--- Ralf Junker <[EMAIL PROTECTED]> wrote: > article ::= blocks. > > blocks ::= block. > blocks ::= blocks block. > > block ::= heading. > block ::= paragraph. > > heading ::= HEADING_START text HEADING_END. > heading ::= HEADING_START text. > heading ::= HEADING_START. > > paragraph ::= text NEWLINE. > paragraph ::= paragraph text NEWLINE. > paragraph ::= text. > paragraph ::= paragraph text. > > text ::= textpiece. > text ::= text textpiece. > > textpiece ::= TEXT. > textpiece ::= LINK.
Your grammar is ambiguous. The text tokens run together for various rules because the grammar lacks clear separators between them. You can fix it a million ways by altering your grammar. Here is one way: article ::= blocks. blocks ::= block. blocks ::= blocks block. block ::= heading. block ::= paragraph. heading ::= HEADING_START text HEADING_END. heading ::= HEADING_START text. heading ::= HEADING_START. paragraph ::= PARA text. text ::= textpiece. text ::= text textpiece. textpiece ::= TEXT. textpiece ::= LINK. Here's another: article ::= blocks. blocks ::= block. blocks ::= blocks block. block ::= heading NEWLINE. block ::= paragraph NEWLINE. heading ::= HEADING_START text HEADING_END. heading ::= HEADING_START text. heading ::= HEADING_START. paragraph ::= text. text ::= textpiece. text ::= text textpiece. textpiece ::= TEXT. textpiece ::= LINK. Lemon generates an .out file for the .y file processed. You can examine it for errors. ____________________________________________________________________________________ Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------