[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

P.S. Grammar for SIGNS




Dear friends,

on July 5th, I wrote:
   The grammar produces shift-reduce conflicts conerning
   the { } within SIGNS. I have therefore redesigned it as follows:

   SIGNS ::= NO_BRACKET_SIGNS


   PLACE-TOKEN-ID  ::= PLACE TOKEN-ID
                     | PLACE
                     | { ID }
                     | [ ID ]
                     | { }
                     | [ ]

   This works quite well (though there are still conflicts).
   
A drawback of this proposal is that the language is changed
slightly, i.e. __{hello}__ and __{good}{bye}__ are now legal IDs,
while {}+ and {}+__ are no longer legal IDs. (Thanks to
Peter Mosses for pointing this out.)
Indeed, the problem of finding an LALR(1) grammar that
produces exactly or nearly the same syntax for IDs as descirbed
in the summary is not so easy. Frederic Voisin currently tries
to make the grammar LALR(1).
Let me stress that in any case alternative syntaxes for ID 
will differ from the current summary only in a few cases,
all of which are relatively peculiar and therefore probably
extremly seldomly used.

Greetings,
Till
-----------------------------------------------------------------------------
Till Mossakowski                Phone +49-421-218-4683, monday: +49-4252-1859
Dept. of Computer Science       Fax +49-421-218-3054
University of Bremen            till@informatik.uni-bremen.de           
P.O.Box 330440, D-28334 Bremen  http://www.informatik.uni-bremen.de/~till
-----------------------------------------------------------------------------