summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2014-03-09 22:05:23 +0000
committerjmmv <jmmv@FreeBSD.org>2014-03-09 22:05:23 +0000
commitfd557a3f40020015b930fdbc600d2244e63842ef (patch)
tree17c2f429840e18803ebc8459ec70ce263d53a752 /tools/regression
parenta82edda523bd2ff7abb01dcc6e8c1f02d6ffb202 (diff)
downloadFreeBSD-src-fd557a3f40020015b930fdbc600d2244e63842ef.zip
FreeBSD-src-fd557a3f40020015b930fdbc600d2244e63842ef.tar.gz
Fix yacc tests so that they run cleanly with prove.
First, change the driver to run the installed yacc instead of the one from /usr/obj (which might not be there), just as we (intend to) do with all other tests. Second, regenerate the expected output files from scratch. Based on visual inspection, the differences seem OK. But this highlights that the tests in here are too fragile and, possibly, useless: we should be testing the behavior of the generated program, not the literal output. Something to be addressed later.
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/usr.bin/yacc/regress.00.out24
-rw-r--r--tools/regression/usr.bin/yacc/regress.01.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.02.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.03.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.04.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.05.out28
-rw-r--r--tools/regression/usr.bin/yacc/regress.06.out28
-rw-r--r--tools/regression/usr.bin/yacc/regress.07.out29
-rw-r--r--tools/regression/usr.bin/yacc/regress.08.out29
-rw-r--r--tools/regression/usr.bin/yacc/regress.09.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.10.out28
-rw-r--r--tools/regression/usr.bin/yacc/regress.11.out29
-rw-r--r--tools/regression/usr.bin/yacc/regress.12.out29
-rw-r--r--tools/regression/usr.bin/yacc/regress.13.out30
-rw-r--r--tools/regression/usr.bin/yacc/regress.14.out30
-rwxr-xr-xtools/regression/usr.bin/yacc/regress.sh30
16 files changed, 204 insertions, 260 deletions
diff --git a/tools/regression/usr.bin/yacc/regress.00.out b/tools/regression/usr.bin/yacc/regress.00.out
index f785627..39a8ca2 100644
--- a/tools/regression/usr.bin/yacc/regress.00.out
+++ b/tools/regression/usr.bin/yacc/regress.00.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -77,10 +78,11 @@ static const short yycheck[] = { -1,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
-"end-of-file",
+"end-of-file","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : rule",
@@ -105,12 +107,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -145,7 +147,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -219,9 +221,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -303,9 +303,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -348,9 +346,7 @@ yyreduce:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.01.out b/tools/regression/usr.bin/yacc/regress.01.out
index cc4845e..8187502 100644
--- a/tools/regression/usr.bin/yacc/regress.01.out
+++ b/tools/regression/usr.bin/yacc/regress.01.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
extern int yylex(void);
static void yyerror(const char *s);
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -152,6 +153,7 @@ static const short yycheck[] = { 40,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -162,7 +164,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -204,12 +206,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -263,7 +265,7 @@ yylex(void)
}
return( c );
}
-#line 266 "/dev/stdout"
+#line 267 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -287,7 +289,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -361,9 +363,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -445,9 +445,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -529,7 +527,7 @@ case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 532 "/dev/stdout"
+#line 529 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -551,9 +549,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.02.out b/tools/regression/usr.bin/yacc/regress.02.out
index c0e7a75..30de536 100644
--- a/tools/regression/usr.bin/yacc/regress.02.out
+++ b/tools/regression/usr.bin/yacc/regress.02.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -55,7 +56,7 @@ typedef union
INTERVAL vval;
} YYSTYPE;
#endif /* !YYSTYPE_IS_DECLARED */
-#line 58 "/dev/stdout"
+#line 59 "/dev/stdout"
/* compatibility with bison */
#ifdef YYPARSE_PARAM
@@ -192,6 +193,7 @@ static const short yycheck[] = { 40,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 260
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -202,7 +204,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,"DREG","VREG","CONST","UMINUS",
+0,0,"DREG","VREG","CONST","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : line",
@@ -254,12 +256,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -402,7 +404,7 @@ vdiv(double a, double b, INTERVAL v)
{
return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo));
}
-#line 405 "/dev/stdout"
+#line 406 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -426,7 +428,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -500,9 +502,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -584,9 +584,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -771,7 +769,7 @@ case 28:
yyval.vval = yystack.l_mark[-1].vval;
}
break;
-#line 774 "/dev/stdout"
+#line 771 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -793,9 +791,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.03.out b/tools/regression/usr.bin/yacc/regress.03.out
index 55ed6ae..a8c9f8c 100644
--- a/tools/regression/usr.bin/yacc/regress.03.out
+++ b/tools/regression/usr.bin/yacc/regress.03.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -28,7 +29,7 @@ int YYLEX_DECL();
static void YYERROR_DECL();
#endif
-#line 31 "/dev/stdout"
+#line 32 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -159,6 +160,7 @@ static const short yycheck[] = { 40,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -169,7 +171,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -206,12 +208,12 @@ int yynerrs;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -270,7 +272,7 @@ YYLEX_DECL()
}
return( c );
}
-#line 273 "/dev/stdout"
+#line 274 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -294,7 +296,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -375,9 +377,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -459,9 +459,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -543,7 +541,7 @@ case 18:
#line 73 "calc3.y"
{ yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 546 "/dev/stdout"
+#line 543 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -565,9 +563,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.04.out b/tools/regression/usr.bin/yacc/regress.04.out
index d9a2006..cd93e86 100644
--- a/tools/regression/usr.bin/yacc/regress.04.out
+++ b/tools/regression/usr.bin/yacc/regress.04.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -27,7 +28,7 @@ int yylex(void);
static void yyerror(const char *s);
#endif
-#line 30 "/dev/stdout"
+#line 31 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -154,6 +155,7 @@ static const short yycheck[] = { 40,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -164,7 +166,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -206,12 +208,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -269,7 +271,7 @@ yylex(void)
}
return( c );
}
-#line 272 "/dev/stdout"
+#line 273 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -293,7 +295,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -367,9 +369,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -451,9 +451,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -535,7 +533,7 @@ case 18:
#line 65 "code_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 538 "/dev/stdout"
+#line 535 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -557,9 +555,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.05.out b/tools/regression/usr.bin/yacc/regress.05.out
index 3f643db..2fbf0d9 100644
--- a/tools/regression/usr.bin/yacc/regress.05.out
+++ b/tools/regression/usr.bin/yacc/regress.05.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -22,7 +23,7 @@ int yylex(void);
static void yyerror(const char *);
#endif
-#line 25 "/dev/stdout"
+#line 26 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -89,10 +90,11 @@ static const short yycheck[] = { 256,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
-"end-of-file",
+"end-of-file","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : S",
@@ -117,12 +119,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -160,7 +162,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
-#line 163 "/dev/stdout"
+#line 164 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -184,7 +186,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -258,9 +260,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -342,9 +342,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -387,9 +385,7 @@ yyreduce:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.06.out b/tools/regression/usr.bin/yacc/regress.06.out
index 1dc80eb..d2305e1 100644
--- a/tools/regression/usr.bin/yacc/regress.06.out
+++ b/tools/regression/usr.bin/yacc/regress.06.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -18,7 +19,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#line 2 "error.y"
int yylex(void);
static void yyerror(const char *);
-#line 21 "/dev/stdout"
+#line 22 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -85,10 +86,11 @@ static const short yycheck[] = { 256,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
-"end-of-file",
+"end-of-file","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : S",
@@ -113,12 +115,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -152,7 +154,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
-#line 155 "/dev/stdout"
+#line 156 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -176,7 +178,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -250,9 +252,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -334,9 +334,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -379,9 +377,7 @@ yyreduce:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.07.out b/tools/regression/usr.bin/yacc/regress.07.out
index de06e38..ae185a0 100644
--- a/tools/regression/usr.bin/yacc/regress.07.out
+++ b/tools/regression/usr.bin/yacc/regress.07.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -114,7 +115,7 @@ yyerror(const char *msg)
{
perror(msg);
}
-#line 117 "/dev/stdout"
+#line 118 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -357,6 +358,7 @@ static const short yycheck[] = { 89,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 319
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -372,6 +374,7 @@ static const char *yyname[] = {
"MAIL","MSND","MSOM","MSAM","MRSQ","MRCP","ALLO","REST","RNFR","RNTO","ABOR",
"DELE","CWD","LIST","NLST","SITE","STAT","HELP","NOOP","MKD","RMD","PWD","CDUP",
"STOU","SMNT","SYST","SIZE","MDTM","UMASK","IDLE","CHMOD","LEXERR",
+"illegal-symbol",
};
static const char *yyrule[] = {
"$accept : cmd_list",
@@ -468,12 +471,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -1008,7 +1011,7 @@ sizecmd(char *filename)
reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]);
}
}
-#line 1011 "/dev/stdout"
+#line 1013 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -1032,7 +1035,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -1106,9 +1109,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -1190,9 +1191,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -1851,7 +1850,7 @@ case 73:
}
}
break;
-#line 1854 "/dev/stdout"
+#line 1852 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -1873,9 +1872,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.08.out b/tools/regression/usr.bin/yacc/regress.08.out
index c86f19f..d5d3ae0 100644
--- a/tools/regression/usr.bin/yacc/regress.08.out
+++ b/tools/regression/usr.bin/yacc/regress.08.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -302,7 +303,7 @@ haveAnsiParam (void)
}
return FALSE;
}
-#line 305 "/dev/stdout"
+#line 306 "/dev/stdout"
/* compatibility with bison */
#ifdef YYPARSE_PARAM
@@ -660,6 +661,7 @@ static const short yycheck[] = { 38,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 291
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -676,6 +678,7 @@ static const char *yyname[] = {
"T_UNSIGNED","T_ENUM","T_STRUCT","T_UNION","T_Bool","T_Complex","T_Imaginary",
"T_TYPE_QUALIFIER","T_BRACKETS","T_LBRACE","T_MATCHRBRACE","T_ELLIPSIS",
"T_INITIALIZER","T_STRING_LITERAL","T_ASM","T_ASMARG","T_VA_DCL",
+"illegal-symbol",
};
static const char *yyrule[] = {
"$accept : program",
@@ -813,12 +816,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -1001,7 +1004,7 @@ free_parser(void)
#endif
}
#endif
-#line 1004 "/dev/stdout"
+#line 1006 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -1025,7 +1028,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -1099,9 +1102,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -1183,9 +1184,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -1881,7 +1880,7 @@ case 114:
yyval.declarator->func_def = FUNC_ANSI;
}
break;
-#line 1884 "/dev/stdout"
+#line 1882 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -1903,9 +1902,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.09.out b/tools/regression/usr.bin/yacc/regress.09.out
index 5eaf258..b6c13e2 100644
--- a/tools/regression/usr.bin/yacc/regress.09.out
+++ b/tools/regression/usr.bin/yacc/regress.09.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -31,7 +32,7 @@ int YYLEX_DECL();
static void YYERROR_DECL();
#endif
-#line 34 "/dev/stdout"
+#line 35 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -158,6 +159,7 @@ static const short yycheck[] = { 40,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -168,7 +170,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -210,12 +212,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -273,7 +275,7 @@ YYLEX_DECL()
}
return( c );
}
-#line 276 "/dev/stdout"
+#line 277 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -297,7 +299,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -371,9 +373,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -455,9 +455,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -539,7 +537,7 @@ case 18:
#line 69 "pure_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 542 "/dev/stdout"
+#line 539 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -561,9 +559,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.10.out b/tools/regression/usr.bin/yacc/regress.10.out
index 02cba4f..f4a5ba4 100644
--- a/tools/regression/usr.bin/yacc/regress.10.out
+++ b/tools/regression/usr.bin/yacc/regress.10.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -26,7 +27,7 @@ int YYLEX_DECL();
static void YYERROR_DECL();
#endif
-#line 29 "/dev/stdout"
+#line 30 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -93,10 +94,11 @@ static const short yycheck[] = { 256,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
-"end-of-file",
+"end-of-file","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : S",
@@ -121,12 +123,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -164,7 +166,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
-#line 167 "/dev/stdout"
+#line 168 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -188,7 +190,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -262,9 +264,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -346,9 +346,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -391,9 +389,7 @@ yyreduce:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.11.out b/tools/regression/usr.bin/yacc/regress.11.out
index 1d6561d..8668971 100644
--- a/tools/regression/usr.bin/yacc/regress.11.out
+++ b/tools/regression/usr.bin/yacc/regress.11.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
int yylex(void);
static void yyerror(const char *s);
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -172,6 +173,7 @@ static const short yycheck[] = { 10,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 271
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -184,6 +186,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"OP_ADD","\"ADD\"","OP_SUB","\"SUB\"","OP_MUL","\"MUL\"","OP_DIV",
"\"DIV\"","OP_MOD","\"MOD\"","OP_AND","\"AND\"","DIGIT","LETTER","UMINUS",
+"illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -225,12 +228,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -283,7 +286,7 @@ yylex(void) {
}
return( c );
}
-#line 286 "/dev/stdout"
+#line 288 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -307,7 +310,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -381,9 +384,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -465,9 +466,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -549,7 +548,7 @@ case 18:
#line 70 "quote_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 552 "/dev/stdout"
+#line 550 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -571,9 +570,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.12.out b/tools/regression/usr.bin/yacc/regress.12.out
index d3d03b9..757c977 100644
--- a/tools/regression/usr.bin/yacc/regress.12.out
+++ b/tools/regression/usr.bin/yacc/regress.12.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
int yylex(void);
static void yyerror(const char *s);
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -172,6 +173,7 @@ static const short yycheck[] = { 10,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 271
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -184,6 +186,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"OP_ADD","\"ADD\"","OP_SUB","\"SUB\"","OP_MUL","\"MUL\"","OP_DIV",
"\"DIV\"","OP_MOD","\"MOD\"","OP_AND","\"AND\"","DIGIT","LETTER","UMINUS",
+"illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -225,12 +228,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -283,7 +286,7 @@ yylex(void) {
}
return( c );
}
-#line 286 "/dev/stdout"
+#line 288 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -307,7 +310,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -381,9 +384,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -465,9 +466,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -549,7 +548,7 @@ case 18:
#line 70 "quote_calc2.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 552 "/dev/stdout"
+#line 550 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -571,9 +570,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.13.out b/tools/regression/usr.bin/yacc/regress.13.out
index fc68da8..94b717e 100644
--- a/tools/regression/usr.bin/yacc/regress.13.out
+++ b/tools/regression/usr.bin/yacc/regress.13.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
int yylex(void);
static void yyerror(const char *s);
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -166,6 +167,7 @@ static const short yycheck[] = { 10,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 271
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -178,7 +180,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"OP_ADD","\"ADD-operator\"","OP_SUB","\"SUB-operator\"","OP_MUL",
"\"MUL-operator\"","OP_DIV","\"DIV-operator\"","OP_MOD","\"MOD-operator\"",
-"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS",
+"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -220,12 +222,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -278,7 +280,7 @@ yylex(void) {
}
return( c );
}
-#line 281 "/dev/stdout"
+#line 282 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -302,7 +304,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -376,9 +378,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -460,9 +460,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -544,7 +542,7 @@ case 18:
#line 70 "quote_calc3.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 547 "/dev/stdout"
+#line 544 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -566,9 +564,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.14.out b/tools/regression/usr.bin/yacc/regress.14.out
index 96fdb57..aecfb49 100644
--- a/tools/regression/usr.bin/yacc/regress.14.out
+++ b/tools/regression/usr.bin/yacc/regress.14.out
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
+#define YYPATCH 20140101
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
int yylex(void);
static void yyerror(const char *s);
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -166,6 +167,7 @@ static const short yycheck[] = { 10,
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 271
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
#if YYDEBUG
static const char *yyname[] = {
@@ -178,7 +180,7 @@ static const char *yyname[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"OP_ADD","\"ADD-operator\"","OP_SUB","\"SUB-operator\"","OP_MUL",
"\"MUL-operator\"","OP_DIV","\"DIV-operator\"","OP_MOD","\"MOD-operator\"",
-"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS",
+"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS","illegal-symbol",
};
static const char *yyrule[] = {
"$accept : list",
@@ -220,12 +222,12 @@ YYSTYPE yylval;
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH 10000
#endif
#endif
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
typedef struct {
unsigned stacksize;
@@ -278,7 +280,7 @@ yylex(void) {
}
return( c );
}
-#line 281 "/dev/stdout"
+#line 282 "/dev/stdout"
#if YYDEBUG
#include <stdio.h> /* needed for printf */
@@ -302,7 +304,7 @@ static int yygrowstack(YYSTACKDATA *data)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
- i = data->s_mark - data->s_base;
+ i = (int) (data->s_mark - data->s_base);
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
if (newss == 0)
return -1;
@@ -376,9 +378,7 @@ yyloop:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -460,9 +460,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -544,7 +542,7 @@ case 18:
#line 70 "quote_calc4.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
-#line 547 "/dev/stdout"
+#line 544 "/dev/stdout"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -566,9 +564,7 @@ break;
#if YYDEBUG
if (yydebug)
{
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
+ yys = yyname[YYTRANSLATE(yychar)];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
diff --git a/tools/regression/usr.bin/yacc/regress.sh b/tools/regression/usr.bin/yacc/regress.sh
index 4517084..5b004be 100755
--- a/tools/regression/usr.bin/yacc/regress.sh
+++ b/tools/regression/usr.bin/yacc/regress.sh
@@ -6,21 +6,21 @@ echo 1..15
REGRESSION_START($1)
-REGRESSION_TEST(`00', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout undefined.y')
-REGRESSION_TEST(`01', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout calc.y')
-REGRESSION_TEST(`02', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout calc1.y')
-REGRESSION_TEST(`03', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout calc3.y')
-REGRESSION_TEST(`04', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout code_calc.y')
-REGRESSION_TEST(`05', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout code_error.y')
-REGRESSION_TEST(`06', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout error.y')
-REGRESSION_TEST(`07', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout ftp.y')
-REGRESSION_TEST(`08', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout grammar.y')
-REGRESSION_TEST(`09', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout pure_calc.y')
-REGRESSION_TEST(`10', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout pure_error.y')
-REGRESSION_TEST(`11', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout quote_calc.y')
-REGRESSION_TEST(`12', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout quote_calc2.y')
-REGRESSION_TEST(`13', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout quote_calc3.y')
-REGRESSION_TEST(`14', `/usr/obj/usr/src/usr.bin/yacc/yacc -b regress -o /dev/stdout quote_calc4.y')
+REGRESSION_TEST(`00', `yacc -b regress -o /dev/stdout undefined.y')
+REGRESSION_TEST(`01', `yacc -b regress -o /dev/stdout calc.y')
+REGRESSION_TEST(`02', `yacc -b regress -o /dev/stdout calc1.y')
+REGRESSION_TEST(`03', `yacc -b regress -o /dev/stdout calc3.y')
+REGRESSION_TEST(`04', `yacc -b regress -o /dev/stdout code_calc.y')
+REGRESSION_TEST(`05', `yacc -b regress -o /dev/stdout code_error.y')
+REGRESSION_TEST(`06', `yacc -b regress -o /dev/stdout error.y')
+REGRESSION_TEST(`07', `yacc -b regress -o /dev/stdout ftp.y')
+REGRESSION_TEST(`08', `yacc -b regress -o /dev/stdout grammar.y')
+REGRESSION_TEST(`09', `yacc -b regress -o /dev/stdout pure_calc.y')
+REGRESSION_TEST(`10', `yacc -b regress -o /dev/stdout pure_error.y')
+REGRESSION_TEST(`11', `yacc -b regress -o /dev/stdout quote_calc.y')
+REGRESSION_TEST(`12', `yacc -b regress -o /dev/stdout quote_calc2.y')
+REGRESSION_TEST(`13', `yacc -b regress -o /dev/stdout quote_calc3.y')
+REGRESSION_TEST(`14', `yacc -b regress -o /dev/stdout quote_calc4.y')
REGRESSION_END()
OpenPOWER on IntegriCloud