]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
maint: use announce-gen's new --mail-headers.
[bison.git] / tests / input.at
index be84f9cf37a47db0d6fee706cf414346a10d02c4..c65f63b5055c0e0860a072950fe8670ed910ee43 100644 (file)
@@ -1,6 +1,7 @@
 # Checking the Bison scanner.                    -*- Autotest -*-
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software
-# Foundation, Inc.
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free
+# Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -702,6 +703,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.  ##
 ## -------------------------------- ##