diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-10 01:17:51 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-10 01:17:51 (GMT) |
commit | 9c13caa3c99af01a9b4c3ff6e178e7dadb61741f (patch) | |
tree | b69df0a23c4628359fc3740e09958980eda7478e /src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp | |
parent | bb1bdcab28e4c52dcea37dfaaa435045b1985eeb (diff) | |
parent | 883da42f7c75775502c818aa456c8576d8457ff8 (diff) | |
download | Qt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.zip Qt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.tar.gz Qt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui-gv
Conflicts:
examples/itemviews/frozencolumn/main.cpp
src/declarative/canvas/qsimplecanvas.cpp
src/declarative/canvas/qsimplecanvas_p.h
src/declarative/canvas/qsimplecanvasitem.h
src/declarative/extra/qfxparticles.cpp
src/declarative/fx/fx.pri
src/declarative/fx/qfxblurfilter.h
src/declarative/fx/qfxcontentwrapper.cpp
src/declarative/fx/qfxflickable.cpp
src/declarative/fx/qfxfocuspanel.h
src/declarative/fx/qfxfocusrealm.h
src/declarative/fx/qfxhighlightfilter.cpp
src/declarative/fx/qfxhighlightfilter.h
src/declarative/fx/qfximage.cpp
src/declarative/fx/qfxitem.cpp
src/declarative/fx/qfxitem.h
src/declarative/fx/qfxrect.cpp
src/declarative/fx/qfxreflectionfilter.h
src/declarative/fx/qfxshadowfilter.cpp
src/declarative/fx/qfxshadowfilter.h
src/declarative/fx/qfxtext.cpp
src/declarative/fx/qfxtext.h
src/declarative/fx/qfxtextedit.cpp
src/declarative/opengl/glbasicshaders.h
src/declarative/test/qfxtestengine.cpp
src/declarative/test/qfxtestengine.h
src/declarative/test/qfxtestobjects.cpp
src/declarative/test/qfxtestobjects.h
src/declarative/test/qfxtestview.h
src/declarative/util/qfxglobal.h
src/declarative/util/qfxview.cpp
src/gui/graphicsview/qgraphicsitem_p.h
tools/qmlviewer/qmlviewer.cpp
Diffstat (limited to 'src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp | 418 |
1 files changed, 168 insertions, 250 deletions
diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp index 1872980..d06adf6 100644 --- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.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,69 @@ /* 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 xpathyyparse -#define yylex xpathyylex -#define yyerror xpathyyerror -#define yylval xpathyylval -#define yychar xpathyychar -#define yydebug xpathyydebug -#define yynerrs xpathyynerrs +#define yyparse xpathyyparse +#define yylex xpathyylex +#define yyerror xpathyyerror +#define yylval xpathyylval +#define yychar xpathyychar +#define yydebug xpathyydebug +#define yynerrs xpathyynerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + MULOP = 258, + RELOP = 259, + EQOP = 260, + MINUS = 261, + PLUS = 262, + AND = 263, + OR = 264, + AXISNAME = 265, + NODETYPE = 266, + PI = 267, + FUNCTIONNAME = 268, + LITERAL = 269, + VARIABLEREFERENCE = 270, + NUMBER = 271, + DOTDOT = 272, + SLASHSLASH = 273, + NAMETEST = 274, + XPATH_ERROR = 275 + }; +#endif +/* Tokens. */ +#define MULOP 258 +#define RELOP 259 +#define EQOP 260 +#define MINUS 261 +#define PLUS 262 +#define AND 263 +#define OR 264 +#define AXISNAME 265 +#define NODETYPE 266 +#define PI 267 +#define FUNCTIONNAME 268 +#define LITERAL 269 +#define VARIABLEREFERENCE 270 +#define NUMBER 271 +#define DOTDOT 272 +#define SLASHSLASH 273 +#define NAMETEST 274 +#define XPATH_ERROR 275 + -/* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Copy the first part of user declarations. */ #line 28 "../xml/XPathGrammar.y" @@ -102,9 +144,6 @@ using namespace XPath; -/* Line 189 of yacc.c */ -#line 107 "WebCore/tmp/../generated/XPathGrammar.tab.c" - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -123,43 +162,10 @@ using namespace XPath; # 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 { - MULOP = 258, - RELOP = 259, - EQOP = 260, - MINUS = 261, - PLUS = 262, - AND = 263, - OR = 264, - AXISNAME = 265, - NODETYPE = 266, - PI = 267, - FUNCTIONNAME = 268, - LITERAL = 269, - VARIABLEREFERENCE = 270, - NUMBER = 271, - DOTDOT = 272, - SLASHSLASH = 273, - NAMETEST = 274, - XPATH_ERROR = 275 - }; -#endif - - - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ #line 56 "../xml/XPathGrammar.y" - +{ Step::Axis axis; Step::NodeTest* nodeTest; NumericOp::Opcode numop; @@ -170,21 +176,18 @@ typedef union YYSTYPE Vector<Expression*>* argList; Step* step; LocationPath* locationPath; - - - -/* Line 214 of yacc.c */ -#line 178 "WebCore/tmp/../generated/XPathGrammar.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 187 of yacc.c. */ +#line 182 "WebCore/tmp/../generated/XPathGrammar.tab.c" + YYSTYPE; # 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 */ +/* Copy the second part of user declarations. */ #line 69 "../xml/XPathGrammar.y" @@ -193,8 +196,8 @@ static void xpathyyerror(const char*) { } -/* Line 264 of yacc.c */ -#line 198 "WebCore/tmp/../generated/XPathGrammar.tab.c" +/* Line 216 of yacc.c. */ +#line 201 "WebCore/tmp/../generated/XPathGrammar.tab.c" #ifdef short # undef short @@ -269,14 +272,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 @@ -357,9 +360,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) @@ -393,12 +396,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); \ } \ @@ -851,20 +854,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"); } @@ -898,11 +898,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"); } } @@ -1182,8 +1182,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1202,9 +1204,10 @@ int yyparse (); -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ + +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1228,46 +1231,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]; @@ -1275,28 +1254,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; @@ -1326,6 +1328,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 @@ -1333,6 +1336,7 @@ YYSTYPE yylval; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -1355,8 +1359,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); @@ -1367,6 +1372,7 @@ YYSTYPE yylval; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1376,9 +1382,6 @@ YYSTYPE yylval; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -1387,16 +1390,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: ")); @@ -1428,16 +1431,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; @@ -1477,8 +1484,6 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1455 of yacc.c */ #line 118 "../xml/XPathGrammar.y" { PARSER->m_topExpr = (yyvsp[(1) - (1)].expr); @@ -1486,8 +1491,6 @@ yyreduce: break; case 3: - -/* Line 1455 of yacc.c */ #line 125 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(false); @@ -1495,8 +1498,6 @@ yyreduce: break; case 4: - -/* Line 1455 of yacc.c */ #line 130 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(true); @@ -1504,8 +1505,6 @@ yyreduce: break; case 5: - -/* Line 1455 of yacc.c */ #line 137 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1514,8 +1513,6 @@ yyreduce: break; case 6: - -/* Line 1455 of yacc.c */ #line 143 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1523,8 +1520,6 @@ yyreduce: break; case 7: - -/* Line 1455 of yacc.c */ #line 148 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1534,8 +1529,6 @@ yyreduce: break; case 8: - -/* Line 1455 of yacc.c */ #line 157 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1546,8 +1539,6 @@ yyreduce: break; case 9: - -/* Line 1455 of yacc.c */ #line 165 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); @@ -1556,8 +1547,6 @@ yyreduce: break; case 10: - -/* Line 1455 of yacc.c */ #line 171 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step)); @@ -1568,8 +1557,6 @@ yyreduce: break; case 11: - -/* Line 1455 of yacc.c */ #line 181 "../xml/XPathGrammar.y" { if ((yyvsp[(2) - (2)].predList)) { @@ -1583,8 +1570,6 @@ yyreduce: break; case 12: - -/* Line 1455 of yacc.c */ #line 192 "../xml/XPathGrammar.y" { String localName; @@ -1605,8 +1590,6 @@ yyreduce: break; case 13: - -/* Line 1455 of yacc.c */ #line 210 "../xml/XPathGrammar.y" { if ((yyvsp[(3) - (3)].predList)) { @@ -1620,8 +1603,6 @@ yyreduce: break; case 14: - -/* Line 1455 of yacc.c */ #line 221 "../xml/XPathGrammar.y" { String localName; @@ -1642,8 +1623,6 @@ yyreduce: break; case 17: - -/* Line 1455 of yacc.c */ #line 245 "../xml/XPathGrammar.y" { (yyval.axis) = Step::AttributeAxis; @@ -1651,8 +1630,6 @@ yyreduce: break; case 18: - -/* Line 1455 of yacc.c */ #line 252 "../xml/XPathGrammar.y" { if (*(yyvsp[(1) - (3)].str) == "node") @@ -1668,8 +1645,6 @@ yyreduce: break; case 19: - -/* Line 1455 of yacc.c */ #line 265 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); @@ -1679,8 +1654,6 @@ yyreduce: break; case 20: - -/* Line 1455 of yacc.c */ #line 272 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace()); @@ -1691,8 +1664,6 @@ yyreduce: break; case 21: - -/* Line 1455 of yacc.c */ #line 282 "../xml/XPathGrammar.y" { (yyval.predList) = 0; @@ -1700,8 +1671,6 @@ yyreduce: break; case 23: - -/* Line 1455 of yacc.c */ #line 291 "../xml/XPathGrammar.y" { (yyval.predList) = new Vector<Predicate*>; @@ -1712,8 +1681,6 @@ yyreduce: break; case 24: - -/* Line 1455 of yacc.c */ #line 299 "../xml/XPathGrammar.y" { (yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr))); @@ -1722,8 +1689,6 @@ yyreduce: break; case 25: - -/* Line 1455 of yacc.c */ #line 307 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1731,8 +1696,6 @@ yyreduce: break; case 26: - -/* Line 1455 of yacc.c */ #line 314 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1741,8 +1704,6 @@ yyreduce: break; case 27: - -/* Line 1455 of yacc.c */ #line 322 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1751,8 +1712,6 @@ yyreduce: break; case 28: - -/* Line 1455 of yacc.c */ #line 328 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1761,8 +1720,6 @@ yyreduce: break; case 29: - -/* Line 1455 of yacc.c */ #line 336 "../xml/XPathGrammar.y" { (yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str)); @@ -1772,8 +1729,6 @@ yyreduce: break; case 30: - -/* Line 1455 of yacc.c */ #line 343 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1781,8 +1736,6 @@ yyreduce: break; case 31: - -/* Line 1455 of yacc.c */ #line 348 "../xml/XPathGrammar.y" { (yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str)); @@ -1792,8 +1745,6 @@ yyreduce: break; case 32: - -/* Line 1455 of yacc.c */ #line 355 "../xml/XPathGrammar.y" { (yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble()); @@ -1803,8 +1754,6 @@ yyreduce: break; case 34: - -/* Line 1455 of yacc.c */ #line 366 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str)); @@ -1816,8 +1765,6 @@ yyreduce: break; case 35: - -/* Line 1455 of yacc.c */ #line 375 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList)); @@ -1830,8 +1777,6 @@ yyreduce: break; case 36: - -/* Line 1455 of yacc.c */ #line 387 "../xml/XPathGrammar.y" { (yyval.argList) = new Vector<Expression*>; @@ -1842,8 +1787,6 @@ yyreduce: break; case 37: - -/* Line 1455 of yacc.c */ #line 395 "../xml/XPathGrammar.y" { (yyval.argList)->append((yyvsp[(3) - (3)].expr)); @@ -1852,8 +1795,6 @@ yyreduce: break; case 40: - -/* Line 1455 of yacc.c */ #line 409 "../xml/XPathGrammar.y" { (yyval.expr) = new Union; @@ -1866,8 +1807,6 @@ yyreduce: break; case 41: - -/* Line 1455 of yacc.c */ #line 421 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(1) - (1)].locationPath); @@ -1875,8 +1814,6 @@ yyreduce: break; case 43: - -/* Line 1455 of yacc.c */ #line 428 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); @@ -1888,8 +1825,6 @@ yyreduce: break; case 44: - -/* Line 1455 of yacc.c */ #line 437 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step)); @@ -1903,8 +1838,6 @@ yyreduce: break; case 46: - -/* Line 1455 of yacc.c */ #line 452 "../xml/XPathGrammar.y" { (yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList)); @@ -1915,8 +1848,6 @@ yyreduce: break; case 48: - -/* Line 1455 of yacc.c */ #line 464 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1927,8 +1858,6 @@ yyreduce: break; case 50: - -/* Line 1455 of yacc.c */ #line 476 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1939,8 +1868,6 @@ yyreduce: break; case 52: - -/* Line 1455 of yacc.c */ #line 488 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1951,8 +1878,6 @@ yyreduce: break; case 54: - -/* Line 1455 of yacc.c */ #line 500 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1963,8 +1888,6 @@ yyreduce: break; case 56: - -/* Line 1455 of yacc.c */ #line 512 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1975,8 +1898,6 @@ yyreduce: break; case 57: - -/* Line 1455 of yacc.c */ #line 520 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1987,8 +1908,6 @@ yyreduce: break; case 59: - -/* Line 1455 of yacc.c */ #line 532 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp((yyvsp[(2) - (3)].numop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1999,8 +1918,6 @@ yyreduce: break; case 61: - -/* Line 1455 of yacc.c */ #line 544 "../xml/XPathGrammar.y" { (yyval.expr) = new Negative; @@ -2011,9 +1928,8 @@ yyreduce: break; - -/* Line 1455 of yacc.c */ -#line 2017 "WebCore/tmp/../generated/XPathGrammar.tab.c" +/* Line 1267 of yacc.c. */ +#line 1933 "WebCore/tmp/../generated/XPathGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2024,6 +1940,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. */ @@ -2088,7 +2005,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) @@ -2105,7 +2022,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; @@ -2162,6 +2079,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -2186,7 +2106,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2197,7 +2117,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 @@ -2223,8 +2143,6 @@ yyreturn: } - -/* Line 1675 of yacc.c */ #line 552 "../xml/XPathGrammar.y" |