summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-05-04 18:45:30 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-05-08 09:11:37 +0200
commitcd569290979820edc65066d576b851d095bad6de (patch)
tree1dd7907fdb25306f510e2117bd01253d955f0160 /tests
parent7aa38561f71d44dac3697324dd2d19cce74f9170 (diff)
downloadbison-cd569290979820edc65066d576b851d095bad6de.tar.gz
tests: use %empty instead of comments
* tests/c++.at, tests/glr-regression.at: here.
Diffstat (limited to 'tests')
-rw-r--r--tests/c++.at2
-rw-r--r--tests/conflicts.at10
-rw-r--r--tests/glr-regression.at6
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/c++.at b/tests/c++.at
index fc843c92..e2e73fc2 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -893,7 +893,7 @@ error-reduce:
consistent-error:
'a'
-| /*empty*/ %prec 'a'
+| %empty %prec 'a'
;
// Provide another context in which all rules are useful so that this
diff --git a/tests/conflicts.at b/tests/conflicts.at
index 44edb0bf..444e2c99 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -278,17 +278,17 @@ AT_DATA([[input.y]],
[[%expect 1
%%
exp: e 'e';
-e: 'e' | /* Nothing. */;
+e: 'e' | %empty;
]])
AT_BISON_CHECK([-o input.c input.y], 0, [],
-[[input.y:4.9: warning: rule useless in parser due to conflicts [-Wother]
+[[input.y:4.10-15: warning: rule useless in parser due to conflicts [-Wother]
]])
AT_BISON_CHECK([-fcaret -o input.c input.y], 0, [],
-[[input.y:4.9: warning: rule useless in parser due to conflicts [-Wother]
- 4 | e: 'e' | /* Nothing. */;
- | ^
+[[input.y:4.10-15: warning: rule useless in parser due to conflicts [-Wother]
+ 4 | e: 'e' | %empty;
+ | ^~~~~~
]])
AT_CLEANUP
diff --git a/tests/glr-regression.at b/tests/glr-regression.at
index b80ea2d1..1d4a5581 100644
--- a/tests/glr-regression.at
+++ b/tests/glr-regression.at
@@ -591,7 +591,7 @@ AT_DATA_GRAMMAR([glr-regr7.y],
start:
stack1 start
| stack2 start
- | /* empty */
+ | %empty
;
stack1: 'a' ;
stack2: 'a' ;
@@ -680,11 +680,11 @@ InterfaceDeclaration : OptConstantWord %dprec 1
| OptSignalWord %dprec 2
;
-OptConstantWord : /* empty */
+OptConstantWord : %empty
| T_CONSTANT
;
-OptSignalWord : /* empty */
+OptSignalWord : %empty
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
| T_SIGNAL
;