I got message from yacc as follows
Now the figure "2", does it refer to state 2 or grammar 2 in y.output?Code:$yacc -v parser.y
conflicts: 2 reduce/reduce
Printable View
I got message from yacc as follows
Now the figure "2", does it refer to state 2 or grammar 2 in y.output?Code:$yacc -v parser.y
conflicts: 2 reduce/reduce
I guess it refers to state 2
Doesn't the conflict message says that input: program . $end, can be reduced into two different "right hand side"s: $accept and what is the other one?Code:state 2
0 $accept: program . $end
$end shift, and go to state 4
Why doesn't my conflict message say it more clearly like the following example from a website?
Code:5: reduce/reduce conflict (reduce 3, reduce 4) on c
state 5
B : x y . (3)
E : x y . (4)
It refers to state 2, I believe. Down below, you ought to be able to look at the state machine the grammer generates. When there's a reduce-reduce, you'll have two possible reduce transitions. Your yacc is likely symbolically linked to bison which might explain the different output file.Quote:
Now the figure "2", does it refer to state 2 or grammar 2 in y.output?