diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-07-11 18:25:49 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-07-11 18:43:46 +0200 |
commit | ee86ea88399ed02243fbceb2704c9ea322a12bf9 (patch) | |
tree | 74dbcd687741fd603a210ff98e9b7182233c4e02 /NEWS | |
parent | a2ad33dca63bf3832c07342ce5d5be591a166a8e (diff) | |
download | bison-ee86ea88399ed02243fbceb2704c9ea322a12bf9.tar.gz |
cex: prefer → to ::=
It does not make a lot of sense to use ::= in our counterexamples,
that's not something that belongs to the Bison "vocabulary". Using
the colon makes sense, but it's too discreet. Let's use the arrow,
which we already use in some reports (HTML and Dot).
* src/gram.h (print_dot_fallback): Generalize into...
(print_fallback): this.
(print_arrow): New.
* src/derivation.c: Use it.
* NEWS, tests/conflicts.at, tests/counterexample.at,
* tests/diagnostics.at, tests/report.at: Adjust.
* doc/bison.texi: Ditto.
Unfortunately the literal `→` is output as `↦`. So we need to use
@arrow.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -45,8 +45,8 @@ GNU Bison NEWS conflict. For example: Example exp '+' exp • '/' exp - First derivation exp ::=[ exp ::=[ exp '+' exp • ] '/' exp ] - Second derivation exp ::=[ exp '+' exp ::=[ exp • '/' exp ] ] + First derivation exp → [ exp → [ exp '+' exp • ] '/' exp ] + Second derivation exp → [ exp '+' exp → [ exp • '/' exp ] ] When Bison is installed with text styling enabled, the example is actually shown twice, with colors highlighting the ambiguity. @@ -57,9 +57,9 @@ GNU Bison NEWS generates two examples that are the same up until the dot: First example expr • ID $end - First derivation $accept ::=[ s ::=[ a ::=[ expr • ] ID ] $end ] + First derivation $accept → [ s → [ a → [ expr • ] ID ] $end ] Second example expr • ID ',' ID $end - Second derivation $accept ::=[ s ::=[ a ::=[ expr ::=[ expr • ID ',' ] ] ID ] $end ] + Second derivation $accept → [ s → [ a → [ expr → [ expr • ID ',' ] ] ID ] $end ] In these cases, the parser usually doesn't have enough lookahead to differentiate the two given examples. |