diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-06-07 07:32:59 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-06-07 09:18:58 +0200 |
commit | 1ccb4be02b07c3acf7e94a8b84d3178b91d26f55 (patch) | |
tree | 3df5f8f09d47983f8d5e203ae48d18b4e1de6dbd /NEWS | |
parent | 421662ec88797e249ae1eced9e1e1f05ffaf0abe (diff) | |
download | bison-1ccb4be02b07c3acf7e94a8b84d3178b91d26f55.tar.gz |
cex: reformat the s/r and r/r reports
In Bison we refer to "shift/reduce" conflicts, not "shift-reduce" (in
Bison 3.6.3 186 occurrences vs 15). Enforce consistency on this.
Instead of "spending" a second line for each conflict to report the
lookaheads, put that on the same line as the type of conflict. Also,
prefer "token" to "symbol". Maybe we should even prefer "lookahead".
While at it, enable internationalization, with plurals where
appropriate.
As a consequence, instead of
Shift-Reduce Conflict:
6: 3 b: . %empty
6: 6 d: c . A
On Symbol: A
display
Shift/reduce conflict on token A:
6: 3 b: . %empty
6: 6 d: c . A
* NEWS, doc/bison.texi, src/conflicts.c: Spell it "shift/reduce", not
"shift-reduce".
* src/counterexample.c (counterexample_report_shift_reduce)
(counterexample_report_reduce_reduce): Reformat and internationalize
output.
* tests/counterexample.at: Adjust expectations.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -848,11 +848,11 @@ GNU Bison NEWS ... - Looking at the output from -v, one can see that the shift-reduce conflict + Looking at the output from -v, one can see that the shift/reduce conflict here is due to the fact that the parser does not know whether to reduce arguments to argument_list until it sees the token _after_ the following ','. By marking the rule with %expect 1 (because there is a conflict in - one state), we document the source of the 1 overall shift-reduce conflict. + one state), we document the source of the 1 overall shift/reduce conflict. In GLR parsers, we can use %expect-rr in a rule for reduce/reduce conflicts. In this case, we mark each of the conflicting rules. For @@ -967,7 +967,7 @@ GNU Bison NEWS ** Bug fixes -*** Incorrect number of reduce-reduce conflicts +*** Incorrect number of reduce/reduce conflicts On a grammar such as |