* src/reduce.c (reduce_output): Formatting changes.

* src/print.c (print_results, print_grammar): Likewise.
* tests/regression.at (Rule Line Numbers)
(Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
This commit is contained in:
Akim Demaille
2001-11-30 10:49:01 +00:00
parent 760b53a84b
commit d2d1b42b07
6 changed files with 59 additions and 31 deletions

View File

@@ -63,12 +63,14 @@ AT_CHECK([bison input.y -o input.c -v], 0, [],
AT_CHECK([cat input.output], [],
[[State 4 contains 1 shift/reduce conflict.
Grammar
Number, Line, Rule
1 3 exp -> exp OP exp
2 3 exp -> NUM
Terminals, with rules where they appear
$ (-1)
@@ -76,6 +78,7 @@ error (256)
NUM (257) 2
OP (258) 1
Nonterminals, with rules where they appear
exp (5)
@@ -138,6 +141,8 @@ state 5
state 6
$default accept
]])
AT_CLEANUP
@@ -162,12 +167,14 @@ AT_CHECK([bison input.y -o input.c -v], 0, [], [])
AT_CHECK([cat input.output], [],
[[Conflict in state 4 between rule 1 and token OP resolved as shift.
Grammar
Number, Line, Rule
1 4 exp -> exp OP exp
2 4 exp -> NUM
Terminals, with rules where they appear
$ (-1)
@@ -175,6 +182,7 @@ error (256)
NUM (257) 2
OP (258) 1
Nonterminals, with rules where they appear
exp (5)
@@ -236,6 +244,8 @@ state 5
state 6
$default accept
]])
AT_CLEANUP
@@ -283,8 +293,7 @@ AT_CHECK([bison input.y -o input.c -v], 0, [], [])
# Check the contents of the report.
AT_CHECK([cat input.output], [],
[[
Grammar
[[Grammar
Number, Line, Rule
1 2 @1 -> /* empty */
@@ -292,6 +301,7 @@ Grammar
3 15 @2 -> /* empty */
4 15 expr -> @2 'c'
Terminals, with rules where they appear
$ (-1)
@@ -300,6 +310,7 @@ $ (-1)
'c' (99) 4
error (256)
Nonterminals, with rules where they appear
expr (6)
@@ -378,6 +389,8 @@ state 7
state 8
$default accept
]])
AT_CLEANUP