diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/Grammar.cpp | 2938 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.h | 87 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.y | 69 | ||||
-rw-r--r-- | cpp/src/Slice/Scanner.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Slice/Scanner.l | 1 |
5 files changed, 1310 insertions, 1786 deletions
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index ae2b63f51c1..224f9a1c282 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 1.875c. */ -/* 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. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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 @@ -17,24 +15,16 @@ 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. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - 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. + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -46,9 +36,6 @@ /* Identify Bison output. */ #define YYBISON 1 -/* Bison version. */ -#define YYBISON_VERSION "2.3" - /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,7 +45,8 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* Substitute the variable and function names. */ +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ #define yyparse slice_parse #define yylex slice_lex #define yyerror slice_error @@ -101,23 +89,21 @@ ICE_CONST = 282, ICE_FALSE = 283, ICE_TRUE = 284, - ICE_NONMUTATING = 285, - ICE_IDEMPOTENT = 286, - ICE_SCOPE_DELIMITER = 287, - ICE_IDENTIFIER = 288, - ICE_STRING_LITERAL = 289, - ICE_INTEGER_LITERAL = 290, - ICE_FLOATING_POINT_LITERAL = 291, - ICE_IDENT_OP = 292, - ICE_KEYWORD_OP = 293, - ICE_METADATA_OPEN = 294, - ICE_METADATA_CLOSE = 295, - ICE_GLOBAL_METADATA_OPEN = 296, - ICE_GLOBAL_METADATA_CLOSE = 297, - BAD_CHAR = 298 + ICE_IDEMPOTENT = 285, + ICE_SCOPE_DELIMITER = 286, + ICE_IDENTIFIER = 287, + ICE_STRING_LITERAL = 288, + ICE_INTEGER_LITERAL = 289, + ICE_FLOATING_POINT_LITERAL = 290, + ICE_IDENT_OP = 291, + ICE_KEYWORD_OP = 292, + ICE_METADATA_OPEN = 293, + ICE_METADATA_CLOSE = 294, + ICE_GLOBAL_METADATA_OPEN = 295, + ICE_GLOBAL_METADATA_CLOSE = 296, + BAD_CHAR = 297 }; #endif -/* Tokens. */ #define ICE_MODULE 258 #define ICE_CLASS 259 #define ICE_INTERFACE 260 @@ -145,26 +131,25 @@ #define ICE_CONST 282 #define ICE_FALSE 283 #define ICE_TRUE 284 -#define ICE_NONMUTATING 285 -#define ICE_IDEMPOTENT 286 -#define ICE_SCOPE_DELIMITER 287 -#define ICE_IDENTIFIER 288 -#define ICE_STRING_LITERAL 289 -#define ICE_INTEGER_LITERAL 290 -#define ICE_FLOATING_POINT_LITERAL 291 -#define ICE_IDENT_OP 292 -#define ICE_KEYWORD_OP 293 -#define ICE_METADATA_OPEN 294 -#define ICE_METADATA_CLOSE 295 -#define ICE_GLOBAL_METADATA_OPEN 296 -#define ICE_GLOBAL_METADATA_CLOSE 297 -#define BAD_CHAR 298 +#define ICE_IDEMPOTENT 285 +#define ICE_SCOPE_DELIMITER 286 +#define ICE_IDENTIFIER 287 +#define ICE_STRING_LITERAL 288 +#define ICE_INTEGER_LITERAL 289 +#define ICE_FLOATING_POINT_LITERAL 290 +#define ICE_IDENT_OP 291 +#define ICE_KEYWORD_OP 292 +#define ICE_METADATA_OPEN 293 +#define ICE_METADATA_CLOSE 294 +#define ICE_GLOBAL_METADATA_OPEN 295 +#define ICE_GLOBAL_METADATA_CLOSE 296 +#define BAD_CHAR 297 /* Copy the first part of user declarations. */ -#line 1 "Grammar.y" +#line 1 "../Slice/Grammar.y" // ********************************************************************** @@ -222,12 +207,7 @@ slice_error(const char* s) # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -239,171 +219,56 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 244 "Grammar.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif +/* Line 214 of yacc.c. */ +#line 224 "Grammar.tab.c" -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif +#if ! defined (yyoverflow) || YYERROR_VERBOSE -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int +# ifndef YYFREE +# define YYFREE free # endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid +# ifndef YYMALLOC +# define YYMALLOC malloc # endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# 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 _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) +# if defined (__STDC__) || defined (__cplusplus) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# 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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif +# define YYSIZE_T size_t # endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; + short yyss; YYSTYPE yyvs; }; @@ -413,24 +278,24 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ +# 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; \ + register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif @@ -448,47 +313,53 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (YYID (0)) + while (0) + +#endif +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short yysigned_char; #endif -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 13 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 775 +#define YYLAST 797 -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 53 -/* YYNNTS -- Number of nonterminals. */ +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 52 +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 67 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 184 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 269 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 181 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 264 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 298 +#define YYMAXUTOK 297 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = +static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 47, 51, 2, 48, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 44, - 49, 52, 50, 2, 2, 2, 2, 2, 2, 2, + 2, 46, 50, 2, 47, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, + 48, 51, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 45, 2, 46, 2, 2, 2, 2, + 2, 2, 2, 44, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -505,13 +376,13 @@ static const yytype_uint8 yytranslate[] = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43 + 35, 36, 37, 38, 39, 40, 41, 42 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const yytype_uint16 yyprhs[] = +static const unsigned short yyprhs[] = { 0, 0, 3, 5, 9, 13, 14, 15, 19, 20, 26, 27, 32, 35, 36, 38, 40, 42, 44, 46, @@ -520,107 +391,106 @@ static const yytype_uint16 yyprhs[] = 105, 108, 110, 113, 116, 119, 120, 127, 132, 136, 139, 140, 142, 145, 148, 151, 152, 161, 164, 165, 168, 169, 174, 178, 181, 182, 184, 187, 189, 191, - 193, 196, 200, 204, 207, 211, 215, 216, 222, 223, - 229, 231, 233, 236, 239, 242, 243, 251, 255, 257, - 259, 262, 263, 268, 272, 275, 276, 278, 282, 284, - 286, 288, 296, 304, 315, 326, 329, 332, 333, 340, - 346, 350, 352, 354, 356, 357, 359, 360, 361, 365, - 371, 376, 383, 387, 393, 396, 397, 399, 402, 406, - 408, 410, 412, 414, 416, 418, 420, 422, 424, 427, - 429, 431, 434, 437, 439, 443, 445, 447, 448, 450, - 452, 454, 456, 458, 460, 467, 473, 475, 477, 479, - 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, - 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, - 521, 523, 525, 527, 529 + 193, 196, 200, 203, 207, 208, 214, 215, 221, 223, + 225, 228, 231, 234, 235, 243, 247, 249, 251, 254, + 255, 260, 264, 267, 268, 270, 274, 276, 278, 280, + 288, 296, 307, 318, 321, 324, 325, 332, 338, 342, + 344, 346, 348, 349, 351, 352, 353, 357, 363, 368, + 375, 379, 385, 388, 389, 391, 394, 398, 400, 402, + 404, 406, 408, 410, 412, 414, 416, 419, 421, 423, + 426, 429, 431, 435, 437, 439, 440, 442, 444, 446, + 448, 450, 452, 459, 465, 467, 469, 471, 473, 475, + 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, + 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = { - 54, 0, -1, 57, -1, 41, 115, 42, -1, 39, - 115, 40, -1, -1, -1, 55, 58, 57, -1, -1, - 56, 61, 59, 44, 57, -1, -1, 1, 44, 60, - 57, -1, 56, 61, -1, -1, 62, -1, 79, -1, - 80, -1, 93, -1, 94, -1, 65, -1, 66, -1, - 73, -1, 74, -1, 102, -1, 103, -1, 105, -1, - 118, -1, -1, 3, 33, 63, 45, 57, 46, -1, - 6, 33, -1, 6, 119, -1, 116, 64, -1, -1, - 116, 64, 68, 67, 45, 69, 46, -1, 12, 112, - -1, -1, 56, 71, 44, 69, -1, 1, 44, 69, - -1, 56, 71, -1, -1, 113, 33, -1, 85, -1, - 7, 33, -1, 7, 119, -1, 116, 72, -1, -1, - 116, 72, 75, 45, 76, 46, -1, 56, 77, 44, - 76, -1, 1, 44, 76, -1, 56, 77, -1, -1, - 85, -1, 4, 33, -1, 4, 119, -1, 116, 78, - -1, -1, 116, 78, 82, 83, 81, 45, 84, 46, - -1, 12, 112, -1, -1, 13, 96, -1, -1, 56, - 91, 44, 84, -1, 1, 44, 84, -1, 56, 91, - -1, -1, 70, -1, 113, 119, -1, 113, -1, 113, - -1, 15, -1, 86, 37, -1, 30, 86, 37, -1, - 31, 86, 37, -1, 86, 38, -1, 30, 86, 38, - -1, 31, 86, 38, -1, -1, 87, 110, 47, 89, - 111, -1, -1, 87, 1, 47, 90, 111, -1, 85, - -1, 88, -1, 5, 33, -1, 5, 119, -1, 116, - 92, -1, -1, 116, 92, 97, 95, 45, 98, 46, - -1, 112, 48, 96, -1, 112, -1, 24, -1, 12, - 96, -1, -1, 56, 99, 44, 98, -1, 1, 44, - 98, -1, 56, 99, -1, -1, 88, -1, 101, 48, - 100, -1, 101, -1, 112, -1, 119, -1, 116, 8, - 49, 56, 113, 50, 33, -1, 116, 8, 49, 56, - 113, 50, 119, -1, 116, 9, 49, 56, 113, 48, - 56, 113, 50, 33, -1, 116, 9, 49, 56, 113, - 48, 56, 113, 50, 119, -1, 10, 33, -1, 10, - 119, -1, -1, 116, 104, 106, 45, 107, 46, -1, - 116, 10, 45, 107, 46, -1, 108, 48, 107, -1, - 108, -1, 33, -1, 119, -1, -1, 11, -1, -1, - -1, 109, 56, 70, -1, 110, 48, 109, 56, 70, - -1, 109, 56, 113, 119, -1, 110, 48, 109, 56, - 113, 119, -1, 109, 56, 113, -1, 110, 48, 109, - 56, 113, -1, 14, 100, -1, -1, 33, -1, 32, - 33, -1, 112, 32, 33, -1, 16, -1, 17, -1, - 18, -1, 19, -1, 20, -1, 21, -1, 22, -1, - 23, -1, 24, -1, 24, 51, -1, 25, -1, 112, - -1, 112, 51, -1, 34, 114, -1, 34, -1, 115, - 48, 114, -1, 114, -1, 26, -1, -1, 35, -1, - 36, -1, 112, -1, 34, -1, 28, -1, 29, -1, - 27, 56, 113, 33, 52, 117, -1, 27, 56, 113, - 52, 117, -1, 3, -1, 4, -1, 5, -1, 6, - -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, - -1, 12, -1, 13, -1, 14, -1, 15, -1, 16, - -1, 17, -1, 18, -1, 19, -1, 20, -1, 21, - -1, 22, -1, 23, -1, 24, -1, 25, -1, 26, - -1, 27, -1, 28, -1, 29, -1, 30, -1, 31, + 53, 0, -1, 56, -1, 40, 114, 41, -1, 38, + 114, 39, -1, -1, -1, 54, 57, 56, -1, -1, + 55, 60, 58, 43, 56, -1, -1, 1, 43, 59, + 56, -1, 55, 60, -1, -1, 61, -1, 78, -1, + 79, -1, 92, -1, 93, -1, 64, -1, 65, -1, + 72, -1, 73, -1, 101, -1, 102, -1, 104, -1, + 117, -1, -1, 3, 32, 62, 44, 56, 45, -1, + 6, 32, -1, 6, 118, -1, 115, 63, -1, -1, + 115, 63, 67, 66, 44, 68, 45, -1, 12, 111, + -1, -1, 55, 70, 43, 68, -1, 1, 43, 68, + -1, 55, 70, -1, -1, 112, 32, -1, 84, -1, + 7, 32, -1, 7, 118, -1, 115, 71, -1, -1, + 115, 71, 74, 44, 75, 45, -1, 55, 76, 43, + 75, -1, 1, 43, 75, -1, 55, 76, -1, -1, + 84, -1, 4, 32, -1, 4, 118, -1, 115, 77, + -1, -1, 115, 77, 81, 82, 80, 44, 83, 45, + -1, 12, 111, -1, -1, 13, 95, -1, -1, 55, + 90, 43, 83, -1, 1, 43, 83, -1, 55, 90, + -1, -1, 69, -1, 112, 118, -1, 112, -1, 112, + -1, 15, -1, 85, 36, -1, 30, 85, 36, -1, + 85, 37, -1, 30, 85, 37, -1, -1, 86, 109, + 46, 88, 110, -1, -1, 86, 1, 46, 89, 110, + -1, 84, -1, 87, -1, 5, 32, -1, 5, 118, + -1, 115, 91, -1, -1, 115, 91, 96, 94, 44, + 97, 45, -1, 111, 47, 95, -1, 111, -1, 24, + -1, 12, 95, -1, -1, 55, 98, 43, 97, -1, + 1, 43, 97, -1, 55, 98, -1, -1, 87, -1, + 100, 47, 99, -1, 100, -1, 111, -1, 118, -1, + 115, 8, 48, 55, 112, 49, 32, -1, 115, 8, + 48, 55, 112, 49, 118, -1, 115, 9, 48, 55, + 112, 47, 55, 112, 49, 32, -1, 115, 9, 48, + 55, 112, 47, 55, 112, 49, 118, -1, 10, 32, + -1, 10, 118, -1, -1, 115, 103, 105, 44, 106, + 45, -1, 115, 10, 44, 106, 45, -1, 107, 47, + 106, -1, 107, -1, 32, -1, 118, -1, -1, 11, + -1, -1, -1, 108, 55, 69, -1, 109, 47, 108, + 55, 69, -1, 108, 55, 112, 118, -1, 109, 47, + 108, 55, 112, 118, -1, 108, 55, 112, -1, 109, + 47, 108, 55, 112, -1, 14, 99, -1, -1, 32, + -1, 31, 32, -1, 111, 31, 32, -1, 16, -1, + 17, -1, 18, -1, 19, -1, 20, -1, 21, -1, + 22, -1, 23, -1, 24, -1, 24, 50, -1, 25, + -1, 111, -1, 111, 50, -1, 33, 113, -1, 33, + -1, 114, 47, 113, -1, 113, -1, 26, -1, -1, + 34, -1, 35, -1, 111, -1, 33, -1, 28, -1, + 29, -1, 27, 55, 112, 32, 51, 116, -1, 27, + 55, 112, 51, 116, -1, 3, -1, 4, -1, 5, + -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, + -1, 11, -1, 12, -1, 13, -1, 14, -1, 15, + -1, 16, -1, 17, -1, 18, -1, 19, -1, 20, + -1, 21, -1, 22, -1, 23, -1, 24, -1, 25, + -1, 26, -1, 27, -1, 28, -1, 29, -1, 30, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const unsigned short yyrline[] = { - 0, 105, 105, 113, 122, 127, 136, 135, 145, 144, - 155, 154, 159, 164, 171, 175, 179, 183, 187, 191, - 195, 199, 203, 207, 211, 215, 219, 229, 228, 262, - 266, 277, 288, 287, 314, 323, 331, 340, 343, 348, - 355, 368, 374, 378, 389, 400, 399, 435, 444, 447, - 452, 459, 465, 469, 480, 494, 493, 533, 568, 576, - 581, 589, 598, 601, 606, 613, 636, 658, 684, 685, - 694, 718, 759, 783, 807, 831, 861, 860, 883, 882, - 905, 906, 912, 916, 927, 942, 941, 976, 1011, 1046, - 1056, 1061, 1069, 1078, 1081, 1086, 1093, 1099, 1106, 1118, - 1130, 1141, 1150, 1165, 1176, 1193, 1197, 1209, 1208, 1232, - 1247, 1253, 1261, 1273, 1281, 1290, 1297, 1308, 1310, 1328, - 1346, 1358, 1370, 1381, 1397, 1402, 1410, 1413, 1419, 1432, - 1436, 1440, 1444, 1448, 1452, 1456, 1460, 1464, 1468, 1472, - 1476, 1495, 1536, 1542, 1550, 1557, 1569, 1576, 1586, 1599, - 1612, 1647, 1658, 1669, 1685, 1694, 1709, 1712, 1715, 1718, - 1721, 1724, 1727, 1730, 1733, 1736, 1739, 1742, 1745, 1748, - 1751, 1754, 1757, 1760, 1763, 1766, 1769, 1772, 1775, 1778, - 1781, 1784, 1787, 1790, 1793 + 0, 104, 104, 112, 121, 126, 135, 134, 144, 143, + 154, 153, 158, 163, 170, 174, 178, 182, 186, 190, + 194, 198, 202, 206, 210, 214, 218, 228, 227, 261, + 265, 276, 287, 286, 313, 322, 330, 339, 342, 347, + 354, 367, 373, 377, 388, 399, 398, 434, 443, 446, + 451, 458, 464, 468, 479, 493, 492, 532, 567, 575, + 580, 588, 597, 600, 605, 612, 635, 657, 683, 684, + 693, 717, 741, 765, 795, 794, 817, 816, 839, 840, + 846, 850, 861, 876, 875, 910, 945, 980, 990, 995, + 1003, 1012, 1015, 1020, 1027, 1033, 1040, 1052, 1064, 1075, + 1084, 1099, 1110, 1127, 1131, 1143, 1142, 1166, 1181, 1187, + 1195, 1207, 1215, 1224, 1231, 1242, 1244, 1262, 1280, 1292, + 1304, 1315, 1331, 1336, 1344, 1347, 1353, 1366, 1370, 1374, + 1378, 1382, 1386, 1390, 1394, 1398, 1402, 1406, 1410, 1429, + 1470, 1476, 1484, 1491, 1503, 1510, 1520, 1533, 1546, 1581, + 1592, 1603, 1619, 1628, 1643, 1646, 1649, 1652, 1655, 1658, + 1661, 1664, 1667, 1670, 1673, 1676, 1679, 1682, 1685, 1688, + 1691, 1694, 1697, 1700, 1703, 1706, 1709, 1712, 1715, 1718, + 1721, 1724 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ICE_MODULE", "ICE_CLASS", @@ -629,8 +499,8 @@ static const char *const yytname[] = "ICE_THROWS", "ICE_VOID", "ICE_BYTE", "ICE_BOOL", "ICE_SHORT", "ICE_INT", "ICE_LONG", "ICE_FLOAT", "ICE_DOUBLE", "ICE_STRING", "ICE_OBJECT", "ICE_LOCAL_OBJECT", "ICE_LOCAL", "ICE_CONST", "ICE_FALSE", "ICE_TRUE", - "ICE_NONMUTATING", "ICE_IDEMPOTENT", "ICE_SCOPE_DELIMITER", - "ICE_IDENTIFIER", "ICE_STRING_LITERAL", "ICE_INTEGER_LITERAL", + "ICE_IDEMPOTENT", "ICE_SCOPE_DELIMITER", "ICE_IDENTIFIER", + "ICE_STRING_LITERAL", "ICE_INTEGER_LITERAL", "ICE_FLOATING_POINT_LITERAL", "ICE_IDENT_OP", "ICE_KEYWORD_OP", "ICE_METADATA_OPEN", "ICE_METADATA_CLOSE", "ICE_GLOBAL_METADATA_OPEN", "ICE_GLOBAL_METADATA_CLOSE", "BAD_CHAR", "';'", "'{'", "'}'", "')'", @@ -655,43 +525,43 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = +static const unsigned short yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 59, 123, 125, 41, 44, 60, - 62, 42, 61 + 295, 296, 297, 59, 123, 125, 41, 44, 60, 62, + 42, 61 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const unsigned char yyr1[] = { - 0, 53, 54, 55, 56, 56, 58, 57, 59, 57, - 60, 57, 57, 57, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 63, 62, 64, - 64, 65, 67, 66, 68, 68, 69, 69, 69, 69, - 70, 71, 72, 72, 73, 75, 74, 76, 76, 76, - 76, 77, 78, 78, 79, 81, 80, 82, 82, 83, - 83, 84, 84, 84, 84, 85, 85, 85, 86, 86, - 87, 87, 87, 87, 87, 87, 89, 88, 90, 88, - 91, 91, 92, 92, 93, 95, 94, 96, 96, 96, - 97, 97, 98, 98, 98, 98, 99, 100, 100, 101, - 101, 102, 102, 103, 103, 104, 104, 106, 105, 105, - 107, 107, 108, 108, 108, 109, 109, 110, 110, 110, - 110, 110, 110, 110, 111, 111, 112, 112, 112, 113, - 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, - 117, 117, 117, 117, 118, 118, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119 + 0, 52, 53, 54, 55, 55, 57, 56, 58, 56, + 59, 56, 56, 56, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 62, 61, 63, + 63, 64, 66, 65, 67, 67, 68, 68, 68, 68, + 69, 70, 71, 71, 72, 74, 73, 75, 75, 75, + 75, 76, 77, 77, 78, 80, 79, 81, 81, 82, + 82, 83, 83, 83, 83, 84, 84, 84, 85, 85, + 86, 86, 86, 86, 88, 87, 89, 87, 90, 90, + 91, 91, 92, 94, 93, 95, 95, 95, 96, 96, + 97, 97, 97, 97, 98, 99, 99, 100, 100, 101, + 101, 102, 102, 103, 103, 105, 104, 104, 106, 106, + 107, 107, 107, 108, 108, 109, 109, 109, 109, 109, + 109, 109, 110, 110, 111, 111, 111, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 113, 113, 114, 114, 115, 115, 116, 116, 116, 116, + 116, 116, 117, 117, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const unsigned char yyr2[] = { 0, 2, 1, 3, 3, 0, 0, 3, 0, 5, 0, 4, 2, 0, 1, 1, 1, 1, 1, 1, @@ -700,314 +570,334 @@ static const yytype_uint8 yyr2[] = 2, 1, 2, 2, 2, 0, 6, 4, 3, 2, 0, 1, 2, 2, 2, 0, 8, 2, 0, 2, 0, 4, 3, 2, 0, 1, 2, 1, 1, 1, - 2, 3, 3, 2, 3, 3, 0, 5, 0, 5, - 1, 1, 2, 2, 2, 0, 7, 3, 1, 1, - 2, 0, 4, 3, 2, 0, 1, 3, 1, 1, - 1, 7, 7, 10, 10, 2, 2, 0, 6, 5, - 3, 1, 1, 1, 0, 1, 0, 0, 3, 5, - 4, 6, 3, 5, 2, 0, 1, 2, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 2, 2, 1, 3, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 6, 5, 1, 1, 1, 1, + 2, 3, 2, 3, 0, 5, 0, 5, 1, 1, + 2, 2, 2, 0, 7, 3, 1, 1, 2, 0, + 4, 3, 2, 0, 1, 3, 1, 1, 1, 7, + 7, 10, 10, 2, 2, 0, 6, 5, 3, 1, + 1, 1, 0, 1, 0, 0, 3, 5, 4, 6, + 3, 5, 2, 0, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, + 2, 1, 3, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 6, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 + 1, 1 }; /* 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[] = +static const unsigned char yydefact[] = { - 0, 0, 0, 0, 0, 6, 147, 2, 10, 143, - 145, 0, 0, 1, 0, 0, 146, 5, 12, 14, + 0, 0, 0, 0, 0, 6, 145, 2, 10, 141, + 143, 0, 0, 1, 0, 0, 144, 5, 12, 14, 19, 20, 21, 22, 15, 16, 17, 18, 23, 24, - 25, 0, 26, 0, 142, 4, 0, 3, 7, 27, + 25, 0, 26, 0, 140, 4, 0, 3, 7, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 44, 54, 84, 107, 11, 144, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 139, 0, 126, 140, - 0, 0, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 52, 53, 82, 83, 29, 30, 42, 43, 5, - 5, 105, 114, 106, 0, 32, 0, 0, 60, 0, - 85, 0, 0, 138, 127, 0, 141, 0, 0, 9, - 0, 0, 112, 0, 111, 113, 34, 0, 0, 57, - 0, 55, 89, 90, 88, 0, 114, 0, 128, 0, - 152, 153, 151, 148, 149, 150, 155, 0, 0, 109, - 114, 0, 0, 0, 0, 59, 0, 0, 0, 0, - 28, 154, 0, 5, 110, 0, 0, 0, 0, 65, - 49, 51, 67, 46, 0, 87, 0, 0, 0, 108, - 101, 102, 0, 0, 38, 41, 33, 48, 0, 40, - 66, 0, 0, 0, 0, 69, 0, 0, 0, 0, - 96, 94, 68, 86, 0, 37, 0, 47, 0, 80, - 81, 63, 67, 56, 93, 0, 0, 70, 73, 0, - 115, 5, 0, 0, 0, 36, 62, 0, 71, 74, - 72, 75, 78, 0, 76, 116, 92, 103, 104, 61, - 125, 118, 122, 125, 5, 0, 79, 120, 77, 0, - 124, 98, 99, 100, 119, 123, 0, 121, 97 + 44, 54, 82, 105, 11, 142, 0, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 137, 0, 124, 138, + 0, 0, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 52, 53, 80, 81, 29, 30, 42, 43, 5, 5, + 103, 112, 104, 0, 32, 0, 0, 60, 0, 83, + 0, 0, 136, 125, 0, 139, 0, 0, 9, 0, + 0, 110, 0, 109, 111, 34, 0, 0, 57, 0, + 55, 87, 88, 86, 0, 112, 0, 126, 0, 150, + 151, 149, 146, 147, 148, 153, 0, 0, 107, 112, + 0, 0, 0, 0, 59, 0, 0, 0, 0, 28, + 152, 0, 5, 108, 0, 0, 0, 0, 65, 49, + 51, 67, 46, 0, 85, 0, 0, 0, 106, 99, + 100, 0, 0, 38, 41, 33, 48, 0, 40, 66, + 0, 0, 0, 0, 69, 0, 0, 0, 94, 92, + 68, 84, 0, 37, 0, 47, 0, 78, 79, 63, + 67, 56, 91, 0, 70, 72, 0, 113, 5, 0, + 0, 0, 36, 62, 0, 71, 73, 76, 0, 74, + 114, 90, 101, 102, 61, 123, 116, 120, 123, 5, + 0, 77, 118, 75, 0, 122, 96, 97, 98, 117, + 121, 0, 119, 95 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const short yydefgoto[] = { -1, 4, 5, 6, 7, 14, 41, 33, 18, 19, - 56, 49, 20, 21, 137, 115, 177, 179, 194, 50, - 22, 23, 116, 164, 180, 51, 24, 25, 166, 118, - 141, 203, 181, 208, 209, 210, 253, 250, 221, 52, - 26, 27, 145, 143, 120, 188, 211, 260, 261, 28, - 29, 53, 30, 121, 133, 134, 231, 232, 256, 69, - 212, 10, 11, 31, 156, 32, 135 + 56, 49, 20, 21, 136, 114, 176, 178, 193, 50, + 22, 23, 115, 163, 179, 51, 24, 25, 165, 117, + 140, 202, 180, 206, 207, 208, 248, 245, 219, 52, + 26, 27, 144, 142, 119, 187, 209, 255, 256, 28, + 29, 53, 30, 120, 132, 133, 228, 229, 251, 69, + 181, 10, 11, 31, 155, 32, 134 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -192 -static const yytype_int16 yypact[] = +#define YYPACT_NINF -176 +static const short yypact[] = { - 400, -26, -9, -9, 27, -192, 62, -192, -192, -9, - -192, 18, 20, -192, 77, 30, -192, 35, 58, -192, - -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, - -192, 130, -192, 77, -192, -192, -9, -192, -192, -192, - 186, 78, 506, 537, 568, 599, 75, 79, 366, -11, - 34, 9, 11, -192, -192, -192, 61, -192, -192, -192, - -192, -192, -192, -192, -192, 76, -192, 96, -192, -15, - 38, 77, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -192, -192, -192, 35, - 35, -192, 630, -192, -2, -192, 103, -2, 128, 93, - -192, 107, 104, -192, -192, 116, -192, 101, 156, -192, - 186, 186, -192, 108, 109, -192, 123, 114, 289, 123, - 93, -192, -192, -192, -8, 115, 630, 117, -192, 156, - -192, -192, -192, -192, -192, 123, -192, 118, 121, -192, - 630, 322, 120, 186, 119, -192, 125, 93, 223, 127, - -192, -192, 661, 35, -192, 122, 186, 129, 289, -192, - 133, -192, 692, -192, 256, -192, 134, 398, 137, -192, - -192, -192, 186, 322, 135, -192, -192, -192, 289, -192, - -192, 136, 398, 140, 223, -192, 742, 742, 32, 28, - -192, 149, -192, -192, 124, -192, 322, -192, 256, -192, - -192, 151, 439, -192, -192, 57, 59, -192, -192, 150, - -192, 35, 51, 223, 723, -192, -192, 256, -192, -192, - -192, -192, -192, 186, -192, 160, -192, -192, -192, -192, - 182, -192, 692, 182, 35, 475, -192, -192, -192, 186, - -192, 152, 123, -192, -192, 692, 475, -192, -192 + 435, -23, -9, -9, 64, -176, 11, -176, -176, -9, + -176, -21, -20, -176, 77, 38, -176, 52, 69, -176, + -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, + -176, 101, -176, 77, -176, -176, -9, -176, -176, -176, + 765, 71, 538, 568, 598, 628, 68, 73, 402, -3, + 83, 10, -1, -176, -176, -176, 84, -176, -176, -176, + -176, -176, -176, -176, -176, 81, -176, 97, -176, -14, + 37, 77, -176, -176, -176, -176, -176, -176, -176, -176, + -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, + -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, + -176, -176, -176, -176, -176, -176, -176, -176, 52, 52, + -176, 658, -176, 36, -176, 88, 36, 120, 41, -176, + 90, 359, -176, -176, 103, -176, 85, 65, -176, 765, + 765, -176, 92, 91, -176, 108, 100, 284, 108, 41, + -176, -176, -176, -15, 102, 658, 96, -176, 65, -176, + -176, -176, -176, -176, 108, -176, 98, 104, -176, 658, + 316, 105, 765, 107, -176, 110, 41, 220, 111, -176, + -176, 688, 52, -176, 106, 765, 112, 284, -176, 116, + -176, 718, -176, 252, -176, 118, 357, 117, -176, -176, + -176, 765, 316, 121, -176, -176, -176, 284, -176, -176, + 122, 357, 123, 220, -176, 432, 82, 28, -176, 124, + -176, -176, 125, -176, 316, -176, 252, -176, -176, 126, + 473, -176, -176, 87, -176, -176, 99, -176, 52, 79, + 220, 748, -176, -176, 252, -176, -176, -176, 765, -176, + 159, -176, -176, -176, -176, 157, -176, 718, 157, 52, + 508, -176, -176, -176, 765, -176, 129, 108, -176, -176, + 718, 508, -176, -176 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = +static const short yypgoto[] = { - -192, -192, -192, -17, -7, -192, -192, -192, -192, -192, - -192, -192, -192, -192, -192, -192, -179, -186, -192, -192, - -192, -192, -192, -163, -192, -192, -192, -192, -192, -192, - -192, -146, -164, -87, -192, -4, -192, -192, -192, -192, - -192, -192, -192, -124, -192, -191, -192, -49, -192, -192, - -192, -192, -192, -192, -127, -192, -24, -192, -31, -108, - -30, 19, 220, -192, 81, -192, -40 + -176, -176, -176, -17, -8, -176, -176, -176, -176, -176, + -176, -176, -176, -176, -176, -176, -158, -159, -176, -176, + -176, -176, -176, -164, -176, -176, -176, -176, -176, -176, + -176, -145, -140, -33, -176, -19, -176, -176, -176, -176, + -176, -176, -176, -124, -176, -175, -176, -80, -176, -176, + -176, -176, -176, -176, -83, -176, -62, -176, -65, -108, + -28, 21, 181, -176, 39, -176, -41 }; /* 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 zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -118 -static const yytype_int16 yytable[] = +#define YYTABLE_NINF -116 +static const short yytable[] = { - 40, 114, 102, 104, 106, 108, 136, 38, 113, 139, - 70, 144, 195, 224, 215, 197, 165, 125, 8, 169, - 155, 117, -58, 119, 125, 9, 54, 13, 34, 229, - 67, 68, 144, 174, -35, 217, 126, 235, 219, 230, - 167, 155, 246, 185, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -58, 55, -91, 251, 35, 144, - -116, -116, 37, 39, 129, 15, 36, -116, 36, 227, - 228, 127, 236, 264, 2, -117, -117, -13, 1, -45, - -5, -5, -5, -5, -5, -5, -5, -5, 16, 17, - 128, 249, 130, 131, 238, 239, 240, 241, 244, 245, - 157, 158, -8, -5, -5, 1, 122, -5, -5, -5, - -5, -5, -5, -5, -5, 147, 2, 142, 3, 225, - 226, 163, 71, -13, 109, 67, 68, 123, 110, 124, - -5, -5, 191, 182, 42, 43, 44, 45, 46, 47, - 48, 140, 200, 2, 176, 3, 182, 262, 138, 148, - -13, 187, 146, 149, 159, 125, 192, 160, 262, 161, - 168, 163, 214, 170, 178, 183, 193, 202, 172, 173, - 184, 230, 222, 189, 234, 196, 176, 198, 204, 216, - 218, 163, 200, 213, 150, 151, 223, 187, 67, 68, - 152, 153, 154, 233, 248, 237, 255, 242, 220, 176, - 266, 202, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 257, 252, 243, 263, 187, 268, 67, 68, - 202, 254, 258, 12, 186, 267, 263, 0, 0, 265, - 171, 0, 0, 0, 0, 0, 0, 259, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, - 0, 0, 0, -5, -5, -5, -5, 201, 0, 0, - 0, 0, 2, 0, 0, 0, 0, 0, 0, -95, - 0, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, 0, 0, 0, 0, -5, -5, -5, -5, - 162, 0, 0, 0, 0, 2, 0, 0, 0, 0, - 0, 0, -64, 0, 0, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, 0, 0, 0, 0, 0, - 0, -5, -5, 175, 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, -50, 0, 0, -5, -5, + 40, 101, 103, 105, 107, 135, 38, 112, 138, 113, + 143, 118, 70, 196, 15, 164, 124, 124, 35, 154, + 8, 37, 116, -58, 9, 54, 36, 36, 222, 226, + 34, 143, 166, 215, 213, 194, 125, 16, 17, 227, + 154, -35, 184, -89, -114, -114, -114, -114, -114, -114, + -114, -114, -114, -114, -58, 241, 232, 55, 143, -114, + -114, 217, 168, 128, 13, 141, -114, 67, 68, 126, + 39, 233, 67, 68, -115, -115, 173, -13, 1, 246, + -5, -5, -5, -5, -5, -5, -5, -5, 127, 244, + 2, 129, 130, 149, 150, 259, 67, 68, 151, 152, + 153, 156, 157, -5, -5, 42, 43, 44, 45, 46, + 47, 48, -8, 146, 71, 2, 108, 3, 224, 225, + 162, 109, -13, 235, 236, 239, 240, -45, 121, 123, + 190, 122, 137, 139, 145, 147, 148, 158, 159, 124, + 199, 169, 257, 175, 160, 237, 167, 171, 177, 192, + 186, 172, 182, 257, 183, 191, 188, 195, 210, 197, + 162, 203, 211, 212, 214, 216, 201, 230, 221, 234, + 227, 250, 223, 220, 231, 175, 261, 210, 249, 199, + 162, 263, 218, 253, 12, 0, 186, 170, 0, 0, + 243, 0, 0, 0, 0, 0, 0, 175, 0, 201, + 0, 0, 0, 0, 0, 0, 252, 0, 0, 258, + 247, 238, 0, 186, 0, 0, 0, 201, 0, 262, + 258, 185, 0, 0, 0, 0, 260, 0, 0, 0, + 0, 0, 254, 0, 0, -5, -5, -5, -5, -5, + -5, -5, -5, -5, -5, -5, 0, 0, 0, 0, + -5, -5, -5, 200, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, -93, 0, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, 0, - 0, 0, 0, 0, -5, -5, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, -39, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 0, 111, - -13, 1, 0, -5, -5, -5, -5, -5, -5, -5, - -5, 112, 0, 205, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 0, 0, -5, -5, 206, 207, - 67, 68, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 3, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 0, 199, 0, 0, 0, -68, -68, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 67, 68, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 0, 101, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, - 103, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 0, 105, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 0, 107, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 0, 132, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 0, 190, 72, 73, 74, 75, 76, + 0, 0, -5, -5, -5, 161, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, -64, 0, 0, + -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, + 0, 0, 0, 0, 0, -5, -5, 174, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, -50, + 0, 0, -5, -5, -5, -5, -5, -5, -5, -5, + -5, -5, 0, 0, 0, 0, 0, -5, -5, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 1, -39, -5, -5, -5, -5, -5, -5, -5, -5, + 0, 0, 204, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 0, 0, -5, -5, 205, 67, 68, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, + 0, 0, 0, 0, -13, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 0, 199, 72, 73, 74, 75, + 97, 98, 99, 0, 110, -13, 1, 0, -5, -5, + -5, -5, -5, -5, -5, -5, 111, 204, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, + 0, -5, -5, 67, 68, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 3, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 0, 247, 205, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, - 0, 0, 0, 0, 67, 68 + 96, 97, 98, 99, 0, 198, 0, 0, 0, -68, + -68, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 67, + 68, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 100, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 102, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 104, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 106, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 131, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 189, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 198, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, + 242, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 0, 0, 0, 0, 0, 67, 68 }; -static const yytype_int16 yycheck[] = +static const short yycheck[] = { - 17, 12, 42, 43, 44, 45, 114, 14, 48, 117, - 40, 119, 176, 204, 193, 178, 140, 32, 44, 146, - 128, 12, 13, 12, 32, 34, 33, 0, 9, 1, - 32, 33, 140, 160, 45, 198, 51, 216, 202, 11, - 48, 149, 233, 167, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 45, 36, 45, 243, 40, 167, - 32, 33, 42, 33, 71, 3, 48, 39, 48, 37, - 38, 33, 218, 259, 39, 47, 48, 0, 1, 45, - 3, 4, 5, 6, 7, 8, 9, 10, 26, 27, - 52, 237, 109, 110, 37, 38, 37, 38, 47, 48, - 130, 131, 44, 26, 27, 1, 45, 3, 4, 5, - 6, 7, 8, 9, 10, 122, 39, 24, 41, 206, - 207, 138, 44, 46, 49, 32, 33, 51, 49, 33, - 26, 27, 172, 163, 4, 5, 6, 7, 8, 9, - 10, 13, 182, 39, 161, 41, 176, 255, 45, 33, - 46, 168, 45, 52, 46, 32, 173, 48, 266, 45, - 45, 178, 192, 46, 44, 46, 44, 184, 50, 48, - 45, 11, 202, 46, 50, 46, 193, 44, 44, 44, - 44, 198, 222, 46, 28, 29, 46, 204, 32, 33, - 34, 35, 36, 44, 234, 44, 14, 47, 202, 216, - 48, 218, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 252, 243, 231, 255, 233, 266, 32, 33, - 237, 245, 253, 3, 1, 265, 266, -1, -1, 259, - 149, -1, -1, -1, -1, -1, -1, 254, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, - -1, -1, -1, 30, 31, 32, 33, 1, -1, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, - -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, -1, -1, -1, -1, 30, 31, 32, 33, - 1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, -1, 46, -1, -1, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - -1, 32, 33, 1, -1, -1, -1, -1, 39, -1, - -1, -1, -1, -1, -1, 46, -1, -1, 16, 17, + 17, 42, 43, 44, 45, 113, 14, 48, 116, 12, + 118, 12, 40, 177, 3, 139, 31, 31, 39, 127, + 43, 41, 12, 13, 33, 33, 47, 47, 203, 1, + 9, 139, 47, 197, 192, 175, 50, 26, 27, 11, + 148, 44, 166, 44, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 44, 230, 214, 36, 166, 31, + 32, 201, 145, 71, 0, 24, 38, 31, 32, 32, + 32, 216, 31, 32, 46, 47, 159, 0, 1, 238, + 3, 4, 5, 6, 7, 8, 9, 10, 51, 234, + 38, 108, 109, 28, 29, 254, 31, 32, 33, 34, + 35, 129, 130, 26, 27, 4, 5, 6, 7, 8, + 9, 10, 43, 121, 43, 38, 48, 40, 36, 37, + 137, 48, 45, 36, 37, 46, 47, 44, 44, 32, + 171, 50, 44, 13, 44, 32, 51, 45, 47, 31, + 181, 45, 250, 160, 44, 46, 44, 49, 43, 43, + 167, 47, 45, 261, 44, 172, 45, 45, 186, 43, + 177, 43, 45, 191, 43, 43, 183, 43, 45, 43, + 11, 14, 205, 201, 49, 192, 47, 205, 240, 220, + 197, 261, 201, 248, 3, -1, 203, 148, -1, -1, + 231, -1, -1, -1, -1, -1, -1, 214, -1, 216, + -1, -1, -1, -1, -1, -1, 247, -1, -1, 250, + 238, 228, -1, 230, -1, -1, -1, 234, -1, 260, + 261, 1, -1, -1, -1, -1, 254, -1, -1, -1, + -1, -1, 249, -1, -1, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, + 30, 31, 32, 1, -1, -1, -1, -1, 38, -1, + -1, -1, -1, -1, -1, 45, -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, - -1, -1, -1, -1, 32, 33, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, -1, 46, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, - 0, 1, -1, 3, 4, 5, 6, 7, 8, 9, - 10, 45, -1, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, -1, -1, 26, 27, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, 39, - -1, 41, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, -1, 33, -1, -1, -1, 37, 38, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, - 33, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - -1, 33, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, -1, 33, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, 33, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, -1, 33, 3, 4, 5, 6, 7, + -1, -1, 30, 31, 32, 1, -1, -1, -1, -1, + 38, -1, -1, -1, -1, -1, -1, 45, -1, -1, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + -1, -1, -1, -1, -1, 31, 32, 1, -1, -1, + -1, -1, 38, -1, -1, -1, -1, -1, -1, 45, + -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, -1, -1, -1, -1, -1, 31, 32, -1, + -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, + 1, 45, 3, 4, 5, 6, 7, 8, 9, 10, + -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, -1, -1, 26, 27, 30, 31, 32, + -1, -1, -1, -1, -1, -1, -1, 38, -1, 40, + -1, -1, -1, -1, 45, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, -1, 33, 3, 4, 5, 6, + 28, 29, 30, -1, 32, 0, 1, -1, 3, 4, + 5, 6, 7, 8, 9, 10, 44, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, + -1, 26, 27, 31, 32, -1, -1, -1, -1, -1, + -1, -1, -1, 38, -1, 40, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, -1, 33, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, - -1, -1, -1, -1, 32, 33 + 27, 28, 29, 30, -1, 32, -1, -1, -1, 36, + 37, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, + 32, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, -1, -1, -1, -1, -1, 31, 32 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const unsigned char yystos[] = { - 0, 1, 39, 41, 54, 55, 56, 57, 44, 34, - 114, 115, 115, 0, 58, 3, 26, 27, 61, 62, - 65, 66, 73, 74, 79, 80, 93, 94, 102, 103, - 105, 116, 118, 60, 114, 40, 48, 42, 57, 33, - 56, 59, 4, 5, 6, 7, 8, 9, 10, 64, - 72, 78, 92, 104, 57, 114, 63, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 32, 33, 112, - 113, 44, 3, 4, 5, 6, 7, 8, 9, 10, + 0, 1, 38, 40, 53, 54, 55, 56, 43, 33, + 113, 114, 114, 0, 57, 3, 26, 27, 60, 61, + 64, 65, 72, 73, 78, 79, 92, 93, 101, 102, + 104, 115, 117, 59, 113, 39, 47, 41, 56, 32, + 55, 58, 4, 5, 6, 7, 8, 9, 10, 63, + 71, 77, 91, 103, 56, 113, 62, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 31, 32, 111, + 112, 43, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 33, 119, 33, 119, 33, 119, 33, 119, 49, - 49, 33, 45, 119, 12, 68, 75, 12, 82, 12, - 97, 106, 45, 51, 33, 32, 51, 33, 52, 57, - 56, 56, 33, 107, 108, 119, 112, 67, 45, 112, - 13, 83, 24, 96, 112, 95, 45, 57, 33, 52, - 28, 29, 34, 35, 36, 112, 117, 113, 113, 46, - 48, 45, 1, 56, 76, 96, 81, 48, 45, 107, - 46, 117, 50, 48, 107, 1, 56, 69, 44, 70, - 77, 85, 113, 46, 45, 96, 1, 56, 98, 46, - 33, 119, 56, 44, 71, 85, 46, 76, 44, 33, - 119, 1, 56, 84, 44, 15, 30, 31, 86, 87, - 88, 99, 113, 46, 113, 69, 44, 76, 44, 85, - 88, 91, 113, 46, 98, 86, 86, 37, 38, 1, - 11, 109, 110, 44, 50, 69, 84, 44, 37, 38, - 37, 38, 47, 56, 47, 48, 98, 33, 119, 84, - 90, 70, 113, 89, 109, 14, 111, 119, 111, 56, - 100, 101, 112, 119, 70, 113, 48, 119, 100 + 32, 118, 32, 118, 32, 118, 32, 118, 48, 48, + 32, 44, 118, 12, 67, 74, 12, 81, 12, 96, + 105, 44, 50, 32, 31, 50, 32, 51, 56, 55, + 55, 32, 106, 107, 118, 111, 66, 44, 111, 13, + 82, 24, 95, 111, 94, 44, 56, 32, 51, 28, + 29, 33, 34, 35, 111, 116, 112, 112, 45, 47, + 44, 1, 55, 75, 95, 80, 47, 44, 106, 45, + 116, 49, 47, 106, 1, 55, 68, 43, 69, 76, + 84, 112, 45, 44, 95, 1, 55, 97, 45, 32, + 118, 55, 43, 70, 84, 45, 75, 43, 32, 118, + 1, 55, 83, 43, 15, 30, 85, 86, 87, 98, + 112, 45, 112, 68, 43, 75, 43, 84, 87, 90, + 112, 45, 97, 85, 36, 37, 1, 11, 108, 109, + 43, 49, 68, 83, 43, 36, 37, 46, 55, 46, + 47, 97, 32, 118, 83, 89, 69, 112, 88, 108, + 14, 110, 118, 110, 55, 99, 100, 111, 118, 69, + 112, 47, 118, 99 }; +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -1033,63 +923,30 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ + YYPOPSTACK; \ goto yybackup; \ } \ else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ + { \ + yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ -while (YYID (0)) - +while (0) #define YYTERROR 1 #define YYERRCODE 256 +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* 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 -# 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 +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) #endif - /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -1110,96 +967,42 @@ while (YYID (0)) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +} while (0) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (short *bottom, short *top) #else static void yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; + short *bottom; + short *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) + for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -1208,52 +1011,45 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (int yyrule) #else static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; +yy_reduce_print (yyrule) int yyrule; #endif { - int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); - } + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) + yy_reduce_print (Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1268,9 +1064,13 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -1280,47 +1080,45 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -#else -static YYSIZE_T +# else yystrlen (yystr) - const char *yystr; -#endif + const char *yystr; +# endif { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) + register const char *yys = yystr; + + while (*yys++ != '\0') continue; - return yylen; + + return yys - yystr - 1; } # endif # endif # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * +# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -#else -static char * +# else yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif + char *yydest; + const char *yysrc; +# endif { - char *yyd = yydest; - const char *yys = yysrc; + register char *yyd = yydest; + register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -1330,192 +1128,70 @@ yystpcpy (yydest, yysrc) # endif # endif -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif +#endif /* !YYERROR_VERBOSE */ -/* 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) + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif { - int yyn = yypact[yystate]; + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + if (yytype < YYNTOKENS) { - 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"); + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # 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; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - 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; } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); } -#endif /* YYERROR_VERBOSE */ - +#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; +yydestruct (yytype, yyvaluep) int yytype; YYSTYPE *yyvaluep; #endif { - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; switch (yytype) { default: - break; + break; } } @@ -1523,13 +1199,13 @@ yydestruct (yymsg, yytype, yyvaluep) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus +# if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM); -#else +# else int yyparse (); -#endif +# endif #else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void); #else int yyparse (); @@ -1546,18 +1222,14 @@ int yyparse (); `----------*/ #ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif #else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else @@ -1567,28 +1239,22 @@ 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; + register int yystate; + register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ + /* Lookahead 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, @@ -1599,18 +1265,18 @@ int yynerrs; to reallocate them elsewhere. */ /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; + register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + register YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) +#define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; @@ -1619,9 +1285,9 @@ int yynerrs; YYSTYPE yyval; - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1645,7 +1311,8 @@ int yynerrs; `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ + have just been pushed. so pushing a state here evens the stacks. + */ yyssp++; yysetstate: @@ -1658,18 +1325,18 @@ int yynerrs; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + short *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 be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), + yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1680,21 +1347,21 @@ int yynerrs; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; + goto yyoverflowlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyexhaustedlab; + goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1725,17 +1392,19 @@ 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. */ +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ - /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a 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: ")); @@ -1750,7 +1419,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1770,21 +1439,22 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ + /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - yystate = yyn; *++yyvsp = yylval; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; goto yynewstate; @@ -1820,36 +1490,36 @@ yyreduce: switch (yyn) { case 2: -#line 106 "Grammar.y" +#line 105 "../Slice/Grammar.y" { ;} break; case 3: -#line 114 "Grammar.y" +#line 113 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (3)]); + yyval = yyvsp[-1]; ;} break; case 4: -#line 123 "Grammar.y" +#line 122 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (3)]); + yyval = yyvsp[-1]; ;} break; case 5: -#line 127 "Grammar.y" +#line 126 "../Slice/Grammar.y" { - (yyval) = new StringListTok; + yyval = new StringListTok; ;} break; case 6: -#line 136 "Grammar.y" +#line 135 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[0]); if(!metaData->v.empty()) { unit->addGlobalMetaData(metaData->v); @@ -1858,10 +1528,10 @@ yyreduce: break; case 8: -#line 145 "Grammar.y" +#line 144 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)])); - ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (2)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]); + ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[0]); if(contained && !metaData->v.empty()) { contained->setMetaData(metaData->v); @@ -1870,181 +1540,181 @@ yyreduce: break; case 10: -#line 155 "Grammar.y" +#line 154 "../Slice/Grammar.y" { yyerrok; ;} break; case 12: -#line 160 "Grammar.y" +#line 159 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); ;} break; case 13: -#line 164 "Grammar.y" +#line 163 "../Slice/Grammar.y" { ;} break; case 14: -#line 172 "Grammar.y" +#line 171 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ModulePtr::dynamicCast(yyvsp[0])); ;} break; case 15: -#line 176 "Grammar.y" +#line 175 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ClassDeclPtr::dynamicCast(yyvsp[0])); ;} break; case 16: -#line 180 "Grammar.y" +#line 179 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ClassDefPtr::dynamicCast(yyvsp[0])); ;} break; case 17: -#line 184 "Grammar.y" +#line 183 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ClassDeclPtr::dynamicCast(yyvsp[0])); ;} break; case 18: -#line 188 "Grammar.y" +#line 187 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ClassDefPtr::dynamicCast(yyvsp[0])); ;} break; case 19: -#line 192 "Grammar.y" +#line 191 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0); + assert(yyvsp[0] == 0); ;} break; case 20: -#line 196 "Grammar.y" +#line 195 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ExceptionPtr::dynamicCast(yyvsp[0])); ;} break; case 21: -#line 200 "Grammar.y" +#line 199 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0); + assert(yyvsp[0] == 0); ;} break; case 22: -#line 204 "Grammar.y" +#line 203 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || StructPtr::dynamicCast(yyvsp[0])); ;} break; case 23: -#line 208 "Grammar.y" +#line 207 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || SequencePtr::dynamicCast(yyvsp[0])); ;} break; case 24: -#line 212 "Grammar.y" +#line 211 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || DictionaryPtr::dynamicCast(yyvsp[0])); ;} break; case 25: -#line 216 "Grammar.y" +#line 215 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || EnumPtr::dynamicCast(yyvsp[0])); ;} break; case 26: -#line 220 "Grammar.y" +#line 219 "../Slice/Grammar.y" { - assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)]))); + assert(yyvsp[0] == 0 || ConstPtr::dynamicCast(yyvsp[0])); ;} break; case 27: -#line 229 "Grammar.y" +#line 228 "../Slice/Grammar.y" { unit->setSeenDefinition(); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ModulePtr module = cont->createModule(ident->v); if(module) { cont->checkIntroduced(ident->v, module); unit->pushContainer(module); - (yyval) = module; + yyval = module; } else { - (yyval) = 0; + yyval = 0; } ;} break; case 28: -#line 246 "Grammar.y" +#line 245 "../Slice/Grammar.y" { - if((yyvsp[(3) - (6)])) + if(yyvsp[-3]) { unit->popContainer(); - (yyval) = (yyvsp[(3) - (6)]); + yyval = yyvsp[-3]; } else { - (yyval) = 0; + yyval = 0; } ;} break; case 29: -#line 263 "Grammar.y" +#line 262 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; case 30: -#line 267 "Grammar.y" +#line 266 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); - (yyval) = (yyvsp[(2) - (2)]); // Dummy + yyval = yyvsp[0]; // Dummy ;} break; case 31: -#line 278 "Grammar.y" +#line 277 "../Slice/Grammar.y" { unit->error("exceptions cannot be forward declared"); - (yyval) = 0; + yyval = 0; ;} break; case 32: -#line 288 "Grammar.y" +#line 287 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); - ExceptionPtr base = ExceptionPtr::dynamicCast((yyvsp[(3) - (3)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-2]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-1]); + ExceptionPtr base = ExceptionPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ExceptionPtr ex = cont->createException(ident->v, base, local->v); if(ex) @@ -2052,44 +1722,44 @@ yyreduce: cont->checkIntroduced(ident->v, ex); unit->pushContainer(ex); } - (yyval) = ex; + yyval = ex; ;} break; case 33: -#line 302 "Grammar.y" +#line 301 "../Slice/Grammar.y" { - if((yyvsp[(4) - (7)])) + if(yyvsp[-3]) { unit->popContainer(); } - (yyval) = (yyvsp[(4) - (7)]); + yyval = yyvsp[-3]; ;} break; case 34: -#line 315 "Grammar.y" +#line 314 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ContainedPtr contained = cont->lookupException(scoped->v); cont->checkIntroduced(scoped->v); - (yyval) = contained; + yyval = contained; ;} break; case 35: -#line 323 "Grammar.y" +#line 322 "../Slice/Grammar.y" { - (yyval) = 0; + yyval = 0; ;} break; case 36: -#line 332 "Grammar.y" +#line 331 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); - ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]); if(contained && !metaData->v.empty()) { contained->setMetaData(metaData->v); @@ -2098,64 +1768,64 @@ yyreduce: break; case 37: -#line 341 "Grammar.y" +#line 340 "../Slice/Grammar.y" { ;} break; case 38: -#line 344 "Grammar.y" +#line 343 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); ;} break; case 39: -#line 348 "Grammar.y" +#line 347 "../Slice/Grammar.y" { ;} break; case 40: -#line 356 "Grammar.y" +#line 355 "../Slice/Grammar.y" { - TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); TypeStringTokPtr typestring = new TypeStringTok; typestring->v = make_pair(type, ident->v); - (yyval) = typestring; + yyval = typestring; ;} break; case 42: -#line 375 "Grammar.y" +#line 374 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; case 43: -#line 379 "Grammar.y" +#line 378 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as struct name"); - (yyval) = (yyvsp[(2) - (2)]); // Dummy + yyval = yyvsp[0]; // Dummy ;} break; case 44: -#line 390 "Grammar.y" +#line 389 "../Slice/Grammar.y" { unit->error("structs cannot be forward declared"); - (yyval) = 0; // Dummy + yyval = 0; // Dummy ;} break; case 45: -#line 400 "Grammar.y" +#line 399 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); StructPtr st = cont->createStruct(ident->v, local->v); if(st) @@ -2163,23 +1833,23 @@ yyreduce: cont->checkIntroduced(ident->v, st); unit->pushContainer(st); } - (yyval) = st; + yyval = st; ;} break; case 46: -#line 413 "Grammar.y" +#line 412 "../Slice/Grammar.y" { - if((yyvsp[(3) - (6)])) + if(yyvsp[-3]) { unit->popContainer(); } - (yyval) = (yyvsp[(3) - (6)]); + yyval = yyvsp[-3]; // // Empty structures are not allowed // - StructPtr st = StructPtr::dynamicCast((yyval)); + StructPtr st = StructPtr::dynamicCast(yyval); assert(st); if(st->dataMembers().empty()) { @@ -2189,10 +1859,10 @@ yyreduce: break; case 47: -#line 436 "Grammar.y" +#line 435 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); - ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]); if(contained && !metaData->v.empty()) { contained->setMetaData(metaData->v); @@ -2201,59 +1871,59 @@ yyreduce: break; case 48: -#line 445 "Grammar.y" +#line 444 "../Slice/Grammar.y" { ;} break; case 49: -#line 448 "Grammar.y" +#line 447 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); ;} break; case 50: -#line 452 "Grammar.y" +#line 451 "../Slice/Grammar.y" { ;} break; case 52: -#line 466 "Grammar.y" +#line 465 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; case 53: -#line 470 "Grammar.y" +#line 469 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as class name"); - (yyval) = (yyvsp[(2) - (2)]); // Dummy + yyval = yyvsp[0]; // Dummy ;} break; case 54: -#line 481 "Grammar.y" +#line 480 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ClassDeclPtr cl = cont->createClassDecl(ident->v, false, local->v); - (yyval) = cl; + yyval = cl; ;} break; case 55: -#line 494 "Grammar.y" +#line 493 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (4)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-3]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); - ClassDefPtr base = ClassDefPtr::dynamicCast((yyvsp[(3) - (4)])); - ClassListTokPtr bases = ClassListTokPtr::dynamicCast((yyvsp[(4) - (4)])); + ClassDefPtr base = ClassDefPtr::dynamicCast(yyvsp[-1]); + ClassListTokPtr bases = ClassListTokPtr::dynamicCast(yyvsp[0]); if(base) { bases->v.push_front(base); @@ -2263,37 +1933,37 @@ yyreduce: { cont->checkIntroduced(ident->v, cl); unit->pushContainer(cl); - (yyval) = cl; + yyval = cl; } else { - (yyval) = 0; + yyval = 0; } ;} break; case 56: -#line 517 "Grammar.y" +#line 516 "../Slice/Grammar.y" { - if((yyvsp[(5) - (8)])) + if(yyvsp[-3]) { unit->popContainer(); - (yyval) = (yyvsp[(5) - (8)]); + yyval = yyvsp[-3]; } else { - (yyval) = 0; + yyval = 0; } ;} break; case 57: -#line 534 "Grammar.y" +#line 533 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); TypeList types = cont->lookupType(scoped->v); - (yyval) = 0; + yyval = 0; if(!types.empty()) { ClassDeclPtr cl = ClassDeclPtr::dynamicCast(types.front()); @@ -2317,7 +1987,7 @@ yyreduce: else { cont->checkIntroduced(scoped->v); - (yyval) = def; + yyval = def; } } } @@ -2325,31 +1995,31 @@ yyreduce: break; case 58: -#line 568 "Grammar.y" +#line 567 "../Slice/Grammar.y" { - (yyval) = 0; + yyval = 0; ;} break; case 59: -#line 577 "Grammar.y" +#line 576 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; case 60: -#line 581 "Grammar.y" +#line 580 "../Slice/Grammar.y" { - (yyval) = new ClassListTok; + yyval = new ClassListTok; ;} break; case 61: -#line 590 "Grammar.y" +#line 589 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); - ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]); if(contained && !metaData->v.empty()) { contained->setMetaData(metaData->v); @@ -2358,29 +2028,29 @@ yyreduce: break; case 62: -#line 599 "Grammar.y" +#line 598 "../Slice/Grammar.y" { ;} break; case 63: -#line 602 "Grammar.y" +#line 601 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); ;} break; case 64: -#line 606 "Grammar.y" +#line 605 "../Slice/Grammar.y" { ;} break; case 65: -#line 614 "Grammar.y" +#line 613 "../Slice/Grammar.y" { - TypePtr type = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]))->v.first; - string name = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]))->v.second; + TypePtr type = TypeStringTokPtr::dynamicCast(yyvsp[0])->v.first; + string name = TypeStringTokPtr::dynamicCast(yyvsp[0])->v.second; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); DataMemberPtr dm; if(cl) @@ -2398,71 +2068,71 @@ yyreduce: dm = ex->createDataMember(name, type); } unit->currentContainer()->checkIntroduced(name, dm); - (yyval) = dm; + yyval = dm; ;} break; case 66: -#line 637 "Grammar.y" +#line 636 "../Slice/Grammar.y" { - TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); - string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; + TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); + string name = StringTokPtr::dynamicCast(yyvsp[0])->v; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { - (yyval) = cl->createDataMember(name, type); // Dummy + yyval = cl->createDataMember(name, type); // Dummy } StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); if(st) { - (yyval) = st->createDataMember(name, type); // Dummy + yyval = st->createDataMember(name, type); // Dummy } ExceptionPtr ex = ExceptionPtr::dynamicCast(unit->currentContainer()); if(ex) { - (yyval) = ex->createDataMember(name, type); // Dummy + yyval = ex->createDataMember(name, type); // Dummy } - assert((yyval)); + assert(yyval); unit->error("keyword `" + name + "' cannot be used as data member name"); ;} break; case 67: -#line 659 "Grammar.y" +#line 658 "../Slice/Grammar.y" { - TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); + TypePtr type = TypePtr::dynamicCast(yyvsp[0]); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { - (yyval) = cl->createDataMember(IceUtil::generateUUID(), type); // Dummy + yyval = cl->createDataMember(IceUtil::generateUUID(), type); // Dummy } StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); if(st) { - (yyval) = st->createDataMember(IceUtil::generateUUID(), type); // Dummy + yyval = st->createDataMember(IceUtil::generateUUID(), type); // Dummy } ExceptionPtr ex = ExceptionPtr::dynamicCast(unit->currentContainer()); if(ex) { - (yyval) = ex->createDataMember(IceUtil::generateUUID(), type); // Dummy + yyval = ex->createDataMember(IceUtil::generateUUID(), type); // Dummy } - assert((yyval)); + assert(yyval); unit->error("missing data member name"); ;} break; case 69: -#line 686 "Grammar.y" +#line 685 "../Slice/Grammar.y" { - (yyval) = 0; + yyval = 0; ;} break; case 70: -#line 695 "Grammar.y" +#line 694 "../Slice/Grammar.y" { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(1) - (2)])); - string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; + TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); + string name = StringTokPtr::dynamicCast(yyvsp[0])->v; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { @@ -2471,69 +2141,25 @@ yyreduce: { cl->checkIntroduced(name, op); unit->pushContainer(op); - (yyval) = op; + yyval = op; } else { - (yyval) = 0; + yyval = 0; } } else { - (yyval) = 0; + yyval = 0; } ;} break; case 71: -#line 719 "Grammar.y" +#line 718 "../Slice/Grammar.y" { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(2) - (3)])); - string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; - ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); - if(cl) - { - OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating); - if(op) - { - cl->checkIntroduced(name, op); - unit->pushContainer(op); - static bool firstWarning = true; - - string msg = "the keyword 'nonmutating' is deprecated"; - if(firstWarning) - { - msg += ";\n"; - msg += "You should use instead 'idempotent' plus:\n"; - msg += " - Freeze metadata ([\"freeze:read\"], [\"freeze:write\"]) if you implement your objects with a Freeze evictor\n"; - msg += " - [\"nonmutating\"], if you need to maintain compatibility with operations that expect "; - msg += "'Nonmutating' as operation-mode. With this metadata, the generated code sends "; - msg += "'Nonmutating' instead of 'Idempotent'\n"; - msg += " - [\"cpp:const\"], to get a const member function on the generated C++ servant base class"; - - firstWarning = false; - } - - unit->warning(msg); - (yyval) = op; - } - else - { - (yyval) = 0; - } - } - else - { - (yyval) = 0; - } -;} - break; - - case 72: -#line 760 "Grammar.y" - { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(2) - (3)])); - string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; + TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); + string name = StringTokPtr::dynamicCast(yyvsp[0])->v; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { @@ -2542,25 +2168,25 @@ yyreduce: { cl->checkIntroduced(name, op); unit->pushContainer(op); - (yyval) = op; + yyval = op; } else { - (yyval) = 0; + yyval = 0; } } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 73: -#line 784 "Grammar.y" + case 72: +#line 742 "../Slice/Grammar.y" { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(1) - (2)])); - string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; + TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); + string name = StringTokPtr::dynamicCast(yyvsp[0])->v; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { @@ -2569,52 +2195,25 @@ yyreduce: { unit->pushContainer(op); unit->error("keyword `" + name + "' cannot be used as operation name"); - (yyval) = op; // Dummy + yyval = op; // Dummy } else { - (yyval) = 0; + yyval = 0; } } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 74: -#line 808 "Grammar.y" - { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(2) - (3)])); - string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; - ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); - if(cl) - { - OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating); - if(op) - { - unit->pushContainer(op); - unit->error("keyword `" + name + "' cannot be used as operation name"); - (yyval) = op; // Dummy - } - else - { - (yyval) = 0; - } - } - else - { - (yyval) = 0; - } -;} - break; - - case 75: -#line 832 "Grammar.y" + case 73: +#line 766 "../Slice/Grammar.y" { - TypePtr returnType = TypePtr::dynamicCast((yyvsp[(2) - (3)])); - string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; + TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); + string name = StringTokPtr::dynamicCast(yyvsp[0])->v; ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); if(cl) { @@ -2623,7 +2222,7 @@ yyreduce: { unit->pushContainer(op); unit->error("keyword `" + name + "' cannot be used as operation name"); - (yyval) = op; // Dummy + yyval = op; // Dummy } else { @@ -2632,31 +2231,31 @@ yyreduce: } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 76: -#line 861 "Grammar.y" + case 74: +#line 795 "../Slice/Grammar.y" { - if((yyvsp[(1) - (3)])) + if(yyvsp[-2]) { unit->popContainer(); - (yyval) = (yyvsp[(1) - (3)]); + yyval = yyvsp[-2]; } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 77: -#line 873 "Grammar.y" + case 75: +#line 807 "../Slice/Grammar.y" { - OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); - ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); + OperationPtr op = OperationPtr::dynamicCast(yyvsp[-1]); + ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast(yyvsp[0]); assert(el); if(op) { @@ -2665,10 +2264,10 @@ yyreduce: ;} break; - case 78: -#line 883 "Grammar.y" + case 76: +#line 817 "../Slice/Grammar.y" { - if((yyvsp[(1) - (3)])) + if(yyvsp[-2]) { unit->popContainer(); } @@ -2676,11 +2275,11 @@ yyreduce: ;} break; - case 79: -#line 891 "Grammar.y" + case 77: +#line 825 "../Slice/Grammar.y" { - OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); - ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); + OperationPtr op = OperationPtr::dynamicCast(yyvsp[-1]); + ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast(yyvsp[0]); assert(el); if(op) { @@ -2689,75 +2288,75 @@ yyreduce: ;} break; - case 82: -#line 913 "Grammar.y" + case 80: +#line 847 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; - case 83: -#line 917 "Grammar.y" + case 81: +#line 851 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as interface name"); - (yyval) = (yyvsp[(2) - (2)]); // Dummy + yyval = yyvsp[0]; // Dummy ;} break; - case 84: -#line 928 "Grammar.y" + case 82: +#line 862 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ClassDeclPtr cl = cont->createClassDecl(ident->v, true, local->v); cont->checkIntroduced(ident->v, cl); - (yyval) = cl; + yyval = cl; ;} break; - case 85: -#line 942 "Grammar.y" + case 83: +#line 876 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-2]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-1]); ContainerPtr cont = unit->currentContainer(); - ClassListTokPtr bases = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)])); + ClassListTokPtr bases = ClassListTokPtr::dynamicCast(yyvsp[0]); ClassDefPtr cl = cont->createClassDef(ident->v, true, bases->v, local->v); if(cl) { cont->checkIntroduced(ident->v, cl); unit->pushContainer(cl); - (yyval) = cl; + yyval = cl; } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 86: -#line 960 "Grammar.y" + case 84: +#line 894 "../Slice/Grammar.y" { - if((yyvsp[(4) - (7)])) + if(yyvsp[-3]) { unit->popContainer(); - (yyval) = (yyvsp[(4) - (7)]); + yyval = yyvsp[-3]; } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 87: -#line 977 "Grammar.y" + case 85: +#line 911 "../Slice/Grammar.y" { - ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)])); - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); + ClassListTokPtr intfs = ClassListTokPtr::dynamicCast(yyvsp[0]); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); TypeList types = cont->lookupType(scoped->v); if(!types.empty()) @@ -2787,15 +2386,15 @@ yyreduce: } } } - (yyval) = intfs; + yyval = intfs; ;} break; - case 88: -#line 1012 "Grammar.y" + case 86: +#line 946 "../Slice/Grammar.y" { ClassListTokPtr intfs = new ClassListTok; - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); TypeList types = cont->lookupType(scoped->v); if(!types.empty()) @@ -2825,37 +2424,37 @@ yyreduce: } } } - (yyval) = intfs; + yyval = intfs; ;} break; - case 89: -#line 1047 "Grammar.y" + case 87: +#line 981 "../Slice/Grammar.y" { unit->error("illegal inheritance from type Object"); - (yyval) = new ClassListTok; // Dummy + yyval = new ClassListTok; // Dummy ;} break; - case 90: -#line 1057 "Grammar.y" + case 88: +#line 991 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; - case 91: -#line 1061 "Grammar.y" + case 89: +#line 995 "../Slice/Grammar.y" { - (yyval) = new ClassListTok; + yyval = new ClassListTok; ;} break; - case 92: -#line 1070 "Grammar.y" + case 90: +#line 1004 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); - ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]); if(contained && !metaData->v.empty()) { contained->setMetaData(metaData->v); @@ -2863,49 +2462,49 @@ yyreduce: ;} break; - case 93: -#line 1079 "Grammar.y" + case 91: +#line 1013 "../Slice/Grammar.y" { ;} break; - case 94: -#line 1082 "Grammar.y" + case 92: +#line 1016 "../Slice/Grammar.y" { unit->error("`;' missing after definition"); ;} break; - case 95: -#line 1086 "Grammar.y" + case 93: +#line 1020 "../Slice/Grammar.y" { ;} break; - case 97: -#line 1100 "Grammar.y" + case 95: +#line 1034 "../Slice/Grammar.y" { - ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)])); - ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast((yyvsp[(3) - (3)])); + ExceptionPtr exception = ExceptionPtr::dynamicCast(yyvsp[-2]); + ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast(yyvsp[0]); exceptionList->v.push_front(exception); - (yyval) = exceptionList; + yyval = exceptionList; ;} break; - case 98: -#line 1107 "Grammar.y" + case 96: +#line 1041 "../Slice/Grammar.y" { - ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])); + ExceptionPtr exception = ExceptionPtr::dynamicCast(yyvsp[0]); ExceptionListTokPtr exceptionList = new ExceptionListTok; exceptionList->v.push_front(exception); - (yyval) = exceptionList; + yyval = exceptionList; ;} break; - case 99: -#line 1119 "Grammar.y" + case 97: +#line 1053 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); ExceptionPtr exception = cont->lookupException(scoped->v); if(!exception) @@ -2913,150 +2512,150 @@ yyreduce: exception = cont->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy } cont->checkIntroduced(scoped->v, exception); - (yyval) = exception; + yyval = exception; ;} break; - case 100: -#line 1131 "Grammar.y" + case 98: +#line 1065 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); - (yyval) = unit->currentContainer()->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy + yyval = unit->currentContainer()->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy ;} break; - case 101: -#line 1142 "Grammar.y" + case 99: +#line 1076 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(4) - (7)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (7)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-6]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + TypePtr type = TypePtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); - (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); + yyval = cont->createSequence(ident->v, type, metaData->v, local->v); ;} break; - case 102: -#line 1151 "Grammar.y" + case 100: +#line 1085 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(4) - (7)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (7)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-6]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + TypePtr type = TypePtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); - (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); // Dummy + yyval = cont->createSequence(ident->v, type, metaData->v, local->v); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as sequence name"); ;} break; - case 103: -#line 1166 "Grammar.y" - { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); - StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast((yyvsp[(4) - (10)])); - TypePtr keyType = TypePtr::dynamicCast((yyvsp[(5) - (10)])); - StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast((yyvsp[(7) - (10)])); - TypePtr valueType = TypePtr::dynamicCast((yyvsp[(8) - (10)])); + case 101: +#line 1100 "../Slice/Grammar.y" + { + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-9]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast(yyvsp[-6]); + TypePtr keyType = TypePtr::dynamicCast(yyvsp[-5]); + StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + TypePtr valueType = TypePtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); - (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); + yyval = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); ;} break; - case 104: -#line 1177 "Grammar.y" - { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); - StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast((yyvsp[(4) - (10)])); - TypePtr keyType = TypePtr::dynamicCast((yyvsp[(5) - (10)])); - StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast((yyvsp[(7) - (10)])); - TypePtr valueType = TypePtr::dynamicCast((yyvsp[(8) - (10)])); + case 102: +#line 1111 "../Slice/Grammar.y" + { + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-9]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast(yyvsp[-6]); + TypePtr keyType = TypePtr::dynamicCast(yyvsp[-5]); + StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + TypePtr valueType = TypePtr::dynamicCast(yyvsp[-2]); ContainerPtr cont = unit->currentContainer(); - (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); // Dummy + 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 105: -#line 1194 "Grammar.y" + case 103: +#line 1128 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); + yyval = yyvsp[0]; ;} break; - case 106: -#line 1198 "Grammar.y" + case 104: +#line 1132 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as enumeration name"); - (yyval) = (yyvsp[(2) - (2)]); // Dummy + yyval = yyvsp[0]; // Dummy ;} break; - case 107: -#line 1209 "Grammar.y" + case 105: +#line 1143 "../Slice/Grammar.y" { - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); EnumPtr en = cont->createEnum(ident->v, local->v); cont->checkIntroduced(ident->v, en); - (yyval) = en; + yyval = en; ;} break; - case 108: -#line 1218 "Grammar.y" + case 106: +#line 1152 "../Slice/Grammar.y" { - EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)])); + EnumPtr en = EnumPtr::dynamicCast(yyvsp[-3]); if(en) { - EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast((yyvsp[(5) - (6)])); + EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast(yyvsp[-1]); if(enumerators->v.empty()) { unit->error("enum `" + en->name() + "' must have at least one enumerator"); } en->setEnumerators(enumerators->v); // Dummy } - (yyval) = (yyvsp[(3) - (6)]); + yyval = yyvsp[-3]; ;} break; - case 109: -#line 1233 "Grammar.y" + case 107: +#line 1167 "../Slice/Grammar.y" { unit->error("missing enumeration name"); - BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (5)])); + BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-4]); ContainerPtr cont = unit->currentContainer(); EnumPtr en = cont->createEnum(IceUtil::generateUUID(), local->v, Dummy); // Dummy - EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast((yyvsp[(4) - (5)])); + EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast(yyvsp[-1]); en->setEnumerators(enumerators->v); // Dummy - (yyval) = en; + yyval = en; ;} break; - case 110: -#line 1248 "Grammar.y" + case 108: +#line 1182 "../Slice/Grammar.y" { - EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)])); - ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v); - (yyval) = ens; + EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast(yyvsp[-2]); + ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast(yyvsp[0])->v); + yyval = ens; ;} break; - case 111: -#line 1254 "Grammar.y" + case 109: +#line 1188 "../Slice/Grammar.y" { ;} break; - case 112: -#line 1262 "Grammar.y" + case 110: +#line 1196 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); EnumeratorListTokPtr ens = new EnumeratorListTok; ContainerPtr cont = unit->currentContainer(); EnumeratorPtr en = cont->createEnumerator(ident->v); @@ -3064,57 +2663,57 @@ yyreduce: { ens->v.push_front(en); } - (yyval) = ens; + yyval = ens; ;} break; - case 113: -#line 1274 "Grammar.y" + case 111: +#line 1208 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); unit->error("keyword `" + ident->v + "' cannot be used as enumerator"); EnumeratorListTokPtr ens = new EnumeratorListTok; // Dummy - (yyval) = ens; + yyval = ens; ;} break; - case 114: -#line 1281 "Grammar.y" + case 112: +#line 1215 "../Slice/Grammar.y" { EnumeratorListTokPtr ens = new EnumeratorListTok; - (yyval) = ens; // Dummy + yyval = ens; // Dummy ;} break; - case 115: -#line 1291 "Grammar.y" + case 113: +#line 1225 "../Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = true; - (yyval) = out; + yyval = out; ;} break; - case 116: -#line 1297 "Grammar.y" + case 114: +#line 1231 "../Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = false; - (yyval) = out; + yyval = out; ;} break; - case 117: -#line 1308 "Grammar.y" + case 115: +#line 1242 "../Slice/Grammar.y" { ;} break; - case 118: -#line 1311 "Grammar.y" + case 116: +#line 1245 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); - TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast((yyvsp[(3) - (3)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]); + TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast(yyvsp[0]); TypePtr type = tsp->v.first; string ident = tsp->v.second; OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); @@ -3122,7 +2721,7 @@ yyreduce: { ParamDeclPtr pd = op->createParamDecl(ident, type, isOutParam->v); unit->currentContainer()->checkIntroduced(ident, pd); - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (3)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]); if(!metaData->v.empty()) { pd->setMetaData(metaData->v); @@ -3131,11 +2730,11 @@ yyreduce: ;} break; - case 119: -#line 1329 "Grammar.y" + case 117: +#line 1263 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); - TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast((yyvsp[(5) - (5)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]); + TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast(yyvsp[0]); TypePtr type = tsp->v.first; string ident = tsp->v.second; OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); @@ -3143,7 +2742,7 @@ yyreduce: { ParamDeclPtr pd = op->createParamDecl(ident, type, isOutParam->v); unit->currentContainer()->checkIntroduced(ident, pd); - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(4) - (5)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]); if(!metaData->v.empty()) { pd->setMetaData(metaData->v); @@ -3152,12 +2751,12 @@ yyreduce: ;} break; - case 120: -#line 1347 "Grammar.y" + case 118: +#line 1281 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (4)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(4) - (4)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-3]); + TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); if(op) { @@ -3167,12 +2766,12 @@ yyreduce: ;} break; - case 121: -#line 1359 "Grammar.y" + case 119: +#line 1293 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (6)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(6) - (6)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-3]); + TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); if(op) { @@ -3182,11 +2781,11 @@ yyreduce: ;} break; - case 122: -#line 1371 "Grammar.y" + case 120: +#line 1305 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (3)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]); + TypePtr type = TypePtr::dynamicCast(yyvsp[0]); OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); if(op) { @@ -3196,11 +2795,11 @@ yyreduce: ;} break; - case 123: -#line 1382 "Grammar.y" + case 121: +#line 1316 "../Slice/Grammar.y" { - BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); - TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (5)])); + BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]); + TypePtr type = TypePtr::dynamicCast(yyvsp[0]); OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer()); if(op) { @@ -3210,127 +2809,127 @@ yyreduce: ;} break; + case 122: +#line 1332 "../Slice/Grammar.y" + { + yyval = yyvsp[0]; +;} + break; + + case 123: +#line 1336 "../Slice/Grammar.y" + { + yyval = new ExceptionListTok; +;} + break; + case 124: -#line 1398 "Grammar.y" +#line 1345 "../Slice/Grammar.y" { - (yyval) = (yyvsp[(2) - (2)]); ;} break; case 125: -#line 1402 "Grammar.y" +#line 1348 "../Slice/Grammar.y" { - (yyval) = new ExceptionListTok; + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + ident->v = "::" + ident->v; + yyval = ident; ;} break; case 126: -#line 1411 "Grammar.y" +#line 1354 "../Slice/Grammar.y" { + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-2]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]); + scoped->v += "::"; + scoped->v += ident->v; + yyval = scoped; ;} break; case 127: -#line 1414 "Grammar.y" +#line 1367 "../Slice/Grammar.y" { - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); - ident->v = "::" + ident->v; - (yyval) = ident; + yyval = unit->builtin(Builtin::KindByte); ;} break; case 128: -#line 1420 "Grammar.y" +#line 1371 "../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; + yyval = unit->builtin(Builtin::KindBool); ;} break; case 129: -#line 1433 "Grammar.y" +#line 1375 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindByte); + yyval = unit->builtin(Builtin::KindShort); ;} break; case 130: -#line 1437 "Grammar.y" +#line 1379 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindBool); + yyval = unit->builtin(Builtin::KindInt); ;} break; case 131: -#line 1441 "Grammar.y" +#line 1383 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindShort); + yyval = unit->builtin(Builtin::KindLong); ;} break; case 132: -#line 1445 "Grammar.y" +#line 1387 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindInt); + yyval = unit->builtin(Builtin::KindFloat); ;} break; case 133: -#line 1449 "Grammar.y" +#line 1391 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindLong); + yyval = unit->builtin(Builtin::KindDouble); ;} break; case 134: -#line 1453 "Grammar.y" +#line 1395 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindFloat); + yyval = unit->builtin(Builtin::KindString); ;} break; case 135: -#line 1457 "Grammar.y" +#line 1399 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindDouble); + yyval = unit->builtin(Builtin::KindObject); ;} break; case 136: -#line 1461 "Grammar.y" +#line 1403 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindString); + yyval = unit->builtin(Builtin::KindObjectProxy); ;} break; case 137: -#line 1465 "Grammar.y" +#line 1407 "../Slice/Grammar.y" { - (yyval) = unit->builtin(Builtin::KindObject); + yyval = unit->builtin(Builtin::KindLocalObject); ;} break; case 138: -#line 1469 "Grammar.y" - { - (yyval) = unit->builtin(Builtin::KindObjectProxy); -;} - break; - - case 139: -#line 1473 "Grammar.y" - { - (yyval) = unit->builtin(Builtin::KindLocalObject); -;} - break; - - case 140: -#line 1477 "Grammar.y" +#line 1411 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ContainerPtr cont = unit->currentContainer(); if(cont) { @@ -3340,19 +2939,19 @@ yyreduce: YYERROR; // Can't continue, jump to next yyerrok } cont->checkIntroduced(scoped->v); - (yyval) = types.front(); + yyval = types.front(); } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 141: -#line 1496 "Grammar.y" + case 139: +#line 1430 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-1]); ContainerPtr cont = unit->currentContainer(); if(cont) { @@ -3379,73 +2978,73 @@ yyreduce: } *p = new Proxy(cl); } - (yyval) = types.front(); + yyval = types.front(); } else { - (yyval) = 0; + yyval = 0; } ;} break; - case 142: -#line 1537 "Grammar.y" + case 140: +#line 1471 "../Slice/Grammar.y" { - StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); - StringTokPtr str2 = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); + StringTokPtr str1 = StringTokPtr::dynamicCast(yyvsp[-1]); + StringTokPtr str2 = StringTokPtr::dynamicCast(yyvsp[0]); str1->v += str2->v; ;} break; - case 143: -#line 1543 "Grammar.y" + case 141: +#line 1477 "../Slice/Grammar.y" { ;} break; - case 144: -#line 1551 "Grammar.y" + case 142: +#line 1485 "../Slice/Grammar.y" { - StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); - StringListTokPtr stringList = StringListTokPtr::dynamicCast((yyvsp[(1) - (3)])); + StringTokPtr str = StringTokPtr::dynamicCast(yyvsp[0]); + StringListTokPtr stringList = StringListTokPtr::dynamicCast(yyvsp[-2]); stringList->v.push_back(str->v); - (yyval) = stringList; + yyval = stringList; ;} break; - case 145: -#line 1558 "Grammar.y" + case 143: +#line 1492 "../Slice/Grammar.y" { - StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr str = StringTokPtr::dynamicCast(yyvsp[0]); StringListTokPtr stringList = new StringListTok; stringList->v.push_back(str->v); - (yyval) = stringList; + yyval = stringList; ;} break; - case 146: -#line 1570 "Grammar.y" + case 144: +#line 1504 "../Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = true; - (yyval) = local; + yyval = local; ;} break; - case 147: -#line 1576 "Grammar.y" + case 145: +#line 1510 "../Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = false; - (yyval) = local; + yyval = local; ;} break; - case 148: -#line 1587 "Grammar.y" + case 146: +#line 1521 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindLong); - IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); + IntegerTokPtr intVal = IntegerTokPtr::dynamicCast(yyvsp[0]); ostringstream sstr; sstr << intVal->v; ConstDefTokPtr def = new ConstDefTok; @@ -3453,15 +3052,15 @@ yyreduce: def->v.value = type; def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = intVal->literal; - (yyval) = def; + yyval = def; ;} break; - case 149: -#line 1600 "Grammar.y" + case 147: +#line 1534 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindDouble); - FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); + FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast(yyvsp[0]); ostringstream sstr; sstr << floatVal->v; ConstDefTokPtr def = new ConstDefTok; @@ -3469,14 +3068,14 @@ yyreduce: def->v.value = type; def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = floatVal->literal; - (yyval) = def; + yyval = def; ;} break; - case 150: -#line 1613 "Grammar.y" + case 148: +#line 1547 "../Slice/Grammar.y" { - StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]); ConstDefTokPtr def = new ConstDefTok; ContainedList cl = unit->currentContainer()->lookupContained(scoped->v); if(cl.empty()) @@ -3507,260 +3106,255 @@ yyreduce: def->v.valueAsString = scoped->v; def->v.valueAsLiteral = scoped->v; } - (yyval) = def; + yyval = def; ;} break; - case 151: -#line 1648 "Grammar.y" + case 149: +#line 1582 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindString); - StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]); ConstDefTokPtr def = new ConstDefTok; def->v.type = type; def->v.value = type; def->v.valueAsString = literal->v; def->v.valueAsLiteral = literal->literal; - (yyval) = def; + yyval = def; ;} break; - case 152: -#line 1659 "Grammar.y" + case 150: +#line 1593 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); - StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]); ConstDefTokPtr def = new ConstDefTok; def->v.type = type; def->v.value = type; def->v.valueAsString = literal->v; def->v.valueAsLiteral = "false"; - (yyval) = def; + yyval = def; ;} break; - case 153: -#line 1670 "Grammar.y" + case 151: +#line 1604 "../Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); - StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); + StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]); ConstDefTokPtr def = new ConstDefTok; def->v.type = type; def->v.value = type; def->v.valueAsString = literal->v; def->v.valueAsLiteral = "true"; - (yyval) = def; + yyval = def; ;} break; - case 154: -#line 1686 "Grammar.y" + case 152: +#line 1620 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)])); - TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (6)])); - StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(4) - (6)])); - ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(6) - (6)])); - (yyval) = unit->currentContainer()->createConst(ident->v, const_type, metaData->v, + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-4]); + TypePtr const_type = TypePtr::dynamicCast(yyvsp[-3]); + StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-2]); + ConstDefTokPtr value = ConstDefTokPtr::dynamicCast(yyvsp[0]); + yyval = unit->currentContainer()->createConst(ident->v, const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral); ;} break; - case 155: -#line 1695 "Grammar.y" + case 153: +#line 1629 "../Slice/Grammar.y" { - StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)])); - TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (5)])); - ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(5) - (5)])); + StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]); + TypePtr const_type = TypePtr::dynamicCast(yyvsp[-2]); + ConstDefTokPtr value = ConstDefTokPtr::dynamicCast(yyvsp[0]); unit->error("missing constant name"); - (yyval) = unit->currentContainer()->createConst(IceUtil::generateUUID(), const_type, metaData->v, + yyval = unit->currentContainer()->createConst(IceUtil::generateUUID(), const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral, Dummy); // Dummy ;} break; + case 154: +#line 1644 "../Slice/Grammar.y" + { +;} + break; + + case 155: +#line 1647 "../Slice/Grammar.y" + { +;} + break; + case 156: -#line 1710 "Grammar.y" +#line 1650 "../Slice/Grammar.y" { ;} break; case 157: -#line 1713 "Grammar.y" +#line 1653 "../Slice/Grammar.y" { ;} break; case 158: -#line 1716 "Grammar.y" +#line 1656 "../Slice/Grammar.y" { ;} break; case 159: -#line 1719 "Grammar.y" +#line 1659 "../Slice/Grammar.y" { ;} break; case 160: -#line 1722 "Grammar.y" +#line 1662 "../Slice/Grammar.y" { ;} break; case 161: -#line 1725 "Grammar.y" +#line 1665 "../Slice/Grammar.y" { ;} break; case 162: -#line 1728 "Grammar.y" +#line 1668 "../Slice/Grammar.y" { ;} break; case 163: -#line 1731 "Grammar.y" +#line 1671 "../Slice/Grammar.y" { ;} break; case 164: -#line 1734 "Grammar.y" +#line 1674 "../Slice/Grammar.y" { ;} break; case 165: -#line 1737 "Grammar.y" +#line 1677 "../Slice/Grammar.y" { ;} break; case 166: -#line 1740 "Grammar.y" +#line 1680 "../Slice/Grammar.y" { ;} break; case 167: -#line 1743 "Grammar.y" +#line 1683 "../Slice/Grammar.y" { ;} break; case 168: -#line 1746 "Grammar.y" +#line 1686 "../Slice/Grammar.y" { ;} break; case 169: -#line 1749 "Grammar.y" +#line 1689 "../Slice/Grammar.y" { ;} break; case 170: -#line 1752 "Grammar.y" +#line 1692 "../Slice/Grammar.y" { ;} break; case 171: -#line 1755 "Grammar.y" +#line 1695 "../Slice/Grammar.y" { ;} break; case 172: -#line 1758 "Grammar.y" +#line 1698 "../Slice/Grammar.y" { ;} break; case 173: -#line 1761 "Grammar.y" +#line 1701 "../Slice/Grammar.y" { ;} break; case 174: -#line 1764 "Grammar.y" +#line 1704 "../Slice/Grammar.y" { ;} break; case 175: -#line 1767 "Grammar.y" +#line 1707 "../Slice/Grammar.y" { ;} break; case 176: -#line 1770 "Grammar.y" +#line 1710 "../Slice/Grammar.y" { ;} break; case 177: -#line 1773 "Grammar.y" +#line 1713 "../Slice/Grammar.y" { ;} break; case 178: -#line 1776 "Grammar.y" +#line 1716 "../Slice/Grammar.y" { ;} break; case 179: -#line 1779 "Grammar.y" +#line 1719 "../Slice/Grammar.y" { ;} break; case 180: -#line 1782 "Grammar.y" +#line 1722 "../Slice/Grammar.y" { ;} break; case 181: -#line 1785 "Grammar.y" - { -;} - break; - - case 182: -#line 1788 "Grammar.y" +#line 1725 "../Slice/Grammar.y" { ;} break; - case 183: -#line 1791 "Grammar.y" - { -;} - break; - case 184: -#line 1794 "Grammar.y" - { -;} - break; + } +/* Line 1000 of yacc.c. */ +#line 3353 "Grammar.tab.c" + + yyvsp -= yylen; + yyssp -= yylen; -/* Line 1267 of yacc.c. */ -#line 3758 "Grammar.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - YYPOPSTACK (yylen); - yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -3789,65 +3383,99 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - 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 +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* 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; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } } - } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); } 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) - { - /* Return failure if at end of input. */ + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ if (yychar == YYEOF) - YYABORT; - } + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } else { - yydestruct ("Error: discarding", - yytoken, &yylval); + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); yychar = YYEMPTY; + } } - /* 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; @@ -3857,17 +3485,15 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) goto yyerrorlab; +#endif - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); + yyvsp -= yylen; + yyssp -= yylen; yystate = *yyssp; goto yyerrlab1; @@ -3896,10 +3522,9 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -3907,11 +3532,10 @@ yyerrlab1: if (yyn == YYFINAL) YYACCEPT; - *++yyvsp = yylval; + YYDPRINTF ((stderr, "Shifting error token, ")); + *++yyvsp = yylval; - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -3932,42 +3556,24 @@ yyabortlab: goto yyreturn; #ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } -#line 1798 "Grammar.y" +#line 1729 "../Slice/Grammar.y" diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h index a7ad3a24642..76a8789abec 100644 --- a/cpp/src/Slice/Grammar.h +++ b/cpp/src/Slice/Grammar.h @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 1.875c. */ -/* 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. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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 @@ -17,21 +15,13 @@ 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. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - 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. + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -66,23 +56,21 @@ ICE_CONST = 282, ICE_FALSE = 283, ICE_TRUE = 284, - ICE_NONMUTATING = 285, - ICE_IDEMPOTENT = 286, - ICE_SCOPE_DELIMITER = 287, - ICE_IDENTIFIER = 288, - ICE_STRING_LITERAL = 289, - ICE_INTEGER_LITERAL = 290, - ICE_FLOATING_POINT_LITERAL = 291, - ICE_IDENT_OP = 292, - ICE_KEYWORD_OP = 293, - ICE_METADATA_OPEN = 294, - ICE_METADATA_CLOSE = 295, - ICE_GLOBAL_METADATA_OPEN = 296, - ICE_GLOBAL_METADATA_CLOSE = 297, - BAD_CHAR = 298 + ICE_IDEMPOTENT = 285, + ICE_SCOPE_DELIMITER = 286, + ICE_IDENTIFIER = 287, + ICE_STRING_LITERAL = 288, + ICE_INTEGER_LITERAL = 289, + ICE_FLOATING_POINT_LITERAL = 290, + ICE_IDENT_OP = 291, + ICE_KEYWORD_OP = 292, + ICE_METADATA_OPEN = 293, + ICE_METADATA_CLOSE = 294, + ICE_GLOBAL_METADATA_OPEN = 295, + ICE_GLOBAL_METADATA_CLOSE = 296, + BAD_CHAR = 297 }; #endif -/* Tokens. */ #define ICE_MODULE 258 #define ICE_CLASS 259 #define ICE_INTERFACE 260 @@ -110,25 +98,24 @@ #define ICE_CONST 282 #define ICE_FALSE 283 #define ICE_TRUE 284 -#define ICE_NONMUTATING 285 -#define ICE_IDEMPOTENT 286 -#define ICE_SCOPE_DELIMITER 287 -#define ICE_IDENTIFIER 288 -#define ICE_STRING_LITERAL 289 -#define ICE_INTEGER_LITERAL 290 -#define ICE_FLOATING_POINT_LITERAL 291 -#define ICE_IDENT_OP 292 -#define ICE_KEYWORD_OP 293 -#define ICE_METADATA_OPEN 294 -#define ICE_METADATA_CLOSE 295 -#define ICE_GLOBAL_METADATA_OPEN 296 -#define ICE_GLOBAL_METADATA_CLOSE 297 -#define BAD_CHAR 298 +#define ICE_IDEMPOTENT 285 +#define ICE_SCOPE_DELIMITER 286 +#define ICE_IDENTIFIER 287 +#define ICE_STRING_LITERAL 288 +#define ICE_INTEGER_LITERAL 289 +#define ICE_FLOATING_POINT_LITERAL 290 +#define ICE_IDENT_OP 291 +#define ICE_KEYWORD_OP 292 +#define ICE_METADATA_OPEN 293 +#define ICE_METADATA_CLOSE 294 +#define ICE_GLOBAL_METADATA_OPEN 295 +#define ICE_GLOBAL_METADATA_CLOSE 296 +#define BAD_CHAR 297 -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -137,3 +124,5 @@ typedef int YYSTYPE; + + diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index 6e338ee3f73..d97b2aa5671 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -76,7 +76,6 @@ slice_error(const char* s) %token ICE_CONST %token ICE_FALSE %token ICE_TRUE -%token ICE_NONMUTATING %token ICE_IDEMPOTENT // @@ -715,47 +714,6 @@ operation_preamble $$ = 0; } } -| ICE_NONMUTATING return_type ICE_IDENT_OP -{ - TypePtr returnType = TypePtr::dynamicCast($2); - string name = StringTokPtr::dynamicCast($3)->v; - ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); - if(cl) - { - OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating); - if(op) - { - cl->checkIntroduced(name, op); - unit->pushContainer(op); - static bool firstWarning = true; - - string msg = "the keyword 'nonmutating' is deprecated"; - if(firstWarning) - { - msg += ";\n"; - msg += "You should use instead 'idempotent' plus:\n"; - msg += " - Freeze metadata ([\"freeze:read\"], [\"freeze:write\"]) if you implement your objects with a Freeze evictor\n"; - msg += " - [\"nonmutating\"], if you need to maintain compatibility with operations that expect "; - msg += "'Nonmutating' as operation-mode. With this metadata, the generated code sends "; - msg += "'Nonmutating' instead of 'Idempotent'\n"; - msg += " - [\"cpp:const\"], to get a const member function on the generated C++ servant base class"; - - firstWarning = false; - } - - unit->warning(msg); - $$ = op; - } - else - { - $$ = 0; - } - } - else - { - $$ = 0; - } -} | ICE_IDEMPOTENT return_type ICE_IDENT_OP { TypePtr returnType = TypePtr::dynamicCast($2); @@ -804,30 +762,6 @@ operation_preamble $$ = 0; } } -| ICE_NONMUTATING return_type ICE_KEYWORD_OP -{ - TypePtr returnType = TypePtr::dynamicCast($2); - string name = StringTokPtr::dynamicCast($3)->v; - ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); - if(cl) - { - OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating); - if(op) - { - unit->pushContainer(op); - unit->error("keyword `" + name + "' cannot be used as operation name"); - $$ = op; // Dummy - } - else - { - $$ = 0; - } - } - else - { - $$ = 0; - } -} | ICE_IDEMPOTENT return_type ICE_KEYWORD_OP { TypePtr returnType = TypePtr::dynamicCast($2); @@ -1787,9 +1721,6 @@ keyword | ICE_TRUE { } -| ICE_NONMUTATING -{ -} | ICE_IDEMPOTENT { } diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp index 273f116578c..65e05f5e632 100644 --- a/cpp/src/Slice/Scanner.cpp +++ b/cpp/src/Slice/Scanner.cpp @@ -2075,7 +2075,6 @@ initScanner() keywordMap["const"] = ICE_CONST; keywordMap["false"] = ICE_FALSE; keywordMap["true"] = ICE_TRUE; - keywordMap["nonmutating"] = ICE_NONMUTATING; keywordMap["idempotent"] = ICE_IDEMPOTENT; } diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index e7fb6405775..0cdeeea50ca 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -441,7 +441,6 @@ initScanner() keywordMap["const"] = ICE_CONST; keywordMap["false"] = ICE_FALSE; keywordMap["true"] = ICE_TRUE; - keywordMap["nonmutating"] = ICE_NONMUTATING; keywordMap["idempotent"] = ICE_IDEMPOTENT; } |