mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
tests: use %empty instead of comments
* tests/c++.at, tests/glr-regression.at: here.
This commit is contained in:
@@ -893,7 +893,7 @@ error-reduce:
|
|||||||
|
|
||||||
consistent-error:
|
consistent-error:
|
||||||
'a'
|
'a'
|
||||||
| /*empty*/ %prec 'a'
|
| %empty %prec 'a'
|
||||||
;
|
;
|
||||||
|
|
||||||
// Provide another context in which all rules are useful so that this
|
// Provide another context in which all rules are useful so that this
|
||||||
|
|||||||
@@ -278,17 +278,17 @@ AT_DATA([[input.y]],
|
|||||||
[[%expect 1
|
[[%expect 1
|
||||||
%%
|
%%
|
||||||
exp: e 'e';
|
exp: e 'e';
|
||||||
e: 'e' | /* Nothing. */;
|
e: 'e' | %empty;
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_BISON_CHECK([-o input.c input.y], 0, [],
|
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, [],
|
AT_BISON_CHECK([-fcaret -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]
|
||||||
4 | e: 'e' | /* Nothing. */;
|
4 | e: 'e' | %empty;
|
||||||
| ^
|
| ^~~~~~
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ AT_DATA_GRAMMAR([glr-regr7.y],
|
|||||||
start:
|
start:
|
||||||
stack1 start
|
stack1 start
|
||||||
| stack2 start
|
| stack2 start
|
||||||
| /* empty */
|
| %empty
|
||||||
;
|
;
|
||||||
stack1: 'a' ;
|
stack1: 'a' ;
|
||||||
stack2: 'a' ;
|
stack2: 'a' ;
|
||||||
@@ -680,11 +680,11 @@ InterfaceDeclaration : OptConstantWord %dprec 1
|
|||||||
| OptSignalWord %dprec 2
|
| OptSignalWord %dprec 2
|
||||||
;
|
;
|
||||||
|
|
||||||
OptConstantWord : /* empty */
|
OptConstantWord : %empty
|
||||||
| T_CONSTANT
|
| T_CONSTANT
|
||||||
;
|
;
|
||||||
|
|
||||||
OptSignalWord : /* empty */
|
OptSignalWord : %empty
|
||||||
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
||||||
| T_SIGNAL
|
| T_SIGNAL
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user