[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cex: enforce case for tokens/nonterminals
From: |
Akim Demaille |
Subject: |
cex: enforce case for tokens/nonterminals |
Date: |
Sun, 7 Jun 2020 08:31:53 +0200 |
commit cb86459809b1c5e77f6be4764ed68d382cf958f3
Author: Akim Demaille <akim.demaille@gmail.com>
Date: Sun Jun 7 08:25:53 2020 +0200
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.
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]
]])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cex: enforce case for tokens/nonterminals,
Akim Demaille <=