|Reduce/Reduce Conflict ? firstname.lastname@example.org (Ashwin) (2003-02-21)|
|Re: Reduce/Reduce Conflict ? matt@NOSPAMbeastrider.com (Matt) (2003-02-24)|
|Re: Reduce/Reduce Conflict ? email@example.com (Scott Nicol) (2003-02-24)|
|Re: Reduce/Reduce Conflict ? firstname.lastname@example.org (SLK Parsers) (2003-03-02)|
|Date:||24 Feb 2003 13:51:55 -0500|
|Posted-Date:||24 Feb 2003 13:51:54 EST|
> The Grammar is as follows:
> | CastExpression
> OPENPAREN Expression CLOSEPAREN
> OPENPAREN Type CLOSEPAREN IDENTIFIER
Either use bison with %glr-parser or flatten parenthesizedexpression and
castexpressiion to be a single rule and manually decide if it's a cast
or not later on. Your resulting grammar will be a mess. This is the
great ugly with lalr(1) parsers.
Would it be possible to build a tool that would take a grammar like this
and rewrite the rules, or at least try and rewrite the rules, to remove
these kinds of problems?
Return to the
Search the comp.compilers archives again.