More fixes related to last two patches.
[bison.git] / tests / conflicts.at
index 28a1c82c0fababee47c0e16ad8a1f5ddc361660c..f2f7861c4196ab9d5b4983aa992f921797a1364d 100644 (file)
@@ -1,6 +1,7 @@
 # Exercising Bison on conflicts.                         -*- Autotest -*-
 
-# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009 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
@@ -98,20 +99,17 @@ AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 
 AT_PARSER_CHECK([./input '0<0'])
-# FIXME: This is an actual bug, but a new one, in the sense that
-# no one has ever spotted it!  The messages are *wrong*: there should
-# be nothing there, it should be expected eof.
 AT_PARSER_CHECK([./input '0<0<0'], [1], [],
-         [syntax error, unexpected '<', expecting '<' or '>'
+         [syntax error, unexpected '<'
 ])
 
 AT_PARSER_CHECK([./input '0>0'])
 AT_PARSER_CHECK([./input '0>0>0'], [1], [],
-         [syntax error, unexpected '>', expecting '<' or '>'
+         [syntax error, unexpected '>'
 ])
 
 AT_PARSER_CHECK([./input '0<0>0'], [1], [],
-         [syntax error, unexpected '>', expecting '<' or '>'
+         [syntax error, unexpected '>'
 ])
 
 AT_CLEANUP
@@ -579,9 +577,9 @@ input.y: expected 2 shift/reduce conflicts
 AT_CLEANUP
 
 
-## ------------------------------ ##
-## %expect with reduce conflicts  ##
-## ------------------------------ ##
+## ------------------------------- ##
+## %expect with reduce conflicts.  ##
+## ------------------------------- ##
 
 AT_SETUP([%expect with reduce conflicts])
 
@@ -599,9 +597,26 @@ input.y: expected 0 reduce/reduce conflicts
 AT_CLEANUP
 
 
-## ------------------------------- ##
-## %no-default-prec without %prec  ##
-## ------------------------------- ##
+## ------------------------- ##
+## %prec with user strings.  ##
+## ------------------------- ##
+
+AT_SETUP([%prec with user string])
+
+AT_DATA([[input.y]],
+[[%%
+exp:
+  "foo" %prec "foo"
+;
+]])
+
+AT_BISON_CHECK([-o input.c input.y])
+AT_CLEANUP
+
+
+## -------------------------------- ##
+## %no-default-prec without %prec.  ##
+## -------------------------------- ##
 
 AT_SETUP([%no-default-prec without %prec])
 
@@ -625,9 +640,9 @@ AT_BISON_CHECK([-o input.c input.y], 0, [],
 AT_CLEANUP
 
 
-## ---------------------------- ##
-## %no-default-prec with %prec  ##
-## ---------------------------- ##
+## ----------------------------- ##
+## %no-default-prec with %prec.  ##
+## ----------------------------- ##
 
 AT_SETUP([%no-default-prec with %prec])
 
@@ -649,9 +664,9 @@ AT_BISON_CHECK([-o input.c input.y])
 AT_CLEANUP
 
 
-## ---------------- ##
-## %default-prec    ##
-## ---------------- ##
+## --------------- ##
+## %default-prec.  ##
+## --------------- ##
 
 AT_SETUP([%default-prec])
 
@@ -869,7 +884,7 @@ state 7
 ]])
 
 AT_DATA([[input-keep.y]],
-[[%define lr.keep_unreachable_states
+[[%define lr.keep-unreachable-states
 ]])
 AT_CHECK([[cat input.y >> input-keep.y]])