diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-06-07 08:25:53 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-06-07 09:18:58 +0200 |
commit | 296e2f90ab3315732e25ce38687954646f5a86e1 (patch) | |
tree | 6b03a66ff6a2cc5e5f2e97dcc38b5247d1b41396 /tests/counterexample.at | |
parent | 1ccb4be02b07c3acf7e94a8b84d3178b91d26f55 (diff) | |
download | bison-296e2f90ab3315732e25ce38687954646f5a86e1.tar.gz |
cex: enforce case for tokens/nonterminals
It's unfortunate that the traditions between formal language theory
and Yacc differs, but here, tokens should be upper case, and
nonterminals should be lower case.
* tests/counterexample.at: Comply with this.
Diffstat (limited to 'tests/counterexample.at')
-rw-r--r-- | tests/counterexample.at | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/counterexample.at b/tests/counterexample.at index a90cc70d..6d9d5a8e 100644 --- a/tests/counterexample.at +++ b/tests/counterexample.at @@ -530,22 +530,22 @@ AT_SETUP([Deep Null Unifying]) AT_KEYWORDS([cex]) AT_DATA([[input.y]], -[[%token a d +[[%token A D %% -S: a A D | a A A D; -A: B; -B: C -C: %empty -D: d; +s: A a d | A a a d; +a: b; +b: c +c: %empty +d: D; ]]) AT_BISON_CHECK_CEX([input.y], [], [], -[[Shift/reduce conflict on token d: -3: 5 C: . %empty -3: 6 D: . d -Example a A • d -First derivation S ::=[ a A A ::=[ B ::=[ C ::=[ • ] ] ] D ::=[ d ] ] -Second derivation S ::=[ a A D ::=[ • d ] ] +[[Shift/reduce conflict on token D: +3: 5 c: . %empty +3: 6 d: . D +Example A a • D +First derivation s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] ] +Second derivation s ::=[ A a d ::=[ • D ] ] input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] ]]) @@ -562,23 +562,23 @@ AT_SETUP([Deep Null Non-unifying]) AT_KEYWORDS([cex]) AT_DATA([[input.y]], -[[%token a d e +[[%token A D E %% -S: a A D | a A A D e; -A: B; -B: C -C: %empty -D: d; +s: A a d | A a a d E; +a: b; +b: c +c: %empty +d: D; ]]) AT_BISON_CHECK_CEX([input.y], [], [], -[[Shift/reduce conflict on token d: -3: 5 C: . %empty -3: 6 D: . d -First Example a A • d e $end -First derivation $accept ::=[ S ::=[ a A A ::=[ B ::=[ C ::=[ • ] ] ] D ::=[ d ] e ] $end ] -Second Example a A • d $end -Second derivation $accept ::=[ S ::=[ a A D ::=[ • d ] ] $end ] +[[Shift/reduce conflict on token D: +3: 5 c: . %empty +3: 6 d: . D +First Example A a • D E $end +First derivation $accept ::=[ s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] E ] $end ] +Second Example A a • D $end +Second derivation $accept ::=[ s ::=[ A a d ::=[ • D ] ] $end ] input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] ]]) |