From 0498923a17f71656a200a250ab97aded3e8ef6b7 Mon Sep 17 00:00:00 2001 From: jkim Date: Mon, 12 Jan 2015 20:14:31 +0000 Subject: [PATCH] MFC: r274460, r274475 Increase MAXTABLE to the maxmimum possible value and regen test cases. git-svn-id: svn://svn.freebsd.org/base/stable/10@277086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/byacc/test/yacc/calc.tab.c | 2 +- contrib/byacc/test/yacc/calc1.tab.c | 2 +- contrib/byacc/test/yacc/calc2.tab.c | 2 +- contrib/byacc/test/yacc/calc3.tab.c | 2 +- contrib/byacc/test/yacc/code_calc.code.c | 2 +- contrib/byacc/test/yacc/code_calc.tab.c | 2 +- contrib/byacc/test/yacc/code_error.code.c | 2 +- contrib/byacc/test/yacc/code_error.tab.c | 2 +- contrib/byacc/test/yacc/empty.tab.c | 2 +- contrib/byacc/test/yacc/err_syntax10.tab.c | 2 +- contrib/byacc/test/yacc/err_syntax11.tab.c | 2 +- contrib/byacc/test/yacc/err_syntax12.tab.c | 2 +- contrib/byacc/test/yacc/err_syntax18.tab.c | 2 +- contrib/byacc/test/yacc/err_syntax20.tab.c | 2 +- contrib/byacc/test/yacc/error.tab.c | 2 +- contrib/byacc/test/yacc/grammar.tab.c | 2 +- contrib/byacc/test/yacc/ok_syntax1.tab.c | 2 +- contrib/byacc/test/yacc/pure_calc.tab.c | 2 +- contrib/byacc/test/yacc/pure_error.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc-s.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc2-s.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc2.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc3-s.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc3.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc4-s.tab.c | 2 +- contrib/byacc/test/yacc/quote_calc4.tab.c | 2 +- contrib/byacc/test/yacc/rename_debug.c | 2 +- contrib/byacc/test/yacc/varsyntax_calc1.tab.c | 2 +- usr.bin/yacc/Makefile | 7 ++++--- 30 files changed, 33 insertions(+), 32 deletions(-) diff --git a/contrib/byacc/test/yacc/calc.tab.c b/contrib/byacc/test/yacc/calc.tab.c index 762dfa182..ac7240d31 100644 --- a/contrib/byacc/test/yacc/calc.tab.c +++ b/contrib/byacc/test/yacc/calc.tab.c @@ -150,7 +150,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/calc1.tab.c b/contrib/byacc/test/yacc/calc1.tab.c index 7a5f925f9..22967c81c 100644 --- a/contrib/byacc/test/yacc/calc1.tab.c +++ b/contrib/byacc/test/yacc/calc1.tab.c @@ -175,7 +175,7 @@ extern int YYPARSE_DECL(); #define CONST 259 #define UMINUS 260 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc1_lhs[] = { -1, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, diff --git a/contrib/byacc/test/yacc/calc2.tab.c b/contrib/byacc/test/yacc/calc2.tab.c index dc82b8e25..dbd52a186 100644 --- a/contrib/byacc/test/yacc/calc2.tab.c +++ b/contrib/byacc/test/yacc/calc2.tab.c @@ -152,7 +152,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/calc3.tab.c b/contrib/byacc/test/yacc/calc3.tab.c index d13bc1afb..db5d36768 100644 --- a/contrib/byacc/test/yacc/calc3.tab.c +++ b/contrib/byacc/test/yacc/calc3.tab.c @@ -157,7 +157,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/code_calc.code.c b/contrib/byacc/test/yacc/code_calc.code.c index 43291db28..94c86b0b7 100644 --- a/contrib/byacc/test/yacc/code_calc.code.c +++ b/contrib/byacc/test/yacc/code_calc.code.c @@ -160,7 +160,7 @@ typedef int YYSTYPE; #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) extern int YYPARSE_DECL(); -typedef short YYINT; +typedef int YYINT; extern YYINT yylhs[]; extern YYINT yylen[]; extern YYINT yydefred[]; diff --git a/contrib/byacc/test/yacc/code_calc.tab.c b/contrib/byacc/test/yacc/code_calc.tab.c index e72fa8421..428375dbf 100644 --- a/contrib/byacc/test/yacc/code_calc.tab.c +++ b/contrib/byacc/test/yacc/code_calc.tab.c @@ -1,4 +1,4 @@ -typedef short YYINT; +typedef int YYINT; const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/code_error.code.c b/contrib/byacc/test/yacc/code_error.code.c index 38d3e5866..a52d316a4 100644 --- a/contrib/byacc/test/yacc/code_error.code.c +++ b/contrib/byacc/test/yacc/code_error.code.c @@ -152,7 +152,7 @@ typedef int YYSTYPE; #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) extern int YYPARSE_DECL(); -typedef short YYINT; +typedef int YYINT; extern YYINT yylhs[]; extern YYINT yylen[]; extern YYINT yydefred[]; diff --git a/contrib/byacc/test/yacc/code_error.tab.c b/contrib/byacc/test/yacc/code_error.tab.c index 9296aa5b1..d394ad808 100644 --- a/contrib/byacc/test/yacc/code_error.tab.c +++ b/contrib/byacc/test/yacc/code_error.tab.c @@ -1,4 +1,4 @@ -typedef short YYINT; +typedef int YYINT; const YYINT error_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/empty.tab.c b/contrib/byacc/test/yacc/empty.tab.c index da0c4be7a..d211255b8 100644 --- a/contrib/byacc/test/yacc/empty.tab.c +++ b/contrib/byacc/test/yacc/empty.tab.c @@ -144,7 +144,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT empty_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/err_syntax10.tab.c b/contrib/byacc/test/yacc/err_syntax10.tab.c index a3b450960..ec244c99e 100644 --- a/contrib/byacc/test/yacc/err_syntax10.tab.c +++ b/contrib/byacc/test/yacc/err_syntax10.tab.c @@ -134,7 +134,7 @@ static void yyerror(const char *); extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax10_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/err_syntax11.tab.c b/contrib/byacc/test/yacc/err_syntax11.tab.c index ebb065f45..46e5d2e35 100644 --- a/contrib/byacc/test/yacc/err_syntax11.tab.c +++ b/contrib/byacc/test/yacc/err_syntax11.tab.c @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax11_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/err_syntax12.tab.c b/contrib/byacc/test/yacc/err_syntax12.tab.c index 784a45ffe..5afd3d135 100644 --- a/contrib/byacc/test/yacc/err_syntax12.tab.c +++ b/contrib/byacc/test/yacc/err_syntax12.tab.c @@ -141,7 +141,7 @@ extern int YYPARSE_DECL(); #define text 456 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax12_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/err_syntax18.tab.c b/contrib/byacc/test/yacc/err_syntax18.tab.c index fb7b06c40..5b7bef787 100644 --- a/contrib/byacc/test/yacc/err_syntax18.tab.c +++ b/contrib/byacc/test/yacc/err_syntax18.tab.c @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax18_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/err_syntax20.tab.c b/contrib/byacc/test/yacc/err_syntax20.tab.c index 85ea1ba90..690daefa3 100644 --- a/contrib/byacc/test/yacc/err_syntax20.tab.c +++ b/contrib/byacc/test/yacc/err_syntax20.tab.c @@ -135,7 +135,7 @@ extern int YYPARSE_DECL(); #define recur 257 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT err_syntax20_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/error.tab.c b/contrib/byacc/test/yacc/error.tab.c index e7aa39508..df363825f 100644 --- a/contrib/byacc/test/yacc/error.tab.c +++ b/contrib/byacc/test/yacc/error.tab.c @@ -140,7 +140,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT error_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/grammar.tab.c b/contrib/byacc/test/yacc/grammar.tab.c index e78f18815..8dc8cf933 100644 --- a/contrib/byacc/test/yacc/grammar.tab.c +++ b/contrib/byacc/test/yacc/grammar.tab.c @@ -453,7 +453,7 @@ extern int YYPARSE_DECL(); #define T_ASMARG 290 #define T_VA_DCL 291 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT grammar_lhs[] = { -1, 0, 0, 26, 26, 27, 27, 27, 27, 27, 27, 27, 31, 30, 30, 28, 28, 34, 28, 32, 32, diff --git a/contrib/byacc/test/yacc/ok_syntax1.tab.c b/contrib/byacc/test/yacc/ok_syntax1.tab.c index 94d67d93b..0446ec57c 100644 --- a/contrib/byacc/test/yacc/ok_syntax1.tab.c +++ b/contrib/byacc/test/yacc/ok_syntax1.tab.c @@ -178,7 +178,7 @@ extern int YYPARSE_DECL(); #define VT 272 #define UMINUS 273 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT ok_syntax1_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/pure_calc.tab.c b/contrib/byacc/test/yacc/pure_calc.tab.c index 911db408e..3505bc4ff 100644 --- a/contrib/byacc/test/yacc/pure_calc.tab.c +++ b/contrib/byacc/test/yacc/pure_calc.tab.c @@ -160,7 +160,7 @@ extern int YYPARSE_DECL(); #define LETTER 258 #define UMINUS 259 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/pure_error.tab.c b/contrib/byacc/test/yacc/pure_error.tab.c index 0184e924f..41effc117 100644 --- a/contrib/byacc/test/yacc/pure_error.tab.c +++ b/contrib/byacc/test/yacc/pure_error.tab.c @@ -152,7 +152,7 @@ typedef int YYSTYPE; extern int YYPARSE_DECL(); #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT error_lhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/quote_calc-s.tab.c b/contrib/byacc/test/yacc/quote_calc-s.tab.c index 9d4d7bd58..caab24811 100644 --- a/contrib/byacc/test/yacc/quote_calc-s.tab.c +++ b/contrib/byacc/test/yacc/quote_calc-s.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc.tab.c b/contrib/byacc/test/yacc/quote_calc.tab.c index affdbe56d..b01685245 100644 --- a/contrib/byacc/test/yacc/quote_calc.tab.c +++ b/contrib/byacc/test/yacc/quote_calc.tab.c @@ -162,7 +162,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc2-s.tab.c b/contrib/byacc/test/yacc/quote_calc2-s.tab.c index 47b8fd0d3..16de64b65 100644 --- a/contrib/byacc/test/yacc/quote_calc2-s.tab.c +++ b/contrib/byacc/test/yacc/quote_calc2-s.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc2.tab.c b/contrib/byacc/test/yacc/quote_calc2.tab.c index cdf8171f0..f03cfb636 100644 --- a/contrib/byacc/test/yacc/quote_calc2.tab.c +++ b/contrib/byacc/test/yacc/quote_calc2.tab.c @@ -162,7 +162,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc2_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc3-s.tab.c b/contrib/byacc/test/yacc/quote_calc3-s.tab.c index b91c1a14a..f85e6754a 100644 --- a/contrib/byacc/test/yacc/quote_calc3-s.tab.c +++ b/contrib/byacc/test/yacc/quote_calc3-s.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc3.tab.c b/contrib/byacc/test/yacc/quote_calc3.tab.c index ad4fe1ae6..59739980c 100644 --- a/contrib/byacc/test/yacc/quote_calc3.tab.c +++ b/contrib/byacc/test/yacc/quote_calc3.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc3_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc4-s.tab.c b/contrib/byacc/test/yacc/quote_calc4-s.tab.c index 4d1e3d437..643567605 100644 --- a/contrib/byacc/test/yacc/quote_calc4-s.tab.c +++ b/contrib/byacc/test/yacc/quote_calc4-s.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc4_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/quote_calc4.tab.c b/contrib/byacc/test/yacc/quote_calc4.tab.c index a5f047ec8..b8dff595c 100644 --- a/contrib/byacc/test/yacc/quote_calc4.tab.c +++ b/contrib/byacc/test/yacc/quote_calc4.tab.c @@ -156,7 +156,7 @@ extern int YYPARSE_DECL(); #define LETTER 270 #define UMINUS 271 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT quote_calc4_lhs[] = { -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, diff --git a/contrib/byacc/test/yacc/rename_debug.c b/contrib/byacc/test/yacc/rename_debug.c index 520207411..6bdd4a4b2 100644 --- a/contrib/byacc/test/yacc/rename_debug.c +++ b/contrib/byacc/test/yacc/rename_debug.c @@ -16,7 +16,7 @@ #line 17 "rename_debug.c" #include "rename_debug.i" #include "rename_debug.h" -typedef short YYINT; +typedef int YYINT; static const YYINT yylhs[] = { -1, 0, }; diff --git a/contrib/byacc/test/yacc/varsyntax_calc1.tab.c b/contrib/byacc/test/yacc/varsyntax_calc1.tab.c index 49a152781..6094f8b28 100644 --- a/contrib/byacc/test/yacc/varsyntax_calc1.tab.c +++ b/contrib/byacc/test/yacc/varsyntax_calc1.tab.c @@ -176,7 +176,7 @@ extern int YYPARSE_DECL(); #define CONST 259 #define UMINUS 260 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT varsyntax_calc1_lhs[] = { -1, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, diff --git a/usr.bin/yacc/Makefile b/usr.bin/yacc/Makefile index 03f0d0122..5b88311d7 100644 --- a/usr.bin/yacc/Makefile +++ b/usr.bin/yacc/Makefile @@ -10,9 +10,10 @@ PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c mstring.c output.c \ reader.c yaccpar.c symtab.c verbose.c warshall.c -CFLAGS+= -DMIXEDCASE_FILENAMES=1 \ - -DHAVE_FCNTL_H=1 \ - -DHAVE_MKSTEMP=1 +CFLAGS+= -DHAVE_FCNTL_H=1 \ + -DHAVE_MKSTEMP=1 \ + -DMAXTABLE=INT_MAX \ + -DMIXEDCASE_FILENAMES=1 YYPATCH!= cat ${BYACC_SRC}/VERSION CFLAGS+= -DYYPATCH=${YYPATCH} -- 2.45.0