|CUP Grammar email@example.com (Joshua Franco) (2007-02-25)|
|Re: CUP Grammar firstname.lastname@example.org (Chris Dodd) (2007-02-26)|
|From:||Chris Dodd <email@example.com>|
|Date:||26 Feb 2007 09:26:13 -0500|
|Posted-Date:||26 Feb 2007 09:26:13 EST|
Joshua Franco <firstname.lastname@example.org> wrote in news:email@example.com:
> I am having a bitch of a time with a grammar that I could swear is
> perfect but seems to be horribly wrong.
The basic problem is that your grammar is not LALR(1) (its even ambigous,
though the obvious ambiguities can be solved with precendeces). You need
to carefully check out each of the conflicts that CUP reports for your
grammar and figure out how to get rid of them.
The biggest problem is going to be disambiguating between 'type ::= ID
LBRACKET RBRACKET' and the lvalue rules.
Return to the
Search the comp.compilers archives again.