Re: EBNF conflict avoidance

"Clint Olsen" <clint@0lsen.net>
24 Nov 2002 01:25:47 -0500

          From comp.compilers

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)
| List of all articles for this month |

From: "Clint Olsen" <clint@0lsen.net>
Newsgroups: comp.compilers
Date: 24 Nov 2002 01:25:47 -0500
Organization: AT&T Broadband
References: 02-11-118
Keywords: parse, LL(1)
Posted-Date: 24 Nov 2002 01:25:47 EST

SLK Parsers wrote:
> 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?


I think you need to consider the fact that you're not naive when it
comes to LL(1) parsing. EBNF saves you from the traditional crap
like:


list : item more_items
          ;


more_items : item
                      |
                      ;


Whereas you'd rather write:


list : items+
          ;


So, I think when they say conflicts I think they are also including
accidental use of left recursion.


-Clint


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.