]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
symtab: refactoring
[bison.git] / tests / input.at
index d94b652ec6cb36cf45b1596e3d087bbee66f4adf..200fa076fa00fed03ac6daaa101c6075b5046333 100644 (file)
@@ -271,6 +271,28 @@ input.y:5.10-24: previous declaration
 
 AT_CLEANUP
 
+## ----------------------------------------------------- ##
+## Undeclared symbols used for a printer or destructor.  ##
+## ----------------------------------------------------- ##
+
+AT_SETUP([Undeclared symbols used for a printer or destructor])
+
+AT_DATA([[input.y]],
+[[%printer {} foo baz
+%destructor {} bar
+
+%%
+exp: bar;
+]])
+
+AT_BISON_CHECK([input.y], [1], [],
+[[input.y:2.16-18: symbol bar is used, but is not defined as a token and has no rules
+input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules
+input.y:1.13-15: warning: symbol foo is used, but is not defined as a token and has no rules
+]])
+
+AT_CLEANUP
+
 
 ## ---------------------------------------- ##
 ## Unused values with default %destructor.  ##