F #2456: Regenerate VM attribute parsers

(cherry picked from commit 28fedd7bb5)
This commit is contained in:
Ruben S. Montero committed 2018-10-22 17:57:34 +02:00
1 parent 896872bf9d
commit 6d7c773973
6 files changed
+137 -131

No files matched your search

+19 -18
View File
@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 3.1. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "3.0.4"
#define YYBISON_VERSION "3.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -358,13 +358,13 @@ typedef signed char yytype_int8;
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
typedef unsigned short yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
typedef short yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -376,7 +376,7 @@ typedef short int yytype_int16;
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# define YYSIZE_T unsigned
# endif
#endif
@@ -428,7 +428,7 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
@@ -598,7 +598,7 @@ union yyalloc
#define YYMAXUTOK 266
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
@@ -941,7 +941,7 @@ do { \
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner)
{
unsigned long int yylno = yyrline[yyrule];
unsigned long yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1167,6 +1167,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1407,7 +1408,7 @@ YYLTYPE yylloc = yyloc_default;
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
(unsigned long) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
@@ -1513,13 +1514,14 @@ yyreduce:
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
/* Default location. */
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 4:
#line 235 "vm_file_var_syntax.y" /* yacc.c:1646 */
#line 235 "vm_file_var_syntax.y" /* yacc.c:1651 */
{
string file((yyvsp[-6].val_str));
string var1((yyvsp[-4].val_str));
@@ -1537,11 +1539,11 @@ yyreduce:
YYABORT;
}
}
#line 1541 "vm_file_var_syntax.cc" /* yacc.c:1646 */
#line 1543 "vm_file_var_syntax.cc" /* yacc.c:1651 */
break;
case 5:
#line 253 "vm_file_var_syntax.y" /* yacc.c:1646 */
#line 253 "vm_file_var_syntax.y" /* yacc.c:1651 */
{
string file((yyvsp[-10].val_str));
string var1((yyvsp[-8].val_str));
@@ -1562,11 +1564,11 @@ yyreduce:
YYABORT;
}
}
#line 1566 "vm_file_var_syntax.cc" /* yacc.c:1646 */
#line 1568 "vm_file_var_syntax.cc" /* yacc.c:1651 */
break;
#line 1570 "vm_file_var_syntax.cc" /* yacc.c:1646 */
#line 1572 "vm_file_var_syntax.cc" /* yacc.c:1651 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -1689,7 +1691,6 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -1801,7 +1802,7 @@ yyreturn:
#endif
return yyresult;
}
#line 274 "vm_file_var_syntax.y" /* yacc.c:1906 */
#line 274 "vm_file_var_syntax.y" /* yacc.c:1910 */
void vm_file_var_error(
+6 -6
View File
@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 3.1. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -40,7 +40,7 @@
extern int vm_file_var_debug;
#endif
/* "%code requires" blocks. */
#line 17 "vm_file_var_syntax.y" /* yacc.c:1909 */
#line 17 "vm_file_var_syntax.y" /* yacc.c:1913 */
#include <iostream>
#include <vector>
@@ -63,7 +63,7 @@ typedef void * yyscan_t;
int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids,
char ** errmsg, yyscan_t scanner);
#line 67 "vm_file_var_syntax.hh" /* yacc.c:1909 */
#line 67 "vm_file_var_syntax.hh" /* yacc.c:1913 */
/* Token type. */
#ifndef YYTOKENTYPE
@@ -87,13 +87,13 @@ int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids,
union YYSTYPE
{
#line 205 "vm_file_var_syntax.y" /* yacc.c:1909 */
#line 205 "vm_file_var_syntax.y" /* yacc.c:1913 */
char * val_str;
int val_int;
char val_char;
#line 97 "vm_file_var_syntax.hh" /* yacc.c:1909 */
#line 97 "vm_file_var_syntax.hh" /* yacc.c:1913 */
};
typedef union YYSTYPE YYSTYPE;
+82 -78
View File
@@ -586,12 +586,12 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static const flex_int16_t yy_accept[34] =
static const flex_int16_t yy_accept[36] =
{ 0,
0, 0, 0, 0, 0, 0, 13, 11, 1, 10,
10, 12, 9, 3, 6, 2, 4, 5, 12, 8,
11, 0, 3, 2, 5, 3, 6, 2, 4, 0,
7, 8, 0
0, 0, 0, 0, 0, 0, 13, 1, 2, 12,
11, 11, 12, 10, 4, 7, 3, 5, 6, 12,
9, 1, 0, 0, 4, 3, 6, 4, 7, 3,
5, 0, 8, 9, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -605,7 +605,7 @@ static const YY_CHAR yy_ec[256] =
8, 1, 1, 1, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
9, 1, 10, 1, 11, 1, 7, 7, 7, 7,
9, 10, 11, 1, 12, 1, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
@@ -626,52 +626,56 @@ static const YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
static const YY_CHAR yy_meta[12] =
static const YY_CHAR yy_meta[13] =
{ 0,
1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
3
1, 3
} ;
static const flex_int16_t yy_base[39] =
static const flex_int16_t yy_base[41] =
{ 0,
41, 40, 0, 0, 8, 12, 44, 0, 47, 47,
18, 47, 47, 41, 0, 40, 39, 47, 32, 20,
0, 0, 23, 21, 47, 20, 0, 19, 16, 13,
47, 7, 47, 28, 31, 34, 10, 37
0, 6, 16, 0, 25, 29, 45, 34, 59, 37,
59, 35, 59, 59, 38, 0, 37, 36, 59, 31,
27, 21, 25, 0, 13, 12, 59, 11, 0, 10,
7, 4, 59, 0, 59, 46, 49, 52, 0, 55
} ;
static const flex_int16_t yy_def[39] =
static const flex_int16_t yy_def[41] =
{ 0,
34, 34, 33, 3, 35, 35, 33, 36, 33, 33,
33, 33, 33, 33, 37, 33, 33, 33, 38, 33,
36, 11, 33, 33, 33, 33, 37, 33, 33, 38,
33, 33, 0, 33, 33, 33, 33, 33
36, 36, 35, 3, 37, 37, 35, 38, 35, 38,
35, 35, 35, 35, 35, 39, 35, 35, 35, 40,
35, 38, 38, 12, 35, 35, 35, 35, 39, 35,
35, 40, 35, 35, 0, 35, 35, 35, 35, 35
} ;
static const flex_int16_t yy_nxt[59] =
static const flex_int16_t yy_nxt[72] =
{ 0,
10, 11, 12, 10, 13, 14, 15, 16, 17, 18,
15, 19, 27, 32, 20, 19, 31, 29, 20, 22,
28, 26, 28, 23, 26, 24, 32, 25, 8, 8,
8, 12, 12, 12, 21, 31, 21, 30, 30, 30,
29, 28, 26, 33, 9, 9, 7, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33
35, 35, 29, 35, 9, 35, 34, 33, 31, 10,
9, 30, 28, 30, 28, 10, 11, 12, 13, 11,
14, 15, 16, 17, 18, 11, 19, 16, 20, 22,
23, 21, 20, 34, 33, 21, 24, 31, 30, 28,
25, 22, 26, 23, 35, 27, 8, 8, 8, 13,
13, 13, 22, 35, 22, 32, 32, 32, 7, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35
} ;
static const flex_int16_t yy_chk[59] =
static const flex_int16_t yy_chk[72] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 5, 37, 32, 5, 6, 30, 29, 6, 11,
28, 26, 24, 11, 23, 11, 20, 11, 34, 34,
34, 35, 35, 35, 36, 19, 36, 38, 38, 38,
17, 16, 14, 7, 2, 1, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33
0, 0, 39, 0, 1, 0, 34, 32, 31, 1,
2, 30, 28, 26, 25, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 5, 23,
22, 5, 6, 21, 20, 6, 12, 18, 17, 15,
12, 10, 12, 8, 7, 12, 36, 36, 36, 37,
37, 37, 38, 0, 38, 40, 40, 40, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35
} ;
/* Table of booleans, true if rule could match eol. */
static const flex_int32_t yy_rule_can_match_eol[13] =
{ 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, };
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -714,9 +718,9 @@ static const flex_int32_t yy_rule_can_match_eol[13] =
#define YY_USER_ACTION llocp->first_line = yylineno; \
llocp->first_column = llocp->last_column; \
llocp->last_column += yyleng;
#line 717 "vm_var_parser.cc"
#line 721 "vm_var_parser.cc"
#line 719 "vm_var_parser.cc"
#line 723 "vm_var_parser.cc"
#define INITIAL 0
#define VAR 1
@@ -995,11 +999,7 @@ YY_DECL
#line 50 "vm_var_parser.l"
/* ------------------------------------------------------------------------- */
/* Parse variables in the form: */
/* $VARIABLE */
/* $VARIABLE[ATTR] */
/* $VARIABLE[ATTR,ATTR=VALUE] */
/* $NUM.CONTEXT_VARIABLE */
/* Just copy the string verbatim till we find a variable (starts with $) */
/* ------------------------------------------------------------------------- */
#line 1005 "vm_var_parser.cc"
@@ -1029,13 +1029,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 34 )
if ( yy_current_state >= 36 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 47 );
while ( yy_base[yy_current_state] != 59 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1072,89 +1072,93 @@ do_action: /* This label is used only to access EOF actions. */
goto yy_find_action;
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 58 "vm_var_parser.l"
{ BEGIN VAR;}
#line 54 "vm_var_parser.l"
{ yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;}
YY_BREAK
/* ------------------------------------------------------------------------- */
/* Parse variables in the form: */
/* $VARIABLE */
/* $VARIABLE[ATTR] */
/* $VARIABLE[ATTR,ATTR=VALUE] */
/* $NUM.CONTEXT_VARIABLE */
/* ------------------------------------------------------------------------- */
case 2:
YY_RULE_SETUP
#line 60 "vm_var_parser.l"
{ BEGIN VALUE; return EQUAL; }
#line 64 "vm_var_parser.l"
{ BEGIN VAR;}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 61 "vm_var_parser.l"
{ return COMMA;}
#line 66 "vm_var_parser.l"
{ BEGIN VALUE; return EQUAL; }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 62 "vm_var_parser.l"
{ return OBRACKET;}
#line 67 "vm_var_parser.l"
{ return COMMA;}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 63 "vm_var_parser.l"
{ return CBRACKET;}
#line 68 "vm_var_parser.l"
{ return OBRACKET;}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 65 "vm_var_parser.l"
#line 69 "vm_var_parser.l"
{ return CBRACKET;}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 71 "vm_var_parser.l"
{ yylval_param->val_str =
mem_collector_strdup(mc,yytext);
return VARIABLE;}
YY_BREAK
case 7:
/* rule 7 can match eol */
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 69 "vm_var_parser.l"
#line 75 "vm_var_parser.l"
{ yylval_param->val_str =
mem_collector_strdup(mc,yytext+1);
yylval_param->val_str[yyleng-2] = '\0';
BEGIN(VAR);
return STRING;}
YY_BREAK
case 8:
case 9:
YY_RULE_SETUP
#line 75 "vm_var_parser.l"
#line 81 "vm_var_parser.l"
{ yylval_param->val_str =
mem_collector_strdup(mc,yytext);
BEGIN(VAR);
return STRING;}
YY_BREAK
case 9:
case 10:
YY_RULE_SETUP
#line 80 "vm_var_parser.l"
#line 86 "vm_var_parser.l"
{ yylval_param->val_char = '\0';
return EOA;}
YY_BREAK
case 10:
case 11:
YY_RULE_SETUP
#line 83 "vm_var_parser.l"
#line 89 "vm_var_parser.l"
{ yylval_param->val_char = *yytext;
BEGIN(INITIAL);
return EOA;}
YY_BREAK
case YY_STATE_EOF(VAR):
#line 87 "vm_var_parser.l"
#line 93 "vm_var_parser.l"
{ yylval_param->val_char = '\0';
BEGIN(INITIAL);
return EOA;}
YY_BREAK
/* ------------------------------------------------------------------------- */
/* Just copy the string verbatim till we find a variable (starts with $) */
/* ------------------------------------------------------------------------- */
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
#line 95 "vm_var_parser.l"
{ yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 97 "vm_var_parser.l"
#line 96 "vm_var_parser.l"
ECHO;
YY_BREAK
#line 1157 "vm_var_parser.cc"
#line 1161 "vm_var_parser.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(VALUE):
yyterminate();
@@ -1454,7 +1458,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 34 )
if ( yy_current_state >= 36 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -1483,11 +1487,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 34 )
if ( yy_current_state >= 36 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 33);
yy_is_jam = (yy_current_state == 35);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
@@ -2305,7 +2309,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
#line 97 "vm_var_parser.l"
#line 96 "vm_var_parser.l"
int vm_var_wrap(yyscan_t scanner)
+1 -1
View File
@@ -711,7 +711,7 @@ extern int yylex \
#undef yyTABLES_NAME
#endif
#line 97 "vm_var_parser.l"
#line 96 "vm_var_parser.l"
#line 717 "vm_var_parser.h"
+23 -22
View File
@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 3.1. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "3.0.4"
#define YYBISON_VERSION "3.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -557,13 +557,13 @@ typedef signed char yytype_int8;
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
typedef unsigned short yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
typedef short yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -575,7 +575,7 @@ typedef short int yytype_int16;
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# define YYSIZE_T unsigned
# endif
#endif
@@ -627,7 +627,7 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
@@ -797,7 +797,7 @@ union yyalloc
#define YYMAXUTOK 266
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
@@ -1140,7 +1140,7 @@ do { \
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner)
{
unsigned long int yylno = yyrline[yyrule];
unsigned long yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1366,6 +1366,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1606,7 +1607,7 @@ YYLTYPE yylloc = yyloc_default;
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
(unsigned long) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
@@ -1712,21 +1713,22 @@ yyreduce:
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
/* Default location. */
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 4:
#line 433 "vm_var_syntax.y" /* yacc.c:1646 */
#line 433 "vm_var_syntax.y" /* yacc.c:1651 */
{
(*parsed) << (yyvsp[0].val_str);
}
#line 1726 "vm_var_syntax.cc" /* yacc.c:1646 */
#line 1728 "vm_var_syntax.cc" /* yacc.c:1651 */
break;
case 5:
#line 437 "vm_var_syntax.y" /* yacc.c:1646 */
#line 437 "vm_var_syntax.y" /* yacc.c:1651 */
{
string name((yyvsp[-1].val_str));
@@ -1739,11 +1741,11 @@ yyreduce:
(*parsed) << (yyvsp[0].val_char);
}
}
#line 1743 "vm_var_syntax.cc" /* yacc.c:1646 */
#line 1745 "vm_var_syntax.cc" /* yacc.c:1651 */
break;
case 6:
#line 450 "vm_var_syntax.y" /* yacc.c:1646 */
#line 450 "vm_var_syntax.y" /* yacc.c:1651 */
{
string name((yyvsp[-4].val_str));
string vname((yyvsp[-2].val_str));
@@ -1758,11 +1760,11 @@ yyreduce:
(*parsed) << (yyvsp[0].val_char);
}
}
#line 1762 "vm_var_syntax.cc" /* yacc.c:1646 */
#line 1764 "vm_var_syntax.cc" /* yacc.c:1651 */
break;
case 7:
#line 465 "vm_var_syntax.y" /* yacc.c:1646 */
#line 465 "vm_var_syntax.y" /* yacc.c:1651 */
{
string name((yyvsp[-8].val_str));
string vname((yyvsp[-6].val_str));
@@ -1780,11 +1782,11 @@ yyreduce:
(*parsed) << (yyvsp[0].val_char);
}
}
#line 1784 "vm_var_syntax.cc" /* yacc.c:1646 */
#line 1786 "vm_var_syntax.cc" /* yacc.c:1651 */
break;
#line 1788 "vm_var_syntax.cc" /* yacc.c:1646 */
#line 1790 "vm_var_syntax.cc" /* yacc.c:1651 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -1907,7 +1909,6 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2019,7 +2020,7 @@ yyreturn:
#endif
return yyresult;
}
#line 483 "vm_var_syntax.y" /* yacc.c:1906 */
#line 483 "vm_var_syntax.y" /* yacc.c:1910 */
void vm_var_error(
+6 -6
View File
@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 3.1. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -40,7 +40,7 @@
extern int vm_var_debug;
#endif
/* "%code requires" blocks. */
#line 17 "vm_var_syntax.y" /* yacc.c:1909 */
#line 17 "vm_var_syntax.y" /* yacc.c:1913 */
#include <iostream>
#include <sstream>
@@ -62,7 +62,7 @@ typedef void * yyscan_t;
int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg,
yyscan_t scanner);
#line 66 "vm_var_syntax.hh" /* yacc.c:1909 */
#line 66 "vm_var_syntax.hh" /* yacc.c:1913 */
/* Token type. */
#ifndef YYTOKENTYPE
@@ -86,13 +86,13 @@ int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg,
union YYSTYPE
{
#line 404 "vm_var_syntax.y" /* yacc.c:1909 */
#line 404 "vm_var_syntax.y" /* yacc.c:1913 */
char * val_str;
int val_int;
char val_char;
#line 96 "vm_var_syntax.hh" /* yacc.c:1909 */
#line 96 "vm_var_syntax.hh" /* yacc.c:1913 */
};
typedef union YYSTYPE YYSTYPE;