|Need help with grammars! email@example.com (1998-04-15)|
|Re: Need help with grammars! firstname.lastname@example.org (John Williams) (1998-04-21)|
|Re: Need help with grammars! email@example.com (Torben Mogensen) (1998-05-07)|
|Date:||15 Apr 1998 23:29:52 -0400|
|Organization:||Deja News - The Leader in Internet Discussion|
|Keywords:||parse, Java, comment|
This is propably real basic stuff. I'm using java_cup and have the
lvalue ::= id | id [ exp ] | lvalue . lvalue
exp ::= id ( functargs )
exp ::= id [ arrayinit ]
exp ::= lvalue
exp ::= lvalue := exp
exp ::= exp + exp
There are semantic actions attached to each production which I omitted. I get
ambiguity warnings when running java_cup since it dont know if it should
shift id (exp ::= id (.. | exp ::= id [ ..) or reduce (lvalue ::= id).
Perhaps I'm all wrong when using the lvalue ::= construct?
[That's what I'd say. How's it supposed to tell id [ arrayinit ] from
id [ exp ] ? -John]
Return to the
Search the comp.compilers archives again.