exp: exp OP exp | NUM;
]])
-AT_CHECK([bison input.y -o input.c -v], 0, [],
+AT_CHECK([bison input.y -o input.c --report=all], 0, [],
[input.y contains 1 shift/reduce conflict.
])
state 0
$axiom -> . exp $ (rule 0)
+ exp -> . exp OP exp (rule 1)
+ exp -> . NUM (rule 2)
NUM shift, and go to state 1
state 4
+ exp -> . exp OP exp (rule 1)
exp -> exp OP . exp (rule 1)
+ exp -> . NUM (rule 2)
NUM shift, and go to state 1
state 5
- exp -> exp . OP exp (rule 1)
- exp -> exp OP exp . (rule 1)
+ exp -> exp . OP exp [$, OP] (rule 1)
+ exp -> exp OP exp . [$, OP] (rule 1)
OP shift, and go to state 4
exp: exp OP exp | NUM;
]])
-AT_CHECK([bison input.y -o input.c -v], 0, [], [])
+AT_CHECK([bison input.y -o input.c --report=all], 0, [], [])
# Check the contents of the report.
AT_CHECK([cat input.output], [],
-[[Conflict in state 5 between rule 2 and token OP resolved as shift.
-
-
-Grammar
+[[Grammar
Number, Line, Rule
0 4 $axiom -> exp $
state 0
$axiom -> . exp $ (rule 0)
+ exp -> . exp OP exp (rule 1)
+ exp -> . NUM (rule 2)
NUM shift, and go to state 1
state 4
+ exp -> . exp OP exp (rule 1)
exp -> exp OP . exp (rule 1)
+ exp -> . NUM (rule 2)
NUM shift, and go to state 1
state 5
- exp -> exp . OP exp (rule 1)
- exp -> exp OP exp . (rule 1)
+ exp -> exp . OP exp [$] (rule 1)
+ exp -> exp OP exp . [$] (rule 1)
OP shift, and go to state 4
$default reduce using rule 1 (exp)
+ Conflict between rule 2 and token OP resolved as reduce (%right OP).
]])