Many thanks, Joe, >Your grammar is ambiguous. The text tokens run together for >various rules because the grammar lacks clear separators between >them.
OK, I begin to understand. The "clear separators" need to be TERMINALs, right? I believed that these were imlicit because there are TEXT and LINK after all text tokens are fully expanded. Therefore I thought that the grammar would not be ambiguous. >You can fix it a million ways by altering your grammar. Thanks for the suggestions - I can see that they do not generate conflicts, but they certainly alter the 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. I observed the new PARA terminal token (the clear separator!?). Unfortunately the lexer does not generate such a token. Paragraph repeats are also removed. >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. This one also removes paragraph repeats, doesn't it? Unfortunately paragraphs need to repeat for my grammar. Is there a way to achieve this without conflicts? >Lemon generates an .out file for the .y file processed. >You can examine it for errors. I have tried to make sense of the .out file before. It tells me where to look for the problem, but not how to fix it ... I am sorry to appear stupid, but I still can not make sense of it all. Can someone still help, please? Ralf ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------