From 2fa4b37edc6a7767efdf5736b1c9eedee640cabc Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Wed, 23 Oct 2024 20:25:15 +0800 Subject: [PATCH] fix linux compiler bug for so library compiler --- tools/tarsgrammar/tars.tab.cpp | 1497 ++++++++++++++++++-------------- tools/tarsparse/tars.lex.cpp | 79 +- tools/tarsparse/tars.tab.cpp | 1497 ++++++++++++++++++-------------- tools/tarsparse/tars.tab.hpp | 80 +- util/src/CMakeLists.txt | 2 +- 5 files changed, 1787 insertions(+), 1368 deletions(-) diff --git a/tools/tarsgrammar/tars.tab.cpp b/tools/tarsgrammar/tars.tab.cpp index 4647924b..30a4b213 100644 --- a/tools/tarsgrammar/tars.tab.cpp +++ b/tools/tarsgrammar/tars.tab.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -34,10 +34,6 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -45,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + +/* Identify Bison output. */ +#define YYBISON 1 -/* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +/* Bison version. */ +#define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -67,7 +66,7 @@ /* First part of user prologue. */ -#line 17 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" +#line 17 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" #include #include @@ -81,7 +80,7 @@ using namespace std; #define YYDEBUG 1 #define YYINITDEPTH 10000 -#line 85 "tars.tab.cpp" +#line 84 "tars.tab.cpp" # ifndef YY_CAST # ifdef __cplusplus @@ -104,102 +103,78 @@ using namespace std; # endif # endif -#include "tars.tab.hpp" -/* Symbol kind. */ -enum yysymbol_kind_t -{ - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_TARS_VOID = 3, /* TARS_VOID */ - YYSYMBOL_TARS_STRUCT = 4, /* TARS_STRUCT */ - YYSYMBOL_TARS_BOOL = 5, /* TARS_BOOL */ - YYSYMBOL_TARS_BYTE = 6, /* TARS_BYTE */ - YYSYMBOL_TARS_SHORT = 7, /* TARS_SHORT */ - YYSYMBOL_TARS_INT = 8, /* TARS_INT */ - YYSYMBOL_TARS_DOUBLE = 9, /* TARS_DOUBLE */ - YYSYMBOL_TARS_FLOAT = 10, /* TARS_FLOAT */ - YYSYMBOL_TARS_LONG = 11, /* TARS_LONG */ - YYSYMBOL_TARS_STRING = 12, /* TARS_STRING */ - YYSYMBOL_TARS_VECTOR = 13, /* TARS_VECTOR */ - YYSYMBOL_TARS_MAP = 14, /* TARS_MAP */ - YYSYMBOL_TARS_NAMESPACE = 15, /* TARS_NAMESPACE */ - YYSYMBOL_TARS_INTERFACE = 16, /* TARS_INTERFACE */ - YYSYMBOL_TARS_IDENTIFIER = 17, /* TARS_IDENTIFIER */ - YYSYMBOL_TARS_OUT = 18, /* TARS_OUT */ - YYSYMBOL_TARS_OP = 19, /* TARS_OP */ - YYSYMBOL_TARS_KEY = 20, /* TARS_KEY */ - YYSYMBOL_TARS_ROUTE_KEY = 21, /* TARS_ROUTE_KEY */ - YYSYMBOL_TARS_REQUIRE = 22, /* TARS_REQUIRE */ - YYSYMBOL_TARS_OPTIONAL = 23, /* TARS_OPTIONAL */ - YYSYMBOL_TARS_CONST_INTEGER = 24, /* TARS_CONST_INTEGER */ - YYSYMBOL_TARS_CONST_FLOAT = 25, /* TARS_CONST_FLOAT */ - YYSYMBOL_TARS_FALSE = 26, /* TARS_FALSE */ - YYSYMBOL_TARS_TRUE = 27, /* TARS_TRUE */ - YYSYMBOL_TARS_STRING_LITERAL = 28, /* TARS_STRING_LITERAL */ - YYSYMBOL_TARS_SCOPE_DELIMITER = 29, /* TARS_SCOPE_DELIMITER */ - YYSYMBOL_TARS_CONST = 30, /* TARS_CONST */ - YYSYMBOL_TARS_ENUM = 31, /* TARS_ENUM */ - YYSYMBOL_TARS_UNSIGNED = 32, /* TARS_UNSIGNED */ - YYSYMBOL_BAD_CHAR = 33, /* BAD_CHAR */ - YYSYMBOL_34_ = 34, /* ';' */ - YYSYMBOL_35_ = 35, /* '{' */ - YYSYMBOL_36_ = 36, /* '}' */ - YYSYMBOL_37_ = 37, /* ',' */ - YYSYMBOL_38_ = 38, /* '=' */ - YYSYMBOL_39_ = 39, /* '[' */ - YYSYMBOL_40_ = 40, /* ']' */ - YYSYMBOL_41_ = 41, /* ')' */ - YYSYMBOL_42_ = 42, /* '*' */ - YYSYMBOL_43_ = 43, /* ':' */ - YYSYMBOL_44_ = 44, /* '<' */ - YYSYMBOL_45_ = 45, /* '>' */ - YYSYMBOL_YYACCEPT = 46, /* $accept */ - YYSYMBOL_start = 47, /* start */ - YYSYMBOL_definitions = 48, /* definitions */ - YYSYMBOL_49_1 = 49, /* $@1 */ - YYSYMBOL_50_2 = 50, /* $@2 */ - YYSYMBOL_definition = 51, /* definition */ - YYSYMBOL_enum_def = 52, /* enum_def */ - YYSYMBOL_53_3 = 53, /* @3 */ - YYSYMBOL_enum_id = 54, /* enum_id */ - YYSYMBOL_enumerator_list = 55, /* enumerator_list */ - YYSYMBOL_enumerator = 56, /* enumerator */ - YYSYMBOL_namespace_def = 57, /* namespace_def */ - YYSYMBOL_58_4 = 58, /* @4 */ - YYSYMBOL_key_def = 59, /* key_def */ - YYSYMBOL_60_5 = 60, /* $@5 */ - YYSYMBOL_key_members = 61, /* key_members */ - YYSYMBOL_interface_def = 62, /* interface_def */ - YYSYMBOL_63_6 = 63, /* @6 */ - YYSYMBOL_interface_id = 64, /* interface_id */ - YYSYMBOL_interface_exports = 65, /* interface_exports */ - YYSYMBOL_interface_export = 66, /* interface_export */ - YYSYMBOL_operation = 67, /* operation */ - YYSYMBOL_operation_preamble = 68, /* operation_preamble */ - YYSYMBOL_return_type = 69, /* return_type */ - YYSYMBOL_parameters = 70, /* parameters */ - YYSYMBOL_routekey_qualifier = 71, /* routekey_qualifier */ - YYSYMBOL_out_qualifier = 72, /* out_qualifier */ - YYSYMBOL_struct_def = 73, /* struct_def */ - YYSYMBOL_74_7 = 74, /* @7 */ - YYSYMBOL_struct_id = 75, /* struct_id */ - YYSYMBOL_struct_exports = 76, /* struct_exports */ - YYSYMBOL_data_member = 77, /* data_member */ - YYSYMBOL_struct_type_id = 78, /* struct_type_id */ - YYSYMBOL_const_initializer = 79, /* const_initializer */ - YYSYMBOL_const_def = 80, /* const_def */ - YYSYMBOL_type_id = 81, /* type_id */ - YYSYMBOL_type = 82, /* type */ - YYSYMBOL_type_no = 83, /* type_no */ - YYSYMBOL_vector = 84, /* vector */ - YYSYMBOL_map = 85, /* map */ - YYSYMBOL_scoped_name = 86, /* scoped_name */ - YYSYMBOL_keyword = 87 /* keyword */ -}; -typedef enum yysymbol_kind_t yysymbol_kind_t; +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Use api.header.include to #include this header + instead of duplicating it here. */ +#ifndef YY_YY_TARS_TAB_HPP_INCLUDED +# define YY_YY_TARS_TAB_HPP_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + TARS_VOID = 258, + TARS_STRUCT = 259, + TARS_BOOL = 260, + TARS_BYTE = 261, + TARS_SHORT = 262, + TARS_INT = 263, + TARS_DOUBLE = 264, + TARS_FLOAT = 265, + TARS_LONG = 266, + TARS_STRING = 267, + TARS_VECTOR = 268, + TARS_MAP = 269, + TARS_NAMESPACE = 270, + TARS_INTERFACE = 271, + TARS_IDENTIFIER = 272, + TARS_OUT = 273, + TARS_OP = 274, + TARS_KEY = 275, + TARS_ROUTE_KEY = 276, + TARS_REQUIRE = 277, + TARS_OPTIONAL = 278, + TARS_CONST_INTEGER = 279, + TARS_CONST_FLOAT = 280, + TARS_FALSE = 281, + TARS_TRUE = 282, + TARS_STRING_LITERAL = 283, + TARS_SCOPE_DELIMITER = 284, + TARS_CONST = 285, + TARS_ENUM = 286, + TARS_UNSIGNED = 287, + BAD_CHAR = 288 + }; +#endif + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; +int yyparse (void); + +#endif /* !YY_YY_TARS_TAB_HPP_INCLUDED */ @@ -240,18 +215,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -311,7 +274,6 @@ typedef int yytype_uint16; #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -330,7 +292,6 @@ typedef int yy_state_fast_t; # endif #endif - #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -349,9 +310,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -388,7 +349,7 @@ typedef int yy_state_fast_t; #define YY_ASSERT(E) ((void) (0 && (E))) -#if !defined yyoverflow +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -453,7 +414,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* !defined yyoverflow */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -529,16 +491,14 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 199 -/* YYMAXUTOK -- Last valid token kind. */ +#define YYUNDEFTOK 2 #define YYMAXUTOK 288 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -596,45 +556,32 @@ static const yytype_int16 yyrline[] = }; #endif -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if YYDEBUG || 0 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - +#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[] = { - "\"end of file\"", "error", "\"invalid token\"", "TARS_VOID", - "TARS_STRUCT", "TARS_BOOL", "TARS_BYTE", "TARS_SHORT", "TARS_INT", - "TARS_DOUBLE", "TARS_FLOAT", "TARS_LONG", "TARS_STRING", "TARS_VECTOR", - "TARS_MAP", "TARS_NAMESPACE", "TARS_INTERFACE", "TARS_IDENTIFIER", - "TARS_OUT", "TARS_OP", "TARS_KEY", "TARS_ROUTE_KEY", "TARS_REQUIRE", - "TARS_OPTIONAL", "TARS_CONST_INTEGER", "TARS_CONST_FLOAT", "TARS_FALSE", - "TARS_TRUE", "TARS_STRING_LITERAL", "TARS_SCOPE_DELIMITER", "TARS_CONST", - "TARS_ENUM", "TARS_UNSIGNED", "BAD_CHAR", "';'", "'{'", "'}'", "','", - "'='", "'['", "']'", "')'", "'*'", "':'", "'<'", "'>'", "$accept", - "start", "definitions", "$@1", "$@2", "definition", "enum_def", "@3", - "enum_id", "enumerator_list", "enumerator", "namespace_def", "@4", - "key_def", "$@5", "key_members", "interface_def", "@6", "interface_id", - "interface_exports", "interface_export", "operation", - "operation_preamble", "return_type", "parameters", "routekey_qualifier", - "out_qualifier", "struct_def", "@7", "struct_id", "struct_exports", - "data_member", "struct_type_id", "const_initializer", "const_def", - "type_id", "type", "type_no", "vector", "map", "scoped_name", "keyword", YY_NULLPTR + "$end", "error", "$undefined", "TARS_VOID", "TARS_STRUCT", "TARS_BOOL", + "TARS_BYTE", "TARS_SHORT", "TARS_INT", "TARS_DOUBLE", "TARS_FLOAT", + "TARS_LONG", "TARS_STRING", "TARS_VECTOR", "TARS_MAP", "TARS_NAMESPACE", + "TARS_INTERFACE", "TARS_IDENTIFIER", "TARS_OUT", "TARS_OP", "TARS_KEY", + "TARS_ROUTE_KEY", "TARS_REQUIRE", "TARS_OPTIONAL", "TARS_CONST_INTEGER", + "TARS_CONST_FLOAT", "TARS_FALSE", "TARS_TRUE", "TARS_STRING_LITERAL", + "TARS_SCOPE_DELIMITER", "TARS_CONST", "TARS_ENUM", "TARS_UNSIGNED", + "BAD_CHAR", "';'", "'{'", "'}'", "','", "'='", "'['", "']'", "')'", + "'*'", "':'", "'<'", "'>'", "$accept", "start", "definitions", "$@1", + "$@2", "definition", "enum_def", "@3", "enum_id", "enumerator_list", + "enumerator", "namespace_def", "@4", "key_def", "$@5", "key_members", + "interface_def", "@6", "interface_id", "interface_exports", + "interface_export", "operation", "operation_preamble", "return_type", + "parameters", "routekey_qualifier", "out_qualifier", "struct_def", "@7", + "struct_id", "struct_exports", "data_member", "struct_type_id", + "const_initializer", "const_def", "type_id", "type", "type_no", "vector", + "map", "scoped_name", "keyword", YY_NULLPTR }; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} #endif -#ifdef YYPRINT +# ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -645,7 +592,7 @@ static const yytype_int16 yytoknum[] = 285, 286, 287, 288, 59, 123, 125, 44, 61, 91, 93, 41, 42, 58, 60, 62 }; -#endif +# endif #define YYPACT_NINF (-146) @@ -721,9 +668,9 @@ static const yytype_int16 yypgoto[] = }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = +static const yytype_int16 yydefgoto[] = { - 0, 8, 9, 76, 80, 10, 11, 77, 12, 123, + -1, 8, 9, 76, 80, 10, 11, 77, 12, 123, 124, 13, 81, 14, 142, 171, 15, 78, 16, 128, 129, 130, 131, 132, 157, 158, 159, 17, 79, 18, 137, 138, 139, 113, 19, 140, 68, 69, 70, 71, @@ -920,10 +867,10 @@ static const yytype_int8 yyr2[] = }; -enum { YYENOMEM = -2 }; - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -949,9 +896,10 @@ enum { YYENOMEM = -2 }; } \ while (0) -/* Backward compatibility with an undocumented macro. - Use YYerror or YYUNDEF. */ -#define YYERRCODE YYUNDEF +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + /* Enable debugging if requested. */ @@ -969,18 +917,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Kind, Value); \ + Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -991,19 +939,18 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YY_USE (yyoutput); + YYUSE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); + if (yytype < YYNTOKENS) + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1013,13 +960,12 @@ yy_symbol_value_print (FILE *yyo, `---------------------------*/ static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyo, yykind, yyvaluep); + yy_symbol_value_print (yyo, yytype, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -1052,8 +998,7 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, - int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -1065,8 +1010,9 @@ yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)]); + yystos[+yyssp[yyi + 1 - yynrhs]], + &yyvsp[(yyi + 1) - (yynrhs)] + ); YYFPRINTF (stderr, "\n"); } } @@ -1081,8 +1027,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1105,30 +1051,259 @@ int yydebug; #endif +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# 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. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# 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 YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYPTRDIFF_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; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else + return yystrlen (yystr); +} +# endif +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + yy_state_t *yyssp, int yytoken) +{ + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Actual size of YYARG. */ + int yycount = 0; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* There are many possibilities here to consider: + - 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]; + YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + yysize = yysize0; + 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]; + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + } + } + } + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + default: /* Avoid compiler warnings. */ + 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_ + } + + { + /* Don't count the "%s"s in the final size, but reserve room for + the terminator. */ + YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + + 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. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { - YY_USE (yyvaluep); + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Lookahead token kind. */ + + +/* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -1137,8 +1312,6 @@ YYSTYPE yylval; int yynerrs; - - /*----------. | yyparse. | `----------*/ @@ -1146,36 +1319,43 @@ int yynerrs; int yyparse (void) { - yy_state_fast_t yystate = 0; + yy_state_fast_t yystate; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + int yyerrstatus; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ + /* The state stack. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + yy_state_t *yyss; + yy_state_t *yyssp; - /* The semantic value stack: array, bottom, top. */ + /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYPTRDIFF_T yystacksize; int yyn; - /* The return value of yyparse. */ int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; - +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; +#endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1183,8 +1363,15 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1207,7 +1394,6 @@ yyparse (void) YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1253,7 +1439,7 @@ yyparse (void) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1292,29 +1478,18 @@ yyparse (void) /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token\n")); + YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; + yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - goto yyerrlab1; - } else { yytoken = YYTRANSLATE (yychar); @@ -1383,93 +1558,93 @@ yyparse (void) YY_REDUCE_PRINT (yyn); switch (yyn) { - case 3: /* $@1: %empty */ -#line 75 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 3: +#line 75 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1391 "tars.tab.cpp" +#line 1566 "tars.tab.cpp" break; - case 5: /* $@2: %empty */ -#line 79 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 5: +#line 79 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyerrok; } -#line 1399 "tars.tab.cpp" +#line 1574 "tars.tab.cpp" break; - case 7: /* definitions: definition */ -#line 84 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 7: +#line 84 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("`;' missing after definition"); } -#line 1407 "tars.tab.cpp" +#line 1582 "tars.tab.cpp" break; - case 8: /* definitions: %empty */ -#line 88 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 8: +#line 88 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1414 "tars.tab.cpp" +#line 1589 "tars.tab.cpp" break; - case 9: /* definition: namespace_def */ -#line 96 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 9: +#line 96 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || NamespacePtr::dynamicCast(yyvsp[0])); } -#line 1422 "tars.tab.cpp" +#line 1597 "tars.tab.cpp" break; - case 10: /* definition: interface_def */ -#line 100 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 10: +#line 100 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || InterfacePtr::dynamicCast(yyvsp[0])); } -#line 1430 "tars.tab.cpp" +#line 1605 "tars.tab.cpp" break; - case 11: /* definition: struct_def */ -#line 104 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 11: +#line 104 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || StructPtr::dynamicCast(yyvsp[0])); } -#line 1438 "tars.tab.cpp" +#line 1613 "tars.tab.cpp" break; - case 12: /* definition: key_def */ -#line 108 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 12: +#line 108 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1445 "tars.tab.cpp" +#line 1620 "tars.tab.cpp" break; - case 13: /* definition: enum_def */ -#line 111 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 13: +#line 111 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || EnumPtr::dynamicCast(yyvsp[0])); } -#line 1453 "tars.tab.cpp" +#line 1628 "tars.tab.cpp" break; - case 14: /* definition: const_def */ -#line 115 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 14: +#line 115 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || ConstPtr::dynamicCast(yyvsp[0])); } -#line 1461 "tars.tab.cpp" +#line 1636 "tars.tab.cpp" break; - case 15: /* @3: %empty */ -#line 124 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 15: +#line 124 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1469 "tars.tab.cpp" +#line 1644 "tars.tab.cpp" break; - case 16: /* enum_def: enum_id @3 '{' enumerator_list '}' */ -#line 128 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 16: +#line 128 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-2]) { @@ -1483,11 +1658,11 @@ yyparse (void) yyval = yyvsp[-3]; } -#line 1487 "tars.tab.cpp" +#line 1662 "tars.tab.cpp" break; - case 17: /* enum_id: TARS_ENUM TARS_IDENTIFIER */ -#line 147 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 17: +#line 147 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { NamespacePtr c = NamespacePtr::dynamicCast(g_parse->currentContainer()); if(!c) @@ -1500,36 +1675,36 @@ yyparse (void) yyval = e; } -#line 1504 "tars.tab.cpp" +#line 1679 "tars.tab.cpp" break; - case 18: /* enum_id: TARS_ENUM keyword */ -#line 160 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 18: +#line 160 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as enumeration name"); yyval = yyvsp[0]; } -#line 1514 "tars.tab.cpp" +#line 1689 "tars.tab.cpp" break; - case 19: /* enumerator_list: enumerator ',' enumerator_list */ -#line 171 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 19: +#line 171 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[-1]; } -#line 1522 "tars.tab.cpp" +#line 1697 "tars.tab.cpp" break; - case 20: /* enumerator_list: enumerator */ -#line 175 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 20: +#line 175 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1529 "tars.tab.cpp" +#line 1704 "tars.tab.cpp" break; - case 21: /* enumerator: TARS_IDENTIFIER */ -#line 183 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 21: +#line 183 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(g_parse->createBuiltin(Builtin::KindLong)); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1540,20 +1715,20 @@ yyparse (void) e->addMember(tPtr); yyval = e; } -#line 1544 "tars.tab.cpp" +#line 1719 "tars.tab.cpp" break; - case 22: /* enumerator: keyword */ -#line 194 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 22: +#line 194 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as enumerator"); } -#line 1553 "tars.tab.cpp" +#line 1728 "tars.tab.cpp" break; - case 23: /* enumerator: TARS_IDENTIFIER '=' const_initializer */ -#line 199 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 23: +#line 199 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(g_parse->createBuiltin(Builtin::KindLong)); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -1566,18 +1741,18 @@ yyparse (void) e->addMember(tPtr); yyval = e; } -#line 1570 "tars.tab.cpp" +#line 1745 "tars.tab.cpp" break; - case 24: /* enumerator: %empty */ -#line 212 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 24: +#line 212 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1577 "tars.tab.cpp" +#line 1752 "tars.tab.cpp" break; - case 25: /* @4: %empty */ -#line 220 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 25: +#line 220 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ContainerPtr c = g_parse->currentContainer(); @@ -1592,11 +1767,11 @@ yyparse (void) yyval = 0; } } -#line 1596 "tars.tab.cpp" +#line 1771 "tars.tab.cpp" break; - case 26: /* namespace_def: TARS_NAMESPACE TARS_IDENTIFIER @4 '{' definitions '}' */ -#line 235 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 26: +#line 235 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1608,11 +1783,11 @@ yyparse (void) yyval = 0; } } -#line 1612 "tars.tab.cpp" +#line 1787 "tars.tab.cpp" break; - case 27: /* $@5: %empty */ -#line 253 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 27: +#line 253 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-1]); StructPtr sp = StructPtr::dynamicCast(g_parse->findUserType(ident->v)); @@ -1623,18 +1798,18 @@ yyparse (void) g_parse->setKeyStruct(sp); } -#line 1627 "tars.tab.cpp" +#line 1802 "tars.tab.cpp" break; - case 28: /* key_def: TARS_KEY '[' scoped_name ',' $@5 key_members ']' */ -#line 264 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 28: +#line 264 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1634 "tars.tab.cpp" +#line 1809 "tars.tab.cpp" break; - case 29: /* key_members: TARS_IDENTIFIER */ -#line 272 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 29: +#line 272 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); StructPtr np = g_parse->getKeyStruct(); @@ -1647,11 +1822,11 @@ yyparse (void) yyval = 0; } } -#line 1651 "tars.tab.cpp" +#line 1826 "tars.tab.cpp" break; - case 30: /* key_members: key_members ',' TARS_IDENTIFIER */ -#line 285 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 30: +#line 285 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); StructPtr np = g_parse->getKeyStruct(); @@ -1664,11 +1839,11 @@ yyparse (void) yyval = 0; } } -#line 1668 "tars.tab.cpp" +#line 1843 "tars.tab.cpp" break; - case 31: /* @6: %empty */ -#line 304 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 31: +#line 304 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1685,11 +1860,11 @@ yyparse (void) yyval = 0; } } -#line 1689 "tars.tab.cpp" +#line 1864 "tars.tab.cpp" break; - case 32: /* interface_def: interface_id @6 '{' interface_exports '}' */ -#line 321 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 32: +#line 321 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1701,58 +1876,58 @@ yyparse (void) yyval = 0; } } -#line 1705 "tars.tab.cpp" +#line 1880 "tars.tab.cpp" break; - case 33: /* interface_id: TARS_INTERFACE TARS_IDENTIFIER */ -#line 338 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 33: +#line 338 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1713 "tars.tab.cpp" +#line 1888 "tars.tab.cpp" break; - case 34: /* interface_id: TARS_INTERFACE keyword */ -#line 342 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 34: +#line 342 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as interface name"); yyval = yyvsp[0]; } -#line 1723 "tars.tab.cpp" +#line 1898 "tars.tab.cpp" break; - case 35: /* interface_exports: interface_export ';' interface_exports */ -#line 353 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 35: +#line 353 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1730 "tars.tab.cpp" +#line 1905 "tars.tab.cpp" break; - case 36: /* interface_exports: error ';' interface_exports */ -#line 356 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 36: +#line 356 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1737 "tars.tab.cpp" +#line 1912 "tars.tab.cpp" break; - case 37: /* interface_exports: interface_export */ -#line 359 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 37: +#line 359 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("`;' missing after definition"); } -#line 1745 "tars.tab.cpp" +#line 1920 "tars.tab.cpp" break; - case 38: /* interface_exports: %empty */ -#line 363 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 38: +#line 363 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1752 "tars.tab.cpp" +#line 1927 "tars.tab.cpp" break; - case 40: /* operation: operation_preamble parameters ')' */ -#line 377 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 40: +#line 377 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-2]) { @@ -1764,11 +1939,11 @@ yyparse (void) yyval = 0; } } -#line 1768 "tars.tab.cpp" +#line 1943 "tars.tab.cpp" break; - case 41: /* operation_preamble: return_type TARS_OP */ -#line 394 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 41: +#line 394 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1792,26 +1967,26 @@ yyparse (void) yyval = 0; } } -#line 1796 "tars.tab.cpp" +#line 1971 "tars.tab.cpp" break; - case 43: /* return_type: TARS_VOID */ -#line 424 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 43: +#line 424 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = 0; } -#line 1804 "tars.tab.cpp" +#line 1979 "tars.tab.cpp" break; - case 44: /* parameters: %empty */ -#line 434 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 44: +#line 434 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1811 "tars.tab.cpp" +#line 1986 "tars.tab.cpp" break; - case 45: /* parameters: type_id */ -#line 437 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 45: +#line 437 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1822,11 +1997,11 @@ yyparse (void) op->createParamDecl(tsp, false, false); } } -#line 1826 "tars.tab.cpp" +#line 2001 "tars.tab.cpp" break; - case 46: /* parameters: parameters ',' type_id */ -#line 448 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 46: +#line 448 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1837,11 +2012,11 @@ yyparse (void) op->createParamDecl(tsp, false, false); } } -#line 1841 "tars.tab.cpp" +#line 2016 "tars.tab.cpp" break; - case 47: /* parameters: out_qualifier type_id */ -#line 459 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 47: +#line 459 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isOutParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1853,11 +2028,11 @@ yyparse (void) op->createParamDecl(tsp, isOutParam->v, false); } } -#line 1857 "tars.tab.cpp" +#line 2032 "tars.tab.cpp" break; - case 48: /* parameters: parameters ',' out_qualifier type_id */ -#line 471 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 48: +#line 471 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isOutParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1869,11 +2044,11 @@ yyparse (void) op->createParamDecl(tsp, isOutParam->v, false); } } -#line 1873 "tars.tab.cpp" +#line 2048 "tars.tab.cpp" break; - case 49: /* parameters: routekey_qualifier type_id */ -#line 483 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 49: +#line 483 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isRouteKeyParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1885,11 +2060,11 @@ yyparse (void) op->createParamDecl(tsp, false, isRouteKeyParam->v); } } -#line 1889 "tars.tab.cpp" +#line 2064 "tars.tab.cpp" break; - case 50: /* parameters: parameters ',' routekey_qualifier type_id */ -#line 495 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 50: +#line 495 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isRouteKeyParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1901,47 +2076,47 @@ yyparse (void) op->createParamDecl(tsp, false, isRouteKeyParam->v); } } -#line 1905 "tars.tab.cpp" +#line 2080 "tars.tab.cpp" break; - case 51: /* parameters: out_qualifier */ -#line 507 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 51: +#line 507 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("'out' must be defined with a type"); } -#line 1913 "tars.tab.cpp" +#line 2088 "tars.tab.cpp" break; - case 52: /* parameters: routekey_qualifier */ -#line 511 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 52: +#line 511 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("'routekey' must be defined with a type"); } -#line 1921 "tars.tab.cpp" +#line 2096 "tars.tab.cpp" break; - case 53: /* routekey_qualifier: TARS_ROUTE_KEY */ -#line 520 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 53: +#line 520 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr routekey = new BoolGrammar; routekey->v = true; yyval = GrammarBasePtr::dynamicCast(routekey); } -#line 1931 "tars.tab.cpp" +#line 2106 "tars.tab.cpp" break; - case 54: /* out_qualifier: TARS_OUT */ -#line 531 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 54: +#line 531 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr out = new BoolGrammar; out->v = true; yyval = GrammarBasePtr::dynamicCast(out); } -#line 1941 "tars.tab.cpp" +#line 2116 "tars.tab.cpp" break; - case 55: /* @7: %empty */ -#line 542 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 55: +#line 542 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); NamespacePtr np = NamespacePtr::dynamicCast(g_parse->currentContainer()); @@ -1963,11 +2138,11 @@ yyparse (void) g_parse->error("struct '" + ident->v + "' must definition in namespace"); } } -#line 1967 "tars.tab.cpp" +#line 2142 "tars.tab.cpp" break; - case 56: /* struct_def: struct_id @7 '{' struct_exports '}' */ -#line 564 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 56: +#line 564 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1982,68 +2157,68 @@ yyparse (void) g_parse->error("struct `" + st->getSid() + "' must have at least one member"); } } -#line 1986 "tars.tab.cpp" +#line 2161 "tars.tab.cpp" break; - case 57: /* struct_id: TARS_STRUCT TARS_IDENTIFIER */ -#line 584 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 57: +#line 584 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1994 "tars.tab.cpp" +#line 2169 "tars.tab.cpp" break; - case 58: /* struct_id: TARS_STRUCT keyword */ -#line 588 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 58: +#line 588 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as struct name"); } -#line 2004 "tars.tab.cpp" +#line 2179 "tars.tab.cpp" break; - case 59: /* struct_id: TARS_STRUCT error */ -#line 594 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 59: +#line 594 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("abstract declarator '' used as declaration"); } -#line 2012 "tars.tab.cpp" +#line 2187 "tars.tab.cpp" break; - case 60: /* struct_exports: data_member ';' struct_exports */ -#line 603 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 60: +#line 603 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2020 "tars.tab.cpp" +#line 2195 "tars.tab.cpp" break; - case 61: /* struct_exports: data_member */ -#line 607 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 61: +#line 607 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("';' missing after definition"); } -#line 2028 "tars.tab.cpp" +#line 2203 "tars.tab.cpp" break; - case 62: /* struct_exports: %empty */ -#line 611 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 62: +#line 611 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2035 "tars.tab.cpp" +#line 2210 "tars.tab.cpp" break; - case 63: /* data_member: struct_type_id */ -#line 621 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 63: +#line 621 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2043 "tars.tab.cpp" +#line 2218 "tars.tab.cpp" break; - case 64: /* struct_type_id: TARS_CONST_INTEGER TARS_REQUIRE type_id */ -#line 630 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 64: +#line 630 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2061,11 +2236,11 @@ yyparse (void) yyval = 0; } } -#line 2065 "tars.tab.cpp" +#line 2240 "tars.tab.cpp" break; - case 65: /* struct_type_id: TARS_CONST_INTEGER TARS_REQUIRE type_id '=' const_initializer */ -#line 648 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 65: +#line 648 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2087,11 +2262,11 @@ yyparse (void) yyval = 0; } } -#line 2091 "tars.tab.cpp" +#line 2266 "tars.tab.cpp" break; - case 66: /* struct_type_id: TARS_CONST_INTEGER TARS_OPTIONAL type_id '=' const_initializer */ -#line 670 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 66: +#line 670 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2113,11 +2288,11 @@ yyparse (void) yyval = 0; } } -#line 2117 "tars.tab.cpp" +#line 2292 "tars.tab.cpp" break; - case 67: /* struct_type_id: TARS_CONST_INTEGER TARS_OPTIONAL type_id */ -#line 692 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 67: +#line 692 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2134,43 +2309,43 @@ yyparse (void) yyval = 0; } } -#line 2138 "tars.tab.cpp" +#line 2313 "tars.tab.cpp" break; - case 68: /* struct_type_id: TARS_REQUIRE type_id */ -#line 709 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 68: +#line 709 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag'"); } -#line 2146 "tars.tab.cpp" +#line 2321 "tars.tab.cpp" break; - case 69: /* struct_type_id: TARS_OPTIONAL type_id */ -#line 713 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 69: +#line 713 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag'"); } -#line 2154 "tars.tab.cpp" +#line 2329 "tars.tab.cpp" break; - case 70: /* struct_type_id: TARS_CONST_INTEGER type_id */ -#line 717 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 70: +#line 717 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'require' or 'optional'"); } -#line 2162 "tars.tab.cpp" +#line 2337 "tars.tab.cpp" break; - case 71: /* struct_type_id: type_id */ -#line 721 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 71: +#line 721 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag' or 'require' or 'optional'"); } -#line 2170 "tars.tab.cpp" +#line 2345 "tars.tab.cpp" break; - case 72: /* const_initializer: TARS_CONST_INTEGER */ -#line 730 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 72: +#line 730 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { IntergerGrammarPtr intVal = IntergerGrammarPtr::dynamicCast(yyvsp[0]); ostringstream sstr; @@ -2180,11 +2355,11 @@ yyparse (void) c->v = sstr.str(); yyval = c; } -#line 2184 "tars.tab.cpp" +#line 2359 "tars.tab.cpp" break; - case 73: /* const_initializer: TARS_CONST_FLOAT */ -#line 740 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 73: +#line 740 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { FloatGrammarPtr floatVal = FloatGrammarPtr::dynamicCast(yyvsp[0]); ostringstream sstr; @@ -2194,11 +2369,11 @@ yyparse (void) c->v = sstr.str(); yyval = c; } -#line 2198 "tars.tab.cpp" +#line 2373 "tars.tab.cpp" break; - case 74: /* const_initializer: TARS_STRING_LITERAL */ -#line 750 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 74: +#line 750 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2206,11 +2381,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2210 "tars.tab.cpp" +#line 2385 "tars.tab.cpp" break; - case 75: /* const_initializer: TARS_FALSE */ -#line 758 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 75: +#line 758 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2218,11 +2393,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2222 "tars.tab.cpp" +#line 2397 "tars.tab.cpp" break; - case 76: /* const_initializer: TARS_TRUE */ -#line 766 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 76: +#line 766 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2230,11 +2405,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2234 "tars.tab.cpp" +#line 2409 "tars.tab.cpp" break; - case 77: /* const_initializer: TARS_IDENTIFIER */ -#line 774 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 77: +#line 774 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2247,11 +2422,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2251 "tars.tab.cpp" +#line 2426 "tars.tab.cpp" break; - case 78: /* const_initializer: scoped_name TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 787 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 78: +#line 787 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr scoped = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -2266,11 +2441,11 @@ yyparse (void) c->v = scoped->v + "::" + ident->v; yyval = c; } -#line 2270 "tars.tab.cpp" +#line 2445 "tars.tab.cpp" break; - case 79: /* const_def: TARS_CONST type_id '=' const_initializer */ -#line 807 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 79: +#line 807 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { NamespacePtr np = NamespacePtr::dynamicCast(g_parse->currentContainer()); if(!np) @@ -2283,11 +2458,11 @@ yyparse (void) ConstPtr cPtr = np->createConst(t, c); yyval = cPtr; } -#line 2287 "tars.tab.cpp" +#line 2462 "tars.tab.cpp" break; - case 80: /* type_id: type TARS_IDENTIFIER */ -#line 825 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 80: +#line 825 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2296,11 +2471,11 @@ yyparse (void) yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2300 "tars.tab.cpp" +#line 2475 "tars.tab.cpp" break; - case 81: /* type_id: type TARS_IDENTIFIER '[' TARS_CONST_INTEGER ']' */ -#line 834 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 81: +#line 834 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = g_parse->createVector(TypePtr::dynamicCast(yyvsp[-4])); IntergerGrammarPtr iPtrSize = IntergerGrammarPtr::dynamicCast(yyvsp[-1]); @@ -2310,11 +2485,11 @@ yyparse (void) TypeIdPtr typeIdPtr = new TypeId(type, ident->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2314 "tars.tab.cpp" +#line 2489 "tars.tab.cpp" break; - case 82: /* type_id: type '*' TARS_IDENTIFIER */ -#line 844 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 82: +#line 844 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = g_parse->createVector(TypePtr::dynamicCast(yyvsp[-2])); //IntergerGrammarPtr iPtrSize = IntergerGrammarPtr::dynamicCast($4); @@ -2324,11 +2499,11 @@ yyparse (void) TypeIdPtr typeIdPtr = new TypeId(type, ident->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2328 "tars.tab.cpp" +#line 2503 "tars.tab.cpp" break; - case 83: /* type_id: type TARS_IDENTIFIER ':' TARS_CONST_INTEGER */ -#line 854 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 83: +#line 854 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-3]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -2337,36 +2512,36 @@ yyparse (void) g_parse->checkArrayVaid(type,iPtrSize->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2341 "tars.tab.cpp" +#line 2516 "tars.tab.cpp" break; - case 84: /* type_id: type keyword */ -#line 863 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 84: +#line 863 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as data member name"); } -#line 2350 "tars.tab.cpp" +#line 2525 "tars.tab.cpp" break; - case 85: /* type_id: type */ -#line 868 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 85: +#line 868 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("missing data member name"); } -#line 2358 "tars.tab.cpp" +#line 2533 "tars.tab.cpp" break; - case 86: /* type_id: error */ -#line 872 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 86: +#line 872 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("unkown type"); } -#line 2366 "tars.tab.cpp" +#line 2541 "tars.tab.cpp" break; - case 87: /* type: type_no ':' TARS_CONST_INTEGER */ -#line 881 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 87: +#line 881 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-2]); @@ -2375,131 +2550,131 @@ yyparse (void) type->setArray(iPtrSize->v); yyval = type; } -#line 2379 "tars.tab.cpp" +#line 2554 "tars.tab.cpp" break; - case 88: /* type: type_no */ -#line 890 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 88: +#line 890 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 2387 "tars.tab.cpp" +#line 2562 "tars.tab.cpp" break; - case 89: /* type: type_no ':' error */ -#line 894 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 89: +#line 894 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("array missing size"); } -#line 2395 "tars.tab.cpp" +#line 2570 "tars.tab.cpp" break; - case 90: /* type_no: TARS_BOOL */ -#line 903 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 90: +#line 903 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindBool); } -#line 2403 "tars.tab.cpp" +#line 2578 "tars.tab.cpp" break; - case 91: /* type_no: TARS_BYTE */ -#line 907 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 91: +#line 907 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindByte); } -#line 2411 "tars.tab.cpp" +#line 2586 "tars.tab.cpp" break; - case 92: /* type_no: TARS_UNSIGNED TARS_BYTE */ -#line 911 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 92: +#line 911 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindShort,true); } -#line 2419 "tars.tab.cpp" +#line 2594 "tars.tab.cpp" break; - case 93: /* type_no: TARS_SHORT */ -#line 915 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 93: +#line 915 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindShort); } -#line 2427 "tars.tab.cpp" +#line 2602 "tars.tab.cpp" break; - case 94: /* type_no: TARS_UNSIGNED TARS_SHORT */ -#line 919 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 94: +#line 919 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindInt,true); } -#line 2435 "tars.tab.cpp" +#line 2610 "tars.tab.cpp" break; - case 95: /* type_no: TARS_INT */ -#line 923 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 95: +#line 923 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindInt); } -#line 2443 "tars.tab.cpp" +#line 2618 "tars.tab.cpp" break; - case 96: /* type_no: TARS_UNSIGNED TARS_INT */ -#line 927 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 96: +#line 927 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindLong,true); } -#line 2451 "tars.tab.cpp" +#line 2626 "tars.tab.cpp" break; - case 97: /* type_no: TARS_LONG */ -#line 931 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 97: +#line 931 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindLong); } -#line 2459 "tars.tab.cpp" +#line 2634 "tars.tab.cpp" break; - case 98: /* type_no: TARS_FLOAT */ -#line 935 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 98: +#line 935 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindFloat); } -#line 2467 "tars.tab.cpp" +#line 2642 "tars.tab.cpp" break; - case 99: /* type_no: TARS_DOUBLE */ -#line 939 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 99: +#line 939 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindDouble); } -#line 2475 "tars.tab.cpp" +#line 2650 "tars.tab.cpp" break; - case 100: /* type_no: TARS_STRING */ -#line 943 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 100: +#line 943 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindString); } -#line 2483 "tars.tab.cpp" +#line 2658 "tars.tab.cpp" break; - case 101: /* type_no: vector */ -#line 947 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 101: +#line 947 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2491 "tars.tab.cpp" +#line 2666 "tars.tab.cpp" break; - case 102: /* type_no: map */ -#line 951 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 102: +#line 951 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2499 "tars.tab.cpp" +#line 2674 "tars.tab.cpp" break; - case 103: /* type_no: scoped_name */ -#line 955 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 103: +#line 955 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); TypePtr sp = g_parse->findUserType(ident->v); @@ -2512,76 +2687,76 @@ yyparse (void) g_parse->error("'" + ident->v + "' undefined!"); } } -#line 2516 "tars.tab.cpp" +#line 2691 "tars.tab.cpp" break; - case 104: /* vector: TARS_VECTOR '<' type '>' */ -#line 973 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 104: +#line 973 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(g_parse->createVector(TypePtr::dynamicCast(yyvsp[-1]))); } -#line 2524 "tars.tab.cpp" +#line 2699 "tars.tab.cpp" break; - case 105: /* vector: TARS_VECTOR '<' error */ -#line 977 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 105: +#line 977 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector error"); } -#line 2532 "tars.tab.cpp" +#line 2707 "tars.tab.cpp" break; - case 106: /* vector: TARS_VECTOR '<' type error */ -#line 981 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 106: +#line 981 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector missing '>'"); } -#line 2540 "tars.tab.cpp" +#line 2715 "tars.tab.cpp" break; - case 107: /* vector: TARS_VECTOR error */ -#line 985 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 107: +#line 985 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector missing type"); } -#line 2548 "tars.tab.cpp" +#line 2723 "tars.tab.cpp" break; - case 108: /* map: TARS_MAP '<' type ',' type '>' */ -#line 994 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 108: +#line 994 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(g_parse->createMap(TypePtr::dynamicCast(yyvsp[-3]), TypePtr::dynamicCast(yyvsp[-1]))); } -#line 2556 "tars.tab.cpp" +#line 2731 "tars.tab.cpp" break; - case 109: /* map: TARS_MAP '<' error */ -#line 998 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 109: +#line 998 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("map error"); } -#line 2564 "tars.tab.cpp" +#line 2739 "tars.tab.cpp" break; - case 110: /* scoped_name: TARS_IDENTIFIER */ -#line 1007 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 110: +#line 1007 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2571 "tars.tab.cpp" +#line 2746 "tars.tab.cpp" break; - case 111: /* scoped_name: TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 1010 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 111: +#line 1010 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ident->v = "::" + ident->v; yyval = GrammarBasePtr::dynamicCast(ident); } -#line 2581 "tars.tab.cpp" +#line 2756 "tars.tab.cpp" break; - case 112: /* scoped_name: scoped_name TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 1016 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 112: +#line 1016 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr scoped = StringGrammarPtr::dynamicCast(yyvsp[-2]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2589,186 +2764,186 @@ yyparse (void) scoped->v += ident->v; yyval = GrammarBasePtr::dynamicCast(scoped); } -#line 2593 "tars.tab.cpp" +#line 2768 "tars.tab.cpp" break; - case 113: /* keyword: TARS_STRUCT */ -#line 1029 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 113: +#line 1029 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2600 "tars.tab.cpp" +#line 2775 "tars.tab.cpp" break; - case 114: /* keyword: TARS_VOID */ -#line 1032 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 114: +#line 1032 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2607 "tars.tab.cpp" +#line 2782 "tars.tab.cpp" break; - case 115: /* keyword: TARS_BOOL */ -#line 1035 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 115: +#line 1035 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2614 "tars.tab.cpp" +#line 2789 "tars.tab.cpp" break; - case 116: /* keyword: TARS_BYTE */ -#line 1038 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 116: +#line 1038 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2621 "tars.tab.cpp" +#line 2796 "tars.tab.cpp" break; - case 117: /* keyword: TARS_SHORT */ -#line 1041 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 117: +#line 1041 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2628 "tars.tab.cpp" +#line 2803 "tars.tab.cpp" break; - case 118: /* keyword: TARS_INT */ -#line 1044 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 118: +#line 1044 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2635 "tars.tab.cpp" +#line 2810 "tars.tab.cpp" break; - case 119: /* keyword: TARS_FLOAT */ -#line 1047 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 119: +#line 1047 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2642 "tars.tab.cpp" +#line 2817 "tars.tab.cpp" break; - case 120: /* keyword: TARS_DOUBLE */ -#line 1050 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 120: +#line 1050 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2649 "tars.tab.cpp" +#line 2824 "tars.tab.cpp" break; - case 121: /* keyword: TARS_STRING */ -#line 1053 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 121: +#line 1053 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2656 "tars.tab.cpp" +#line 2831 "tars.tab.cpp" break; - case 122: /* keyword: TARS_VECTOR */ -#line 1056 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 122: +#line 1056 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2663 "tars.tab.cpp" +#line 2838 "tars.tab.cpp" break; - case 123: /* keyword: TARS_KEY */ -#line 1059 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 123: +#line 1059 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2670 "tars.tab.cpp" +#line 2845 "tars.tab.cpp" break; - case 124: /* keyword: TARS_MAP */ -#line 1062 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 124: +#line 1062 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2677 "tars.tab.cpp" +#line 2852 "tars.tab.cpp" break; - case 125: /* keyword: TARS_NAMESPACE */ -#line 1065 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 125: +#line 1065 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2684 "tars.tab.cpp" +#line 2859 "tars.tab.cpp" break; - case 126: /* keyword: TARS_INTERFACE */ -#line 1068 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 126: +#line 1068 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2691 "tars.tab.cpp" +#line 2866 "tars.tab.cpp" break; - case 127: /* keyword: TARS_OUT */ -#line 1071 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 127: +#line 1071 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2698 "tars.tab.cpp" +#line 2873 "tars.tab.cpp" break; - case 128: /* keyword: TARS_REQUIRE */ -#line 1074 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 128: +#line 1074 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2705 "tars.tab.cpp" +#line 2880 "tars.tab.cpp" break; - case 129: /* keyword: TARS_OPTIONAL */ -#line 1077 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 129: +#line 1077 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2712 "tars.tab.cpp" +#line 2887 "tars.tab.cpp" break; - case 130: /* keyword: TARS_CONST_INTEGER */ -#line 1080 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 130: +#line 1080 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2719 "tars.tab.cpp" +#line 2894 "tars.tab.cpp" break; - case 131: /* keyword: TARS_CONST_FLOAT */ -#line 1083 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 131: +#line 1083 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2726 "tars.tab.cpp" +#line 2901 "tars.tab.cpp" break; - case 132: /* keyword: TARS_FALSE */ -#line 1086 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 132: +#line 1086 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2733 "tars.tab.cpp" +#line 2908 "tars.tab.cpp" break; - case 133: /* keyword: TARS_TRUE */ -#line 1089 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 133: +#line 1089 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2740 "tars.tab.cpp" +#line 2915 "tars.tab.cpp" break; - case 134: /* keyword: TARS_STRING_LITERAL */ -#line 1092 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 134: +#line 1092 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2747 "tars.tab.cpp" +#line 2922 "tars.tab.cpp" break; - case 135: /* keyword: TARS_CONST */ -#line 1095 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 135: +#line 1095 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2754 "tars.tab.cpp" +#line 2929 "tars.tab.cpp" break; - case 136: /* keyword: TARS_ENUM */ -#line 1098 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 136: +#line 1098 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2761 "tars.tab.cpp" +#line 2936 "tars.tab.cpp" break; - case 137: /* keyword: TARS_UNSIGNED */ -#line 1101 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 137: +#line 1101 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2768 "tars.tab.cpp" +#line 2943 "tars.tab.cpp" break; -#line 2772 "tars.tab.cpp" +#line 2947 "tars.tab.cpp" default: break; } @@ -2783,10 +2958,11 @@ yyparse (void) 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 ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -2810,14 +2986,50 @@ yyparse (void) yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, 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 } + + if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2866,14 +3078,13 @@ yyparse (void) yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ - /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) @@ -2887,7 +3098,7 @@ yyparse (void) yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2899,7 +3110,7 @@ yyparse (void) /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2921,20 +3132,20 @@ yyparse (void) goto yyreturn; -#if !defined yyoverflow +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; + /* Fall through. */ #endif -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2951,18 +3162,20 @@ yyparse (void) while (yyssp != yyss) { yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); + yystos[+*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif return yyresult; } - -#line 1105 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" +#line 1105 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" diff --git a/tools/tarsparse/tars.lex.cpp b/tools/tarsparse/tars.lex.cpp index e7cd6524..08a169e3 100644 --- a/tools/tarsparse/tars.lex.cpp +++ b/tools/tarsparse/tars.lex.cpp @@ -1,6 +1,6 @@ -#line 1 "tars.lex.cpp" +#line 2 "tars.lex.cpp" -#line 3 "tars.lex.cpp" +#line 4 "tars.lex.cpp" #define YY_INT_ALIGNED short int @@ -47,7 +47,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -156,7 +155,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef size_t yy_size_t; #endif -extern yy_size_t yyleng; +extern int yyleng; extern FILE *yyin, *yyout; @@ -173,7 +172,7 @@ extern FILE *yyin, *yyout; */ #define YY_LESS_LINENO(n) \ do { \ - yy_size_t yyl;\ + int yyl;\ for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ @@ -218,7 +217,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -287,8 +286,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; @@ -315,7 +314,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); void *yyalloc ( yy_size_t ); void *yyrealloc ( void *, yy_size_t ); @@ -368,7 +367,7 @@ static void yynoreturn yy_fatal_error ( const char* msg ); */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -511,7 +510,7 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 1 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" /** * Tencent is pleased to support the open source community by making Tars available. * @@ -527,7 +526,7 @@ char *yytext; * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -#line 20 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 20 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" #include #include #include @@ -598,7 +597,7 @@ FILE *yyget_out ( void ); void yyset_out ( FILE * _out_str ); - yy_size_t yyget_leng ( void ); + int yyget_leng ( void ); char *yyget_text ( void ); @@ -667,7 +666,7 @@ static int input ( void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -776,7 +775,7 @@ YY_DECL } { -#line 67 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 67 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" #line 782 "tars.lex.cpp" @@ -827,7 +826,7 @@ YY_DECL if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - yy_size_t yyl; + int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) @@ -848,12 +847,12 @@ YY_DECL case 1: YY_RULE_SETUP -#line 69 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 69 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { BEGIN(INCL); } YY_BREAK case 2: YY_RULE_SETUP -#line 71 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 71 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { if ( include_file_stack_ptr >= MAX_INCLUDE_DEPTH ) { @@ -886,7 +885,7 @@ YY_RULE_SETUP YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INCL): -#line 101 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 101 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { --include_file_stack_ptr; if ( include_file_stack_ptr < 0 ) @@ -905,14 +904,14 @@ case YY_STATE_EOF(INCL): YY_BREAK case 3: YY_RULE_SETUP -#line 117 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 117 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { return TARS_SCOPE_DELIMITER; } YY_BREAK case 4: YY_RULE_SETUP -#line 121 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 121 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { // C++ comment bool e = false; @@ -933,7 +932,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 139 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 139 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { // C comment bool e = false; @@ -984,7 +983,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 187 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { StringGrammarPtr ident = new StringGrammar; ident->v = yytext; @@ -995,7 +994,7 @@ YY_RULE_SETUP case 7: /* rule 7 can match eol */ YY_RULE_SETUP -#line 194 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 194 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { StringGrammarPtr ident = new StringGrammar; ident->v = yytext; @@ -1008,7 +1007,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 204 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 204 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { StringGrammarPtr str = new StringGrammar; bool e = false; @@ -1123,7 +1122,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 316 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 316 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { errno = 0; IntergerGrammarPtr ptr = new IntergerGrammar; @@ -1148,7 +1147,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 338 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 338 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { errno = 0; FloatGrammarPtr ptr = new FloatGrammar; @@ -1183,7 +1182,7 @@ YY_RULE_SETUP case 11: /* rule 11 can match eol */ YY_RULE_SETUP -#line 369 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 369 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { if(yytext[0] == '\n') { @@ -1193,7 +1192,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 376 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 376 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" { if(yytext[0] < 32 || yytext[0] > 126) { @@ -1212,7 +1211,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 392 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 392 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" ECHO; YY_BREAK #line 1218 "tars.lex.cpp" @@ -1400,7 +1399,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1414,7 +1413,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1472,7 +1471,7 @@ static int yy_get_next_buffer (void) if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1561,7 +1560,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - yy_size_t number_to_move = (yy_n_chars) + 2; + int number_to_move = (yy_n_chars) + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; char *source = @@ -1616,7 +1615,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1990,12 +1989,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2037,7 +2036,7 @@ static void yynoreturn yy_fatal_error (const char* msg ) do \ { \ /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ + int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ @@ -2077,7 +2076,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -yy_size_t yyget_leng (void) +int yyget_leng (void) { return yyleng; } @@ -2230,7 +2229,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 392 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.l" +#line 392 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.l" diff --git a/tools/tarsparse/tars.tab.cpp b/tools/tarsparse/tars.tab.cpp index 4647924b..30a4b213 100644 --- a/tools/tarsparse/tars.tab.cpp +++ b/tools/tarsparse/tars.tab.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -34,10 +34,6 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -45,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + +/* Identify Bison output. */ +#define YYBISON 1 -/* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +/* Bison version. */ +#define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -67,7 +66,7 @@ /* First part of user prologue. */ -#line 17 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" +#line 17 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" #include #include @@ -81,7 +80,7 @@ using namespace std; #define YYDEBUG 1 #define YYINITDEPTH 10000 -#line 85 "tars.tab.cpp" +#line 84 "tars.tab.cpp" # ifndef YY_CAST # ifdef __cplusplus @@ -104,102 +103,78 @@ using namespace std; # endif # endif -#include "tars.tab.hpp" -/* Symbol kind. */ -enum yysymbol_kind_t -{ - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_TARS_VOID = 3, /* TARS_VOID */ - YYSYMBOL_TARS_STRUCT = 4, /* TARS_STRUCT */ - YYSYMBOL_TARS_BOOL = 5, /* TARS_BOOL */ - YYSYMBOL_TARS_BYTE = 6, /* TARS_BYTE */ - YYSYMBOL_TARS_SHORT = 7, /* TARS_SHORT */ - YYSYMBOL_TARS_INT = 8, /* TARS_INT */ - YYSYMBOL_TARS_DOUBLE = 9, /* TARS_DOUBLE */ - YYSYMBOL_TARS_FLOAT = 10, /* TARS_FLOAT */ - YYSYMBOL_TARS_LONG = 11, /* TARS_LONG */ - YYSYMBOL_TARS_STRING = 12, /* TARS_STRING */ - YYSYMBOL_TARS_VECTOR = 13, /* TARS_VECTOR */ - YYSYMBOL_TARS_MAP = 14, /* TARS_MAP */ - YYSYMBOL_TARS_NAMESPACE = 15, /* TARS_NAMESPACE */ - YYSYMBOL_TARS_INTERFACE = 16, /* TARS_INTERFACE */ - YYSYMBOL_TARS_IDENTIFIER = 17, /* TARS_IDENTIFIER */ - YYSYMBOL_TARS_OUT = 18, /* TARS_OUT */ - YYSYMBOL_TARS_OP = 19, /* TARS_OP */ - YYSYMBOL_TARS_KEY = 20, /* TARS_KEY */ - YYSYMBOL_TARS_ROUTE_KEY = 21, /* TARS_ROUTE_KEY */ - YYSYMBOL_TARS_REQUIRE = 22, /* TARS_REQUIRE */ - YYSYMBOL_TARS_OPTIONAL = 23, /* TARS_OPTIONAL */ - YYSYMBOL_TARS_CONST_INTEGER = 24, /* TARS_CONST_INTEGER */ - YYSYMBOL_TARS_CONST_FLOAT = 25, /* TARS_CONST_FLOAT */ - YYSYMBOL_TARS_FALSE = 26, /* TARS_FALSE */ - YYSYMBOL_TARS_TRUE = 27, /* TARS_TRUE */ - YYSYMBOL_TARS_STRING_LITERAL = 28, /* TARS_STRING_LITERAL */ - YYSYMBOL_TARS_SCOPE_DELIMITER = 29, /* TARS_SCOPE_DELIMITER */ - YYSYMBOL_TARS_CONST = 30, /* TARS_CONST */ - YYSYMBOL_TARS_ENUM = 31, /* TARS_ENUM */ - YYSYMBOL_TARS_UNSIGNED = 32, /* TARS_UNSIGNED */ - YYSYMBOL_BAD_CHAR = 33, /* BAD_CHAR */ - YYSYMBOL_34_ = 34, /* ';' */ - YYSYMBOL_35_ = 35, /* '{' */ - YYSYMBOL_36_ = 36, /* '}' */ - YYSYMBOL_37_ = 37, /* ',' */ - YYSYMBOL_38_ = 38, /* '=' */ - YYSYMBOL_39_ = 39, /* '[' */ - YYSYMBOL_40_ = 40, /* ']' */ - YYSYMBOL_41_ = 41, /* ')' */ - YYSYMBOL_42_ = 42, /* '*' */ - YYSYMBOL_43_ = 43, /* ':' */ - YYSYMBOL_44_ = 44, /* '<' */ - YYSYMBOL_45_ = 45, /* '>' */ - YYSYMBOL_YYACCEPT = 46, /* $accept */ - YYSYMBOL_start = 47, /* start */ - YYSYMBOL_definitions = 48, /* definitions */ - YYSYMBOL_49_1 = 49, /* $@1 */ - YYSYMBOL_50_2 = 50, /* $@2 */ - YYSYMBOL_definition = 51, /* definition */ - YYSYMBOL_enum_def = 52, /* enum_def */ - YYSYMBOL_53_3 = 53, /* @3 */ - YYSYMBOL_enum_id = 54, /* enum_id */ - YYSYMBOL_enumerator_list = 55, /* enumerator_list */ - YYSYMBOL_enumerator = 56, /* enumerator */ - YYSYMBOL_namespace_def = 57, /* namespace_def */ - YYSYMBOL_58_4 = 58, /* @4 */ - YYSYMBOL_key_def = 59, /* key_def */ - YYSYMBOL_60_5 = 60, /* $@5 */ - YYSYMBOL_key_members = 61, /* key_members */ - YYSYMBOL_interface_def = 62, /* interface_def */ - YYSYMBOL_63_6 = 63, /* @6 */ - YYSYMBOL_interface_id = 64, /* interface_id */ - YYSYMBOL_interface_exports = 65, /* interface_exports */ - YYSYMBOL_interface_export = 66, /* interface_export */ - YYSYMBOL_operation = 67, /* operation */ - YYSYMBOL_operation_preamble = 68, /* operation_preamble */ - YYSYMBOL_return_type = 69, /* return_type */ - YYSYMBOL_parameters = 70, /* parameters */ - YYSYMBOL_routekey_qualifier = 71, /* routekey_qualifier */ - YYSYMBOL_out_qualifier = 72, /* out_qualifier */ - YYSYMBOL_struct_def = 73, /* struct_def */ - YYSYMBOL_74_7 = 74, /* @7 */ - YYSYMBOL_struct_id = 75, /* struct_id */ - YYSYMBOL_struct_exports = 76, /* struct_exports */ - YYSYMBOL_data_member = 77, /* data_member */ - YYSYMBOL_struct_type_id = 78, /* struct_type_id */ - YYSYMBOL_const_initializer = 79, /* const_initializer */ - YYSYMBOL_const_def = 80, /* const_def */ - YYSYMBOL_type_id = 81, /* type_id */ - YYSYMBOL_type = 82, /* type */ - YYSYMBOL_type_no = 83, /* type_no */ - YYSYMBOL_vector = 84, /* vector */ - YYSYMBOL_map = 85, /* map */ - YYSYMBOL_scoped_name = 86, /* scoped_name */ - YYSYMBOL_keyword = 87 /* keyword */ -}; -typedef enum yysymbol_kind_t yysymbol_kind_t; +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Use api.header.include to #include this header + instead of duplicating it here. */ +#ifndef YY_YY_TARS_TAB_HPP_INCLUDED +# define YY_YY_TARS_TAB_HPP_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + TARS_VOID = 258, + TARS_STRUCT = 259, + TARS_BOOL = 260, + TARS_BYTE = 261, + TARS_SHORT = 262, + TARS_INT = 263, + TARS_DOUBLE = 264, + TARS_FLOAT = 265, + TARS_LONG = 266, + TARS_STRING = 267, + TARS_VECTOR = 268, + TARS_MAP = 269, + TARS_NAMESPACE = 270, + TARS_INTERFACE = 271, + TARS_IDENTIFIER = 272, + TARS_OUT = 273, + TARS_OP = 274, + TARS_KEY = 275, + TARS_ROUTE_KEY = 276, + TARS_REQUIRE = 277, + TARS_OPTIONAL = 278, + TARS_CONST_INTEGER = 279, + TARS_CONST_FLOAT = 280, + TARS_FALSE = 281, + TARS_TRUE = 282, + TARS_STRING_LITERAL = 283, + TARS_SCOPE_DELIMITER = 284, + TARS_CONST = 285, + TARS_ENUM = 286, + TARS_UNSIGNED = 287, + BAD_CHAR = 288 + }; +#endif + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; +int yyparse (void); + +#endif /* !YY_YY_TARS_TAB_HPP_INCLUDED */ @@ -240,18 +215,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -311,7 +274,6 @@ typedef int yytype_uint16; #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -330,7 +292,6 @@ typedef int yy_state_fast_t; # endif #endif - #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -349,9 +310,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -388,7 +349,7 @@ typedef int yy_state_fast_t; #define YY_ASSERT(E) ((void) (0 && (E))) -#if !defined yyoverflow +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -453,7 +414,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* !defined yyoverflow */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -529,16 +491,14 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 199 -/* YYMAXUTOK -- Last valid token kind. */ +#define YYUNDEFTOK 2 #define YYMAXUTOK 288 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -596,45 +556,32 @@ static const yytype_int16 yyrline[] = }; #endif -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if YYDEBUG || 0 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - +#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[] = { - "\"end of file\"", "error", "\"invalid token\"", "TARS_VOID", - "TARS_STRUCT", "TARS_BOOL", "TARS_BYTE", "TARS_SHORT", "TARS_INT", - "TARS_DOUBLE", "TARS_FLOAT", "TARS_LONG", "TARS_STRING", "TARS_VECTOR", - "TARS_MAP", "TARS_NAMESPACE", "TARS_INTERFACE", "TARS_IDENTIFIER", - "TARS_OUT", "TARS_OP", "TARS_KEY", "TARS_ROUTE_KEY", "TARS_REQUIRE", - "TARS_OPTIONAL", "TARS_CONST_INTEGER", "TARS_CONST_FLOAT", "TARS_FALSE", - "TARS_TRUE", "TARS_STRING_LITERAL", "TARS_SCOPE_DELIMITER", "TARS_CONST", - "TARS_ENUM", "TARS_UNSIGNED", "BAD_CHAR", "';'", "'{'", "'}'", "','", - "'='", "'['", "']'", "')'", "'*'", "':'", "'<'", "'>'", "$accept", - "start", "definitions", "$@1", "$@2", "definition", "enum_def", "@3", - "enum_id", "enumerator_list", "enumerator", "namespace_def", "@4", - "key_def", "$@5", "key_members", "interface_def", "@6", "interface_id", - "interface_exports", "interface_export", "operation", - "operation_preamble", "return_type", "parameters", "routekey_qualifier", - "out_qualifier", "struct_def", "@7", "struct_id", "struct_exports", - "data_member", "struct_type_id", "const_initializer", "const_def", - "type_id", "type", "type_no", "vector", "map", "scoped_name", "keyword", YY_NULLPTR + "$end", "error", "$undefined", "TARS_VOID", "TARS_STRUCT", "TARS_BOOL", + "TARS_BYTE", "TARS_SHORT", "TARS_INT", "TARS_DOUBLE", "TARS_FLOAT", + "TARS_LONG", "TARS_STRING", "TARS_VECTOR", "TARS_MAP", "TARS_NAMESPACE", + "TARS_INTERFACE", "TARS_IDENTIFIER", "TARS_OUT", "TARS_OP", "TARS_KEY", + "TARS_ROUTE_KEY", "TARS_REQUIRE", "TARS_OPTIONAL", "TARS_CONST_INTEGER", + "TARS_CONST_FLOAT", "TARS_FALSE", "TARS_TRUE", "TARS_STRING_LITERAL", + "TARS_SCOPE_DELIMITER", "TARS_CONST", "TARS_ENUM", "TARS_UNSIGNED", + "BAD_CHAR", "';'", "'{'", "'}'", "','", "'='", "'['", "']'", "')'", + "'*'", "':'", "'<'", "'>'", "$accept", "start", "definitions", "$@1", + "$@2", "definition", "enum_def", "@3", "enum_id", "enumerator_list", + "enumerator", "namespace_def", "@4", "key_def", "$@5", "key_members", + "interface_def", "@6", "interface_id", "interface_exports", + "interface_export", "operation", "operation_preamble", "return_type", + "parameters", "routekey_qualifier", "out_qualifier", "struct_def", "@7", + "struct_id", "struct_exports", "data_member", "struct_type_id", + "const_initializer", "const_def", "type_id", "type", "type_no", "vector", + "map", "scoped_name", "keyword", YY_NULLPTR }; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} #endif -#ifdef YYPRINT +# ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -645,7 +592,7 @@ static const yytype_int16 yytoknum[] = 285, 286, 287, 288, 59, 123, 125, 44, 61, 91, 93, 41, 42, 58, 60, 62 }; -#endif +# endif #define YYPACT_NINF (-146) @@ -721,9 +668,9 @@ static const yytype_int16 yypgoto[] = }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = +static const yytype_int16 yydefgoto[] = { - 0, 8, 9, 76, 80, 10, 11, 77, 12, 123, + -1, 8, 9, 76, 80, 10, 11, 77, 12, 123, 124, 13, 81, 14, 142, 171, 15, 78, 16, 128, 129, 130, 131, 132, 157, 158, 159, 17, 79, 18, 137, 138, 139, 113, 19, 140, 68, 69, 70, 71, @@ -920,10 +867,10 @@ static const yytype_int8 yyr2[] = }; -enum { YYENOMEM = -2 }; - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -949,9 +896,10 @@ enum { YYENOMEM = -2 }; } \ while (0) -/* Backward compatibility with an undocumented macro. - Use YYerror or YYUNDEF. */ -#define YYERRCODE YYUNDEF +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + /* Enable debugging if requested. */ @@ -969,18 +917,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Kind, Value); \ + Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -991,19 +939,18 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YY_USE (yyoutput); + YYUSE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); + if (yytype < YYNTOKENS) + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1013,13 +960,12 @@ yy_symbol_value_print (FILE *yyo, `---------------------------*/ static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyo, yykind, yyvaluep); + yy_symbol_value_print (yyo, yytype, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -1052,8 +998,7 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, - int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -1065,8 +1010,9 @@ yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)]); + yystos[+yyssp[yyi + 1 - yynrhs]], + &yyvsp[(yyi + 1) - (yynrhs)] + ); YYFPRINTF (stderr, "\n"); } } @@ -1081,8 +1027,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1105,30 +1051,259 @@ int yydebug; #endif +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# 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. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# 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 YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYPTRDIFF_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; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else + return yystrlen (yystr); +} +# endif +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + yy_state_t *yyssp, int yytoken) +{ + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Actual size of YYARG. */ + int yycount = 0; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* There are many possibilities here to consider: + - 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]; + YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + yysize = yysize0; + 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]; + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + } + } + } + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + default: /* Avoid compiler warnings. */ + 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_ + } + + { + /* Don't count the "%s"s in the final size, but reserve room for + the terminator. */ + YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + + 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. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { - YY_USE (yyvaluep); + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Lookahead token kind. */ + + +/* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -1137,8 +1312,6 @@ YYSTYPE yylval; int yynerrs; - - /*----------. | yyparse. | `----------*/ @@ -1146,36 +1319,43 @@ int yynerrs; int yyparse (void) { - yy_state_fast_t yystate = 0; + yy_state_fast_t yystate; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + int yyerrstatus; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ + /* The state stack. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + yy_state_t *yyss; + yy_state_t *yyssp; - /* The semantic value stack: array, bottom, top. */ + /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYPTRDIFF_T yystacksize; int yyn; - /* The return value of yyparse. */ int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; - +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; +#endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1183,8 +1363,15 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1207,7 +1394,6 @@ yyparse (void) YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1253,7 +1439,7 @@ yyparse (void) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1292,29 +1478,18 @@ yyparse (void) /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token\n")); + YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = YYEOF; - yytoken = YYSYMBOL_YYEOF; + yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } - else if (yychar == YYerror) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = YYUNDEF; - yytoken = YYSYMBOL_YYerror; - goto yyerrlab1; - } else { yytoken = YYTRANSLATE (yychar); @@ -1383,93 +1558,93 @@ yyparse (void) YY_REDUCE_PRINT (yyn); switch (yyn) { - case 3: /* $@1: %empty */ -#line 75 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 3: +#line 75 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1391 "tars.tab.cpp" +#line 1566 "tars.tab.cpp" break; - case 5: /* $@2: %empty */ -#line 79 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 5: +#line 79 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyerrok; } -#line 1399 "tars.tab.cpp" +#line 1574 "tars.tab.cpp" break; - case 7: /* definitions: definition */ -#line 84 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 7: +#line 84 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("`;' missing after definition"); } -#line 1407 "tars.tab.cpp" +#line 1582 "tars.tab.cpp" break; - case 8: /* definitions: %empty */ -#line 88 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 8: +#line 88 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1414 "tars.tab.cpp" +#line 1589 "tars.tab.cpp" break; - case 9: /* definition: namespace_def */ -#line 96 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 9: +#line 96 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || NamespacePtr::dynamicCast(yyvsp[0])); } -#line 1422 "tars.tab.cpp" +#line 1597 "tars.tab.cpp" break; - case 10: /* definition: interface_def */ -#line 100 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 10: +#line 100 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || InterfacePtr::dynamicCast(yyvsp[0])); } -#line 1430 "tars.tab.cpp" +#line 1605 "tars.tab.cpp" break; - case 11: /* definition: struct_def */ -#line 104 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 11: +#line 104 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || StructPtr::dynamicCast(yyvsp[0])); } -#line 1438 "tars.tab.cpp" +#line 1613 "tars.tab.cpp" break; - case 12: /* definition: key_def */ -#line 108 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 12: +#line 108 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1445 "tars.tab.cpp" +#line 1620 "tars.tab.cpp" break; - case 13: /* definition: enum_def */ -#line 111 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 13: +#line 111 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || EnumPtr::dynamicCast(yyvsp[0])); } -#line 1453 "tars.tab.cpp" +#line 1628 "tars.tab.cpp" break; - case 14: /* definition: const_def */ -#line 115 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 14: +#line 115 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { assert(yyvsp[0] == 0 || ConstPtr::dynamicCast(yyvsp[0])); } -#line 1461 "tars.tab.cpp" +#line 1636 "tars.tab.cpp" break; - case 15: /* @3: %empty */ -#line 124 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 15: +#line 124 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1469 "tars.tab.cpp" +#line 1644 "tars.tab.cpp" break; - case 16: /* enum_def: enum_id @3 '{' enumerator_list '}' */ -#line 128 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 16: +#line 128 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-2]) { @@ -1483,11 +1658,11 @@ yyparse (void) yyval = yyvsp[-3]; } -#line 1487 "tars.tab.cpp" +#line 1662 "tars.tab.cpp" break; - case 17: /* enum_id: TARS_ENUM TARS_IDENTIFIER */ -#line 147 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 17: +#line 147 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { NamespacePtr c = NamespacePtr::dynamicCast(g_parse->currentContainer()); if(!c) @@ -1500,36 +1675,36 @@ yyparse (void) yyval = e; } -#line 1504 "tars.tab.cpp" +#line 1679 "tars.tab.cpp" break; - case 18: /* enum_id: TARS_ENUM keyword */ -#line 160 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 18: +#line 160 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as enumeration name"); yyval = yyvsp[0]; } -#line 1514 "tars.tab.cpp" +#line 1689 "tars.tab.cpp" break; - case 19: /* enumerator_list: enumerator ',' enumerator_list */ -#line 171 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 19: +#line 171 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[-1]; } -#line 1522 "tars.tab.cpp" +#line 1697 "tars.tab.cpp" break; - case 20: /* enumerator_list: enumerator */ -#line 175 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 20: +#line 175 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1529 "tars.tab.cpp" +#line 1704 "tars.tab.cpp" break; - case 21: /* enumerator: TARS_IDENTIFIER */ -#line 183 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 21: +#line 183 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(g_parse->createBuiltin(Builtin::KindLong)); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1540,20 +1715,20 @@ yyparse (void) e->addMember(tPtr); yyval = e; } -#line 1544 "tars.tab.cpp" +#line 1719 "tars.tab.cpp" break; - case 22: /* enumerator: keyword */ -#line 194 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 22: +#line 194 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as enumerator"); } -#line 1553 "tars.tab.cpp" +#line 1728 "tars.tab.cpp" break; - case 23: /* enumerator: TARS_IDENTIFIER '=' const_initializer */ -#line 199 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 23: +#line 199 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(g_parse->createBuiltin(Builtin::KindLong)); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -1566,18 +1741,18 @@ yyparse (void) e->addMember(tPtr); yyval = e; } -#line 1570 "tars.tab.cpp" +#line 1745 "tars.tab.cpp" break; - case 24: /* enumerator: %empty */ -#line 212 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 24: +#line 212 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1577 "tars.tab.cpp" +#line 1752 "tars.tab.cpp" break; - case 25: /* @4: %empty */ -#line 220 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 25: +#line 220 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ContainerPtr c = g_parse->currentContainer(); @@ -1592,11 +1767,11 @@ yyparse (void) yyval = 0; } } -#line 1596 "tars.tab.cpp" +#line 1771 "tars.tab.cpp" break; - case 26: /* namespace_def: TARS_NAMESPACE TARS_IDENTIFIER @4 '{' definitions '}' */ -#line 235 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 26: +#line 235 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1608,11 +1783,11 @@ yyparse (void) yyval = 0; } } -#line 1612 "tars.tab.cpp" +#line 1787 "tars.tab.cpp" break; - case 27: /* $@5: %empty */ -#line 253 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 27: +#line 253 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-1]); StructPtr sp = StructPtr::dynamicCast(g_parse->findUserType(ident->v)); @@ -1623,18 +1798,18 @@ yyparse (void) g_parse->setKeyStruct(sp); } -#line 1627 "tars.tab.cpp" +#line 1802 "tars.tab.cpp" break; - case 28: /* key_def: TARS_KEY '[' scoped_name ',' $@5 key_members ']' */ -#line 264 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 28: +#line 264 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1634 "tars.tab.cpp" +#line 1809 "tars.tab.cpp" break; - case 29: /* key_members: TARS_IDENTIFIER */ -#line 272 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 29: +#line 272 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); StructPtr np = g_parse->getKeyStruct(); @@ -1647,11 +1822,11 @@ yyparse (void) yyval = 0; } } -#line 1651 "tars.tab.cpp" +#line 1826 "tars.tab.cpp" break; - case 30: /* key_members: key_members ',' TARS_IDENTIFIER */ -#line 285 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 30: +#line 285 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); StructPtr np = g_parse->getKeyStruct(); @@ -1664,11 +1839,11 @@ yyparse (void) yyval = 0; } } -#line 1668 "tars.tab.cpp" +#line 1843 "tars.tab.cpp" break; - case 31: /* @6: %empty */ -#line 304 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 31: +#line 304 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1685,11 +1860,11 @@ yyparse (void) yyval = 0; } } -#line 1689 "tars.tab.cpp" +#line 1864 "tars.tab.cpp" break; - case 32: /* interface_def: interface_id @6 '{' interface_exports '}' */ -#line 321 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 32: +#line 321 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1701,58 +1876,58 @@ yyparse (void) yyval = 0; } } -#line 1705 "tars.tab.cpp" +#line 1880 "tars.tab.cpp" break; - case 33: /* interface_id: TARS_INTERFACE TARS_IDENTIFIER */ -#line 338 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 33: +#line 338 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1713 "tars.tab.cpp" +#line 1888 "tars.tab.cpp" break; - case 34: /* interface_id: TARS_INTERFACE keyword */ -#line 342 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 34: +#line 342 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as interface name"); yyval = yyvsp[0]; } -#line 1723 "tars.tab.cpp" +#line 1898 "tars.tab.cpp" break; - case 35: /* interface_exports: interface_export ';' interface_exports */ -#line 353 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 35: +#line 353 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1730 "tars.tab.cpp" +#line 1905 "tars.tab.cpp" break; - case 36: /* interface_exports: error ';' interface_exports */ -#line 356 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 36: +#line 356 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1737 "tars.tab.cpp" +#line 1912 "tars.tab.cpp" break; - case 37: /* interface_exports: interface_export */ -#line 359 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 37: +#line 359 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("`;' missing after definition"); } -#line 1745 "tars.tab.cpp" +#line 1920 "tars.tab.cpp" break; - case 38: /* interface_exports: %empty */ -#line 363 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 38: +#line 363 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1752 "tars.tab.cpp" +#line 1927 "tars.tab.cpp" break; - case 40: /* operation: operation_preamble parameters ')' */ -#line 377 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 40: +#line 377 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-2]) { @@ -1764,11 +1939,11 @@ yyparse (void) yyval = 0; } } -#line 1768 "tars.tab.cpp" +#line 1943 "tars.tab.cpp" break; - case 41: /* operation_preamble: return_type TARS_OP */ -#line 394 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 41: +#line 394 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -1792,26 +1967,26 @@ yyparse (void) yyval = 0; } } -#line 1796 "tars.tab.cpp" +#line 1971 "tars.tab.cpp" break; - case 43: /* return_type: TARS_VOID */ -#line 424 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 43: +#line 424 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = 0; } -#line 1804 "tars.tab.cpp" +#line 1979 "tars.tab.cpp" break; - case 44: /* parameters: %empty */ -#line 434 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 44: +#line 434 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 1811 "tars.tab.cpp" +#line 1986 "tars.tab.cpp" break; - case 45: /* parameters: type_id */ -#line 437 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 45: +#line 437 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1822,11 +1997,11 @@ yyparse (void) op->createParamDecl(tsp, false, false); } } -#line 1826 "tars.tab.cpp" +#line 2001 "tars.tab.cpp" break; - case 46: /* parameters: parameters ',' type_id */ -#line 448 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 46: +#line 448 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1837,11 +2012,11 @@ yyparse (void) op->createParamDecl(tsp, false, false); } } -#line 1841 "tars.tab.cpp" +#line 2016 "tars.tab.cpp" break; - case 47: /* parameters: out_qualifier type_id */ -#line 459 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 47: +#line 459 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isOutParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1853,11 +2028,11 @@ yyparse (void) op->createParamDecl(tsp, isOutParam->v, false); } } -#line 1857 "tars.tab.cpp" +#line 2032 "tars.tab.cpp" break; - case 48: /* parameters: parameters ',' out_qualifier type_id */ -#line 471 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 48: +#line 471 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isOutParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1869,11 +2044,11 @@ yyparse (void) op->createParamDecl(tsp, isOutParam->v, false); } } -#line 1873 "tars.tab.cpp" +#line 2048 "tars.tab.cpp" break; - case 49: /* parameters: routekey_qualifier type_id */ -#line 483 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 49: +#line 483 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isRouteKeyParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1885,11 +2060,11 @@ yyparse (void) op->createParamDecl(tsp, false, isRouteKeyParam->v); } } -#line 1889 "tars.tab.cpp" +#line 2064 "tars.tab.cpp" break; - case 50: /* parameters: parameters ',' routekey_qualifier type_id */ -#line 495 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 50: +#line 495 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr isRouteKeyParam = BoolGrammarPtr::dynamicCast(yyvsp[-1]); TypeIdPtr tsp = TypeIdPtr::dynamicCast(yyvsp[0]); @@ -1901,47 +2076,47 @@ yyparse (void) op->createParamDecl(tsp, false, isRouteKeyParam->v); } } -#line 1905 "tars.tab.cpp" +#line 2080 "tars.tab.cpp" break; - case 51: /* parameters: out_qualifier */ -#line 507 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 51: +#line 507 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("'out' must be defined with a type"); } -#line 1913 "tars.tab.cpp" +#line 2088 "tars.tab.cpp" break; - case 52: /* parameters: routekey_qualifier */ -#line 511 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 52: +#line 511 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("'routekey' must be defined with a type"); } -#line 1921 "tars.tab.cpp" +#line 2096 "tars.tab.cpp" break; - case 53: /* routekey_qualifier: TARS_ROUTE_KEY */ -#line 520 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 53: +#line 520 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr routekey = new BoolGrammar; routekey->v = true; yyval = GrammarBasePtr::dynamicCast(routekey); } -#line 1931 "tars.tab.cpp" +#line 2106 "tars.tab.cpp" break; - case 54: /* out_qualifier: TARS_OUT */ -#line 531 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 54: +#line 531 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { BoolGrammarPtr out = new BoolGrammar; out->v = true; yyval = GrammarBasePtr::dynamicCast(out); } -#line 1941 "tars.tab.cpp" +#line 2116 "tars.tab.cpp" break; - case 55: /* @7: %empty */ -#line 542 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 55: +#line 542 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); NamespacePtr np = NamespacePtr::dynamicCast(g_parse->currentContainer()); @@ -1963,11 +2138,11 @@ yyparse (void) g_parse->error("struct '" + ident->v + "' must definition in namespace"); } } -#line 1967 "tars.tab.cpp" +#line 2142 "tars.tab.cpp" break; - case 56: /* struct_def: struct_id @7 '{' struct_exports '}' */ -#line 564 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 56: +#line 564 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { if(yyvsp[-3]) { @@ -1982,68 +2157,68 @@ yyparse (void) g_parse->error("struct `" + st->getSid() + "' must have at least one member"); } } -#line 1986 "tars.tab.cpp" +#line 2161 "tars.tab.cpp" break; - case 57: /* struct_id: TARS_STRUCT TARS_IDENTIFIER */ -#line 584 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 57: +#line 584 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 1994 "tars.tab.cpp" +#line 2169 "tars.tab.cpp" break; - case 58: /* struct_id: TARS_STRUCT keyword */ -#line 588 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 58: +#line 588 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as struct name"); } -#line 2004 "tars.tab.cpp" +#line 2179 "tars.tab.cpp" break; - case 59: /* struct_id: TARS_STRUCT error */ -#line 594 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 59: +#line 594 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("abstract declarator '' used as declaration"); } -#line 2012 "tars.tab.cpp" +#line 2187 "tars.tab.cpp" break; - case 60: /* struct_exports: data_member ';' struct_exports */ -#line 603 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 60: +#line 603 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2020 "tars.tab.cpp" +#line 2195 "tars.tab.cpp" break; - case 61: /* struct_exports: data_member */ -#line 607 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 61: +#line 607 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("';' missing after definition"); } -#line 2028 "tars.tab.cpp" +#line 2203 "tars.tab.cpp" break; - case 62: /* struct_exports: %empty */ -#line 611 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 62: +#line 611 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2035 "tars.tab.cpp" +#line 2210 "tars.tab.cpp" break; - case 63: /* data_member: struct_type_id */ -#line 621 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 63: +#line 621 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2043 "tars.tab.cpp" +#line 2218 "tars.tab.cpp" break; - case 64: /* struct_type_id: TARS_CONST_INTEGER TARS_REQUIRE type_id */ -#line 630 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 64: +#line 630 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2061,11 +2236,11 @@ yyparse (void) yyval = 0; } } -#line 2065 "tars.tab.cpp" +#line 2240 "tars.tab.cpp" break; - case 65: /* struct_type_id: TARS_CONST_INTEGER TARS_REQUIRE type_id '=' const_initializer */ -#line 648 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 65: +#line 648 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2087,11 +2262,11 @@ yyparse (void) yyval = 0; } } -#line 2091 "tars.tab.cpp" +#line 2266 "tars.tab.cpp" break; - case 66: /* struct_type_id: TARS_CONST_INTEGER TARS_OPTIONAL type_id '=' const_initializer */ -#line 670 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 66: +#line 670 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2113,11 +2288,11 @@ yyparse (void) yyval = 0; } } -#line 2117 "tars.tab.cpp" +#line 2292 "tars.tab.cpp" break; - case 67: /* struct_type_id: TARS_CONST_INTEGER TARS_OPTIONAL type_id */ -#line 692 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 67: +#line 692 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StructPtr np = StructPtr::dynamicCast(g_parse->currentContainer()); if(np) @@ -2134,43 +2309,43 @@ yyparse (void) yyval = 0; } } -#line 2138 "tars.tab.cpp" +#line 2313 "tars.tab.cpp" break; - case 68: /* struct_type_id: TARS_REQUIRE type_id */ -#line 709 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 68: +#line 709 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag'"); } -#line 2146 "tars.tab.cpp" +#line 2321 "tars.tab.cpp" break; - case 69: /* struct_type_id: TARS_OPTIONAL type_id */ -#line 713 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 69: +#line 713 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag'"); } -#line 2154 "tars.tab.cpp" +#line 2329 "tars.tab.cpp" break; - case 70: /* struct_type_id: TARS_CONST_INTEGER type_id */ -#line 717 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 70: +#line 717 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'require' or 'optional'"); } -#line 2162 "tars.tab.cpp" +#line 2337 "tars.tab.cpp" break; - case 71: /* struct_type_id: type_id */ -#line 721 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 71: +#line 721 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("struct member need 'tag' or 'require' or 'optional'"); } -#line 2170 "tars.tab.cpp" +#line 2345 "tars.tab.cpp" break; - case 72: /* const_initializer: TARS_CONST_INTEGER */ -#line 730 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 72: +#line 730 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { IntergerGrammarPtr intVal = IntergerGrammarPtr::dynamicCast(yyvsp[0]); ostringstream sstr; @@ -2180,11 +2355,11 @@ yyparse (void) c->v = sstr.str(); yyval = c; } -#line 2184 "tars.tab.cpp" +#line 2359 "tars.tab.cpp" break; - case 73: /* const_initializer: TARS_CONST_FLOAT */ -#line 740 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 73: +#line 740 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { FloatGrammarPtr floatVal = FloatGrammarPtr::dynamicCast(yyvsp[0]); ostringstream sstr; @@ -2194,11 +2369,11 @@ yyparse (void) c->v = sstr.str(); yyval = c; } -#line 2198 "tars.tab.cpp" +#line 2373 "tars.tab.cpp" break; - case 74: /* const_initializer: TARS_STRING_LITERAL */ -#line 750 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 74: +#line 750 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2206,11 +2381,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2210 "tars.tab.cpp" +#line 2385 "tars.tab.cpp" break; - case 75: /* const_initializer: TARS_FALSE */ -#line 758 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 75: +#line 758 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2218,11 +2393,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2222 "tars.tab.cpp" +#line 2397 "tars.tab.cpp" break; - case 76: /* const_initializer: TARS_TRUE */ -#line 766 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 76: +#line 766 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ConstGrammarPtr c = new ConstGrammar(); @@ -2230,11 +2405,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2234 "tars.tab.cpp" +#line 2409 "tars.tab.cpp" break; - case 77: /* const_initializer: TARS_IDENTIFIER */ -#line 774 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 77: +#line 774 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2247,11 +2422,11 @@ yyparse (void) c->v = ident->v; yyval = c; } -#line 2251 "tars.tab.cpp" +#line 2426 "tars.tab.cpp" break; - case 78: /* const_initializer: scoped_name TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 787 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 78: +#line 787 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr scoped = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -2266,11 +2441,11 @@ yyparse (void) c->v = scoped->v + "::" + ident->v; yyval = c; } -#line 2270 "tars.tab.cpp" +#line 2445 "tars.tab.cpp" break; - case 79: /* const_def: TARS_CONST type_id '=' const_initializer */ -#line 807 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 79: +#line 807 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { NamespacePtr np = NamespacePtr::dynamicCast(g_parse->currentContainer()); if(!np) @@ -2283,11 +2458,11 @@ yyparse (void) ConstPtr cPtr = np->createConst(t, c); yyval = cPtr; } -#line 2287 "tars.tab.cpp" +#line 2462 "tars.tab.cpp" break; - case 80: /* type_id: type TARS_IDENTIFIER */ -#line 825 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 80: +#line 825 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-1]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2296,11 +2471,11 @@ yyparse (void) yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2300 "tars.tab.cpp" +#line 2475 "tars.tab.cpp" break; - case 81: /* type_id: type TARS_IDENTIFIER '[' TARS_CONST_INTEGER ']' */ -#line 834 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 81: +#line 834 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = g_parse->createVector(TypePtr::dynamicCast(yyvsp[-4])); IntergerGrammarPtr iPtrSize = IntergerGrammarPtr::dynamicCast(yyvsp[-1]); @@ -2310,11 +2485,11 @@ yyparse (void) TypeIdPtr typeIdPtr = new TypeId(type, ident->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2314 "tars.tab.cpp" +#line 2489 "tars.tab.cpp" break; - case 82: /* type_id: type '*' TARS_IDENTIFIER */ -#line 844 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 82: +#line 844 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = g_parse->createVector(TypePtr::dynamicCast(yyvsp[-2])); //IntergerGrammarPtr iPtrSize = IntergerGrammarPtr::dynamicCast($4); @@ -2324,11 +2499,11 @@ yyparse (void) TypeIdPtr typeIdPtr = new TypeId(type, ident->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2328 "tars.tab.cpp" +#line 2503 "tars.tab.cpp" break; - case 83: /* type_id: type TARS_IDENTIFIER ':' TARS_CONST_INTEGER */ -#line 854 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 83: +#line 854 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-3]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[-2]); @@ -2337,36 +2512,36 @@ yyparse (void) g_parse->checkArrayVaid(type,iPtrSize->v); yyval = GrammarBasePtr::dynamicCast(typeIdPtr); } -#line 2341 "tars.tab.cpp" +#line 2516 "tars.tab.cpp" break; - case 84: /* type_id: type keyword */ -#line 863 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 84: +#line 863 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); g_parse->error("keyword `" + ident->v + "' cannot be used as data member name"); } -#line 2350 "tars.tab.cpp" +#line 2525 "tars.tab.cpp" break; - case 85: /* type_id: type */ -#line 868 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 85: +#line 868 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("missing data member name"); } -#line 2358 "tars.tab.cpp" +#line 2533 "tars.tab.cpp" break; - case 86: /* type_id: error */ -#line 872 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 86: +#line 872 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("unkown type"); } -#line 2366 "tars.tab.cpp" +#line 2541 "tars.tab.cpp" break; - case 87: /* type: type_no ':' TARS_CONST_INTEGER */ -#line 881 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 87: +#line 881 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { TypePtr type = TypePtr::dynamicCast(yyvsp[-2]); @@ -2375,131 +2550,131 @@ yyparse (void) type->setArray(iPtrSize->v); yyval = type; } -#line 2379 "tars.tab.cpp" +#line 2554 "tars.tab.cpp" break; - case 88: /* type: type_no */ -#line 890 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 88: +#line 890 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = yyvsp[0]; } -#line 2387 "tars.tab.cpp" +#line 2562 "tars.tab.cpp" break; - case 89: /* type: type_no ':' error */ -#line 894 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 89: +#line 894 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("array missing size"); } -#line 2395 "tars.tab.cpp" +#line 2570 "tars.tab.cpp" break; - case 90: /* type_no: TARS_BOOL */ -#line 903 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 90: +#line 903 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindBool); } -#line 2403 "tars.tab.cpp" +#line 2578 "tars.tab.cpp" break; - case 91: /* type_no: TARS_BYTE */ -#line 907 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 91: +#line 907 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindByte); } -#line 2411 "tars.tab.cpp" +#line 2586 "tars.tab.cpp" break; - case 92: /* type_no: TARS_UNSIGNED TARS_BYTE */ -#line 911 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 92: +#line 911 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindShort,true); } -#line 2419 "tars.tab.cpp" +#line 2594 "tars.tab.cpp" break; - case 93: /* type_no: TARS_SHORT */ -#line 915 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 93: +#line 915 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindShort); } -#line 2427 "tars.tab.cpp" +#line 2602 "tars.tab.cpp" break; - case 94: /* type_no: TARS_UNSIGNED TARS_SHORT */ -#line 919 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 94: +#line 919 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindInt,true); } -#line 2435 "tars.tab.cpp" +#line 2610 "tars.tab.cpp" break; - case 95: /* type_no: TARS_INT */ -#line 923 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 95: +#line 923 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindInt); } -#line 2443 "tars.tab.cpp" +#line 2618 "tars.tab.cpp" break; - case 96: /* type_no: TARS_UNSIGNED TARS_INT */ -#line 927 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 96: +#line 927 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindLong,true); } -#line 2451 "tars.tab.cpp" +#line 2626 "tars.tab.cpp" break; - case 97: /* type_no: TARS_LONG */ -#line 931 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 97: +#line 931 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindLong); } -#line 2459 "tars.tab.cpp" +#line 2634 "tars.tab.cpp" break; - case 98: /* type_no: TARS_FLOAT */ -#line 935 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 98: +#line 935 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindFloat); } -#line 2467 "tars.tab.cpp" +#line 2642 "tars.tab.cpp" break; - case 99: /* type_no: TARS_DOUBLE */ -#line 939 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 99: +#line 939 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindDouble); } -#line 2475 "tars.tab.cpp" +#line 2650 "tars.tab.cpp" break; - case 100: /* type_no: TARS_STRING */ -#line 943 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 100: +#line 943 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = g_parse->createBuiltin(Builtin::KindString); } -#line 2483 "tars.tab.cpp" +#line 2658 "tars.tab.cpp" break; - case 101: /* type_no: vector */ -#line 947 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 101: +#line 947 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2491 "tars.tab.cpp" +#line 2666 "tars.tab.cpp" break; - case 102: /* type_no: map */ -#line 951 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 102: +#line 951 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(yyvsp[0]); } -#line 2499 "tars.tab.cpp" +#line 2674 "tars.tab.cpp" break; - case 103: /* type_no: scoped_name */ -#line 955 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 103: +#line 955 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); TypePtr sp = g_parse->findUserType(ident->v); @@ -2512,76 +2687,76 @@ yyparse (void) g_parse->error("'" + ident->v + "' undefined!"); } } -#line 2516 "tars.tab.cpp" +#line 2691 "tars.tab.cpp" break; - case 104: /* vector: TARS_VECTOR '<' type '>' */ -#line 973 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 104: +#line 973 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(g_parse->createVector(TypePtr::dynamicCast(yyvsp[-1]))); } -#line 2524 "tars.tab.cpp" +#line 2699 "tars.tab.cpp" break; - case 105: /* vector: TARS_VECTOR '<' error */ -#line 977 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 105: +#line 977 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector error"); } -#line 2532 "tars.tab.cpp" +#line 2707 "tars.tab.cpp" break; - case 106: /* vector: TARS_VECTOR '<' type error */ -#line 981 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 106: +#line 981 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector missing '>'"); } -#line 2540 "tars.tab.cpp" +#line 2715 "tars.tab.cpp" break; - case 107: /* vector: TARS_VECTOR error */ -#line 985 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 107: +#line 985 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("vector missing type"); } -#line 2548 "tars.tab.cpp" +#line 2723 "tars.tab.cpp" break; - case 108: /* map: TARS_MAP '<' type ',' type '>' */ -#line 994 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 108: +#line 994 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { yyval = GrammarBasePtr::dynamicCast(g_parse->createMap(TypePtr::dynamicCast(yyvsp[-3]), TypePtr::dynamicCast(yyvsp[-1]))); } -#line 2556 "tars.tab.cpp" +#line 2731 "tars.tab.cpp" break; - case 109: /* map: TARS_MAP '<' error */ -#line 998 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 109: +#line 998 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { g_parse->error("map error"); } -#line 2564 "tars.tab.cpp" +#line 2739 "tars.tab.cpp" break; - case 110: /* scoped_name: TARS_IDENTIFIER */ -#line 1007 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 110: +#line 1007 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2571 "tars.tab.cpp" +#line 2746 "tars.tab.cpp" break; - case 111: /* scoped_name: TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 1010 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 111: +#line 1010 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); ident->v = "::" + ident->v; yyval = GrammarBasePtr::dynamicCast(ident); } -#line 2581 "tars.tab.cpp" +#line 2756 "tars.tab.cpp" break; - case 112: /* scoped_name: scoped_name TARS_SCOPE_DELIMITER TARS_IDENTIFIER */ -#line 1016 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 112: +#line 1016 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { StringGrammarPtr scoped = StringGrammarPtr::dynamicCast(yyvsp[-2]); StringGrammarPtr ident = StringGrammarPtr::dynamicCast(yyvsp[0]); @@ -2589,186 +2764,186 @@ yyparse (void) scoped->v += ident->v; yyval = GrammarBasePtr::dynamicCast(scoped); } -#line 2593 "tars.tab.cpp" +#line 2768 "tars.tab.cpp" break; - case 113: /* keyword: TARS_STRUCT */ -#line 1029 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 113: +#line 1029 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2600 "tars.tab.cpp" +#line 2775 "tars.tab.cpp" break; - case 114: /* keyword: TARS_VOID */ -#line 1032 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 114: +#line 1032 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2607 "tars.tab.cpp" +#line 2782 "tars.tab.cpp" break; - case 115: /* keyword: TARS_BOOL */ -#line 1035 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 115: +#line 1035 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2614 "tars.tab.cpp" +#line 2789 "tars.tab.cpp" break; - case 116: /* keyword: TARS_BYTE */ -#line 1038 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 116: +#line 1038 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2621 "tars.tab.cpp" +#line 2796 "tars.tab.cpp" break; - case 117: /* keyword: TARS_SHORT */ -#line 1041 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 117: +#line 1041 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2628 "tars.tab.cpp" +#line 2803 "tars.tab.cpp" break; - case 118: /* keyword: TARS_INT */ -#line 1044 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 118: +#line 1044 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2635 "tars.tab.cpp" +#line 2810 "tars.tab.cpp" break; - case 119: /* keyword: TARS_FLOAT */ -#line 1047 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 119: +#line 1047 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2642 "tars.tab.cpp" +#line 2817 "tars.tab.cpp" break; - case 120: /* keyword: TARS_DOUBLE */ -#line 1050 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 120: +#line 1050 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2649 "tars.tab.cpp" +#line 2824 "tars.tab.cpp" break; - case 121: /* keyword: TARS_STRING */ -#line 1053 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 121: +#line 1053 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2656 "tars.tab.cpp" +#line 2831 "tars.tab.cpp" break; - case 122: /* keyword: TARS_VECTOR */ -#line 1056 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 122: +#line 1056 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2663 "tars.tab.cpp" +#line 2838 "tars.tab.cpp" break; - case 123: /* keyword: TARS_KEY */ -#line 1059 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 123: +#line 1059 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2670 "tars.tab.cpp" +#line 2845 "tars.tab.cpp" break; - case 124: /* keyword: TARS_MAP */ -#line 1062 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 124: +#line 1062 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2677 "tars.tab.cpp" +#line 2852 "tars.tab.cpp" break; - case 125: /* keyword: TARS_NAMESPACE */ -#line 1065 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 125: +#line 1065 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2684 "tars.tab.cpp" +#line 2859 "tars.tab.cpp" break; - case 126: /* keyword: TARS_INTERFACE */ -#line 1068 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 126: +#line 1068 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2691 "tars.tab.cpp" +#line 2866 "tars.tab.cpp" break; - case 127: /* keyword: TARS_OUT */ -#line 1071 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 127: +#line 1071 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2698 "tars.tab.cpp" +#line 2873 "tars.tab.cpp" break; - case 128: /* keyword: TARS_REQUIRE */ -#line 1074 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 128: +#line 1074 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2705 "tars.tab.cpp" +#line 2880 "tars.tab.cpp" break; - case 129: /* keyword: TARS_OPTIONAL */ -#line 1077 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 129: +#line 1077 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2712 "tars.tab.cpp" +#line 2887 "tars.tab.cpp" break; - case 130: /* keyword: TARS_CONST_INTEGER */ -#line 1080 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 130: +#line 1080 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2719 "tars.tab.cpp" +#line 2894 "tars.tab.cpp" break; - case 131: /* keyword: TARS_CONST_FLOAT */ -#line 1083 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 131: +#line 1083 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2726 "tars.tab.cpp" +#line 2901 "tars.tab.cpp" break; - case 132: /* keyword: TARS_FALSE */ -#line 1086 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 132: +#line 1086 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2733 "tars.tab.cpp" +#line 2908 "tars.tab.cpp" break; - case 133: /* keyword: TARS_TRUE */ -#line 1089 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 133: +#line 1089 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2740 "tars.tab.cpp" +#line 2915 "tars.tab.cpp" break; - case 134: /* keyword: TARS_STRING_LITERAL */ -#line 1092 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 134: +#line 1092 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2747 "tars.tab.cpp" +#line 2922 "tars.tab.cpp" break; - case 135: /* keyword: TARS_CONST */ -#line 1095 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 135: +#line 1095 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2754 "tars.tab.cpp" +#line 2929 "tars.tab.cpp" break; - case 136: /* keyword: TARS_ENUM */ -#line 1098 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 136: +#line 1098 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2761 "tars.tab.cpp" +#line 2936 "tars.tab.cpp" break; - case 137: /* keyword: TARS_UNSIGNED */ -#line 1101 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" + case 137: +#line 1101 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" { } -#line 2768 "tars.tab.cpp" +#line 2943 "tars.tab.cpp" break; -#line 2772 "tars.tab.cpp" +#line 2947 "tars.tab.cpp" default: break; } @@ -2783,10 +2958,11 @@ yyparse (void) 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 ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -2810,14 +2986,50 @@ yyparse (void) yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, 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 } + + if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2866,14 +3078,13 @@ yyparse (void) yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ - /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) @@ -2887,7 +3098,7 @@ yyparse (void) yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2899,7 +3110,7 @@ yyparse (void) /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2921,20 +3132,20 @@ yyparse (void) goto yyreturn; -#if !defined yyoverflow +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; + /* Fall through. */ #endif -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2951,18 +3162,20 @@ yyparse (void) while (yyssp != yyss) { yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); + yystos[+*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif return yyresult; } - -#line 1105 "/Volumes/MyData/centos/boat/boat-code/tarscpp/tools/tarsgrammar/tars.y" +#line 1105 "/mnt/data/heer/ruanshudong/frameworkPro/tarscpp/tools/tarsgrammar/tars.y" diff --git a/tools/tarsparse/tars.tab.hpp b/tools/tarsparse/tars.tab.hpp index 7a3f80ae..901fc7c0 100644 --- a/tools/tarsparse/tars.tab.hpp +++ b/tools/tarsparse/tars.tab.hpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,9 +31,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ #ifndef YY_YY_TARS_TAB_HPP_INCLUDED # define YY_YY_TARS_TAB_HPP_INCLUDED @@ -45,48 +44,43 @@ extern int yydebug; #endif -/* Token kinds. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - YYEMPTY = -2, - YYEOF = 0, /* "end of file" */ - YYerror = 256, /* error */ - YYUNDEF = 257, /* "invalid token" */ - TARS_VOID = 258, /* TARS_VOID */ - TARS_STRUCT = 259, /* TARS_STRUCT */ - TARS_BOOL = 260, /* TARS_BOOL */ - TARS_BYTE = 261, /* TARS_BYTE */ - TARS_SHORT = 262, /* TARS_SHORT */ - TARS_INT = 263, /* TARS_INT */ - TARS_DOUBLE = 264, /* TARS_DOUBLE */ - TARS_FLOAT = 265, /* TARS_FLOAT */ - TARS_LONG = 266, /* TARS_LONG */ - TARS_STRING = 267, /* TARS_STRING */ - TARS_VECTOR = 268, /* TARS_VECTOR */ - TARS_MAP = 269, /* TARS_MAP */ - TARS_NAMESPACE = 270, /* TARS_NAMESPACE */ - TARS_INTERFACE = 271, /* TARS_INTERFACE */ - TARS_IDENTIFIER = 272, /* TARS_IDENTIFIER */ - TARS_OUT = 273, /* TARS_OUT */ - TARS_OP = 274, /* TARS_OP */ - TARS_KEY = 275, /* TARS_KEY */ - TARS_ROUTE_KEY = 276, /* TARS_ROUTE_KEY */ - TARS_REQUIRE = 277, /* TARS_REQUIRE */ - TARS_OPTIONAL = 278, /* TARS_OPTIONAL */ - TARS_CONST_INTEGER = 279, /* TARS_CONST_INTEGER */ - TARS_CONST_FLOAT = 280, /* TARS_CONST_FLOAT */ - TARS_FALSE = 281, /* TARS_FALSE */ - TARS_TRUE = 282, /* TARS_TRUE */ - TARS_STRING_LITERAL = 283, /* TARS_STRING_LITERAL */ - TARS_SCOPE_DELIMITER = 284, /* TARS_SCOPE_DELIMITER */ - TARS_CONST = 285, /* TARS_CONST */ - TARS_ENUM = 286, /* TARS_ENUM */ - TARS_UNSIGNED = 287, /* TARS_UNSIGNED */ - BAD_CHAR = 288 /* BAD_CHAR */ + TARS_VOID = 258, + TARS_STRUCT = 259, + TARS_BOOL = 260, + TARS_BYTE = 261, + TARS_SHORT = 262, + TARS_INT = 263, + TARS_DOUBLE = 264, + TARS_FLOAT = 265, + TARS_LONG = 266, + TARS_STRING = 267, + TARS_VECTOR = 268, + TARS_MAP = 269, + TARS_NAMESPACE = 270, + TARS_INTERFACE = 271, + TARS_IDENTIFIER = 272, + TARS_OUT = 273, + TARS_OP = 274, + TARS_KEY = 275, + TARS_ROUTE_KEY = 276, + TARS_REQUIRE = 277, + TARS_OPTIONAL = 278, + TARS_CONST_INTEGER = 279, + TARS_CONST_FLOAT = 280, + TARS_FALSE = 281, + TARS_TRUE = 282, + TARS_STRING_LITERAL = 283, + TARS_SCOPE_DELIMITER = 284, + TARS_CONST = 285, + TARS_ENUM = 286, + TARS_UNSIGNED = 287, + BAD_CHAR = 288 }; - typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ diff --git a/util/src/CMakeLists.txt b/util/src/CMakeLists.txt index 31dcdf7f..6c3b7f99 100644 --- a/util/src/CMakeLists.txt +++ b/util/src/CMakeLists.txt @@ -28,7 +28,7 @@ add_library(tarsutil STATIC ${DIR_SRCS}) add_library(tarsutil_shared SHARED ${DIR_SRCS}) add_dependencies(tarsutil thirdparty) -target_link_libraries(tarsutil_shared mysqlclient) +#target_link_libraries(tarsutil_shared mysqlclient) target_compile_definitions(tarsutil_shared PRIVATE UTIL_DLL_EXPORT) if (TARS_SSL)