i have the following rules and when implementing them with bison i get 5 shift/reduce warnings.
a part of the Rules are:
Type----> BOOL
| INT
| CHAR
| DOUBLE
| ID
| INT '['']'
;
rule: VarDec rule
| VarDec
;
VarDec: Type ID ';'
;
and the Parser.output
give me the warning in this state:
**state 25**
4 rule: VarDec . rule
5 | VarDec .
BOOL shift, and go to state 3
INT shift, and go to state 4
CHAR shift, and go to state 5
DOUBLE shift, and go to state 6
ID shift, and go to state 7
BOOL [reduce using rule 5 (rule)]
INT [reduce using rule 5 (rule)]
CHAR [reduce using rule 5 (rule)]
DOUBLE [reduce using rule 5 (rule)]
ID [reduce using rule 5 (rule)]
$default reduce using rule 5 (rule)
rule go to state 28
VarDec go to state 25
Type go to state 27
can anyone help me how to solve this, i have read many articles but i wasn't able to figure out what's wrong, and thanks in advance to every one... :)