mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 18:53:04 +00:00
cex: improve readability of the subsections
Now that the derivation is no longer printed on one line, aligning the example and the derivation is no longer useful. It can actually be harmful, as it makes the overall structure less clear. * src/derivation.h, src/derivation.c (derivation_print_leaves): Remove the `prefix` argument. * src/counterexample.c (print_counterexample): Put the example next to its label. * tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at, * tests/report.at: Adjust.
This commit is contained in:
@@ -864,7 +864,7 @@ State 5
|
||||
shift/reduce conflict on token OP:
|
||||
1 exp: exp OP exp .
|
||||
1 exp: exp . OP exp
|
||||
Example exp OP exp . OP exp
|
||||
Example: exp OP exp . OP exp
|
||||
Shift derivation
|
||||
exp
|
||||
`-> exp OP exp
|
||||
@@ -1212,7 +1212,7 @@ State 1
|
||||
reduce/reduce conflict on token $end:
|
||||
3 num: '0' .
|
||||
4 id: '0' .
|
||||
Example '0' .
|
||||
Example: '0' .
|
||||
First derivation
|
||||
exp
|
||||
`-> num
|
||||
@@ -1767,12 +1767,12 @@ State 4
|
||||
shift/reduce conflict on token 'a':
|
||||
10 reported_conflicts: . %empty
|
||||
8 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a' 'a'
|
||||
First example: resolved_conflict . 'a' 'a'
|
||||
Shift derivation
|
||||
start
|
||||
`-> resolved_conflict reported_conflicts 'a'
|
||||
`-> . 'a'
|
||||
Second example resolved_conflict . 'a'
|
||||
Second example: resolved_conflict . 'a'
|
||||
Reduce derivation
|
||||
start
|
||||
`-> resolved_conflict reported_conflicts 'a'
|
||||
@@ -1781,12 +1781,12 @@ State 4
|
||||
shift/reduce conflict on token 'a':
|
||||
10 reported_conflicts: . %empty
|
||||
9 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a' 'a'
|
||||
First example: resolved_conflict . 'a' 'a'
|
||||
Shift derivation
|
||||
start
|
||||
`-> resolved_conflict reported_conflicts 'a'
|
||||
`-> . 'a'
|
||||
Second example resolved_conflict . 'a'
|
||||
Second example: resolved_conflict . 'a'
|
||||
Reduce derivation
|
||||
start
|
||||
`-> resolved_conflict reported_conflicts 'a'
|
||||
@@ -1806,7 +1806,7 @@ State 5
|
||||
reduce/reduce conflict on token 'a':
|
||||
8 reported_conflicts: 'a' .
|
||||
9 reported_conflicts: 'a' .
|
||||
Example 'a' .
|
||||
Example: 'a' .
|
||||
First derivation
|
||||
reported_conflicts
|
||||
`-> 'a' .
|
||||
@@ -1996,7 +1996,7 @@ AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
|
||||
reduce/reduce conflict on token 'c':
|
||||
12 empty_c2: . %empty
|
||||
13 empty_c3: . %empty
|
||||
Example . 'c'
|
||||
Example: . 'c'
|
||||
First derivation
|
||||
start
|
||||
`-> empty_c2 'c'
|
||||
|
||||
Reference in New Issue
Block a user