|Problem solving shift/reduce conflict firstname.lastname@example.org (Ashwin) (2003-01-04)|
|Re: Problem solving shift/reduce conflict email@example.com (Chris Dodd) (2003-01-07)|
|Re: Problem solving shift/reduce conflict firstname.lastname@example.org (2003-01-07)|
|Date:||4 Jan 2003 22:45:20 -0500|
|Posted-Date:||04 Jan 2003 22:45:20 EST|
I am trying to remove all the shift/reduce, reduce/reduce
problems from my C# grammar. There is one shift/reduce
problem I am stumped on. I would appreciate if someone
can tell me how to fix the problem. I don't even understand
why bison says that there is a shift/reduce problem.
The grammar (just four simple rules) and the
partial bison output follows.
Thank you in advance for your help.
The following is my (simplified) grammar. The
starting point is ArrayType.
| RankSpecifiers RankSpecifier
The following is my partial listing using -v option of bison where the
shift/reduce conflict is listed
ArrayType -> ReferenceType RankSpecifiers . (rule 26)
RankSpecifiers -> RankSpecifiers . RankSpecifier (rule 28)
LEFTBRACKET shift, and go to state 6
LEFTBRACKET [reduce using rule 26 (ArrayType)]
$default reduce using rule 26 (ArrayType)
RankSpecifier go to state 10
RankSpecifier -> LEFTBRACKET . RIGHTBRACKET (rule 29)
RIGHTBRACKET shift, and go to state 9
Return to the
Search the comp.compilers archives again.