diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /cpp/src/Slice/Grammar.cpp | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'cpp/src/Slice/Grammar.cpp')
-rw-r--r-- | cpp/src/Slice/Grammar.cpp | 2012 |
1 files changed, 933 insertions, 1079 deletions
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index 1d12b32567c..b4534a7f92e 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -1,10 +1,8 @@ +/* A Bison parser, made by GNU Bison 2.7.12-4996. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 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 @@ -46,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.7.12-4996" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -60,8 +58,6 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse slice_parse @@ -72,11 +68,9 @@ #define yydebug slice_debug #define yynerrs slice_nerrs - /* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "../Slice/Grammar.y" +/* Line 371 of yacc.c */ +#line 1 "Grammar.y" // ********************************************************************** @@ -121,14 +115,16 @@ slice_error(const char* s) } +/* Line 371 of yacc.c */ +#line 120 "Grammar.tab.c" -/* Line 189 of yacc.c */ -#line 127 "Grammar.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 -#endif +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -138,11 +134,17 @@ slice_error(const char* s) # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "Grammar.tab.h". */ +#ifndef YY_SLICE_GRAMMAR_TAB_H_INCLUDED +# define YY_SLICE_GRAMMAR_TAB_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int slice_debug; #endif - /* Tokens. */ #ifndef YYTOKENTYPE @@ -196,7 +198,6 @@ slice_error(const char* s) #endif - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 @@ -205,11 +206,26 @@ typedef int YYSTYPE; #endif -/* Copy the second part of user declarations. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int slice_parse (void *YYPARSE_PARAM); +#else +int slice_parse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int slice_parse (void); +#else +int slice_parse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_SLICE_GRAMMAR_TAB_H_INCLUDED */ +/* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 213 "Grammar.tab.c" +/* Line 390 of yacc.c */ +#line 229 "Grammar.tab.c" #ifdef short # undef short @@ -259,27 +275,36 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif + /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(n) (n) +# define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) @@ -312,11 +337,12 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (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 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -339,24 +365,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (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__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -385,23 +411,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + 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__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -421,6 +431,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 13 /* YYLAST -- Last index in YYTABLE. */ @@ -596,7 +626,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -628,7 +658,7 @@ static const char *const yytname[] = "dictionary_def", "enum_id", "enum_def", "@11", "enumerator_list", "enumerator", "enumerator_initializer", "out_qualifier", "parameters", "throws", "scoped_name", "type", "string_literal", "string_list", - "local_qualifier", "const_initializer", "const_def", "keyword", 0 + "local_qualifier", "const_initializer", "const_def", "keyword", YY_NULL }; #endif @@ -698,8 +728,8 @@ static const yytype_uint8 yyr2[] = 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 +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { @@ -802,8 +832,7 @@ static const yytype_int16 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -136 static const yytype_int16 yytable[] = { @@ -898,6 +927,12 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 0, 68, 69 }; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-227))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { 17, 103, 14, 153, 42, 43, 44, 45, 170, 0, @@ -1040,78 +1075,50 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) - +/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 -/* 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. */ - +/* This macro is provided for backward compatibility. */ #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 YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ - #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else @@ -1161,6 +1168,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) YYSTYPE const * const yyvaluep; #endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT @@ -1169,11 +1178,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) # else YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1298,7 +1303,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1401,115 +1405,145 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* 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) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } - 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; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1534,36 +1568,15 @@ yydestruct (yymsg, yytype, yyvaluep) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YYUSE (yytype); } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1590,8 +1603,31 @@ yyparse () /* The lookahead symbol. */ int yychar; + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1604,7 +1640,7 @@ YYSTYPE yylval; `yyss': related to states. `yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1622,7 +1658,7 @@ YYSTYPE yylval; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1640,9 +1676,8 @@ YYSTYPE yylval; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1651,14 +1686,6 @@ YYSTYPE yylval; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1750,7 +1777,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1781,8 +1808,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1799,7 +1826,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1836,57 +1865,51 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1455 of yacc.c */ -#line 108 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 108 "Grammar.y" { -;} +} break; case 3: - -/* Line 1455 of yacc.c */ -#line 116 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 116 "Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); -;} +} break; case 4: - -/* Line 1455 of yacc.c */ -#line 125 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 125 "Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); -;} +} break; case 5: - -/* Line 1455 of yacc.c */ -#line 129 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 129 "Grammar.y" { (yyval) = new StringListTok; -;} +} break; case 6: - -/* Line 1455 of yacc.c */ -#line 138 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 138 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)])); if(!metaData->v.empty()) { unit->addGlobalMetaData(metaData->v); } -;} +} break; case 8: - -/* Line 1455 of yacc.c */ -#line 147 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 147 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -1894,156 +1917,139 @@ yyreduce: { contained->setMetaData(metaData->v); } -;} +} break; case 10: - -/* Line 1455 of yacc.c */ -#line 157 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 157 "Grammar.y" { yyerrok; -;} +} break; case 12: - -/* Line 1455 of yacc.c */ -#line 162 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 162 "Grammar.y" { unit->error("`;' missing after definition"); -;} +} break; case 13: - -/* Line 1455 of yacc.c */ -#line 166 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 166 "Grammar.y" { -;} +} break; case 14: - -/* Line 1455 of yacc.c */ -#line 174 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 174 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 15: - -/* Line 1455 of yacc.c */ -#line 178 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 178 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 16: - -/* Line 1455 of yacc.c */ -#line 182 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 182 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 17: - -/* Line 1455 of yacc.c */ -#line 186 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 186 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 18: - -/* Line 1455 of yacc.c */ -#line 190 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 190 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 19: - -/* Line 1455 of yacc.c */ -#line 194 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 194 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); -;} +} break; case 20: - -/* Line 1455 of yacc.c */ -#line 198 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 198 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 21: - -/* Line 1455 of yacc.c */ -#line 202 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 202 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); -;} +} break; case 22: - -/* Line 1455 of yacc.c */ -#line 206 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 206 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 23: - -/* Line 1455 of yacc.c */ -#line 210 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 210 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 24: - -/* Line 1455 of yacc.c */ -#line 214 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 214 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 25: - -/* Line 1455 of yacc.c */ -#line 218 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 218 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 26: - -/* Line 1455 of yacc.c */ -#line 222 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 222 "Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)]))); -;} +} break; case 27: - -/* Line 1455 of yacc.c */ -#line 231 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 231 "Grammar.y" { unit->setSeenDefinition(); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2059,13 +2065,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 28: - -/* Line 1455 of yacc.c */ -#line 248 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 248 "Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2076,43 +2081,39 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 29: - -/* Line 1455 of yacc.c */ -#line 265 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 265 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 30: - -/* Line 1455 of yacc.c */ -#line 269 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 269 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -;} +} break; case 31: - -/* Line 1455 of yacc.c */ -#line 280 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 280 "Grammar.y" { unit->error("exceptions cannot be forward declared"); (yyval) = 0; -;} +} break; case 32: - -/* Line 1455 of yacc.c */ -#line 290 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 290 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2125,48 +2126,44 @@ yyreduce: unit->pushContainer(ex); } (yyval) = ex; -;} +} break; case 33: - -/* Line 1455 of yacc.c */ -#line 304 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 304 "Grammar.y" { if((yyvsp[(4) - (7)])) { unit->popContainer(); } (yyval) = (yyvsp[(4) - (7)]); -;} +} break; case 34: - -/* Line 1455 of yacc.c */ -#line 317 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 317 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); ContainedPtr contained = cont->lookupException(scoped->v); cont->checkIntroduced(scoped->v); (yyval) = contained; -;} +} break; case 35: - -/* Line 1455 of yacc.c */ -#line 325 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 325 "Grammar.y" { (yyval) = 0; -;} +} break; case 36: - -/* Line 1455 of yacc.c */ -#line 334 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 334 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2174,51 +2171,46 @@ yyreduce: { contained->setMetaData(metaData->v); } -;} +} break; case 37: - -/* Line 1455 of yacc.c */ -#line 343 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 343 "Grammar.y" { -;} +} break; case 38: - -/* Line 1455 of yacc.c */ -#line 346 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 346 "Grammar.y" { unit->error("`;' missing after definition"); -;} +} break; case 39: - -/* Line 1455 of yacc.c */ -#line 350 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 350 "Grammar.y" { -;} +} break; case 40: - -/* Line 1455 of yacc.c */ -#line 358 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 358 "Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); TypeStringTokPtr typestring = new TypeStringTok; typestring->v = make_pair(type, ident->v); (yyval) = typestring; -;} +} break; case 41: - -/* Line 1455 of yacc.c */ -#line 371 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 371 "Grammar.y" { IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2237,13 +2229,12 @@ yyreduce: m->v.optional = tag >= 0; m->v.tag = tag; (yyval) = m; -;} +} break; case 42: - -/* Line 1455 of yacc.c */ -#line 391 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 391 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2298,52 +2289,48 @@ yyreduce: m->v.optional = tag >= 0; m->v.tag = tag; (yyval) = m; -;} +} break; case 43: - -/* Line 1455 of yacc.c */ -#line 447 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 447 "Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy m->v.optional = false; m->v.tag = -1; (yyval) = m; -;} +} break; case 44: - -/* Line 1455 of yacc.c */ -#line 455 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 455 "Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy m->v.optional = false; m->v.tag = -1; (yyval) = m; -;} +} break; case 45: - -/* Line 1455 of yacc.c */ -#line 468 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 468 "Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); m->v.type = ts->v.first; m->v.name = ts->v.second; (yyval) = m; -;} +} break; case 46: - -/* Line 1455 of yacc.c */ -#line 476 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 476 "Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); OptionalDefTokPtr m = new OptionalDefTok; @@ -2352,43 +2339,39 @@ yyreduce: m->v.optional = false; m->v.tag = -1; (yyval) = m; -;} +} break; case 48: - -/* Line 1455 of yacc.c */ -#line 497 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 497 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 49: - -/* Line 1455 of yacc.c */ -#line 501 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 501 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as struct name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -;} +} break; case 50: - -/* Line 1455 of yacc.c */ -#line 512 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 512 "Grammar.y" { unit->error("structs cannot be forward declared"); (yyval) = 0; // Dummy -;} +} break; case 51: - -/* Line 1455 of yacc.c */ -#line 522 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 522 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2406,13 +2389,12 @@ yyreduce: unit->pushContainer(st); } (yyval) = st; -;} +} break; case 52: - -/* Line 1455 of yacc.c */ -#line 541 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 541 "Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2429,13 +2411,12 @@ yyreduce: { unit->error("struct `" + st->name() + "' must have at least one member"); // $$ is a dummy } -;} +} break; case 53: - -/* Line 1455 of yacc.c */ -#line 564 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 564 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2443,58 +2424,52 @@ yyreduce: { contained->setMetaData(metaData->v); } -;} +} break; case 54: - -/* Line 1455 of yacc.c */ -#line 573 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 573 "Grammar.y" { -;} +} break; case 55: - -/* Line 1455 of yacc.c */ -#line 576 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 576 "Grammar.y" { unit->error("`;' missing after definition"); -;} +} break; case 56: - -/* Line 1455 of yacc.c */ -#line 580 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 580 "Grammar.y" { -;} +} break; case 58: - -/* Line 1455 of yacc.c */ -#line 594 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 594 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 59: - -/* Line 1455 of yacc.c */ -#line 598 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 598 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as class name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -;} +} break; case 60: - -/* Line 1455 of yacc.c */ -#line 609 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 609 "Grammar.y" { IceUtil::Int64 id = IntegerTokPtr::dynamicCast((yyvsp[(3) - (4)]))->v; if(id < 0) @@ -2518,13 +2493,12 @@ yyreduce: classId->v = StringTokPtr::dynamicCast((yyvsp[(2) - (4)]))->v; classId->t = static_cast<int>(id); (yyval) = classId; -;} +} break; case 61: - -/* Line 1455 of yacc.c */ -#line 634 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 634 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(3) - (4)])); @@ -2588,38 +2562,35 @@ yyreduce: classId->t = id; (yyval) = classId; -;} +} break; case 62: - -/* Line 1455 of yacc.c */ -#line 699 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 699 "Grammar.y" { ClassIdTokPtr classId = new ClassIdTok(); classId->v = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]))->v; classId->t = -1; (yyval) = classId; -;} +} break; case 63: - -/* Line 1455 of yacc.c */ -#line 711 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 711 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); ClassDeclPtr cl = cont->createClassDecl(ident->v, false, local->v); (yyval) = cl; -;} +} break; case 64: - -/* Line 1455 of yacc.c */ -#line 724 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 724 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); ClassIdTokPtr ident = ClassIdTokPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2641,13 +2612,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 65: - -/* Line 1455 of yacc.c */ -#line 747 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 747 "Grammar.y" { if((yyvsp[(5) - (8)])) { @@ -2658,13 +2628,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 66: - -/* Line 1455 of yacc.c */ -#line 764 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 764 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -2697,40 +2666,36 @@ yyreduce: } } } -;} +} break; case 67: - -/* Line 1455 of yacc.c */ -#line 798 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 798 "Grammar.y" { (yyval) = 0; -;} +} break; case 68: - -/* Line 1455 of yacc.c */ -#line 807 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 807 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 69: - -/* Line 1455 of yacc.c */ -#line 811 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 811 "Grammar.y" { (yyval) = new ClassListTok; -;} +} break; case 70: - -/* Line 1455 of yacc.c */ -#line 820 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 820 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2738,38 +2703,34 @@ yyreduce: { contained->setMetaData(metaData->v); } -;} +} break; case 71: - -/* Line 1455 of yacc.c */ -#line 829 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 829 "Grammar.y" { -;} +} break; case 72: - -/* Line 1455 of yacc.c */ -#line 832 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 832 "Grammar.y" { unit->error("`;' missing after definition"); -;} +} break; case 73: - -/* Line 1455 of yacc.c */ -#line 836 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 836 "Grammar.y" { -;} +} break; case 74: - -/* Line 1455 of yacc.c */ -#line 844 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 844 "Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -2790,13 +2751,12 @@ yyreduce: } unit->currentContainer()->checkIntroduced(def->v.name, dm); (yyval) = dm; -;} +} break; case 75: - -/* Line 1455 of yacc.c */ -#line 866 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 866 "Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -2822,13 +2782,12 @@ yyreduce: } unit->currentContainer()->checkIntroduced(def->v.name, dm); (yyval) = dm; -;} +} break; case 76: - -/* Line 1455 of yacc.c */ -#line 893 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 893 "Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2849,13 +2808,12 @@ yyreduce: } assert((yyval)); unit->error("keyword `" + name + "' cannot be used as data member name"); -;} +} break; case 77: - -/* Line 1455 of yacc.c */ -#line 915 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 915 "Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -2875,13 +2833,12 @@ yyreduce: } assert((yyval)); unit->error("missing data member name"); -;} +} break; case 78: - -/* Line 1455 of yacc.c */ -#line 941 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 941 "Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2889,13 +2846,12 @@ yyreduce: DataMemberPtr dm = st->createDataMember(ts->v.second, ts->v.first, false, -1, 0, "", ""); unit->currentContainer()->checkIntroduced(ts->v.second, dm); (yyval) = dm; -;} +} break; case 79: - -/* Line 1455 of yacc.c */ -#line 950 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 950 "Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -2905,13 +2861,12 @@ yyreduce: value->v.valueAsString, value->v.valueAsLiteral); unit->currentContainer()->checkIntroduced(ts->v.second, dm); (yyval) = dm; -;} +} break; case 80: - -/* Line 1455 of yacc.c */ -#line 961 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 961 "Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2919,13 +2874,12 @@ yyreduce: (yyval) = st->createDataMember(ts->v.second, ts->v.first, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("optional data members not supported in struct"); -;} +} break; case 81: - -/* Line 1455 of yacc.c */ -#line 970 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 970 "Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2933,13 +2887,12 @@ yyreduce: (yyval) = st->createDataMember(ts->v.second, ts->v.first, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("optional data members not supported in struct"); -;} +} break; case 82: - -/* Line 1455 of yacc.c */ -#line 979 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 979 "Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2948,13 +2901,12 @@ yyreduce: (yyval) = st->createDataMember(name, type, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("keyword `" + name + "' cannot be used as data member name"); -;} +} break; case 83: - -/* Line 1455 of yacc.c */ -#line 989 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 989 "Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -2962,49 +2914,45 @@ yyreduce: (yyval) = st->createDataMember(IceUtil::generateUUID(), type, false, 0, 0, "", ""); // Dummy assert((yyval)); unit->error("missing data member name"); -;} +} break; case 84: - -/* Line 1455 of yacc.c */ -#line 1003 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1003 "Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); m->v.type = TypePtr::dynamicCast((yyvsp[(2) - (2)])); (yyval) = m; -;} +} break; case 85: - -/* Line 1455 of yacc.c */ -#line 1009 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1009 "Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok(); m->v.type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); m->v.optional = false; m->v.tag = -1; (yyval) = m; -;} +} break; case 86: - -/* Line 1455 of yacc.c */ -#line 1017 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1017 "Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok; m->v.optional = false; m->v.tag = -1; (yyval) = m; -;} +} break; case 87: - -/* Line 1455 of yacc.c */ -#line 1029 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1029 "Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3027,13 +2975,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 88: - -/* Line 1455 of yacc.c */ -#line 1053 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1053 "Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -3057,13 +3004,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 89: - -/* Line 1455 of yacc.c */ -#line 1078 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1078 "Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3086,13 +3032,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 90: - -/* Line 1455 of yacc.c */ -#line 1102 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1102 "Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -3116,13 +3061,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 91: - -/* Line 1455 of yacc.c */ -#line 1132 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1132 "Grammar.y" { if((yyvsp[(1) - (3)])) { @@ -3133,13 +3077,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 92: - -/* Line 1455 of yacc.c */ -#line 1144 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1144 "Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3148,26 +3091,24 @@ yyreduce: { op->setExceptionList(el->v); } -;} +} break; case 93: - -/* Line 1455 of yacc.c */ -#line 1154 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1154 "Grammar.y" { if((yyvsp[(1) - (3)])) { unit->popContainer(); } yyerrok; -;} +} break; case 94: - -/* Line 1455 of yacc.c */ -#line 1162 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1162 "Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3176,33 +3117,30 @@ yyreduce: { op->setExceptionList(el->v); // Dummy } -;} +} break; case 97: - -/* Line 1455 of yacc.c */ -#line 1184 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1184 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 98: - -/* Line 1455 of yacc.c */ -#line 1188 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1188 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as interface name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -;} +} break; case 99: - -/* Line 1455 of yacc.c */ -#line 1199 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1199 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3210,13 +3148,12 @@ yyreduce: ClassDeclPtr cl = cont->createClassDecl(ident->v, true, local->v); cont->checkIntroduced(ident->v, cl); (yyval) = cl; -;} +} break; case 100: - -/* Line 1455 of yacc.c */ -#line 1213 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1213 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -3233,13 +3170,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 101: - -/* Line 1455 of yacc.c */ -#line 1231 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1231 "Grammar.y" { if((yyvsp[(4) - (7)])) { @@ -3250,13 +3186,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 102: - -/* Line 1455 of yacc.c */ -#line 1248 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1248 "Grammar.y" { ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -3290,13 +3225,12 @@ yyreduce: } } (yyval) = intfs; -;} +} break; case 103: - -/* Line 1455 of yacc.c */ -#line 1283 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1283 "Grammar.y" { ClassListTokPtr intfs = new ClassListTok; StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -3330,41 +3264,37 @@ yyreduce: } } (yyval) = intfs; -;} +} break; case 104: - -/* Line 1455 of yacc.c */ -#line 1318 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1318 "Grammar.y" { unit->error("illegal inheritance from type Object"); (yyval) = new ClassListTok; // Dummy -;} +} break; case 105: - -/* Line 1455 of yacc.c */ -#line 1328 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1328 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 106: - -/* Line 1455 of yacc.c */ -#line 1332 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1332 "Grammar.y" { (yyval) = new ClassListTok; -;} +} break; case 107: - -/* Line 1455 of yacc.c */ -#line 1341 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1341 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -3372,62 +3302,56 @@ yyreduce: { contained->setMetaData(metaData->v); } -;} +} break; case 108: - -/* Line 1455 of yacc.c */ -#line 1350 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1350 "Grammar.y" { -;} +} break; case 109: - -/* Line 1455 of yacc.c */ -#line 1353 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1353 "Grammar.y" { unit->error("`;' missing after definition"); -;} +} break; case 110: - -/* Line 1455 of yacc.c */ -#line 1357 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1357 "Grammar.y" { -;} +} break; case 112: - -/* Line 1455 of yacc.c */ -#line 1371 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1371 "Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)])); ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast((yyvsp[(3) - (3)])); exceptionList->v.push_front(exception); (yyval) = exceptionList; -;} +} break; case 113: - -/* Line 1455 of yacc.c */ -#line 1378 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1378 "Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])); ExceptionListTokPtr exceptionList = new ExceptionListTok; exceptionList->v.push_front(exception); (yyval) = exceptionList; -;} +} break; case 114: - -/* Line 1455 of yacc.c */ -#line 1390 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1390 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -3438,24 +3362,22 @@ yyreduce: } cont->checkIntroduced(scoped->v, exception); (yyval) = exception; -;} +} break; case 115: - -/* Line 1455 of yacc.c */ -#line 1402 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1402 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); (yyval) = unit->currentContainer()->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy -;} +} break; case 116: - -/* Line 1455 of yacc.c */ -#line 1413 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1413 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3463,13 +3385,12 @@ yyreduce: TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (7)])); ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); -;} +} break; case 117: - -/* Line 1455 of yacc.c */ -#line 1422 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1422 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3478,13 +3399,12 @@ yyreduce: ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createSequence(ident->v, type, metaData->v, local->v); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as sequence name"); -;} +} break; case 118: - -/* Line 1455 of yacc.c */ -#line 1437 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1437 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3494,13 +3414,12 @@ yyreduce: TypePtr valueType = TypePtr::dynamicCast((yyvsp[(8) - (10)])); ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); -;} +} break; case 119: - -/* Line 1455 of yacc.c */ -#line 1448 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1448 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3511,33 +3430,30 @@ yyreduce: ContainerPtr cont = unit->currentContainer(); (yyval) = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as dictionary name"); -;} +} break; case 120: - -/* Line 1455 of yacc.c */ -#line 1465 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1465 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 121: - -/* Line 1455 of yacc.c */ -#line 1469 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1469 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as enumeration name"); (yyval) = (yyvsp[(2) - (2)]); // Dummy -;} +} break; case 122: - -/* Line 1455 of yacc.c */ -#line 1480 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1480 "Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3545,13 +3461,12 @@ yyreduce: EnumPtr en = cont->createEnum(ident->v, local->v); cont->checkIntroduced(ident->v, en); (yyval) = en; -;} +} break; case 123: - -/* Line 1455 of yacc.c */ -#line 1489 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1489 "Grammar.y" { EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)])); if(en) @@ -3564,13 +3479,12 @@ yyreduce: en->setEnumerators(enumerators->v); // Dummy } (yyval) = (yyvsp[(3) - (6)]); -;} +} break; case 124: - -/* Line 1455 of yacc.c */ -#line 1504 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1504 "Grammar.y" { unit->error("missing enumeration name"); BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (5)])); @@ -3579,32 +3493,29 @@ yyreduce: EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast((yyvsp[(4) - (5)])); en->setEnumerators(enumerators->v); // Dummy (yyval) = en; -;} +} break; case 125: - -/* Line 1455 of yacc.c */ -#line 1519 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1519 "Grammar.y" { EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)])); ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v); (yyval) = ens; -;} +} break; case 126: - -/* Line 1455 of yacc.c */ -#line 1525 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1525 "Grammar.y" { -;} +} break; case 127: - -/* Line 1455 of yacc.c */ -#line 1533 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1533 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3615,13 +3526,12 @@ yyreduce: ens->v.push_front(en); } (yyval) = ens; -;} +} break; case 128: - -/* Line 1455 of yacc.c */ -#line 1545 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1545 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3643,44 +3553,40 @@ yyreduce: } } (yyval) = ens; -;} +} break; case 129: - -/* Line 1455 of yacc.c */ -#line 1568 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1568 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as enumerator"); EnumeratorListTokPtr ens = new EnumeratorListTok; // Dummy (yyval) = ens; -;} +} break; case 130: - -/* Line 1455 of yacc.c */ -#line 1575 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1575 "Grammar.y" { EnumeratorListTokPtr ens = new EnumeratorListTok; (yyval) = ens; // Dummy -;} +} break; case 131: - -/* Line 1455 of yacc.c */ -#line 1585 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1585 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); -;} +} break; case 132: - -/* Line 1455 of yacc.c */ -#line 1589 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1589 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainedList cl = unit->currentContainer()->lookupContained(scoped->v); @@ -3713,43 +3619,39 @@ yyreduce: } (yyval) = tok; -;} +} break; case 133: - -/* Line 1455 of yacc.c */ -#line 1628 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1628 "Grammar.y" { BoolTokPtr out = new BoolTok; out->v = true; (yyval) = out; -;} +} break; case 134: - -/* Line 1455 of yacc.c */ -#line 1634 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1634 "Grammar.y" { BoolTokPtr out = new BoolTok; out->v = false; (yyval) = out; -;} +} break; case 135: - -/* Line 1455 of yacc.c */ -#line 1645 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1645 "Grammar.y" { -;} +} break; case 136: - -/* Line 1455 of yacc.c */ -#line 1648 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1648 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3764,13 +3666,12 @@ yyreduce: pd->setMetaData(metaData->v); } } -;} +} break; case 137: - -/* Line 1455 of yacc.c */ -#line 1664 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1664 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3785,13 +3686,12 @@ yyreduce: pd->setMetaData(metaData->v); } } -;} +} break; case 138: - -/* Line 1455 of yacc.c */ -#line 1680 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1680 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (4)])); @@ -3802,13 +3702,12 @@ yyreduce: op->createParamDecl(ident->v, type, isOutParam->v, false, 0); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as parameter name"); } -;} +} break; case 139: - -/* Line 1455 of yacc.c */ -#line 1692 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1692 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (6)])); @@ -3819,13 +3718,12 @@ yyreduce: op->createParamDecl(ident->v, type, isOutParam->v, false, 0); // Dummy unit->error("keyword `" + ident->v + "' cannot be used as parameter name"); } -;} +} break; case 140: - -/* Line 1455 of yacc.c */ -#line 1704 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1704 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3835,13 +3733,12 @@ yyreduce: op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v, false, 0); // Dummy unit->error("missing parameter name"); } -;} +} break; case 141: - -/* Line 1455 of yacc.c */ -#line 1715 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1715 "Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3851,162 +3748,145 @@ yyreduce: op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v, false, 0); // Dummy unit->error("missing parameter name"); } -;} +} break; case 142: - -/* Line 1455 of yacc.c */ -#line 1731 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1731 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); -;} +} break; case 143: - -/* Line 1455 of yacc.c */ -#line 1735 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1735 "Grammar.y" { (yyval) = new ExceptionListTok; -;} +} break; case 144: - -/* Line 1455 of yacc.c */ -#line 1744 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1744 "Grammar.y" { -;} +} break; case 145: - -/* Line 1455 of yacc.c */ -#line 1747 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1747 "Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ident->v = "::" + ident->v; (yyval) = ident; -;} +} break; case 146: - -/* Line 1455 of yacc.c */ -#line 1753 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1753 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); scoped->v += "::"; scoped->v += ident->v; (yyval) = scoped; -;} +} break; case 147: - -/* Line 1455 of yacc.c */ -#line 1766 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1766 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindByte); -;} +} break; case 148: - -/* Line 1455 of yacc.c */ -#line 1770 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1770 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindBool); -;} +} break; case 149: - -/* Line 1455 of yacc.c */ -#line 1774 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1774 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindShort); -;} +} break; case 150: - -/* Line 1455 of yacc.c */ -#line 1778 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1778 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindInt); -;} +} break; case 151: - -/* Line 1455 of yacc.c */ -#line 1782 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1782 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindLong); -;} +} break; case 152: - -/* Line 1455 of yacc.c */ -#line 1786 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1786 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindFloat); -;} +} break; case 153: - -/* Line 1455 of yacc.c */ -#line 1790 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1790 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindDouble); -;} +} break; case 154: - -/* Line 1455 of yacc.c */ -#line 1794 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1794 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindString); -;} +} break; case 155: - -/* Line 1455 of yacc.c */ -#line 1798 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1798 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindObject); -;} +} break; case 156: - -/* Line 1455 of yacc.c */ -#line 1802 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1802 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindObjectProxy); -;} +} break; case 157: - -/* Line 1455 of yacc.c */ -#line 1806 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1806 "Grammar.y" { (yyval) = unit->builtin(Builtin::KindLocalObject); -;} +} break; case 158: - -/* Line 1455 of yacc.c */ -#line 1810 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1810 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -4024,13 +3904,12 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 159: - -/* Line 1455 of yacc.c */ -#line 1829 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1829 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -4065,78 +3944,71 @@ yyreduce: { (yyval) = 0; } -;} +} break; case 160: - -/* Line 1455 of yacc.c */ -#line 1870 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1870 "Grammar.y" { StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr str2 = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); str1->v += str2->v; -;} +} break; case 161: - -/* Line 1455 of yacc.c */ -#line 1876 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1876 "Grammar.y" { -;} +} break; case 162: - -/* Line 1455 of yacc.c */ -#line 1884 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1884 "Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringListTokPtr stringList = StringListTokPtr::dynamicCast((yyvsp[(1) - (3)])); stringList->v.push_back(str->v); (yyval) = stringList; -;} +} break; case 163: - -/* Line 1455 of yacc.c */ -#line 1891 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1891 "Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StringListTokPtr stringList = new StringListTok; stringList->v.push_back(str->v); (yyval) = stringList; -;} +} break; case 164: - -/* Line 1455 of yacc.c */ -#line 1903 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1903 "Grammar.y" { BoolTokPtr local = new BoolTok; local->v = true; (yyval) = local; -;} +} break; case 165: - -/* Line 1455 of yacc.c */ -#line 1909 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1909 "Grammar.y" { BoolTokPtr local = new BoolTok; local->v = false; (yyval) = local; -;} +} break; case 166: - -/* Line 1455 of yacc.c */ -#line 1920 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1920 "Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindLong); IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4148,13 +4020,12 @@ yyreduce: def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = intVal->literal; (yyval) = def; -;} +} break; case 167: - -/* Line 1455 of yacc.c */ -#line 1933 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1933 "Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindDouble); FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4166,13 +4037,12 @@ yyreduce: def->v.valueAsString = sstr.str(); def->v.valueAsLiteral = floatVal->literal; (yyval) = def; -;} +} break; case 168: - -/* Line 1455 of yacc.c */ -#line 1946 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1946 "Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ConstDefTokPtr def = new ConstDefTok; @@ -4217,13 +4087,12 @@ yyreduce: } } (yyval) = def; -;} +} break; case 169: - -/* Line 1455 of yacc.c */ -#line 1992 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 1992 "Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindString); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4233,13 +4102,12 @@ yyreduce: def->v.valueAsString = literal->v; def->v.valueAsLiteral = literal->literal; (yyval) = def; -;} +} break; case 170: - -/* Line 1455 of yacc.c */ -#line 2003 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2003 "Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4249,13 +4117,12 @@ yyreduce: def->v.valueAsString = "false"; def->v.valueAsLiteral = "false"; (yyval) = def; -;} +} break; case 171: - -/* Line 1455 of yacc.c */ -#line 2014 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2014 "Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4265,13 +4132,12 @@ yyreduce: def->v.valueAsString = "true"; def->v.valueAsLiteral = "true"; (yyval) = def; -;} +} break; case 172: - -/* Line 1455 of yacc.c */ -#line 2030 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2030 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (6)])); @@ -4279,13 +4145,12 @@ yyreduce: ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(6) - (6)])); (yyval) = unit->currentContainer()->createConst(ident->v, const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral); -;} +} break; case 173: - -/* Line 1455 of yacc.c */ -#line 2039 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2039 "Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (5)])); @@ -4293,247 +4158,228 @@ yyreduce: unit->error("missing constant name"); (yyval) = unit->currentContainer()->createConst(IceUtil::generateUUID(), const_type, metaData->v, value->v.value, value->v.valueAsString, value->v.valueAsLiteral, Dummy); // Dummy -;} +} break; case 174: - -/* Line 1455 of yacc.c */ -#line 2053 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2053 "Grammar.y" { -;} +} break; case 175: - -/* Line 1455 of yacc.c */ -#line 2056 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2056 "Grammar.y" { -;} +} break; case 176: - -/* Line 1455 of yacc.c */ -#line 2059 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2059 "Grammar.y" { -;} +} break; case 177: - -/* Line 1455 of yacc.c */ -#line 2062 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2062 "Grammar.y" { -;} +} break; case 178: - -/* Line 1455 of yacc.c */ -#line 2065 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2065 "Grammar.y" { -;} +} break; case 179: - -/* Line 1455 of yacc.c */ -#line 2068 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2068 "Grammar.y" { -;} +} break; case 180: - -/* Line 1455 of yacc.c */ -#line 2071 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2071 "Grammar.y" { -;} +} break; case 181: - -/* Line 1455 of yacc.c */ -#line 2074 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2074 "Grammar.y" { -;} +} break; case 182: - -/* Line 1455 of yacc.c */ -#line 2077 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2077 "Grammar.y" { -;} +} break; case 183: - -/* Line 1455 of yacc.c */ -#line 2080 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2080 "Grammar.y" { -;} +} break; case 184: - -/* Line 1455 of yacc.c */ -#line 2083 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2083 "Grammar.y" { -;} +} break; case 185: - -/* Line 1455 of yacc.c */ -#line 2086 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2086 "Grammar.y" { -;} +} break; case 186: - -/* Line 1455 of yacc.c */ -#line 2089 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2089 "Grammar.y" { -;} +} break; case 187: - -/* Line 1455 of yacc.c */ -#line 2092 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2092 "Grammar.y" { -;} +} break; case 188: - -/* Line 1455 of yacc.c */ -#line 2095 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2095 "Grammar.y" { -;} +} break; case 189: - -/* Line 1455 of yacc.c */ -#line 2098 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2098 "Grammar.y" { -;} +} break; case 190: - -/* Line 1455 of yacc.c */ -#line 2101 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2101 "Grammar.y" { -;} +} break; case 191: - -/* Line 1455 of yacc.c */ -#line 2104 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2104 "Grammar.y" { -;} +} break; case 192: - -/* Line 1455 of yacc.c */ -#line 2107 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2107 "Grammar.y" { -;} +} break; case 193: - -/* Line 1455 of yacc.c */ -#line 2110 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2110 "Grammar.y" { -;} +} break; case 194: - -/* Line 1455 of yacc.c */ -#line 2113 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2113 "Grammar.y" { -;} +} break; case 195: - -/* Line 1455 of yacc.c */ -#line 2116 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2116 "Grammar.y" { -;} +} break; case 196: - -/* Line 1455 of yacc.c */ -#line 2119 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2119 "Grammar.y" { -;} +} break; case 197: - -/* Line 1455 of yacc.c */ -#line 2122 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2122 "Grammar.y" { -;} +} break; case 198: - -/* Line 1455 of yacc.c */ -#line 2125 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2125 "Grammar.y" { -;} +} break; case 199: - -/* Line 1455 of yacc.c */ -#line 2128 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2128 "Grammar.y" { -;} +} break; case 200: - -/* Line 1455 of yacc.c */ -#line 2131 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2131 "Grammar.y" { -;} +} break; case 201: - -/* Line 1455 of yacc.c */ -#line 2134 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2134 "Grammar.y" { -;} +} break; case 202: - -/* Line 1455 of yacc.c */ -#line 2137 "../Slice/Grammar.y" +/* Line 1787 of yacc.c */ +#line 2137 "Grammar.y" { -;} +} break; - -/* Line 1455 of yacc.c */ -#line 4535 "Grammar.tab.c" +/* Line 1787 of yacc.c */ +#line 4370 "Grammar.tab.c" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -4561,6 +4407,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -4568,37 +4418,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -4657,7 +4506,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -4680,7 +4529,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -4704,7 +4555,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4716,8 +4567,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -4741,8 +4597,6 @@ yyreturn: } - -/* Line 1675 of yacc.c */ -#line 2141 "../Slice/Grammar.y" - +/* Line 2050 of yacc.c */ +#line 2141 "Grammar.y" |