]> git.saurik.com Git - bison.git/blobdiff - tests/regression.at
Pass the token type to yysyntax_error.
[bison.git] / tests / regression.at
index cb9cd9a461ea70116f5de157ebf6fe589fb178c9..cf6534607d17b590f32a101967f4a44a9a7c999f 100644 (file)
@@ -1246,3 +1246,25 @@ AT_COMPILE([[input]])
 AT_PARSER_CHECK([[./input]])
 
 AT_CLEANUP
 AT_PARSER_CHECK([[./input]])
 
 AT_CLEANUP
+
+
+
+## --------------------------- ##
+## parse-gram.y: LALR = IELR.  ##
+## --------------------------- ##
+
+# If parse-gram.y's LALR and IELR parser tables ever begin to differ, we
+# need to fix parse-gram.y or start using IELR.
+
+AT_SETUP([[parse-gram.y: LALR = IELR]])
+
+# Avoid differences in synclines by telling bison that the output files
+# have the same name.
+[cp $abs_top_srcdir/src/parse-gram.y input.y]
+AT_BISON_CHECK([[-o input.c -Dlr.type=lalr input.y]])
+[mv input.c lalr.c]
+AT_BISON_CHECK([[-o input.c -Dlr.type=ielr input.y]])
+[mv input.c ielr.c]
+AT_CHECK([[diff -u lalr.c ielr.c]])
+
+AT_CLEANUP