Related articles |
---|
EBNF conflict avoidance slk12@earthlink.net (SLK Parsers) (2002-11-20) |
Re: EBNF conflict avoidance clint@0lsen.net (Clint Olsen) (2002-11-24) |
Re: EBNF conflict avoidance slk12@earthlink.net (SLK Parsers) (2002-12-11) |
Re: EBNF conflict avoidance clint@0lsen.net (Clint Olsen) (2002-12-13) |
Re: EBNF conflict avoidance slk12@earthlink.net (SLK Parsers) (2002-12-19) |
From: | "SLK Parsers" <slk12@earthlink.net> |
Newsgroups: | comp.compilers |
Date: | 11 Dec 2002 22:32:23 -0500 |
Organization: | Parsers Inc. |
References: | 02-11-118 02-11-134 |
Keywords: | parse |
Posted-Date: | 11 Dec 2002 22:32:23 EST |
> > The conflict avoidance properties of EBNF LL(k) grammars seem
> > exaggerated. Of the ten LL(1) conflicts in my C grammar, none appear to
> > be avoidable by using EBNF. Can anyone provide references or example
> > grammars that illustrate conflict avoidance by using EBNF in top-down
> > parsing techniques?
>
> So, I think when they say conflicts I think they are also including
> accidental use of left recursion.
I do not see how this would work. Seems like left-recursion and
left-factoring problems can only be avoided by the usual language
transformations. Do you have a reference?
I can see only one relatively obscure LL(k)/strong LL(k) issue, and only for
k>1, since LL(1) is also strong. The conflict is avoided because EBNF
constructs are equivalent to new and unique nonterminals in the grammar. See
http://parsers.org/parsing.html#8 for more explanation.
The SLK parser-generator now supports the EBNF operators [], {}, and {}+.
Separate actions for the null and non-null cases can be specified. This
support provides the conflict avoidance described above.
http://parsers.org/slk
Return to the
comp.compilers page.
Search the
comp.compilers archives again.