]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
maint: prepare to use date ranges in copyright notices.
[bison.git] / tests / input.at
index ab01cbe8ed8a8c33a9810cab6e811f5da073e0c1..6cfa2b120a4a8363d1951b0b2f5def10403c7f2b 100644 (file)
@@ -1,5 +1,6 @@
 # Checking the Bison scanner.                    -*- Autotest -*-
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 # Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -794,6 +795,26 @@ AT_BISON_CHECK([input.y], [1], [],
 AT_CLEANUP
 
 
+## ------------------------------- ##
+## %prec's token must be defined.  ##
+## ------------------------------- ##
+
+AT_SETUP([[%prec's token must be defined]])
+
+# According to POSIX, a %prec token must be defined separately.
+
+AT_DATA([[input.y]],
+[[%%
+start: %prec PREC ;
+]])
+
+AT_BISON_CHECK([[input.y]], [[0]], [],
+[[input.y:2.8-17: warning: token for %prec is not defined: PREC
+]])
+
+AT_CLEANUP
+
+
 ## -------------------------------- ##
 ## Reject unused %code qualifiers.  ##
 ## -------------------------------- ##
@@ -1268,3 +1289,26 @@ input.y:5.19: invalid character after \-escape: \001
 ]])
 
 AT_CLEANUP
+
+## ------------------------- ##
+## LAC: Errors for %define.  ##
+## ------------------------- ##
+
+AT_SETUP([[LAC: Errors for %define]])
+
+AT_DATA([[input.y]],
+[[%%
+start: ;
+]])
+
+# parse.lac.* options are useless if LAC isn't actually activated.
+AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 input.y]],
+               [[1]], [],
+[[<command line>:2: %define variable `parse.lac.es-capacity-initial' is not used
+]])
+AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]],
+               [[1]], [],
+[[<command line>:2: %define variable `parse.lac.memory-trace' is not used
+]])
+
+AT_CLEANUP