diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/FreezeScript/Grammar.cpp | 110 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Grammar.h | 7 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Scanner.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceGrid/Grammar.cpp | 707 | ||||
-rw-r--r-- | cpp/src/IceGrid/Grammar.h | 71 | ||||
-rw-r--r-- | cpp/src/IceGrid/Scanner.cpp | 56 | ||||
-rw-r--r-- | cpp/src/IceStorm/Grammar.cpp | 400 | ||||
-rw-r--r-- | cpp/src/IceStorm/Grammar.h | 42 | ||||
-rw-r--r-- | cpp/src/IceStorm/Scanner.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.cpp | 1595 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.h | 8 | ||||
-rw-r--r-- | cpp/src/Slice/Scanner.cpp | 6 |
12 files changed, 1628 insertions, 1382 deletions
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp index c435a0ad234..8e47febf5d7 100644 --- a/cpp/src/FreezeScript/Grammar.cpp +++ b/cpp/src/FreezeScript/Grammar.cpp @@ -1,9 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ + +/* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + 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 it under the terms of the GNU General Public License as published by @@ -45,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -119,7 +120,7 @@ freeze_script_error(const char* s) /* Line 189 of yacc.c */ -#line 123 "Grammar.tab.c" +#line 124 "Grammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -190,7 +191,7 @@ typedef int YYSTYPE; /* Line 264 of yacc.c */ -#line 194 "Grammar.tab.c" +#line 195 "Grammar.tab.c" #ifdef short # undef short @@ -240,7 +241,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -645,18 +646,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -713,7 +705,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1451,7 +1443,7 @@ yyreduce: { case 2: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 85 "../FreezeScript/Grammar.y" { parseResult = (yyvsp[(1) - (1)]); @@ -1460,7 +1452,7 @@ yyreduce: case 3: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 94 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1469,7 +1461,7 @@ yyreduce: case 4: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 103 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpLess, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1478,7 +1470,7 @@ yyreduce: case 5: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 107 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpGreater, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1487,7 +1479,7 @@ yyreduce: case 6: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 111 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpLessEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1496,7 +1488,7 @@ yyreduce: case 7: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 115 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpGrEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1505,7 +1497,7 @@ yyreduce: case 8: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 119 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1514,7 +1506,7 @@ yyreduce: case 9: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 123 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpNotEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1523,7 +1515,7 @@ yyreduce: case 10: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 127 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpOr, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1532,7 +1524,7 @@ yyreduce: case 11: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 131 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpAnd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1541,7 +1533,7 @@ yyreduce: case 12: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 135 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpMul, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1550,7 +1542,7 @@ yyreduce: case 13: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 139 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpDiv, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1559,7 +1551,7 @@ yyreduce: case 14: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 143 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpMod, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1568,7 +1560,7 @@ yyreduce: case 15: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 147 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpAdd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1577,7 +1569,7 @@ yyreduce: case 16: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 151 "../FreezeScript/Grammar.y" { (yyval) = new BinaryNode(BinOpSub, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); @@ -1586,7 +1578,7 @@ yyreduce: case 17: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 155 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1595,7 +1587,7 @@ yyreduce: case 18: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 164 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); @@ -1604,7 +1596,7 @@ yyreduce: case 19: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 168 "../FreezeScript/Grammar.y" { (yyval) = new UnaryNode(UnaryOpNeg, parseDataFactory, (yyvsp[(2) - (2)])); @@ -1613,7 +1605,7 @@ yyreduce: case 20: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 172 "../FreezeScript/Grammar.y" { (yyval) = new UnaryNode(UnaryOpNot, parseDataFactory, (yyvsp[(2) - (2)])); @@ -1622,7 +1614,7 @@ yyreduce: case 21: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 176 "../FreezeScript/Grammar.y" { IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1633,7 +1625,7 @@ yyreduce: case 22: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 182 "../FreezeScript/Grammar.y" { FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1644,7 +1636,7 @@ yyreduce: case 23: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 188 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1655,7 +1647,7 @@ yyreduce: case 24: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 194 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createBoolean(true, true)); @@ -1664,7 +1656,7 @@ yyreduce: case 25: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 198 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createBoolean(false, true)); @@ -1673,7 +1665,7 @@ yyreduce: case 26: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 202 "../FreezeScript/Grammar.y" { (yyval) = new DataNode(parseDataFactory->createNil(true)); @@ -1682,7 +1674,7 @@ yyreduce: case 27: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 206 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1691,7 +1683,7 @@ yyreduce: case 28: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 210 "../FreezeScript/Grammar.y" { EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1705,7 +1697,7 @@ yyreduce: case 29: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 219 "../FreezeScript/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); @@ -1714,7 +1706,7 @@ yyreduce: case 30: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 223 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1725,7 +1717,7 @@ yyreduce: case 31: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 234 "../FreezeScript/Grammar.y" { EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (4)])); @@ -1737,7 +1729,7 @@ yyreduce: case 32: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 241 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -1751,7 +1743,7 @@ yyreduce: case 33: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 250 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -1762,7 +1754,7 @@ yyreduce: case 34: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 261 "../FreezeScript/Grammar.y" { StringTokPtr func = StringTokPtr::dynamicCast((yyvsp[(1) - (4)])); @@ -1775,7 +1767,7 @@ yyreduce: case 35: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 274 "../FreezeScript/Grammar.y" { NodeListTokPtr l = NodeListTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1787,7 +1779,7 @@ yyreduce: case 36: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 281 "../FreezeScript/Grammar.y" { NodeListTokPtr result = new NodeListTok; @@ -1798,7 +1790,7 @@ yyreduce: case 37: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 287 "../FreezeScript/Grammar.y" { (yyval) = new NodeListTok; @@ -1807,7 +1799,7 @@ yyreduce: case 38: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 296 "../FreezeScript/Grammar.y" { StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -1821,7 +1813,7 @@ yyreduce: case 39: -/* Line 1464 of yacc.c */ +/* Line 1455 of yacc.c */ #line 305 "../FreezeScript/Grammar.y" { StringTokPtr idVal = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -1834,8 +1826,8 @@ yyreduce: -/* Line 1464 of yacc.c */ -#line 1839 "Grammar.tab.c" +/* Line 1455 of yacc.c */ +#line 1831 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2046,7 +2038,7 @@ yyreturn: -/* Line 1684 of yacc.c */ +/* Line 1675 of yacc.c */ #line 314 "../FreezeScript/Grammar.y" diff --git a/cpp/src/FreezeScript/Grammar.h b/cpp/src/FreezeScript/Grammar.h index de0df9778b2..ae561a72f12 100644 --- a/cpp/src/FreezeScript/Grammar.h +++ b/cpp/src/FreezeScript/Grammar.h @@ -1,9 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ + +/* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + 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 it under the terms of the GNU General Public License as published by diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp index c759d4012bc..9c427a38707 100644 --- a/cpp/src/FreezeScript/Scanner.cpp +++ b/cpp/src/FreezeScript/Scanner.cpp @@ -671,7 +671,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( freeze_script_text, freeze_script_leng, 1, freeze_script_out ) +#define ECHO do { if (fwrite( freeze_script_text, freeze_script_leng, 1, freeze_script_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -682,7 +682,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( freeze_script_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp index 58770391dcd..31f11b505d4 100644 --- a/cpp/src/IceGrid/Grammar.cpp +++ b/cpp/src/IceGrid/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + 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 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,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. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,105 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ICE_GRID_HELP = 258, - ICE_GRID_EXIT = 259, - ICE_GRID_APPLICATION = 260, - ICE_GRID_NODE = 261, - ICE_GRID_REGISTRY = 262, - ICE_GRID_SERVER = 263, - ICE_GRID_ADAPTER = 264, - ICE_GRID_PING = 265, - ICE_GRID_LOAD = 266, - ICE_GRID_SOCKETS = 267, - ICE_GRID_ADD = 268, - ICE_GRID_REMOVE = 269, - ICE_GRID_LIST = 270, - ICE_GRID_SHUTDOWN = 271, - ICE_GRID_STRING = 272, - ICE_GRID_START = 273, - ICE_GRID_STOP = 274, - ICE_GRID_PATCH = 275, - ICE_GRID_SIGNAL = 276, - ICE_GRID_STDOUT = 277, - ICE_GRID_STDERR = 278, - ICE_GRID_DESCRIBE = 279, - ICE_GRID_PROPERTIES = 280, - ICE_GRID_PROPERTY = 281, - ICE_GRID_STATE = 282, - ICE_GRID_PID = 283, - ICE_GRID_ENDPOINTS = 284, - ICE_GRID_ACTIVATION = 285, - ICE_GRID_OBJECT = 286, - ICE_GRID_FIND = 287, - ICE_GRID_SHOW = 288, - ICE_GRID_COPYING = 289, - ICE_GRID_WARRANTY = 290, - ICE_GRID_DIFF = 291, - ICE_GRID_UPDATE = 292, - ICE_GRID_INSTANTIATE = 293, - ICE_GRID_TEMPLATE = 294, - ICE_GRID_SERVICE = 295, - ICE_GRID_ENABLE = 296, - ICE_GRID_DISABLE = 297 - }; -#endif -/* Tokens. */ -#define ICE_GRID_HELP 258 -#define ICE_GRID_EXIT 259 -#define ICE_GRID_APPLICATION 260 -#define ICE_GRID_NODE 261 -#define ICE_GRID_REGISTRY 262 -#define ICE_GRID_SERVER 263 -#define ICE_GRID_ADAPTER 264 -#define ICE_GRID_PING 265 -#define ICE_GRID_LOAD 266 -#define ICE_GRID_SOCKETS 267 -#define ICE_GRID_ADD 268 -#define ICE_GRID_REMOVE 269 -#define ICE_GRID_LIST 270 -#define ICE_GRID_SHUTDOWN 271 -#define ICE_GRID_STRING 272 -#define ICE_GRID_START 273 -#define ICE_GRID_STOP 274 -#define ICE_GRID_PATCH 275 -#define ICE_GRID_SIGNAL 276 -#define ICE_GRID_STDOUT 277 -#define ICE_GRID_STDERR 278 -#define ICE_GRID_DESCRIBE 279 -#define ICE_GRID_PROPERTIES 280 -#define ICE_GRID_PROPERTY 281 -#define ICE_GRID_STATE 282 -#define ICE_GRID_PID 283 -#define ICE_GRID_ENDPOINTS 284 -#define ICE_GRID_ACTIVATION 285 -#define ICE_GRID_OBJECT 286 -#define ICE_GRID_FIND 287 -#define ICE_GRID_SHOW 288 -#define ICE_GRID_COPYING 289 -#define ICE_GRID_WARRANTY 290 -#define ICE_GRID_DIFF 291 -#define ICE_GRID_UPDATE 292 -#define ICE_GRID_INSTANTIATE 293 -#define ICE_GRID_TEMPLATE 294 -#define ICE_GRID_SERVICE 295 -#define ICE_GRID_ENABLE 296 -#define ICE_GRID_DISABLE 297 - +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -189,6 +103,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 108 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -207,20 +124,71 @@ yyerror(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 { + ICE_GRID_HELP = 258, + ICE_GRID_EXIT = 259, + ICE_GRID_APPLICATION = 260, + ICE_GRID_NODE = 261, + ICE_GRID_REGISTRY = 262, + ICE_GRID_SERVER = 263, + ICE_GRID_ADAPTER = 264, + ICE_GRID_PING = 265, + ICE_GRID_LOAD = 266, + ICE_GRID_SOCKETS = 267, + ICE_GRID_ADD = 268, + ICE_GRID_REMOVE = 269, + ICE_GRID_LIST = 270, + ICE_GRID_SHUTDOWN = 271, + ICE_GRID_STRING = 272, + ICE_GRID_START = 273, + ICE_GRID_STOP = 274, + ICE_GRID_PATCH = 275, + ICE_GRID_SIGNAL = 276, + ICE_GRID_STDOUT = 277, + ICE_GRID_STDERR = 278, + ICE_GRID_DESCRIBE = 279, + ICE_GRID_PROPERTIES = 280, + ICE_GRID_PROPERTY = 281, + ICE_GRID_STATE = 282, + ICE_GRID_PID = 283, + ICE_GRID_ENDPOINTS = 284, + ICE_GRID_ACTIVATION = 285, + ICE_GRID_OBJECT = 286, + ICE_GRID_FIND = 287, + ICE_GRID_SHOW = 288, + ICE_GRID_COPYING = 289, + ICE_GRID_WARRANTY = 290, + ICE_GRID_DIFF = 291, + ICE_GRID_UPDATE = 292, + ICE_GRID_INSTANTIATE = 293, + ICE_GRID_TEMPLATE = 294, + ICE_GRID_SERVICE = 295, + ICE_GRID_ENABLE = 296, + ICE_GRID_DISABLE = 297 + }; +#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 216 of yacc.c. */ -#line 224 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 192 "Grammar.tab.c" #ifdef short # undef short @@ -270,7 +238,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -295,14 +263,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -383,9 +351,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -419,12 +387,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) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -1446,7 +1414,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1557,17 +1525,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -1601,11 +1572,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1885,10 +1856,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1907,10 +1876,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1934,74 +1902,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; + /* Number of syntax errors so far. */ + int yynerrs; - int yystate; - int yyn; - int yyresult; - /* 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]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* 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. */ + 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 state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + 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; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* 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; @@ -2031,7 +2000,6 @@ int yynerrs; 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 @@ -2039,7 +2007,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -2062,9 +2029,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2075,7 +2041,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -2085,6 +2050,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -2093,16 +2061,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2134,20 +2102,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -2187,30 +2151,40 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 89 "Grammar.y" { ;} break; case 3: + +/* Line 1455 of yacc.c */ #line 92 "Grammar.y" { ;} break; case 4: + +/* Line 1455 of yacc.c */ #line 100 "Grammar.y" { ;} break; case 5: + +/* Line 1455 of yacc.c */ #line 103 "Grammar.y" { ;} break; case 6: + +/* Line 1455 of yacc.c */ #line 109 "Grammar.y" { parser->checkInterrupted(); @@ -2218,6 +2192,8 @@ yyreduce: break; case 7: + +/* Line 1455 of yacc.c */ #line 118 "Grammar.y" { parser->usage(); @@ -2225,6 +2201,8 @@ yyreduce: break; case 8: + +/* Line 1455 of yacc.c */ #line 122 "Grammar.y" { return 0; @@ -2232,6 +2210,8 @@ yyreduce: break; case 9: + +/* Line 1455 of yacc.c */ #line 126 "Grammar.y" { parser->addApplication((yyvsp[(3) - (4)])); @@ -2239,6 +2219,8 @@ yyreduce: break; case 10: + +/* Line 1455 of yacc.c */ #line 130 "Grammar.y" { parser->usage("application", "add"); @@ -2246,6 +2228,8 @@ yyreduce: break; case 11: + +/* Line 1455 of yacc.c */ #line 134 "Grammar.y" { parser->removeApplication((yyvsp[(3) - (4)])); @@ -2253,6 +2237,8 @@ yyreduce: break; case 12: + +/* Line 1455 of yacc.c */ #line 138 "Grammar.y" { parser->usage("application", "remove"); @@ -2260,6 +2246,8 @@ yyreduce: break; case 13: + +/* Line 1455 of yacc.c */ #line 142 "Grammar.y" { parser->diffApplication((yyvsp[(3) - (4)])); @@ -2267,6 +2255,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 146 "Grammar.y" { parser->usage("application", "diff"); @@ -2274,6 +2264,8 @@ yyreduce: break; case 15: + +/* Line 1455 of yacc.c */ #line 150 "Grammar.y" { parser->updateApplication((yyvsp[(3) - (4)])); @@ -2281,6 +2273,8 @@ yyreduce: break; case 16: + +/* Line 1455 of yacc.c */ #line 154 "Grammar.y" { parser->usage("application", "update"); @@ -2288,6 +2282,8 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 158 "Grammar.y" { parser->describeApplication((yyvsp[(3) - (4)])); @@ -2295,6 +2291,8 @@ yyreduce: break; case 18: + +/* Line 1455 of yacc.c */ #line 162 "Grammar.y" { parser->usage("application", "describe"); @@ -2302,6 +2300,8 @@ yyreduce: break; case 19: + +/* Line 1455 of yacc.c */ #line 166 "Grammar.y" { parser->patchApplication((yyvsp[(3) - (4)])); @@ -2309,6 +2309,8 @@ yyreduce: break; case 20: + +/* Line 1455 of yacc.c */ #line 170 "Grammar.y" { parser->usage("application", "patch"); @@ -2316,6 +2318,8 @@ yyreduce: break; case 21: + +/* Line 1455 of yacc.c */ #line 174 "Grammar.y" { parser->listAllApplications((yyvsp[(3) - (4)])); @@ -2323,6 +2327,8 @@ yyreduce: break; case 22: + +/* Line 1455 of yacc.c */ #line 178 "Grammar.y" { parser->usage("application", "list"); @@ -2330,6 +2336,8 @@ yyreduce: break; case 23: + +/* Line 1455 of yacc.c */ #line 182 "Grammar.y" { parser->describeServerTemplate((yyvsp[(4) - (5)])); @@ -2337,6 +2345,8 @@ yyreduce: break; case 24: + +/* Line 1455 of yacc.c */ #line 186 "Grammar.y" { parser->usage("server template", "describe"); @@ -2344,6 +2354,8 @@ yyreduce: break; case 25: + +/* Line 1455 of yacc.c */ #line 190 "Grammar.y" { parser->instantiateServerTemplate((yyvsp[(4) - (5)])); @@ -2351,6 +2363,8 @@ yyreduce: break; case 26: + +/* Line 1455 of yacc.c */ #line 194 "Grammar.y" { parser->usage("server template", "instantiate"); @@ -2358,6 +2372,8 @@ yyreduce: break; case 27: + +/* Line 1455 of yacc.c */ #line 198 "Grammar.y" { parser->usage("server template"); @@ -2365,6 +2381,8 @@ yyreduce: break; case 28: + +/* Line 1455 of yacc.c */ #line 202 "Grammar.y" { parser->describeServiceTemplate((yyvsp[(4) - (5)])); @@ -2372,6 +2390,8 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 206 "Grammar.y" { parser->usage("service template", "describe"); @@ -2379,6 +2399,8 @@ yyreduce: break; case 30: + +/* Line 1455 of yacc.c */ #line 210 "Grammar.y" { parser->usage("service template"); @@ -2386,6 +2408,8 @@ yyreduce: break; case 31: + +/* Line 1455 of yacc.c */ #line 214 "Grammar.y" { parser->describeNode((yyvsp[(3) - (4)])); @@ -2393,6 +2417,8 @@ yyreduce: break; case 32: + +/* Line 1455 of yacc.c */ #line 218 "Grammar.y" { parser->usage("node", "describe"); @@ -2400,6 +2426,8 @@ yyreduce: break; case 33: + +/* Line 1455 of yacc.c */ #line 222 "Grammar.y" { parser->pingNode((yyvsp[(3) - (4)])); @@ -2407,6 +2435,8 @@ yyreduce: break; case 34: + +/* Line 1455 of yacc.c */ #line 226 "Grammar.y" { parser->usage("node", "ping"); @@ -2414,6 +2444,8 @@ yyreduce: break; case 35: + +/* Line 1455 of yacc.c */ #line 230 "Grammar.y" { parser->printLoadNode((yyvsp[(3) - (4)])); @@ -2421,6 +2453,8 @@ yyreduce: break; case 36: + +/* Line 1455 of yacc.c */ #line 234 "Grammar.y" { parser->usage("node", "load"); @@ -2428,6 +2462,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 238 "Grammar.y" { parser->printNodeProcessorSockets((yyvsp[(3) - (4)])); @@ -2435,6 +2471,8 @@ yyreduce: break; case 38: + +/* Line 1455 of yacc.c */ #line 242 "Grammar.y" { parser->usage("node", "sockets"); @@ -2442,6 +2480,8 @@ yyreduce: break; case 39: + +/* Line 1455 of yacc.c */ #line 246 "Grammar.y" { parser->shutdownNode((yyvsp[(3) - (4)])); @@ -2449,6 +2489,8 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 250 "Grammar.y" { parser->usage("node", "shutdown"); @@ -2456,6 +2498,8 @@ yyreduce: break; case 41: + +/* Line 1455 of yacc.c */ #line 254 "Grammar.y" { parser->listAllNodes((yyvsp[(3) - (4)])); @@ -2463,6 +2507,8 @@ yyreduce: break; case 42: + +/* Line 1455 of yacc.c */ #line 258 "Grammar.y" { parser->usage("node", "list"); @@ -2470,6 +2516,8 @@ yyreduce: break; case 43: + +/* Line 1455 of yacc.c */ #line 262 "Grammar.y" { parser->showFile("node", (yyvsp[(3) - (4)])); @@ -2477,6 +2525,8 @@ yyreduce: break; case 44: + +/* Line 1455 of yacc.c */ #line 266 "Grammar.y" { parser->usage("node", "show"); @@ -2484,6 +2534,8 @@ yyreduce: break; case 45: + +/* Line 1455 of yacc.c */ #line 270 "Grammar.y" { parser->describeRegistry((yyvsp[(3) - (4)])); @@ -2491,6 +2543,8 @@ yyreduce: break; case 46: + +/* Line 1455 of yacc.c */ #line 274 "Grammar.y" { parser->usage("registry", "describe"); @@ -2498,6 +2552,8 @@ yyreduce: break; case 47: + +/* Line 1455 of yacc.c */ #line 278 "Grammar.y" { parser->pingRegistry((yyvsp[(3) - (4)])); @@ -2505,6 +2561,8 @@ yyreduce: break; case 48: + +/* Line 1455 of yacc.c */ #line 282 "Grammar.y" { parser->usage("registry", "ping"); @@ -2512,6 +2570,8 @@ yyreduce: break; case 49: + +/* Line 1455 of yacc.c */ #line 286 "Grammar.y" { parser->shutdownRegistry((yyvsp[(3) - (4)])); @@ -2519,6 +2579,8 @@ yyreduce: break; case 50: + +/* Line 1455 of yacc.c */ #line 290 "Grammar.y" { parser->usage("registry", "shutdown"); @@ -2526,6 +2588,8 @@ yyreduce: break; case 51: + +/* Line 1455 of yacc.c */ #line 294 "Grammar.y" { parser->listAllRegistries((yyvsp[(3) - (4)])); @@ -2533,6 +2597,8 @@ yyreduce: break; case 52: + +/* Line 1455 of yacc.c */ #line 298 "Grammar.y" { parser->usage("registry", "list"); @@ -2540,6 +2606,8 @@ yyreduce: break; case 53: + +/* Line 1455 of yacc.c */ #line 302 "Grammar.y" { parser->showFile("registry", (yyvsp[(3) - (4)])); @@ -2547,6 +2615,8 @@ yyreduce: break; case 54: + +/* Line 1455 of yacc.c */ #line 306 "Grammar.y" { parser->usage("registry", "show"); @@ -2554,6 +2624,8 @@ yyreduce: break; case 55: + +/* Line 1455 of yacc.c */ #line 310 "Grammar.y" { parser->removeServer((yyvsp[(3) - (4)])); @@ -2561,6 +2633,8 @@ yyreduce: break; case 56: + +/* Line 1455 of yacc.c */ #line 314 "Grammar.y" { parser->usage("server", "remove"); @@ -2568,6 +2642,8 @@ yyreduce: break; case 57: + +/* Line 1455 of yacc.c */ #line 318 "Grammar.y" { parser->describeServer((yyvsp[(3) - (4)])); @@ -2575,6 +2651,8 @@ yyreduce: break; case 58: + +/* Line 1455 of yacc.c */ #line 322 "Grammar.y" { parser->usage("server", "describe"); @@ -2582,6 +2660,8 @@ yyreduce: break; case 59: + +/* Line 1455 of yacc.c */ #line 326 "Grammar.y" { parser->startServer((yyvsp[(3) - (4)])); @@ -2589,6 +2669,8 @@ yyreduce: break; case 60: + +/* Line 1455 of yacc.c */ #line 330 "Grammar.y" { parser->usage("server", "start"); @@ -2596,6 +2678,8 @@ yyreduce: break; case 61: + +/* Line 1455 of yacc.c */ #line 334 "Grammar.y" { parser->stopServer((yyvsp[(3) - (4)])); @@ -2603,6 +2687,8 @@ yyreduce: break; case 62: + +/* Line 1455 of yacc.c */ #line 338 "Grammar.y" { parser->usage("server", "stop"); @@ -2610,6 +2696,8 @@ yyreduce: break; case 63: + +/* Line 1455 of yacc.c */ #line 342 "Grammar.y" { parser->patchServer((yyvsp[(3) - (4)])); @@ -2617,6 +2705,8 @@ yyreduce: break; case 64: + +/* Line 1455 of yacc.c */ #line 346 "Grammar.y" { parser->usage("server", "patch"); @@ -2624,6 +2714,8 @@ yyreduce: break; case 65: + +/* Line 1455 of yacc.c */ #line 350 "Grammar.y" { parser->signalServer((yyvsp[(3) - (4)])); @@ -2631,6 +2723,8 @@ yyreduce: break; case 66: + +/* Line 1455 of yacc.c */ #line 354 "Grammar.y" { parser->usage("server", "signal"); @@ -2638,6 +2732,8 @@ yyreduce: break; case 67: + +/* Line 1455 of yacc.c */ #line 358 "Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 1); @@ -2645,6 +2741,8 @@ yyreduce: break; case 68: + +/* Line 1455 of yacc.c */ #line 362 "Grammar.y" { parser->usage("server", "stdout"); @@ -2652,6 +2750,8 @@ yyreduce: break; case 69: + +/* Line 1455 of yacc.c */ #line 366 "Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 2); @@ -2659,6 +2759,8 @@ yyreduce: break; case 70: + +/* Line 1455 of yacc.c */ #line 370 "Grammar.y" { parser->usage("server", "stderr"); @@ -2666,6 +2768,8 @@ yyreduce: break; case 71: + +/* Line 1455 of yacc.c */ #line 374 "Grammar.y" { parser->stateServer((yyvsp[(3) - (4)])); @@ -2673,6 +2777,8 @@ yyreduce: break; case 72: + +/* Line 1455 of yacc.c */ #line 378 "Grammar.y" { parser->usage("server", "start"); @@ -2680,6 +2786,8 @@ yyreduce: break; case 73: + +/* Line 1455 of yacc.c */ #line 382 "Grammar.y" { parser->pidServer((yyvsp[(3) - (4)])); @@ -2687,6 +2795,8 @@ yyreduce: break; case 74: + +/* Line 1455 of yacc.c */ #line 386 "Grammar.y" { parser->usage("server", "pid"); @@ -2694,6 +2804,8 @@ yyreduce: break; case 75: + +/* Line 1455 of yacc.c */ #line 390 "Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), false); @@ -2701,6 +2813,8 @@ yyreduce: break; case 76: + +/* Line 1455 of yacc.c */ #line 394 "Grammar.y" { parser->usage("server", "properties"); @@ -2708,6 +2822,8 @@ yyreduce: break; case 77: + +/* Line 1455 of yacc.c */ #line 398 "Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), true); @@ -2715,6 +2831,8 @@ yyreduce: break; case 78: + +/* Line 1455 of yacc.c */ #line 402 "Grammar.y" { parser->usage("server", "property"); @@ -2722,6 +2840,8 @@ yyreduce: break; case 79: + +/* Line 1455 of yacc.c */ #line 406 "Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), true); @@ -2729,6 +2849,8 @@ yyreduce: break; case 80: + +/* Line 1455 of yacc.c */ #line 410 "Grammar.y" { parser->usage("server", "enable"); @@ -2736,6 +2858,8 @@ yyreduce: break; case 81: + +/* Line 1455 of yacc.c */ #line 414 "Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), false); @@ -2743,6 +2867,8 @@ yyreduce: break; case 82: + +/* Line 1455 of yacc.c */ #line 418 "Grammar.y" { parser->usage("server", "disable"); @@ -2750,6 +2876,8 @@ yyreduce: break; case 83: + +/* Line 1455 of yacc.c */ #line 422 "Grammar.y" { parser->listAllServers((yyvsp[(3) - (4)])); @@ -2757,6 +2885,8 @@ yyreduce: break; case 84: + +/* Line 1455 of yacc.c */ #line 426 "Grammar.y" { parser->usage("server", "list"); @@ -2764,6 +2894,8 @@ yyreduce: break; case 85: + +/* Line 1455 of yacc.c */ #line 430 "Grammar.y" { parser->showFile("server", (yyvsp[(3) - (4)])); @@ -2771,6 +2903,8 @@ yyreduce: break; case 86: + +/* Line 1455 of yacc.c */ #line 434 "Grammar.y" { parser->usage("server", "show"); @@ -2778,6 +2912,8 @@ yyreduce: break; case 87: + +/* Line 1455 of yacc.c */ #line 438 "Grammar.y" { parser->startService((yyvsp[(3) - (4)])); @@ -2785,6 +2921,8 @@ yyreduce: break; case 88: + +/* Line 1455 of yacc.c */ #line 442 "Grammar.y" { parser->usage("service", "start"); @@ -2792,6 +2930,8 @@ yyreduce: break; case 89: + +/* Line 1455 of yacc.c */ #line 446 "Grammar.y" { parser->stopService((yyvsp[(3) - (4)])); @@ -2799,6 +2939,8 @@ yyreduce: break; case 90: + +/* Line 1455 of yacc.c */ #line 450 "Grammar.y" { parser->usage("service", "stop"); @@ -2806,6 +2948,8 @@ yyreduce: break; case 91: + +/* Line 1455 of yacc.c */ #line 454 "Grammar.y" { parser->describeService((yyvsp[(3) - (4)])); @@ -2813,6 +2957,8 @@ yyreduce: break; case 92: + +/* Line 1455 of yacc.c */ #line 458 "Grammar.y" { parser->usage("service", "describe"); @@ -2820,6 +2966,8 @@ yyreduce: break; case 93: + +/* Line 1455 of yacc.c */ #line 462 "Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), false); @@ -2827,6 +2975,8 @@ yyreduce: break; case 94: + +/* Line 1455 of yacc.c */ #line 466 "Grammar.y" { parser->usage("service", "properties"); @@ -2834,6 +2984,8 @@ yyreduce: break; case 95: + +/* Line 1455 of yacc.c */ #line 470 "Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), true); @@ -2841,6 +2993,8 @@ yyreduce: break; case 96: + +/* Line 1455 of yacc.c */ #line 474 "Grammar.y" { parser->usage("service", "property"); @@ -2848,6 +3002,8 @@ yyreduce: break; case 97: + +/* Line 1455 of yacc.c */ #line 478 "Grammar.y" { parser->listServices((yyvsp[(3) - (4)])); @@ -2855,6 +3011,8 @@ yyreduce: break; case 98: + +/* Line 1455 of yacc.c */ #line 482 "Grammar.y" { parser->usage("service", "list"); @@ -2862,6 +3020,8 @@ yyreduce: break; case 99: + +/* Line 1455 of yacc.c */ #line 486 "Grammar.y" { parser->endpointsAdapter((yyvsp[(3) - (4)])); @@ -2869,6 +3029,8 @@ yyreduce: break; case 100: + +/* Line 1455 of yacc.c */ #line 490 "Grammar.y" { parser->usage("adapter", "endpoints"); @@ -2876,6 +3038,8 @@ yyreduce: break; case 101: + +/* Line 1455 of yacc.c */ #line 494 "Grammar.y" { parser->removeAdapter((yyvsp[(3) - (4)])); @@ -2883,6 +3047,8 @@ yyreduce: break; case 102: + +/* Line 1455 of yacc.c */ #line 498 "Grammar.y" { parser->usage("adapter", "remove"); @@ -2890,6 +3056,8 @@ yyreduce: break; case 103: + +/* Line 1455 of yacc.c */ #line 502 "Grammar.y" { parser->listAllAdapters((yyvsp[(3) - (4)])); @@ -2897,6 +3065,8 @@ yyreduce: break; case 104: + +/* Line 1455 of yacc.c */ #line 506 "Grammar.y" { parser->usage("adapter", "list"); @@ -2904,6 +3074,8 @@ yyreduce: break; case 105: + +/* Line 1455 of yacc.c */ #line 510 "Grammar.y" { parser->addObject((yyvsp[(3) - (4)])); @@ -2911,6 +3083,8 @@ yyreduce: break; case 106: + +/* Line 1455 of yacc.c */ #line 514 "Grammar.y" { parser->usage("object", "add"); @@ -2918,6 +3092,8 @@ yyreduce: break; case 107: + +/* Line 1455 of yacc.c */ #line 518 "Grammar.y" { parser->removeObject((yyvsp[(3) - (4)])); @@ -2925,6 +3101,8 @@ yyreduce: break; case 108: + +/* Line 1455 of yacc.c */ #line 522 "Grammar.y" { parser->usage("object", "remove"); @@ -2932,6 +3110,8 @@ yyreduce: break; case 109: + +/* Line 1455 of yacc.c */ #line 526 "Grammar.y" { parser->findObject((yyvsp[(3) - (4)])); @@ -2939,6 +3119,8 @@ yyreduce: break; case 110: + +/* Line 1455 of yacc.c */ #line 530 "Grammar.y" { parser->usage("object", "find"); @@ -2946,6 +3128,8 @@ yyreduce: break; case 111: + +/* Line 1455 of yacc.c */ #line 534 "Grammar.y" { parser->listObject((yyvsp[(3) - (4)])); @@ -2953,6 +3137,8 @@ yyreduce: break; case 112: + +/* Line 1455 of yacc.c */ #line 538 "Grammar.y" { parser->usage("object", "list"); @@ -2960,6 +3146,8 @@ yyreduce: break; case 113: + +/* Line 1455 of yacc.c */ #line 542 "Grammar.y" { parser->describeObject((yyvsp[(3) - (4)])); @@ -2967,6 +3155,8 @@ yyreduce: break; case 114: + +/* Line 1455 of yacc.c */ #line 546 "Grammar.y" { parser->usage("object", "describe"); @@ -2974,6 +3164,8 @@ yyreduce: break; case 115: + +/* Line 1455 of yacc.c */ #line 550 "Grammar.y" { parser->showCopying(); @@ -2981,6 +3173,8 @@ yyreduce: break; case 116: + +/* Line 1455 of yacc.c */ #line 554 "Grammar.y" { parser->showWarranty(); @@ -2988,6 +3182,8 @@ yyreduce: break; case 117: + +/* Line 1455 of yacc.c */ #line 558 "Grammar.y" { parser->usage((yyvsp[(2) - (3)]).front()); @@ -2995,6 +3191,8 @@ yyreduce: break; case 118: + +/* Line 1455 of yacc.c */ #line 562 "Grammar.y" { if(((yyvsp[(2) - (4)]).front() == "server" || (yyvsp[(2) - (4)]).front() == "service") && (yyvsp[(3) - (4)]).front() == "template") @@ -3009,6 +3207,8 @@ yyreduce: break; case 119: + +/* Line 1455 of yacc.c */ #line 573 "Grammar.y" { parser->usage((yyvsp[(2) - (5)]).front(), (yyvsp[(3) - (5)]).front()); @@ -3016,6 +3216,8 @@ yyreduce: break; case 120: + +/* Line 1455 of yacc.c */ #line 577 "Grammar.y" { if(((yyvsp[(2) - (5)]).front() == "server" || (yyvsp[(2) - (5)]).front() == "service") && (yyvsp[(3) - (5)]).front() == "template") @@ -3030,6 +3232,8 @@ yyreduce: break; case 121: + +/* Line 1455 of yacc.c */ #line 588 "Grammar.y" { if(((yyvsp[(2) - (6)]).front() == "server" || (yyvsp[(2) - (6)]).front() == "service") && (yyvsp[(3) - (6)]).front() == "template") @@ -3044,6 +3248,8 @@ yyreduce: break; case 122: + +/* Line 1455 of yacc.c */ #line 599 "Grammar.y" { parser->usage((yyvsp[(2) - (4)]).front()); @@ -3051,6 +3257,8 @@ yyreduce: break; case 123: + +/* Line 1455 of yacc.c */ #line 603 "Grammar.y" { parser->usage(); @@ -3058,6 +3266,8 @@ yyreduce: break; case 124: + +/* Line 1455 of yacc.c */ #line 607 "Grammar.y" { parser->usage((yyvsp[(1) - (3)]).front()); @@ -3065,6 +3275,8 @@ yyreduce: break; case 125: + +/* Line 1455 of yacc.c */ #line 611 "Grammar.y" { (yyvsp[(1) - (4)]).push_back((yyvsp[(2) - (4)]).front()); @@ -3074,6 +3286,8 @@ yyreduce: break; case 126: + +/* Line 1455 of yacc.c */ #line 617 "Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); @@ -3082,6 +3296,8 @@ yyreduce: break; case 127: + +/* Line 1455 of yacc.c */ #line 622 "Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); @@ -3090,6 +3306,8 @@ yyreduce: break; case 128: + +/* Line 1455 of yacc.c */ #line 627 "Grammar.y" { yyerrok; @@ -3097,12 +3315,16 @@ yyreduce: break; case 129: + +/* Line 1455 of yacc.c */ #line 631 "Grammar.y" { ;} break; case 130: + +/* Line 1455 of yacc.c */ #line 640 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); @@ -3111,6 +3333,8 @@ yyreduce: break; case 131: + +/* Line 1455 of yacc.c */ #line 645 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); @@ -3119,6 +3343,8 @@ yyreduce: break; case 132: + +/* Line 1455 of yacc.c */ #line 650 "Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); @@ -3128,6 +3354,8 @@ yyreduce: break; case 133: + +/* Line 1455 of yacc.c */ #line 656 "Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); @@ -3137,6 +3365,8 @@ yyreduce: break; case 134: + +/* Line 1455 of yacc.c */ #line 662 "Grammar.y" { (yyval) = YYSTYPE(); @@ -3144,236 +3374,313 @@ yyreduce: break; case 135: + +/* Line 1455 of yacc.c */ #line 671 "Grammar.y" { ;} break; case 136: + +/* Line 1455 of yacc.c */ #line 674 "Grammar.y" { ;} break; case 137: + +/* Line 1455 of yacc.c */ #line 677 "Grammar.y" { ;} break; case 138: + +/* Line 1455 of yacc.c */ #line 680 "Grammar.y" { ;} break; case 139: + +/* Line 1455 of yacc.c */ #line 683 "Grammar.y" { ;} break; case 140: + +/* Line 1455 of yacc.c */ #line 686 "Grammar.y" { ;} break; case 141: + +/* Line 1455 of yacc.c */ #line 689 "Grammar.y" { ;} break; case 142: + +/* Line 1455 of yacc.c */ #line 692 "Grammar.y" { ;} break; case 143: + +/* Line 1455 of yacc.c */ #line 695 "Grammar.y" { ;} break; case 144: + +/* Line 1455 of yacc.c */ #line 698 "Grammar.y" { ;} break; case 145: + +/* Line 1455 of yacc.c */ #line 701 "Grammar.y" { ;} break; case 146: + +/* Line 1455 of yacc.c */ #line 704 "Grammar.y" { ;} break; case 147: + +/* Line 1455 of yacc.c */ #line 707 "Grammar.y" { ;} break; case 148: + +/* Line 1455 of yacc.c */ #line 710 "Grammar.y" { ;} break; case 149: + +/* Line 1455 of yacc.c */ #line 713 "Grammar.y" { ;} break; case 150: + +/* Line 1455 of yacc.c */ #line 716 "Grammar.y" { ;} break; case 151: + +/* Line 1455 of yacc.c */ #line 719 "Grammar.y" { ;} break; case 152: + +/* Line 1455 of yacc.c */ #line 722 "Grammar.y" { ;} break; case 153: + +/* Line 1455 of yacc.c */ #line 725 "Grammar.y" { ;} break; case 154: + +/* Line 1455 of yacc.c */ #line 728 "Grammar.y" { ;} break; case 155: + +/* Line 1455 of yacc.c */ #line 731 "Grammar.y" { ;} break; case 156: + +/* Line 1455 of yacc.c */ #line 734 "Grammar.y" { ;} break; case 157: + +/* Line 1455 of yacc.c */ #line 737 "Grammar.y" { ;} break; case 158: + +/* Line 1455 of yacc.c */ #line 740 "Grammar.y" { ;} break; case 159: + +/* Line 1455 of yacc.c */ #line 743 "Grammar.y" { ;} break; case 160: + +/* Line 1455 of yacc.c */ #line 746 "Grammar.y" { ;} break; case 161: + +/* Line 1455 of yacc.c */ #line 749 "Grammar.y" { ;} break; case 162: + +/* Line 1455 of yacc.c */ #line 752 "Grammar.y" { ;} break; case 163: + +/* Line 1455 of yacc.c */ #line 755 "Grammar.y" { ;} break; case 164: + +/* Line 1455 of yacc.c */ #line 758 "Grammar.y" { ;} break; case 165: + +/* Line 1455 of yacc.c */ #line 761 "Grammar.y" { ;} break; case 166: + +/* Line 1455 of yacc.c */ #line 764 "Grammar.y" { ;} break; case 167: + +/* Line 1455 of yacc.c */ #line 767 "Grammar.y" { ;} break; case 168: + +/* Line 1455 of yacc.c */ #line 770 "Grammar.y" { ;} break; case 169: + +/* Line 1455 of yacc.c */ #line 773 "Grammar.y" { ;} break; case 170: + +/* Line 1455 of yacc.c */ #line 776 "Grammar.y" { ;} break; case 171: + +/* Line 1455 of yacc.c */ #line 779 "Grammar.y" { ;} break; case 172: + +/* Line 1455 of yacc.c */ #line 782 "Grammar.y" { ;} break; -/* Line 1267 of yacc.c. */ -#line 3377 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 3684 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3384,7 +3691,6 @@ 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. */ @@ -3449,7 +3755,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -3466,7 +3772,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -3523,9 +3829,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -3550,7 +3853,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -3561,7 +3864,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered diff --git a/cpp/src/IceGrid/Grammar.h b/cpp/src/IceGrid/Grammar.h index 8739da3d8b5..e39828c6ae7 100644 --- a/cpp/src/IceGrid/Grammar.h +++ b/cpp/src/IceGrid/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + 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 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ 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. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -81,57 +81,16 @@ ICE_GRID_DISABLE = 297 }; #endif -/* Tokens. */ -#define ICE_GRID_HELP 258 -#define ICE_GRID_EXIT 259 -#define ICE_GRID_APPLICATION 260 -#define ICE_GRID_NODE 261 -#define ICE_GRID_REGISTRY 262 -#define ICE_GRID_SERVER 263 -#define ICE_GRID_ADAPTER 264 -#define ICE_GRID_PING 265 -#define ICE_GRID_LOAD 266 -#define ICE_GRID_SOCKETS 267 -#define ICE_GRID_ADD 268 -#define ICE_GRID_REMOVE 269 -#define ICE_GRID_LIST 270 -#define ICE_GRID_SHUTDOWN 271 -#define ICE_GRID_STRING 272 -#define ICE_GRID_START 273 -#define ICE_GRID_STOP 274 -#define ICE_GRID_PATCH 275 -#define ICE_GRID_SIGNAL 276 -#define ICE_GRID_STDOUT 277 -#define ICE_GRID_STDERR 278 -#define ICE_GRID_DESCRIBE 279 -#define ICE_GRID_PROPERTIES 280 -#define ICE_GRID_PROPERTY 281 -#define ICE_GRID_STATE 282 -#define ICE_GRID_PID 283 -#define ICE_GRID_ENDPOINTS 284 -#define ICE_GRID_ACTIVATION 285 -#define ICE_GRID_OBJECT 286 -#define ICE_GRID_FIND 287 -#define ICE_GRID_SHOW 288 -#define ICE_GRID_COPYING 289 -#define ICE_GRID_WARRANTY 290 -#define ICE_GRID_DIFF 291 -#define ICE_GRID_UPDATE 292 -#define ICE_GRID_INSTANTIATE 293 -#define ICE_GRID_TEMPLATE 294 -#define ICE_GRID_SERVICE 295 -#define ICE_GRID_ENABLE 296 -#define ICE_GRID_DISABLE 297 - #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 + diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp index e335117de42..bea6b2408e3 100644 --- a/cpp/src/IceGrid/Scanner.cpp +++ b/cpp/src/IceGrid/Scanner.cpp @@ -47,7 +47,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -154,12 +153,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; +extern int yyleng; extern FILE *yyin, *yyout; @@ -185,6 +179,11 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -202,7 +201,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -272,8 +271,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -301,7 +300,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -359,7 +358,7 @@ static void yy_fatal_error (yyconst char msg[] ); */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -524,7 +523,7 @@ std::string parseSingleQuotedString(); } #define YY_USER_INIT initScanner(); -#line 527 "lex.yy.c" +#line 526 "lex.yy.c" #define INITIAL 0 @@ -563,7 +562,7 @@ FILE *yyget_out (void ); void yyset_out (FILE * out_str ); -yy_size_t yyget_leng (void ); +int yyget_leng (void ); char *yyget_text (void ); @@ -613,7 +612,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -624,7 +623,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -709,7 +708,7 @@ YY_DECL #line 75 "Scanner.l" -#line 712 "lex.yy.c" +#line 711 "lex.yy.c" if ( !(yy_init) ) { @@ -939,7 +938,7 @@ YY_RULE_SETUP #line 196 "Scanner.l" ECHO; YY_BREAK -#line 942 "lex.yy.c" +#line 941 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1125,7 +1124,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1139,7 +1138,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1170,7 +1169,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1280,7 +1279,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; + register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -1329,7 +1328,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1353,7 +1352,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1601,7 +1600,7 @@ void yypop_buffer_state (void) */ static void yyensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -1698,11 +1697,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1784,7 +1784,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -yy_size_t yyget_leng (void) +int yyget_leng (void) { return yyleng; } diff --git a/cpp/src/IceStorm/Grammar.cpp b/cpp/src/IceStorm/Grammar.cpp index f9fee392c4f..959f2b5b183 100644 --- a/cpp/src/IceStorm/Grammar.cpp +++ b/cpp/src/IceStorm/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + 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 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,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. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,48 +54,21 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ICE_STORM_HELP = 258, - ICE_STORM_EXIT = 259, - ICE_STORM_CURRENT = 260, - ICE_STORM_CREATE = 261, - ICE_STORM_DESTROY = 262, - ICE_STORM_LINK = 263, - ICE_STORM_UNLINK = 264, - ICE_STORM_LINKS = 265, - ICE_STORM_TOPICS = 266, - ICE_STORM_REPLICA = 267, - ICE_STORM_STRING = 268 - }; -#endif -/* Tokens. */ -#define ICE_STORM_HELP 258 -#define ICE_STORM_EXIT 259 -#define ICE_STORM_CURRENT 260 -#define ICE_STORM_CREATE 261 -#define ICE_STORM_DESTROY 262 -#define ICE_STORM_LINK 263 -#define ICE_STORM_UNLINK 264 -#define ICE_STORM_LINKS 265 -#define ICE_STORM_TOPICS 266 -#define ICE_STORM_REPLICA 267 -#define ICE_STORM_STRING 268 - +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ -#line 1 "../IceStorm/Grammar.y" + +/* Line 189 of yacc.c */ +#line 1 "Grammar.y" // ********************************************************************** @@ -131,6 +103,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 108 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -149,20 +124,42 @@ yyerror(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 { + ICE_STORM_HELP = 258, + ICE_STORM_EXIT = 259, + ICE_STORM_CURRENT = 260, + ICE_STORM_CREATE = 261, + ICE_STORM_DESTROY = 262, + ICE_STORM_LINK = 263, + ICE_STORM_UNLINK = 264, + ICE_STORM_LINKS = 265, + ICE_STORM_TOPICS = 266, + ICE_STORM_REPLICA = 267, + ICE_STORM_STRING = 268 + }; +#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 216 of yacc.c. */ -#line 166 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 163 "Grammar.tab.c" #ifdef short # undef short @@ -212,7 +209,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -237,14 +234,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -325,9 +322,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -361,12 +358,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) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -651,7 +648,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -762,17 +759,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -806,11 +806,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1090,10 +1090,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1112,10 +1110,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1139,74 +1136,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* 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]; - char *yymsg = yymsgbuf; - 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. + /* Number of syntax errors so far. */ + int yynerrs; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + 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; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + 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; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* 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; @@ -1236,7 +1234,6 @@ int yynerrs; 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 @@ -1244,7 +1241,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1267,9 +1263,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1280,7 +1275,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1290,6 +1284,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1298,16 +1295,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1339,20 +1336,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1392,121 +1385,157 @@ yyreduce: switch (yyn) { case 2: -#line 60 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 60 "Grammar.y" { ;} break; case 3: -#line 63 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 63 "Grammar.y" { ;} break; case 4: -#line 71 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 71 "Grammar.y" { ;} break; case 5: -#line 74 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 74 "Grammar.y" { ;} break; case 6: -#line 82 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 82 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 86 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 86 "Grammar.y" { return 0; ;} break; case 8: -#line 90 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 90 "Grammar.y" { parser->create((yyvsp[(2) - (3)])); ;} break; case 9: -#line 94 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 94 "Grammar.y" { parser->current((yyvsp[(2) - (3)])); ;} break; case 10: -#line 98 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 98 "Grammar.y" { parser->destroy((yyvsp[(2) - (3)])); ;} break; case 11: -#line 102 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 102 "Grammar.y" { parser->link((yyvsp[(2) - (3)])); ;} break; case 12: -#line 106 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 106 "Grammar.y" { parser->unlink((yyvsp[(2) - (3)])); ;} break; case 13: -#line 110 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 110 "Grammar.y" { parser->links((yyvsp[(2) - (3)])); ;} break; case 14: -#line 114 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 114 "Grammar.y" { parser->topics((yyvsp[(2) - (3)])); ;} break; case 15: -#line 118 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 118 "Grammar.y" { parser->replica((yyvsp[(2) - (3)])); ;} break; case 16: -#line 122 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 122 "Grammar.y" { parser->invalidCommand("unknown command `" + (yyvsp[(1) - (3)]).front() + "' (type `help' for more info)"); ;} break; case 17: -#line 126 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 126 "Grammar.y" { yyerrok; ;} break; case 18: -#line 130 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 130 "Grammar.y" { ;} break; case 19: -#line 138 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 138 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1514,7 +1543,9 @@ yyreduce: break; case 20: -#line 143 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 143 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1522,69 +1553,90 @@ yyreduce: break; case 21: -#line 148 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 148 "Grammar.y" { (yyval) = YYSTYPE(); ;} break; case 22: -#line 157 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 157 "Grammar.y" { ;} break; case 23: -#line 160 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 160 "Grammar.y" { ;} break; case 24: -#line 163 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 163 "Grammar.y" { ;} break; case 25: -#line 166 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 166 "Grammar.y" { ;} break; case 26: -#line 169 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 169 "Grammar.y" { ;} break; case 27: -#line 172 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 172 "Grammar.y" { ;} break; case 28: -#line 175 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 175 "Grammar.y" { ;} break; case 29: -#line 178 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 178 "Grammar.y" { ;} break; case 30: -#line 181 "../IceStorm/Grammar.y" + +/* Line 1455 of yacc.c */ +#line 181 "Grammar.y" { ;} break; -/* Line 1267 of yacc.c. */ -#line 1588 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1640 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1595,7 +1647,6 @@ 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. */ @@ -1660,7 +1711,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1677,7 +1728,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1734,9 +1785,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1761,7 +1809,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1772,7 +1820,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1798,6 +1846,8 @@ yyreturn: } -#line 184 "../IceStorm/Grammar.y" + +/* Line 1675 of yacc.c */ +#line 184 "Grammar.y" diff --git a/cpp/src/IceStorm/Grammar.h b/cpp/src/IceStorm/Grammar.h index d515b585338..12d800b3a5c 100644 --- a/cpp/src/IceStorm/Grammar.h +++ b/cpp/src/IceStorm/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + 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 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ 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. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -52,28 +52,16 @@ ICE_STORM_STRING = 268 }; #endif -/* Tokens. */ -#define ICE_STORM_HELP 258 -#define ICE_STORM_EXIT 259 -#define ICE_STORM_CURRENT 260 -#define ICE_STORM_CREATE 261 -#define ICE_STORM_DESTROY 262 -#define ICE_STORM_LINK 263 -#define ICE_STORM_UNLINK 264 -#define ICE_STORM_LINKS 265 -#define ICE_STORM_TOPICS 266 -#define ICE_STORM_REPLICA 267 -#define ICE_STORM_STRING 268 - #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 + diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp index e6e81e808f6..1c8eac2dd7e 100644 --- a/cpp/src/IceStorm/Scanner.cpp +++ b/cpp/src/IceStorm/Scanner.cpp @@ -610,7 +610,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -621,7 +621,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index f565fb444a9..cfe05044c34 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison implementation for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 it under the terms of the GNU General Public License as published by @@ -44,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -73,8 +75,8 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ -#line 1 "Grammar.y" +/* Line 189 of yacc.c */ +#line 1 "../Slice/Grammar.y" // ********************************************************************** @@ -120,8 +122,8 @@ slice_error(const char* s) -/* Line 268 of yacc.c */ -#line 125 "Grammar.tab.c" +/* Line 189 of yacc.c */ +#line 127 "Grammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -206,8 +208,8 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ -#line 211 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 213 "Grammar.tab.c" #ifdef short # undef short @@ -257,7 +259,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -310,11 +312,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -337,24 +339,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -383,7 +385,23 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -403,26 +421,6 @@ union yyalloc #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - /* YYFINAL -- State number of the termination state. */ #define YYFINAL 13 /* YYLAST -- Last index in YYTABLE. */ @@ -695,8 +693,8 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { @@ -797,7 +795,8 @@ static const yytype_int16 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -133 static const yytype_int16 yytable[] = { @@ -893,12 +892,6 @@ static const yytype_int16 yytable[] = 99, 100, 0, 273 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-218)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 17, 14, 164, 12, 42, 43, 44, 45, 221, 149, @@ -1041,18 +1034,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1062,6 +1046,7 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -1103,10 +1088,19 @@ while (YYID (0)) #endif -/* This macro is provided for backward compatibility. */ +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif @@ -1298,6 +1292,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1400,142 +1395,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } + int yyn = yypact[yystate]; - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1568,7 +1536,6 @@ yydestruct (yymsg, yytype, yyvaluep) } } - /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1585,9 +1552,12 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ -/*----------. -| yyparse. | -`----------*/ + + + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1774,7 +1744,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1805,8 +1775,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1861,56 +1831,56 @@ yyreduce: { case 2: -/* Line 1806 of yacc.c */ -#line 108 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 108 "../Slice/Grammar.y" { -} +;} break; case 3: -/* Line 1806 of yacc.c */ -#line 116 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 116 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); -} +;} break; case 4: -/* Line 1806 of yacc.c */ -#line 125 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 125 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); -} +;} break; case 5: -/* Line 1806 of yacc.c */ -#line 129 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 129 "../Slice/Grammar.y" { (yyval) = new StringListTok; -} +;} break; case 6: -/* Line 1806 of yacc.c */ -#line 138 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 138 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)])); if(!metaData->v.empty()) { unit->addGlobalMetaData(metaData->v); } -} +;} break; case 8: -/* Line 1806 of yacc.c */ -#line 147 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 147 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -1918,156 +1888,156 @@ yyreduce: { contained->setMetaData(metaData->v); } -} +;} break; case 10: -/* Line 1806 of yacc.c */ -#line 157 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 157 "../Slice/Grammar.y" { yyerrok; -} +;} break; case 12: -/* Line 1806 of yacc.c */ -#line 162 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 162 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); -} +;} break; case 13: -/* Line 1806 of yacc.c */ -#line 166 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 166 "../Slice/Grammar.y" { -} +;} break; case 14: -/* Line 1806 of yacc.c */ -#line 174 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 174 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 15: -/* Line 1806 of yacc.c */ -#line 178 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 178 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 16: -/* Line 1806 of yacc.c */ -#line 182 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 182 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 17: -/* Line 1806 of yacc.c */ -#line 186 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 186 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 18: -/* Line 1806 of yacc.c */ -#line 190 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 190 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 19: -/* Line 1806 of yacc.c */ -#line 194 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 194 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); -} +;} break; case 20: -/* Line 1806 of yacc.c */ -#line 198 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 198 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 21: -/* Line 1806 of yacc.c */ -#line 202 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 202 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); -} +;} break; case 22: -/* Line 1806 of yacc.c */ -#line 206 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 206 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 23: -/* Line 1806 of yacc.c */ -#line 210 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 210 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 24: -/* Line 1806 of yacc.c */ -#line 214 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 214 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 25: -/* Line 1806 of yacc.c */ -#line 218 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 218 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 26: -/* Line 1806 of yacc.c */ -#line 222 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 222 "../Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)]))); -} +;} break; case 27: -/* Line 1806 of yacc.c */ -#line 231 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 231 "../Slice/Grammar.y" { unit->setSeenDefinition(); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2083,13 +2053,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 28: -/* Line 1806 of yacc.c */ -#line 248 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 248 "../Slice/Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2100,43 +2070,43 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 29: -/* Line 1806 of yacc.c */ -#line 265 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 265 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 30: -/* Line 1806 of yacc.c */ -#line 269 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 269 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -} +;} break; case 31: -/* Line 1806 of yacc.c */ -#line 280 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 280 "../Slice/Grammar.y" { unit->error("exceptions cannot be forward declared"); (yyval) = 0; -} +;} break; case 32: -/* Line 1806 of yacc.c */ -#line 290 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 290 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2149,48 +2119,48 @@ yyreduce: unit->pushContainer(ex); } (yyval) = ex; -} +;} break; case 33: -/* Line 1806 of yacc.c */ -#line 304 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 304 "../Slice/Grammar.y" { if((yyvsp[(4) - (7)])) { unit->popContainer(); } (yyval) = (yyvsp[(4) - (7)]); -} +;} break; case 34: -/* Line 1806 of yacc.c */ -#line 317 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 317 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); ContainedPtr contained = cont->lookupException(scoped->v); cont->checkIntroduced(scoped->v); (yyval) = contained; -} +;} break; case 35: -/* Line 1806 of yacc.c */ -#line 325 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 325 "../Slice/Grammar.y" { (yyval) = 0; -} +;} break; case 36: -/* Line 1806 of yacc.c */ -#line 334 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 334 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2198,51 +2168,51 @@ yyreduce: { contained->setMetaData(metaData->v); } -} +;} break; case 37: -/* Line 1806 of yacc.c */ -#line 343 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 343 "../Slice/Grammar.y" { -} +;} break; case 38: -/* Line 1806 of yacc.c */ -#line 346 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 346 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); -} +;} break; case 39: -/* Line 1806 of yacc.c */ -#line 350 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 350 "../Slice/Grammar.y" { -} +;} break; case 40: -/* Line 1806 of yacc.c */ -#line 358 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 358 "../Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); TypeStringTokPtr typestring = new TypeStringTok; typestring->v = make_pair(type, ident->v); (yyval) = typestring; -} +;} break; case 41: -/* Line 1806 of yacc.c */ -#line 371 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 371 "../Slice/Grammar.y" { IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2261,13 +2231,13 @@ yyreduce: m->v.optional = tag >= 0; m->v.tag = tag; (yyval) = m; -} +;} break; case 42: -/* Line 1806 of yacc.c */ -#line 391 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 391 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2336,52 +2306,52 @@ yyreduce: m->v.optional = tag >= 0; m->v.tag = tag; (yyval) = m; -} +;} break; case 43: -/* Line 1806 of yacc.c */ -#line 461 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 461 "../Slice/Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy m->v.optional = false; m->v.tag = -1; (yyval) = m; -} +;} break; case 44: -/* Line 1806 of yacc.c */ -#line 469 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 469 "../Slice/Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy m->v.optional = false; m->v.tag = -1; (yyval) = m; -} +;} break; case 45: -/* Line 1806 of yacc.c */ -#line 482 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 482 "../Slice/Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); m->v.type = ts->v.first; m->v.name = ts->v.second; (yyval) = m; -} +;} break; case 46: -/* Line 1806 of yacc.c */ -#line 490 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 490 "../Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); OptionalDefTokPtr m = new OptionalDefTok; @@ -2390,43 +2360,43 @@ yyreduce: m->v.optional = false; m->v.tag = -1; (yyval) = m; -} +;} break; case 48: -/* Line 1806 of yacc.c */ -#line 511 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 511 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 49: -/* Line 1806 of yacc.c */ -#line 515 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 515 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as struct name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -} +;} break; case 50: -/* Line 1806 of yacc.c */ -#line 526 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 526 "../Slice/Grammar.y" { unit->error("structs cannot be forward declared"); (yyval) = 0; // Dummy -} +;} break; case 51: -/* Line 1806 of yacc.c */ -#line 536 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 536 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2438,13 +2408,13 @@ yyreduce: unit->pushContainer(st); } (yyval) = st; -} +;} break; case 52: -/* Line 1806 of yacc.c */ -#line 549 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 549 "../Slice/Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2461,13 +2431,13 @@ yyreduce: { unit->error("struct `" + st->name() + "' must have at least one member"); // $$ is a dummy } -} +;} break; case 53: -/* Line 1806 of yacc.c */ -#line 572 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 572 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2475,71 +2445,71 @@ yyreduce: { contained->setMetaData(metaData->v); } -} +;} break; case 54: -/* Line 1806 of yacc.c */ -#line 581 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 581 "../Slice/Grammar.y" { -} +;} break; case 55: -/* Line 1806 of yacc.c */ -#line 584 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 584 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); -} +;} break; case 56: -/* Line 1806 of yacc.c */ -#line 588 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 588 "../Slice/Grammar.y" { -} +;} break; case 58: -/* Line 1806 of yacc.c */ -#line 602 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 602 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 59: -/* Line 1806 of yacc.c */ -#line 606 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 606 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as class name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -} +;} break; case 60: -/* Line 1806 of yacc.c */ -#line 617 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 617 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); ClassDeclPtr cl = cont->createClassDecl(ident->v, false, local->v); (yyval) = cl; -} +;} break; case 61: -/* Line 1806 of yacc.c */ -#line 630 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 630 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2561,13 +2531,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 62: -/* Line 1806 of yacc.c */ -#line 653 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 653 "../Slice/Grammar.y" { if((yyvsp[(5) - (8)])) { @@ -2578,13 +2548,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 63: -/* Line 1806 of yacc.c */ -#line 670 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 670 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -2617,40 +2587,40 @@ yyreduce: } } } -} +;} break; case 64: -/* Line 1806 of yacc.c */ -#line 704 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 704 "../Slice/Grammar.y" { (yyval) = 0; -} +;} break; case 65: -/* Line 1806 of yacc.c */ -#line 713 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 713 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 66: -/* Line 1806 of yacc.c */ -#line 717 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 717 "../Slice/Grammar.y" { (yyval) = new ClassListTok; -} +;} break; case 67: -/* Line 1806 of yacc.c */ -#line 726 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 726 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2658,38 +2628,38 @@ yyreduce: { contained->setMetaData(metaData->v); } -} +;} break; case 68: -/* Line 1806 of yacc.c */ -#line 735 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 735 "../Slice/Grammar.y" { -} +;} break; case 69: -/* Line 1806 of yacc.c */ -#line 738 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 738 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); -} +;} break; case 70: -/* Line 1806 of yacc.c */ -#line 742 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 742 "../Slice/Grammar.y" { -} +;} break; case 71: -/* Line 1806 of yacc.c */ -#line 750 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 750 "../Slice/Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -2710,13 +2680,13 @@ yyreduce: } unit->currentContainer()->checkIntroduced(def->v.name, dm); (yyval) = dm; -} +;} break; case 72: -/* Line 1806 of yacc.c */ -#line 772 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 772 "../Slice/Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -2742,13 +2712,13 @@ yyreduce: } unit->currentContainer()->checkIntroduced(def->v.name, dm); (yyval) = dm; -} +;} break; case 73: -/* Line 1806 of yacc.c */ -#line 799 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 799 "../Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2769,13 +2739,13 @@ yyreduce: } assert((yyval)); unit->error("keyword `" + name + "' cannot be used as data member name"); -} +;} break; case 74: -/* Line 1806 of yacc.c */ -#line 821 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 821 "../Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -2795,13 +2765,13 @@ yyreduce: } assert((yyval)); unit->error("missing data member name"); -} +;} break; case 75: -/* Line 1806 of yacc.c */ -#line 847 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 847 "../Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2809,13 +2779,13 @@ yyreduce: DataMemberPtr dm = st->createDataMember(ts->v.second, ts->v.first, false, -1, 0, "", ""); unit->currentContainer()->checkIntroduced(ts->v.second, dm); (yyval) = dm; -} +;} break; case 76: -/* Line 1806 of yacc.c */ -#line 856 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 856 "../Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -2825,13 +2795,13 @@ yyreduce: value->v.valueAsString, value->v.valueAsLiteral); unit->currentContainer()->checkIntroduced(ts->v.second, dm); (yyval) = dm; -} +;} break; case 77: -/* Line 1806 of yacc.c */ -#line 867 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 867 "../Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2839,13 +2809,13 @@ yyreduce: (yyval) = st->createDataMember(ts->v.second, ts->v.first, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("optional data members not supported in struct"); -} +;} break; case 78: -/* Line 1806 of yacc.c */ -#line 876 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 876 "../Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2853,13 +2823,13 @@ yyreduce: (yyval) = st->createDataMember(ts->v.second, ts->v.first, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("optional data members not supported in struct"); -} +;} break; case 79: -/* Line 1806 of yacc.c */ -#line 885 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 885 "../Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2868,13 +2838,13 @@ yyreduce: (yyval) = st->createDataMember(name, type, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("keyword `" + name + "' cannot be used as data member name"); -} +;} break; case 80: -/* Line 1806 of yacc.c */ -#line 895 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 895 "../Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2882,49 +2852,49 @@ yyreduce: (yyval) = st->createDataMember(IceUtil::generateUUID(), type, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("missing data member name"); -} +;} break; case 81: -/* Line 1806 of yacc.c */ -#line 909 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 909 "../Slice/Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); m->v.type = TypePtr::dynamicCast((yyvsp[(2) - (2)])); (yyval) = m; -} +;} break; case 82: -/* Line 1806 of yacc.c */ -#line 915 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 915 "../Slice/Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok(); m->v.type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); m->v.optional = false; m->v.tag = -1; (yyval) = m; -} +;} break; case 83: -/* Line 1806 of yacc.c */ -#line 923 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 923 "../Slice/Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok; m->v.optional = false; m->v.tag = -1; (yyval) = m; -} +;} break; case 84: -/* Line 1806 of yacc.c */ -#line 935 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 935 "../Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2947,13 +2917,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 85: -/* Line 1806 of yacc.c */ -#line 959 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 959 "../Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -2977,13 +2947,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 86: -/* Line 1806 of yacc.c */ -#line 984 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 984 "../Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3006,13 +2976,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 87: -/* Line 1806 of yacc.c */ -#line 1008 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1008 "../Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -3036,13 +3006,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 88: -/* Line 1806 of yacc.c */ -#line 1038 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1038 "../Slice/Grammar.y" { if((yyvsp[(1) - (3)])) { @@ -3053,13 +3023,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 89: -/* Line 1806 of yacc.c */ -#line 1050 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1050 "../Slice/Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3068,26 +3038,26 @@ yyreduce: { op->setExceptionList(el->v); } -} +;} break; case 90: -/* Line 1806 of yacc.c */ -#line 1060 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1060 "../Slice/Grammar.y" { if((yyvsp[(1) - (3)])) { unit->popContainer(); } yyerrok; -} +;} break; case 91: -/* Line 1806 of yacc.c */ -#line 1068 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1068 "../Slice/Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3096,33 +3066,33 @@ yyreduce: { op->setExceptionList(el->v); // Dummy } -} +;} break; case 94: -/* Line 1806 of yacc.c */ -#line 1090 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1090 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 95: -/* Line 1806 of yacc.c */ -#line 1094 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1094 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as interface name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -} +;} break; case 96: -/* Line 1806 of yacc.c */ -#line 1105 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1105 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3130,13 +3100,13 @@ yyreduce: ClassDeclPtr cl = cont->createClassDecl(ident->v, true, local->v); cont->checkIntroduced(ident->v, cl); (yyval) = cl; -} +;} break; case 97: -/* Line 1806 of yacc.c */ -#line 1119 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1119 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -3153,13 +3123,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 98: -/* Line 1806 of yacc.c */ -#line 1137 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1137 "../Slice/Grammar.y" { if((yyvsp[(4) - (7)])) { @@ -3170,13 +3140,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 99: -/* Line 1806 of yacc.c */ -#line 1154 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1154 "../Slice/Grammar.y" { ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -3210,13 +3180,13 @@ yyreduce: } } (yyval) = intfs; -} +;} break; case 100: -/* Line 1806 of yacc.c */ -#line 1189 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1189 "../Slice/Grammar.y" { ClassListTokPtr intfs = new ClassListTok; StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -3250,41 +3220,41 @@ yyreduce: } } (yyval) = intfs; -} +;} break; case 101: -/* Line 1806 of yacc.c */ -#line 1224 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1224 "../Slice/Grammar.y" { unit->error("illegal inheritance from type Object"); (yyval) = new ClassListTok; // Dummy -} +;} break; case 102: -/* Line 1806 of yacc.c */ -#line 1234 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1234 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 103: -/* Line 1806 of yacc.c */ -#line 1238 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1238 "../Slice/Grammar.y" { (yyval) = new ClassListTok; -} +;} break; case 104: -/* Line 1806 of yacc.c */ -#line 1247 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1247 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -3292,62 +3262,62 @@ yyreduce: { contained->setMetaData(metaData->v); } -} +;} break; case 105: -/* Line 1806 of yacc.c */ -#line 1256 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1256 "../Slice/Grammar.y" { -} +;} break; case 106: -/* Line 1806 of yacc.c */ -#line 1259 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1259 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); -} +;} break; case 107: -/* Line 1806 of yacc.c */ -#line 1263 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1263 "../Slice/Grammar.y" { -} +;} break; case 109: -/* Line 1806 of yacc.c */ -#line 1277 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1277 "../Slice/Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)])); ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast((yyvsp[(3) - (3)])); exceptionList->v.push_front(exception); (yyval) = exceptionList; -} +;} break; case 110: -/* Line 1806 of yacc.c */ -#line 1284 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1284 "../Slice/Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])); ExceptionListTokPtr exceptionList = new ExceptionListTok; exceptionList->v.push_front(exception); (yyval) = exceptionList; -} +;} break; case 111: -/* Line 1806 of yacc.c */ -#line 1296 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1296 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -3358,24 +3328,24 @@ yyreduce: } cont->checkIntroduced(scoped->v, exception); (yyval) = exception; -} +;} break; case 112: -/* Line 1806 of yacc.c */ -#line 1308 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1308 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); (yyval) = unit->currentContainer()->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy -} +;} break; case 113: -/* Line 1806 of yacc.c */ -#line 1319 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1319 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3383,13 +3353,13 @@ yyreduce: TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (7)])); ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); -} +;} break; case 114: -/* Line 1806 of yacc.c */ -#line 1328 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1328 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3398,13 +3368,13 @@ yyreduce: ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as sequence name"); -} +;} break; case 115: -/* Line 1806 of yacc.c */ -#line 1343 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1343 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3414,13 +3384,13 @@ yyreduce: TypePtr valueType = TypePtr::dynamicCast((yyvsp[(8) - (10)])); ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); -} +;} break; case 116: -/* Line 1806 of yacc.c */ -#line 1354 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1354 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3431,33 +3401,33 @@ yyreduce: ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as dictionary name"); -} +;} break; case 117: -/* Line 1806 of yacc.c */ -#line 1371 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1371 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 118: -/* Line 1806 of yacc.c */ -#line 1375 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1375 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as enumeration name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -} +;} break; case 119: -/* Line 1806 of yacc.c */ -#line 1386 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1386 "../Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3465,13 +3435,13 @@ yyreduce: EnumPtr en = cont->createEnum(ident->v, local->v); cont->checkIntroduced(ident->v, en); (yyval) = en; -} +;} break; case 120: -/* Line 1806 of yacc.c */ -#line 1395 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1395 "../Slice/Grammar.y" { EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)])); if(en) @@ -3484,13 +3454,13 @@ yyreduce: en->setEnumerators(enumerators->v); // Dummy } (yyval) = (yyvsp[(3) - (6)]); -} +;} break; case 121: -/* Line 1806 of yacc.c */ -#line 1410 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1410 "../Slice/Grammar.y" { unit->error("missing enumeration name"); BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (5)])); @@ -3499,32 +3469,32 @@ yyreduce: EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast((yyvsp[(4) - (5)])); en->setEnumerators(enumerators->v); // Dummy (yyval) = en; -} +;} break; case 122: -/* Line 1806 of yacc.c */ -#line 1425 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1425 "../Slice/Grammar.y" { EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)])); ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v); (yyval) = ens; -} +;} break; case 123: -/* Line 1806 of yacc.c */ -#line 1431 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1431 "../Slice/Grammar.y" { -} +;} break; case 124: -/* Line 1806 of yacc.c */ -#line 1439 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1439 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3535,13 +3505,13 @@ yyreduce: ens->v.push_front(en); } (yyval) = ens; -} +;} break; case 125: -/* Line 1806 of yacc.c */ -#line 1451 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1451 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3563,44 +3533,44 @@ yyreduce: } } (yyval) = ens; -} +;} break; case 126: -/* Line 1806 of yacc.c */ -#line 1474 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1474 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as enumerator"); EnumeratorListTokPtr ens = new EnumeratorListTok; // Dummy (yyval) = ens; -} +;} break; case 127: -/* Line 1806 of yacc.c */ -#line 1481 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1481 "../Slice/Grammar.y" { EnumeratorListTokPtr ens = new EnumeratorListTok; (yyval) = ens; // Dummy -} +;} break; case 128: -/* Line 1806 of yacc.c */ -#line 1491 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1491 "../Slice/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); -} +;} break; case 129: -/* Line 1806 of yacc.c */ -#line 1495 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1495 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainedList cl = unit->currentContainer()->lookupContained(scoped->v); @@ -3633,43 +3603,43 @@ yyreduce: } (yyval) = tok; -} +;} break; case 130: -/* Line 1806 of yacc.c */ -#line 1534 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1534 "../Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = true; (yyval) = out; -} +;} break; case 131: -/* Line 1806 of yacc.c */ -#line 1540 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1540 "../Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = false; (yyval) = out; -} +;} break; case 132: -/* Line 1806 of yacc.c */ -#line 1551 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1551 "../Slice/Grammar.y" { -} +;} break; case 133: -/* Line 1806 of yacc.c */ -#line 1554 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1554 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3684,13 +3654,13 @@ yyreduce: pd->setMetaData(metaData->v); } } -} +;} break; case 134: -/* Line 1806 of yacc.c */ -#line 1570 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1570 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3705,13 +3675,13 @@ yyreduce: pd->setMetaData(metaData->v); } } -} +;} break; case 135: -/* Line 1806 of yacc.c */ -#line 1586 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1586 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (4)])); @@ -3722,13 +3692,13 @@ yyreduce: op->createParamDecl(ident->v, type, isOutParam->v, false, 0); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as parameter name"); } -} +;} break; case 136: -/* Line 1806 of yacc.c */ -#line 1598 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1598 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (6)])); @@ -3739,13 +3709,13 @@ yyreduce: op->createParamDecl(ident->v, type, isOutParam->v, false, 0); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as parameter name"); } -} +;} break; case 137: -/* Line 1806 of yacc.c */ -#line 1610 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1610 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3755,13 +3725,13 @@ yyreduce: op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v, false, 0); // Dummy unit->error("missing parameter name"); } -} +;} break; case 138: -/* Line 1806 of yacc.c */ -#line 1621 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1621 "../Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3771,162 +3741,162 @@ yyreduce: op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v, false, 0); // Dummy unit->error("missing parameter name"); } -} +;} break; case 139: -/* Line 1806 of yacc.c */ -#line 1637 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1637 "../Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -} +;} break; case 140: -/* Line 1806 of yacc.c */ -#line 1641 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1641 "../Slice/Grammar.y" { (yyval) = new ExceptionListTok; -} +;} break; case 141: -/* Line 1806 of yacc.c */ -#line 1650 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1650 "../Slice/Grammar.y" { -} +;} break; case 142: -/* Line 1806 of yacc.c */ -#line 1653 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1653 "../Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ident->v = "::" + ident->v; (yyval) = ident; -} +;} break; case 143: -/* Line 1806 of yacc.c */ -#line 1659 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1659 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); scoped->v += "::"; scoped->v += ident->v; (yyval) = scoped; -} +;} break; case 144: -/* Line 1806 of yacc.c */ -#line 1672 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1672 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindByte); -} +;} break; case 145: -/* Line 1806 of yacc.c */ -#line 1676 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1676 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindBool); -} +;} break; case 146: -/* Line 1806 of yacc.c */ -#line 1680 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1680 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindShort); -} +;} break; case 147: -/* Line 1806 of yacc.c */ -#line 1684 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1684 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindInt); -} +;} break; case 148: -/* Line 1806 of yacc.c */ -#line 1688 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1688 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindLong); -} +;} break; case 149: -/* Line 1806 of yacc.c */ -#line 1692 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1692 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindFloat); -} +;} break; case 150: -/* Line 1806 of yacc.c */ -#line 1696 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1696 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindDouble); -} +;} break; case 151: -/* Line 1806 of yacc.c */ -#line 1700 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1700 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindString); -} +;} break; case 152: -/* Line 1806 of yacc.c */ -#line 1704 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1704 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindObject); -} +;} break; case 153: -/* Line 1806 of yacc.c */ -#line 1708 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1708 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindObjectProxy); -} +;} break; case 154: -/* Line 1806 of yacc.c */ -#line 1712 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1712 "../Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindLocalObject); -} +;} break; case 155: -/* Line 1806 of yacc.c */ -#line 1716 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1716 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -3944,13 +3914,13 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 156: -/* Line 1806 of yacc.c */ -#line 1735 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1735 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -3985,78 +3955,78 @@ yyreduce: { (yyval) = 0; } -} +;} break; case 157: -/* Line 1806 of yacc.c */ -#line 1776 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1776 "../Slice/Grammar.y" { StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr str2 = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); str1->v += str2->v; -} +;} break; case 158: -/* Line 1806 of yacc.c */ -#line 1782 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1782 "../Slice/Grammar.y" { -} +;} break; case 159: -/* Line 1806 of yacc.c */ -#line 1790 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1790 "../Slice/Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringListTokPtr stringList = StringListTokPtr::dynamicCast((yyvsp[(1) - (3)])); stringList->v.push_back(str->v); (yyval) = stringList; -} +;} break; case 160: -/* Line 1806 of yacc.c */ -#line 1797 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1797 "../Slice/Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StringListTokPtr stringList = new StringListTok; stringList->v.push_back(str->v); (yyval) = stringList; -} +;} break; case 161: -/* Line 1806 of yacc.c */ -#line 1809 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1809 "../Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = true; (yyval) = local; -} +;} break; case 162: -/* Line 1806 of yacc.c */ -#line 1815 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1815 "../Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = false; (yyval) = local; -} +;} break; case 163: -/* Line 1806 of yacc.c */ -#line 1826 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1826 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindLong); IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4068,13 +4038,13 @@ yyreduce: def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = intVal->literal; (yyval) = def; -} +;} break; case 164: -/* Line 1806 of yacc.c */ -#line 1839 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1839 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindDouble); FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4086,13 +4056,13 @@ yyreduce: def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = floatVal->literal; (yyval) = def; -} +;} break; case 165: -/* Line 1806 of yacc.c */ -#line 1852 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1852 "../Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ConstDefTokPtr def = new ConstDefTok; @@ -4137,13 +4107,13 @@ yyreduce: } } (yyval) = def; -} +;} break; case 166: -/* Line 1806 of yacc.c */ -#line 1898 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1898 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindString); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4153,13 +4123,13 @@ yyreduce: def->v.valueAsString = literal->v; def->v.valueAsLiteral = literal->literal; (yyval) = def; -} +;} break; case 167: -/* Line 1806 of yacc.c */ -#line 1909 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1909 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4169,13 +4139,13 @@ yyreduce: def->v.valueAsString = "false"; def->v.valueAsLiteral = "false"; (yyval) = def; -} +;} break; case 168: -/* Line 1806 of yacc.c */ -#line 1920 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1920 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4185,13 +4155,13 @@ yyreduce: def->v.valueAsString = "true"; def->v.valueAsLiteral = "true"; (yyval) = def; -} +;} break; case 169: -/* Line 1806 of yacc.c */ -#line 1936 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1936 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (6)])); @@ -4199,13 +4169,13 @@ yyreduce: ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(6) - (6)])); (yyval) = unit->currentContainer()->createConst(ident->v, const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral); -} +;} break; case 170: -/* Line 1806 of yacc.c */ -#line 1945 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1945 "../Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (5)])); @@ -4213,258 +4183,247 @@ yyreduce: unit->error("missing constant name"); (yyval) = unit->currentContainer()->createConst(IceUtil::generateUUID(), const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral, Dummy); // Dummy -} +;} break; case 171: -/* Line 1806 of yacc.c */ -#line 1959 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1959 "../Slice/Grammar.y" { -} +;} break; case 172: -/* Line 1806 of yacc.c */ -#line 1962 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1962 "../Slice/Grammar.y" { -} +;} break; case 173: -/* Line 1806 of yacc.c */ -#line 1965 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1965 "../Slice/Grammar.y" { -} +;} break; case 174: -/* Line 1806 of yacc.c */ -#line 1968 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1968 "../Slice/Grammar.y" { -} +;} break; case 175: -/* Line 1806 of yacc.c */ -#line 1971 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1971 "../Slice/Grammar.y" { -} +;} break; case 176: -/* Line 1806 of yacc.c */ -#line 1974 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1974 "../Slice/Grammar.y" { -} +;} break; case 177: -/* Line 1806 of yacc.c */ -#line 1977 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1977 "../Slice/Grammar.y" { -} +;} break; case 178: -/* Line 1806 of yacc.c */ -#line 1980 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1980 "../Slice/Grammar.y" { -} +;} break; case 179: -/* Line 1806 of yacc.c */ -#line 1983 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1983 "../Slice/Grammar.y" { -} +;} break; case 180: -/* Line 1806 of yacc.c */ -#line 1986 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1986 "../Slice/Grammar.y" { -} +;} break; case 181: -/* Line 1806 of yacc.c */ -#line 1989 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1989 "../Slice/Grammar.y" { -} +;} break; case 182: -/* Line 1806 of yacc.c */ -#line 1992 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1992 "../Slice/Grammar.y" { -} +;} break; case 183: -/* Line 1806 of yacc.c */ -#line 1995 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1995 "../Slice/Grammar.y" { -} +;} break; case 184: -/* Line 1806 of yacc.c */ -#line 1998 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 1998 "../Slice/Grammar.y" { -} +;} break; case 185: -/* Line 1806 of yacc.c */ -#line 2001 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2001 "../Slice/Grammar.y" { -} +;} break; case 186: -/* Line 1806 of yacc.c */ -#line 2004 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2004 "../Slice/Grammar.y" { -} +;} break; case 187: -/* Line 1806 of yacc.c */ -#line 2007 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2007 "../Slice/Grammar.y" { -} +;} break; case 188: -/* Line 1806 of yacc.c */ -#line 2010 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2010 "../Slice/Grammar.y" { -} +;} break; case 189: -/* Line 1806 of yacc.c */ -#line 2013 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2013 "../Slice/Grammar.y" { -} +;} break; case 190: -/* Line 1806 of yacc.c */ -#line 2016 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2016 "../Slice/Grammar.y" { -} +;} break; case 191: -/* Line 1806 of yacc.c */ -#line 2019 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2019 "../Slice/Grammar.y" { -} +;} break; case 192: -/* Line 1806 of yacc.c */ -#line 2022 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2022 "../Slice/Grammar.y" { -} +;} break; case 193: -/* Line 1806 of yacc.c */ -#line 2025 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2025 "../Slice/Grammar.y" { -} +;} break; case 194: -/* Line 1806 of yacc.c */ -#line 2028 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2028 "../Slice/Grammar.y" { -} +;} break; case 195: -/* Line 1806 of yacc.c */ -#line 2031 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2031 "../Slice/Grammar.y" { -} +;} break; case 196: -/* Line 1806 of yacc.c */ -#line 2034 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2034 "../Slice/Grammar.y" { -} +;} break; case 197: -/* Line 1806 of yacc.c */ -#line 2037 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2037 "../Slice/Grammar.y" { -} +;} break; case 198: -/* Line 1806 of yacc.c */ -#line 2040 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2040 "../Slice/Grammar.y" { -} +;} break; case 199: -/* Line 1806 of yacc.c */ -#line 2043 "Grammar.y" +/* Line 1455 of yacc.c */ +#line 2043 "../Slice/Grammar.y" { -} +;} break; -/* Line 1806 of yacc.c */ -#line 4455 "Grammar.tab.c" +/* Line 1455 of yacc.c */ +#line 4425 "Grammar.tab.c" default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -4492,10 +4451,6 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -4503,36 +4458,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } @@ -4591,7 +4547,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -4650,13 +4606,8 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -4681,7 +4632,7 @@ yyreturn: -/* Line 2067 of yacc.c */ -#line 2047 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 2047 "../Slice/Grammar.y" diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h index 44fb7115b46..0ee3d141315 100644 --- a/cpp/src/Slice/Grammar.h +++ b/cpp/src/Slice/Grammar.h @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison interface for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 it under the terms of the GNU General Public License as published by diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp index 9399b80a741..11941185747 100644 --- a/cpp/src/Slice/Scanner.cpp +++ b/cpp/src/Slice/Scanner.cpp @@ -1,4 +1,4 @@ -#include "IceUtil/ScannerConfig.h"
+#include <IceUtil/ScannerConfig.h> #line 2 "lex.yy.c" #line 4 "lex.yy.c" @@ -711,7 +711,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( slice_text, slice_leng, 1, slice_out ) +#define ECHO do { if (fwrite( slice_text, slice_leng, 1, slice_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -722,7 +722,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( slice_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ |