Joe Wilson <[EMAIL PROTECTED]> wrote:
>The following grammar may be clearer to you:
Yes, it is many thanks! I believe I am making progress! At least I can see the
picture much clearer now and was able to come up with the following grammar
with just one conflict unsolved:
%left NEWLINE.
--- Ralf Junker <[EMAIL PROTECTED]> wrote:
> > paragraph ::= PARA text.
>
> I observed the new PARA terminal token (the clear separator!?). Unfortunately
> the lexer does not
> generate such a token. Paragraph repeats are also removed.
It was just an HTML-like example. I just wanted to demonstr
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
--- 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 N
I am trying to write a Wiki parser with Lemon. The Lemon features suite my
needs perfectly, but I am unfortunately stuck with the problem of parsing
conflicts.
All conflicts seem caused by repeat constructs like this:
text ::= textpiece.
text ::= text textpiece.
The complete grammar follow
5 matches
Mail list logo