diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-02-12 05:43:42 -0500 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-02-12 05:43:42 -0500 |
commit | 4521d3dd6cf07185b4ba43b979f775a259c5b422 (patch) | |
tree | ad6f9609ca723e2d26a0c67da07e012c438d6b9e /cpp/src/FreezeScript/Grammar.cpp | |
parent | Fixed ICE-5223: Removed deprecated admin interfaces (diff) | |
download | ice-4521d3dd6cf07185b4ba43b979f775a259c5b422.tar.bz2 ice-4521d3dd6cf07185b4ba43b979f775a259c5b422.tar.xz ice-4521d3dd6cf07185b4ba43b979f775a259c5b422.zip |
Rebuilt dependencies
Diffstat (limited to 'cpp/src/FreezeScript/Grammar.cpp')
-rw-r--r-- | cpp/src/FreezeScript/Grammar.cpp | 414 |
1 files changed, 181 insertions, 233 deletions
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp index d02c33a32f5..42fe90aaaf7 100644 --- a/cpp/src/FreezeScript/Grammar.cpp +++ b/cpp/src/FreezeScript/Grammar.cpp @@ -1,23 +1,24 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -28,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -46,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -54,28 +55,87 @@ /* Pure parsers. */ #define YYPURE 1 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse freeze_script_parse -#define yylex freeze_script_lex -#define yyerror freeze_script_error -#define yylval freeze_script_lval -#define yychar freeze_script_char -#define yydebug freeze_script_debug -#define yynerrs freeze_script_nerrs +#define yyparse freeze_script_parse +#define yylex freeze_script_lex +#define yyerror freeze_script_error +#define yylval freeze_script_lval +#define yychar freeze_script_char +#define yydebug freeze_script_debug +#define yynerrs freeze_script_nerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_AND = 258, + TOK_OR = 259, + TOK_NOT = 260, + TOK_ADD = 261, + TOK_SUB = 262, + TOK_MUL = 263, + TOK_DIV = 264, + TOK_MOD = 265, + TOK_LPAREN = 266, + TOK_RPAREN = 267, + TOK_LBRACKET = 268, + TOK_RBRACKET = 269, + TOK_LESS_THAN = 270, + TOK_GREATER_THAN = 271, + TOK_LESS_EQUAL = 272, + TOK_GREATER_EQUAL = 273, + TOK_EQUAL = 274, + TOK_NEQ = 275, + TOK_TRUE = 276, + TOK_FALSE = 277, + TOK_NIL = 278, + TOK_SCOPE_DELIMITER = 279, + TOK_IDENTIFIER = 280, + TOK_STRING_LITERAL = 281, + TOK_INTEGER_LITERAL = 282, + TOK_FLOATING_POINT_LITERAL = 283, + UNARY_OP = 284 + }; +#endif +/* Tokens. */ +#define TOK_AND 258 +#define TOK_OR 259 +#define TOK_NOT 260 +#define TOK_ADD 261 +#define TOK_SUB 262 +#define TOK_MUL 263 +#define TOK_DIV 264 +#define TOK_MOD 265 +#define TOK_LPAREN 266 +#define TOK_RPAREN 267 +#define TOK_LBRACKET 268 +#define TOK_RBRACKET 269 +#define TOK_LESS_THAN 270 +#define TOK_GREATER_THAN 271 +#define TOK_LESS_EQUAL 272 +#define TOK_GREATER_EQUAL 273 +#define TOK_EQUAL 274 +#define TOK_NEQ 275 +#define TOK_TRUE 276 +#define TOK_FALSE 277 +#define TOK_NIL 278 +#define TOK_SCOPE_DELIMITER 279 +#define TOK_IDENTIFIER 280 +#define TOK_STRING_LITERAL 281 +#define TOK_INTEGER_LITERAL 282 +#define TOK_FLOATING_POINT_LITERAL 283 +#define UNARY_OP 284 -/* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ + +/* Copy the first part of user declarations. */ #line 1 "../FreezeScript/Grammar.y" @@ -119,9 +179,6 @@ freeze_script_error(const char* s) -/* Line 189 of yacc.c */ -#line 124 "Grammar.tab.c" - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -140,58 +197,20 @@ freeze_script_error(const char* s) # define YYTOKEN_TABLE 0 #endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_AND = 258, - TOK_OR = 259, - TOK_NOT = 260, - TOK_ADD = 261, - TOK_SUB = 262, - TOK_MUL = 263, - TOK_DIV = 264, - TOK_MOD = 265, - TOK_LPAREN = 266, - TOK_RPAREN = 267, - TOK_LBRACKET = 268, - TOK_RBRACKET = 269, - TOK_LESS_THAN = 270, - TOK_GREATER_THAN = 271, - TOK_LESS_EQUAL = 272, - TOK_GREATER_EQUAL = 273, - TOK_EQUAL = 274, - TOK_NEQ = 275, - TOK_TRUE = 276, - TOK_FALSE = 277, - TOK_NIL = 278, - TOK_SCOPE_DELIMITER = 279, - TOK_IDENTIFIER = 280, - TOK_STRING_LITERAL = 281, - TOK_INTEGER_LITERAL = 282, - TOK_FLOATING_POINT_LITERAL = 283, - UNARY_OP = 284 - }; -#endif - - - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif + /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 195 "Grammar.tab.c" +/* Line 216 of yacc.c. */ +#line 214 "Grammar.tab.c" #ifdef short # undef short @@ -266,14 +285,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -354,9 +373,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -390,12 +409,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -816,20 +835,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -863,11 +879,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -1147,8 +1163,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1167,9 +1185,10 @@ int yyparse (); -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ + +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1193,46 +1212,22 @@ yyparse () #endif #endif { -/* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; +/* Number of syntax errors so far. */ +int yynerrs; + int yystate; int yyn; int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -1240,28 +1235,51 @@ YYSTYPE yylval; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ + yyssp = yyss; yyvsp = yyvs; @@ -1291,6 +1309,7 @@ YYSTYPE yylval; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1298,6 +1317,7 @@ YYSTYPE yylval; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -1320,8 +1340,9 @@ YYSTYPE yylval; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1332,6 +1353,7 @@ YYSTYPE yylval; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1341,9 +1363,6 @@ YYSTYPE yylval; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -1352,16 +1371,16 @@ YYSTYPE yylval; yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1393,16 +1412,20 @@ yybackup: goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1442,8 +1465,6 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1455 of yacc.c */ #line 85 "../FreezeScript/Grammar.y" { parseResult = (yyvsp[(1) - (1)]); @@ -1451,8 +1472,6 @@ yyreduce: break; case 3: - -/* Line 1455 of yacc.c */ #line 94 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1460,8 +1479,6 @@ yyreduce: break; case 4: - -/* Line 1455 of yacc.c */ #line 103 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpLess, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1469,8 +1486,6 @@ yyreduce: break; case 5: - -/* Line 1455 of yacc.c */ #line 107 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpGreater, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1478,8 +1493,6 @@ yyreduce: break; case 6: - -/* Line 1455 of yacc.c */ #line 111 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpLessEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1487,8 +1500,6 @@ yyreduce: break; case 7: - -/* Line 1455 of yacc.c */ #line 115 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpGrEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1496,8 +1507,6 @@ yyreduce: break; case 8: - -/* Line 1455 of yacc.c */ #line 119 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1505,8 +1514,6 @@ yyreduce: break; case 9: - -/* Line 1455 of yacc.c */ #line 123 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpNotEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1514,8 +1521,6 @@ yyreduce: break; case 10: - -/* Line 1455 of yacc.c */ #line 127 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpOr, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1523,8 +1528,6 @@ yyreduce: break; case 11: - -/* Line 1455 of yacc.c */ #line 131 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpAnd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1532,8 +1535,6 @@ yyreduce: break; case 12: - -/* Line 1455 of yacc.c */ #line 135 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpMul, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1541,8 +1542,6 @@ yyreduce: break; case 13: - -/* Line 1455 of yacc.c */ #line 139 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpDiv, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1550,8 +1549,6 @@ yyreduce: break; case 14: - -/* Line 1455 of yacc.c */ #line 143 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpMod, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1559,8 +1556,6 @@ yyreduce: break; case 15: - -/* Line 1455 of yacc.c */ #line 147 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpAdd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1568,8 +1563,6 @@ yyreduce: break; case 16: - -/* Line 1455 of yacc.c */ #line 151 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpSub, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1577,8 +1570,6 @@ yyreduce: break; case 17: - -/* Line 1455 of yacc.c */ #line 155 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1586,8 +1577,6 @@ yyreduce: break; case 18: - -/* Line 1455 of yacc.c */ #line 164 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); @@ -1595,8 +1584,6 @@ yyreduce: break; case 19: - -/* Line 1455 of yacc.c */ #line 168 "../FreezeScript/Grammar.y" { (yyval) = new UnaryNode(UnaryOpNeg, parseDataFactory, (yyvsp[(2) - (2)])); @@ -1604,8 +1591,6 @@ yyreduce: break; case 20: - -/* Line 1455 of yacc.c */ #line 172 "../FreezeScript/Grammar.y" { (yyval) = new UnaryNode(UnaryOpNot, parseDataFactory, (yyvsp[(2) - (2)])); @@ -1613,8 +1598,6 @@ yyreduce: break; case 21: - -/* Line 1455 of yacc.c */ #line 176 "../FreezeScript/Grammar.y" { IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1624,8 +1607,6 @@ yyreduce: break; case 22: - -/* Line 1455 of yacc.c */ #line 182 "../FreezeScript/Grammar.y" { FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1635,8 +1616,6 @@ yyreduce: break; case 23: - -/* Line 1455 of yacc.c */ #line 188 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1646,8 +1625,6 @@ yyreduce: break; case 24: - -/* Line 1455 of yacc.c */ #line 194 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createBoolean(true, true)); @@ -1655,8 +1632,6 @@ yyreduce: break; case 25: - -/* Line 1455 of yacc.c */ #line 198 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createBoolean(false, true)); @@ -1664,8 +1639,6 @@ yyreduce: break; case 26: - -/* Line 1455 of yacc.c */ #line 202 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createNil(true)); @@ -1673,8 +1646,6 @@ yyreduce: break; case 27: - -/* Line 1455 of yacc.c */ #line 206 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1682,8 +1653,6 @@ yyreduce: break; case 28: - -/* Line 1455 of yacc.c */ #line 210 "../FreezeScript/Grammar.y" { EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1696,8 +1665,6 @@ yyreduce: break; case 29: - -/* Line 1455 of yacc.c */ #line 219 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1705,8 +1672,6 @@ yyreduce: break; case 30: - -/* Line 1455 of yacc.c */ #line 223 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1716,8 +1681,6 @@ yyreduce: break; case 31: - -/* Line 1455 of yacc.c */ #line 234 "../FreezeScript/Grammar.y" { EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (4)])); @@ -1728,8 +1691,6 @@ yyreduce: break; case 32: - -/* Line 1455 of yacc.c */ #line 241 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -1742,8 +1703,6 @@ yyreduce: break; case 33: - -/* Line 1455 of yacc.c */ #line 250 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1753,8 +1712,6 @@ yyreduce: break; case 34: - -/* Line 1455 of yacc.c */ #line 261 "../FreezeScript/Grammar.y" { StringTokPtr func = StringTokPtr::dynamicCast((yyvsp[(1) - (4)])); @@ -1766,8 +1723,6 @@ yyreduce: break; case 35: - -/* Line 1455 of yacc.c */ #line 274 "../FreezeScript/Grammar.y" { NodeListTokPtr l = NodeListTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1778,8 +1733,6 @@ yyreduce: break; case 36: - -/* Line 1455 of yacc.c */ #line 281 "../FreezeScript/Grammar.y" { NodeListTokPtr result = new NodeListTok; @@ -1789,8 +1742,6 @@ yyreduce: break; case 37: - -/* Line 1455 of yacc.c */ #line 287 "../FreezeScript/Grammar.y" { (yyval) = new NodeListTok; @@ -1798,8 +1749,6 @@ yyreduce: break; case 38: - -/* Line 1455 of yacc.c */ #line 296 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1812,8 +1761,6 @@ yyreduce: break; case 39: - -/* Line 1455 of yacc.c */ #line 305 "../FreezeScript/Grammar.y" { StringTokPtr idVal = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -1825,9 +1772,8 @@ yyreduce: break; - -/* Line 1455 of yacc.c */ -#line 1831 "Grammar.tab.c" +/* Line 1267 of yacc.c. */ +#line 1777 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1838,6 +1784,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1902,7 +1849,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1919,7 +1866,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -1976,6 +1923,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -2000,7 +1950,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2011,7 +1961,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) + if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -2037,8 +1987,6 @@ yyreturn: } - -/* Line 1675 of yacc.c */ #line 314 "../FreezeScript/Grammar.y" |