|CUP Grammar firstname.lastname@example.org (Joshua Franco) (2007-02-25)|
|Re: CUP Grammar email@example.com (Chris Dodd) (2007-02-26)|
|From:||Chris Dodd <firstname.lastname@example.org>|
|Date:||26 Feb 2007 09:26:13 -0500|
|Posted-Date:||26 Feb 2007 09:26:13 EST|
Joshua Franco <email@example.com> wrote in news:firstname.lastname@example.org:
> 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.