]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
* data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
[bison.git] / tests / input.at
index 12561892e1431979a9274c50b2d35fa406ca87fe..d0bdcbdd61b9a2b2e36c47b574d7a91a4cefe70f 100644 (file)
@@ -714,6 +714,7 @@ AT_DATA([input-c.y],
 [[%code q {}
 %code bad {}
 %code bad {}
+%code format {}
 %%
 start: ;
 ]])
@@ -721,6 +722,7 @@ AT_CHECK([[bison input-c.y]], [0], [],
 [[input-c.y:1.7: warning: %code qualifier `q' is not used
 input-c.y:2.7-9: warning: %code qualifier `bad' is not used
 input-c.y:3.7-9: warning: %code qualifier `bad' is not used
+input-c.y:4.7-12: warning: %code qualifier `format' is not used
 ]])
 
 AT_DATA([input-c-glr.y],
@@ -809,7 +811,9 @@ start: ;
 
 AT_CHECK([[bison input.y]], [0], [],
 [[input.y:2.9-11: warning: %define variable `var' redefined
+input.y:1.9-11: warning: previous definition
 input.y:3.10-12: warning: %define variable `var' redefined
+input.y:2.9-11: warning: previous definition
 input.y:1.9-11: warning: %define variable `var' is not used
 input.y:2.9-11: warning: %define variable `var' is not used
 input.y:3.10-12: warning: %define variable `var' is not used
@@ -818,3 +822,23 @@ input.y:5.9-16: warning: %define variable `special2' is not used
 ]])
 
 AT_CLEANUP
+
+## --------------------------- ##
+## Boolean %define variables.  ##
+## --------------------------- ##
+
+AT_SETUP([Boolean %define variables])
+
+AT_DATA([Input.y],
+[[%language "Java"
+%define public "maybe"
+%define parser_class_name "Input"
+%%
+start: ;
+]])
+
+AT_CHECK([[bison Input.y]], [1], [],
+[[Input.y:2.9-14: invalid value for %define boolean variable `public'
+]])
+
+AT_CLEANUP