From 206a2e726b27344725ce86f8fd89cd21ea3f8829 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Tue, 24 Jul 2018 13:55:20 +0900 Subject: [PATCH] Fix bug about parsing unknown tokens Change-Id: If0a39c48242867f1a5c9453d6a72279c87416244 Signed-off-by: Junghoon Park --- idlc/tidlc.ll | 2 +- idlc/tidlc.yy | 2 +- idlc/tidlc_l.cpp | 19 ++- idlc/tidlc_y.cpp | 392 ++++++++++++++++++++++++++++--------------------------- idlc/tidlc_y.hpp | 39 +++--- 5 files changed, 231 insertions(+), 223 deletions(-) diff --git a/idlc/tidlc.ll b/idlc/tidlc.ll index 4bc0eda..a81e5af 100644 --- a/idlc/tidlc.ll +++ b/idlc/tidlc.ll @@ -134,7 +134,7 @@ return yy::parser::token::T_SB_CLOSE; } "=" { return yy::parser::token::T_EQUAL; } - +. { return yy::parser::token::T_UNKNOWN; } %% diff --git a/idlc/tidlc.yy b/idlc/tidlc.yy index d4f000a..3e982a5 100644 --- a/idlc/tidlc.yy +++ b/idlc/tidlc.yy @@ -27,7 +27,7 @@ int yylex(yy::parser::semantic_type *, yy::parser::location_type *, void *); %token T_LEFT T_RIGHT T_COMMA T_SEMICOLON T_BRACE_OPEN T_BRACE_CLOSE %token T_IN T_OUT T_REF T_ASYNC %token T_META_OPEN T_META_CLOSE -%token T_EQUAL T_DELEGATE +%token T_EQUAL T_DELEGATE T_UNKNOWN %start start diff --git a/idlc/tidlc_l.cpp b/idlc/tidlc_l.cpp index 3f96a32..888d35b 100644 --- a/idlc/tidlc_l.cpp +++ b/idlc/tidlc_l.cpp @@ -378,8 +378,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 44 -#define YY_END_OF_BUFFER 45 +#define YY_NUM_RULES 45 +#define YY_END_OF_BUFFER 46 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -389,10 +389,10 @@ struct yy_trans_info }; static yyconst flex_int16_t yy_accept[129] = { 0, - 0, 0, 0, 0, 0, 0, 45, 44, 12, 11, + 0, 0, 0, 0, 0, 0, 46, 44, 12, 11, 8, 16, 17, 13, 44, 18, 34, 43, 35, 40, 41, 42, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 14, 15, 6, 5, 6, 10, 44, + 40, 40, 40, 14, 15, 6, 5, 6, 10, 45, 9, 10, 11, 1, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 29, 40, 40, 40, 40, 40, 40, 40, 6, 5, 3, 10, 0, 7, 40, 40, @@ -536,11 +536,11 @@ static yyconst flex_int16_t yy_chk[192] = } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[45] = +static yyconst flex_int32_t yy_rule_can_match_eol[46] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, }; + 0, 0, 0, 0, 0, 0, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1210,10 +1210,15 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP +#line 137 "./idlc/tidlc.ll" +{ return yy::parser::token::T_UNKNOWN; } + YY_BREAK +case 45: +YY_RULE_SETUP #line 139 "./idlc/tidlc.ll" ECHO; YY_BREAK -#line 1217 "./idlc/tidlc_l.cpp" +#line 1222 "./idlc/tidlc_l.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(VALUE): yyterminate(); diff --git a/idlc/tidlc_y.cpp b/idlc/tidlc_y.cpp index e4766f3..5a21a4e 100644 --- a/idlc/tidlc_y.cpp +++ b/idlc/tidlc_y.cpp @@ -234,10 +234,10 @@ static void yyerror (const yy::parser::location_type *yylocationp, yy::parser& y /* YYFINAL -- State number of the termination state. */ #define YYFINAL 19 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 400 +#define YYLAST 409 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 35 +#define YYNTOKENS 36 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 19 /* YYNRULES -- Number of rules. */ @@ -252,7 +252,7 @@ static void yyerror (const yy::parser::location_type *yylocationp, yy::parser& y /* YYTRANSLATE(X) -- Bison symbol number corresponding to X. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 289 +#define YYMAXUTOK 290 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -288,7 +288,8 @@ static const unsigned char yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35 }; #if YYDEBUG @@ -313,37 +314,38 @@ static const char *const yytname[] = "$end", "error", "$undefined", "T_LEFT", "T_RIGHT", "T_COMMA", "T_SEMICOLON", "T_BRACE_OPEN", "T_BRACE_CLOSE", "T_IN", "T_OUT", "T_REF", "T_ASYNC", "T_META_OPEN", "T_META_CLOSE", "T_EQUAL", "T_DELEGATE", - "T_ID", "T_STRUCTURE", "T_INTERFACE", "T_CHAR", "T_SHORT", "T_INT", - "T_LONG", "T_FLOAT", "T_DOUBLE", "T_VOID", "T_BUNDLE", "T_STRING", - "T_BOOL", "T_LIST", "T_ARRAY", "T_VALUE", "T_SB_OPEN", "T_SB_CLOSE", - "$accept", "start", "blocks", "block", "structure_block", "elements", - "element", "attributes", "attribute", "interface_block", "declarations", - "declaration", "parameter_list", "direction_specifier", "parameter", - "parameter_type", "base_type", "container_type", "container_type_name", YY_NULLPTR + "T_UNKNOWN", "T_ID", "T_STRUCTURE", "T_INTERFACE", "T_CHAR", "T_SHORT", + "T_INT", "T_LONG", "T_FLOAT", "T_DOUBLE", "T_VOID", "T_BUNDLE", + "T_STRING", "T_BOOL", "T_LIST", "T_ARRAY", "T_VALUE", "T_SB_OPEN", + "T_SB_CLOSE", "$accept", "start", "blocks", "block", "structure_block", + "elements", "element", "attributes", "attribute", "interface_block", + "declarations", "declaration", "parameter_list", "direction_specifier", + "parameter", "parameter_type", "base_type", "container_type", + "container_type_name", YY_NULLPTR }; #endif -#define YYPACT_NINF -67 +#define YYPACT_NINF -68 #define YYTABLE_NINF -56 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing // STATE-NUM. static const short int yypact[] = { - 27, 6, 9, 40, 14, 27, -67, -67, -67, 55, - 316, 10, 59, 354, 36, -67, 38, -1, -67, -67, - -67, 316, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, 115, -67, 19, - -67, -7, 316, 354, -67, 21, 146, -67, 39, 354, - -11, 2, 30, 49, 177, 58, -67, -67, 64, -67, - 74, 369, 208, 239, 75, 84, 76, 78, -67, -67, - 80, 84, 79, 270, -67, -67, -67, -67, 81, -67, - -67, -67, -67, 83, -67, -67, -67, -67, -67, -67, - -67, 82, 45, 369, -67, 85, -67, 84, -67, -67, - 68, 84, -67, 93, -67, 3, 339, -67, -67, 71, - 86, 73, 354, 97, 111, -67, 42, -67, 53, 301, - -67, -67, -67, 112, 113, -67, 114, 116, -67, -67, - -67, -67, -67 + 26, 6, 13, 41, 10, 26, -68, -68, -68, 40, + 323, 31, 55, 362, 43, -68, 42, 1, -68, -68, + -68, 323, -68, -68, -68, -68, -68, -68, -68, -68, + -68, -68, -68, -68, -68, -68, -68, 116, -68, 15, + -68, 4, 323, 362, -68, 22, 148, -68, 38, 362, + -11, 2, 36, 47, 180, 72, -68, -68, 73, -68, + 74, 377, 212, 244, 75, 84, 79, 78, -68, -68, + 80, 84, 87, 276, -68, -68, -68, -68, 59, -68, + -68, -68, -68, 83, -68, -68, -68, -68, -68, -68, + -68, 81, 61, 377, -68, 82, -68, 84, -68, -68, + 65, 84, -68, 85, -68, 37, 347, -68, -68, 68, + 92, 71, 362, 95, 97, -68, 3, -68, 52, 308, + -68, -68, -68, 98, 112, -68, 113, 114, -68, -68, + -68, -68, -68 }; // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -370,8 +372,8 @@ static const unsigned char yydefact[] = // YYPGOTO[NTERM-NUM]. static const signed char yypgoto[] = { - -67, -67, -67, 119, -67, -12, -25, -67, 69, -67, - -41, -45, -66, -67, -16, -67, -10, -67, -67 + -68, -68, -68, 117, -68, -16, -25, -68, 69, -68, + -41, -45, -67, -68, 17, -68, -10, -68, -68 }; // YYDEFGOTO[NTERM-NUM]. @@ -386,110 +388,110 @@ static const signed char yydefgoto[] = // number is the opposite. If YYTABLE_NINF, syntax error. static const short int yytable[] = { - 39, 69, 63, 75, 52, 100, 61, 9, 73, 54, - 12, 39, 57, 10, 19, 113, 13, 42, 69, 114, - 58, 74, 64, 11, 65, 59, 14, 39, 69, 57, - 62, 109, 39, 53, 76, 111, 60, 57, 66, 50, - 70, 15, 71, 49, 39, 1, 2, 16, 122, 105, - 106, 83, 39, 51, 123, 96, 72, 16, 124, 125, - 3, 96, 21, 22, 80, 126, 43, 44, 78, 127, - 81, 119, 110, 106, 69, 116, 106, 118, 106, 97, - 82, 86, 101, 107, 98, 87, 99, 96, -49, -49, - 115, 96, 117, 88, 89, 90, 96, 104, 103, -55, - 112, 24, 108, 120, 25, 26, 27, 28, 29, 30, - 91, 32, 33, 34, 35, 36, 55, 121, 129, 130, - 131, 77, 132, 56, 20, 0, 0, 0, 0, 0, - 0, 0, 24, 0, 0, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 67, 0, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, - 0, 0, 0, 24, 0, 0, 25, 26, 27, 28, - 29, 30, 45, 32, 33, 34, 35, 36, 55, 0, - 0, 0, 0, 0, 0, 79, 0, 0, 0, 0, + 39, 69, 63, 75, 100, 54, 52, 9, 73, 122, + 19, 39, 57, 10, 12, 123, 58, 61, 69, 124, + 13, 59, 74, 64, 11, 65, 62, 39, 69, 57, + 109, 14, 39, 60, 111, 76, 53, 57, 42, 70, + 66, 71, 15, 50, 39, 1, 2, 21, 22, 113, + 49, 83, 39, 114, 16, 96, 72, 51, 125, 16, + 3, 96, 43, 44, 126, 105, 106, 78, 127, 110, + 106, 119, 116, 106, 69, 118, 106, 103, 80, 81, + 82, 86, 97, 107, 98, 87, 99, 96, -49, -49, + 101, 96, 112, 88, 89, 90, 96, 104, 117, -55, + 108, 120, 24, 121, 129, 25, 26, 27, 28, 29, + 30, 91, 32, 33, 34, 35, 36, 55, 130, 131, + 132, 77, 20, 115, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 55, - 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 0, 0, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 67, 0, 0, 0, 0, 0, 0, 85, 0, 0, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 67, + 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 25, 26, 27, 28, 29, 30, 45, 32, 33, 34, 35, - 36, 67, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, - 25, 26, 27, 28, 29, 30, 45, 32, 33, 34, - 35, 36, 67, 0, 0, 0, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, 0, 23, 24, 0, - 0, 25, 26, 27, 28, 29, 30, 45, 32, 33, - 34, 35, 36, 24, 0, 0, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 88, 89, - 90, 0, 0, 0, 0, 0, 24, 0, 0, 25, - 26, 27, 28, 29, 30, 91, 32, 33, 34, 35, + 36, 55, 0, 0, 0, 0, 0, 0, 79, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, + 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 55, 0, 0, 0, 0, 0, 0, + 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 67, 0, 0, 0, 0, + 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 0, 0, 25, 26, 27, 28, 29, + 30, 45, 32, 33, 34, 35, 36, 67, 0, 0, + 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 25, 26, 27, + 28, 29, 30, 45, 32, 33, 34, 35, 36, 67, + 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, + 0, 0, 0, 0, 23, 0, 24, 0, 0, 25, + 26, 27, 28, 29, 30, 45, 32, 33, 34, 35, 36, 24, 0, 0, 25, 26, 27, 28, 29, 30, - 45, 32, 33, 34, 35, 36, 24, 0, 0, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36 + 31, 32, 33, 34, 35, 36, 88, 89, 90, 0, + 0, 0, 0, 0, 0, 24, 0, 0, 25, 26, + 27, 28, 29, 30, 91, 32, 33, 34, 35, 36, + 24, 0, 0, 25, 26, 27, 28, 29, 30, 45, + 32, 33, 34, 35, 36, 24, 0, 0, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 }; static const signed char yycheck[] = { - 10, 46, 43, 1, 5, 71, 13, 1, 49, 21, - 1, 21, 37, 7, 0, 12, 7, 7, 63, 16, - 1, 32, 1, 17, 3, 6, 17, 37, 73, 54, - 42, 97, 42, 34, 32, 101, 17, 62, 17, 1, - 1, 1, 3, 7, 54, 18, 19, 17, 6, 4, - 5, 61, 62, 15, 12, 65, 17, 17, 16, 6, - 33, 71, 7, 8, 6, 12, 7, 8, 19, 16, - 6, 112, 4, 5, 119, 4, 5, 4, 5, 3, + 10, 46, 43, 1, 71, 21, 5, 1, 49, 6, + 0, 21, 37, 7, 1, 12, 1, 13, 63, 16, + 7, 6, 33, 1, 18, 3, 42, 37, 73, 54, + 97, 18, 42, 18, 101, 33, 35, 62, 7, 1, + 18, 3, 1, 1, 54, 19, 20, 7, 8, 12, + 7, 61, 62, 16, 18, 65, 18, 15, 6, 18, + 34, 71, 7, 8, 12, 4, 5, 20, 16, 4, + 5, 112, 4, 5, 119, 4, 5, 18, 6, 6, 6, 6, 3, 93, 6, 1, 6, 97, 4, 5, - 106, 101, 6, 9, 10, 11, 106, 14, 17, 17, - 7, 17, 17, 6, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 1, 6, 6, 6, - 6, 52, 6, 8, 5, -1, -1, -1, -1, -1, - -1, -1, 17, -1, -1, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 1, -1, -1, + 3, 101, 7, 9, 10, 11, 106, 14, 6, 18, + 18, 6, 18, 6, 6, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 1, 6, 6, + 6, 52, 5, 106, 8, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 18, -1, -1, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 1, + -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 18, -1, -1, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 1, -1, -1, -1, -1, -1, -1, 8, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 18, -1, + -1, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 1, -1, -1, -1, -1, -1, -1, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 18, -1, -1, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 1, -1, -1, -1, -1, + -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 18, -1, -1, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, - -1, -1, -1, 17, -1, -1, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 1, -1, - -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, - -1, -1, -1, -1, 17, -1, -1, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, + -1, -1, -1, -1, 18, -1, -1, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, - -1, -1, -1, -1, -1, 17, -1, -1, 20, 21, + -1, -1, -1, -1, 1, -1, 18, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 1, -1, -1, -1, -1, -1, -1, 8, -1, -1, - -1, -1, -1, -1, -1, -1, 17, -1, -1, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 1, -1, -1, -1, -1, -1, -1, 8, -1, - -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 1, -1, -1, -1, -1, -1, -1, 8, - -1, -1, -1, -1, -1, -1, -1, 1, 17, -1, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 17, -1, -1, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 9, 10, - 11, -1, -1, -1, -1, -1, 17, -1, -1, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 17, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 17, -1, -1, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31 + 32, 18, -1, -1, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 9, 10, 11, -1, + -1, -1, -1, -1, -1, 18, -1, -1, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 18, -1, -1, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 18, -1, -1, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. static const unsigned char yystos[] = { - 0, 18, 19, 33, 36, 37, 38, 39, 44, 1, - 7, 17, 1, 7, 17, 1, 17, 42, 43, 0, - 38, 7, 8, 1, 17, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 40, 41, 51, - 52, 53, 7, 7, 8, 26, 45, 46, 51, 7, - 1, 15, 5, 34, 40, 1, 8, 41, 1, 6, - 17, 13, 40, 45, 1, 3, 17, 1, 8, 46, - 1, 3, 17, 45, 32, 1, 32, 43, 19, 8, - 6, 6, 6, 51, 8, 8, 6, 1, 9, 10, - 11, 26, 47, 48, 49, 50, 51, 3, 6, 6, - 47, 3, 8, 17, 14, 4, 5, 51, 17, 47, - 4, 47, 7, 12, 16, 49, 4, 6, 4, 45, + 0, 19, 20, 34, 37, 38, 39, 40, 45, 1, + 7, 18, 1, 7, 18, 1, 18, 43, 44, 0, + 39, 7, 8, 1, 18, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 41, 42, 52, + 53, 54, 7, 7, 8, 27, 46, 47, 52, 7, + 1, 15, 5, 35, 41, 1, 8, 42, 1, 6, + 18, 13, 41, 46, 1, 3, 18, 1, 8, 47, + 1, 3, 18, 46, 33, 1, 33, 44, 20, 8, + 6, 6, 6, 52, 8, 8, 6, 1, 9, 10, + 11, 27, 48, 49, 50, 51, 52, 3, 6, 6, + 48, 3, 8, 18, 14, 4, 5, 52, 18, 48, + 4, 48, 7, 12, 16, 50, 4, 6, 4, 46, 6, 6, 6, 12, 16, 6, 12, 16, 8, 6, 6, 6, 6 }; @@ -497,13 +499,13 @@ static const unsigned char yystos[] = // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. static const unsigned char yyr1[] = { - 0, 35, 36, 37, 37, 38, 38, 39, 39, 39, - 39, 40, 40, 40, 41, 41, 41, 41, 42, 42, - 42, 43, 43, 43, 44, 44, 44, 44, 44, 45, - 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 47, 47, 47, 48, 48, 48, 49, - 49, 49, 50, 50, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 52, 53, 53 + 0, 36, 37, 38, 38, 39, 39, 40, 40, 40, + 40, 41, 41, 41, 42, 42, 42, 42, 43, 43, + 43, 44, 44, 44, 45, 45, 45, 45, 45, 46, + 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, + 50, 50, 51, 51, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 53, 54, 54 }; // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. @@ -602,7 +604,7 @@ static const unsigned char yyconflp[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by @@ -1090,7 +1092,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ps->SetDoc((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doc)); } -#line 1094 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1096 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 3: @@ -1100,7 +1102,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL) ((*yyvalp).doc)->AddBlock((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk)); } -#line 1104 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1106 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 4: @@ -1117,7 +1119,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, } } } -#line 1121 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1123 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 5: @@ -1125,7 +1127,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.interf); } -#line 1129 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1131 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 6: @@ -1133,7 +1135,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.structure); } -#line 1137 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1139 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 7: @@ -1144,7 +1146,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1148 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1150 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 8: @@ -1154,7 +1156,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).structure) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1158 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1160 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 9: @@ -1165,7 +1167,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).structure) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); } -#line 1169 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1171 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 10: @@ -1175,7 +1177,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).structure) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token); } -#line 1179 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1181 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 11: @@ -1184,7 +1186,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).elms) = new tidl::Elements(); ((*yyvalp).elms)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)); } -#line 1188 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1190 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 12: @@ -1198,7 +1200,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).elms)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)); } } -#line 1202 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1204 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 13: @@ -1207,7 +1209,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in elements declarations.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line); ((*yyvalp).elms) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.elms); } -#line 1211 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1213 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 14: @@ -1217,7 +1219,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token); } -#line 1221 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1223 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 15: @@ -1226,7 +1228,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line); ((*yyvalp).elm) = NULL; } -#line 1230 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1232 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 16: @@ -1235,7 +1237,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line); ((*yyvalp).elm) = NULL; } -#line 1239 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1241 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 17: @@ -1244,7 +1246,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line); ((*yyvalp).elm) = NULL; } -#line 1248 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1250 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 18: @@ -1253,7 +1255,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).attrs) = new tidl::Attributes(); ((*yyvalp).attrs)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)); } -#line 1257 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1259 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 19: @@ -1267,7 +1269,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).attrs)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)); } } -#line 1271 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1273 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 20: @@ -1276,7 +1278,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in attributes", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line); ((*yyvalp).attrs) = new tidl::Attributes(); } -#line 1280 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1282 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 21: @@ -1286,7 +1288,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1290 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1292 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 22: @@ -1297,7 +1299,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1301 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1303 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 23: @@ -1307,7 +1309,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).attr) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token); } -#line 1311 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1313 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 24: @@ -1318,7 +1320,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1322 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1324 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 25: @@ -1331,7 +1333,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1335 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1337 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 26: @@ -1341,7 +1343,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).interf) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1345 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1347 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 27: @@ -1351,7 +1353,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).interf) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); } -#line 1355 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1357 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 28: @@ -1361,7 +1363,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).interf) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token); } -#line 1365 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1367 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 29: @@ -1370,7 +1372,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).decls) = new tidl::Declarations(); ((*yyvalp).decls)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)); } -#line 1374 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1376 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 30: @@ -1384,7 +1386,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).decls)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)); } } -#line 1388 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1390 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 31: @@ -1393,7 +1395,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in methods declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line); ((*yyvalp).decls) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.decls); } -#line 1397 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1399 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 32: @@ -1403,7 +1405,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::SYNC); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); } -#line 1407 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1409 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 33: @@ -1415,7 +1417,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token); } -#line 1419 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1421 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 34: @@ -1428,7 +1430,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token); } -#line 1432 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1434 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 35: @@ -1438,7 +1440,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).decl) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token); } -#line 1442 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1444 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 36: @@ -1448,7 +1450,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).decl) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token); } -#line 1452 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1454 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 37: @@ -1458,7 +1460,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).decl) = NULL; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token); } -#line 1462 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1464 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 38: @@ -1467,7 +1469,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line); ((*yyvalp).decl) = NULL; } -#line 1471 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1473 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 39: @@ -1476,7 +1478,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line); ((*yyvalp).decl) = NULL; } -#line 1480 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1482 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 40: @@ -1485,7 +1487,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line); ((*yyvalp).decl) = NULL; } -#line 1489 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1491 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 41: @@ -1494,7 +1496,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line); ((*yyvalp).decl) = NULL; } -#line 1498 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1500 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 42: @@ -1503,7 +1505,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line); ((*yyvalp).decl) = NULL; } -#line 1507 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1509 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 43: @@ -1513,7 +1515,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) ((*yyvalp).params)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)); } -#line 1517 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1519 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 44: @@ -1527,7 +1529,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).params)->Add((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)); } } -#line 1531 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1533 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 45: @@ -1536,7 +1538,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ps->ReportError("syntax error in parameter list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line); ((*yyvalp).params) = new tidl::Parameters(); } -#line 1540 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1542 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 46: @@ -1544,7 +1546,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).direction) = new tidl::Token("in", ""); } -#line 1548 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1550 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 47: @@ -1552,7 +1554,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).direction) = new tidl::Token("out", ""); } -#line 1556 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1558 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 48: @@ -1560,7 +1562,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).direction) = new tidl::Token("ref", ""); } -#line 1564 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1566 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 49: @@ -1568,7 +1570,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).param) = nullptr; } -#line 1572 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1574 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 50: @@ -1577,7 +1579,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).param) = nullptr; delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1581 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1583 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 51: @@ -1586,7 +1588,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).param) = new tidl::Parameter((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.p_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1590 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1592 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 52: @@ -1594,7 +1596,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type)); } -#line 1598 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1600 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 53: @@ -1603,7 +1605,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction)->ToString()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction); } -#line 1607 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1609 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 54: @@ -1611,7 +1613,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, { ((*yyvalp).b_type) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type); } -#line 1615 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1617 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 55: @@ -1620,7 +1622,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1624 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1626 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 56: @@ -1629,7 +1631,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("char", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1633 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1635 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 57: @@ -1638,7 +1640,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("short", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1642 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1644 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 58: @@ -1647,7 +1649,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("int", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1651 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1653 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 59: @@ -1656,7 +1658,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("long", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1660 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1662 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 60: @@ -1665,7 +1667,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("float", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1669 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1671 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 61: @@ -1674,7 +1676,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("double", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1678 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1680 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 62: @@ -1683,7 +1685,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("bundle", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1687 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1689 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 63: @@ -1692,7 +1694,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("string", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1696 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1698 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 64: @@ -1701,7 +1703,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType("bool", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1705 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1707 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 65: @@ -1710,7 +1712,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(), true); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1714 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1716 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 66: @@ -1720,7 +1722,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).b_type)->SetMetaType((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type)); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token); } -#line 1724 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1726 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 67: @@ -1729,7 +1731,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).token) = new tidl::Token("list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1733 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1735 "./idlc/tidlc_y.cpp" // glr.c:783 break; case 68: @@ -1738,11 +1740,11 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, ((*yyvalp).token) = new tidl::Token("array", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments()); delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token); } -#line 1742 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1744 "./idlc/tidlc_y.cpp" // glr.c:783 break; -#line 1746 "./idlc/tidlc_y.cpp" // glr.c:783 +#line 1748 "./idlc/tidlc_y.cpp" // glr.c:783 default: break; } @@ -1839,7 +1841,7 @@ yylhsNonterm (yyRuleNum yyrule) } #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-67))) + (!!((Yystate) == (-68))) /** True iff LR state YYSTATE has only a default reduction (regardless * of token). */ @@ -3217,7 +3219,7 @@ yyparse (yy::parser& yyparser, tidl::Parser* ps) /* User initialization code. */ yylloc.initialize (); -#line 3221 "./idlc/tidlc_y.cpp" // glr.c:2237 +#line 3223 "./idlc/tidlc_y.cpp" // glr.c:2237 if (! yyinitGLRStack (yystackp, YYINITDEPTH)) goto yyexhaustedlab; @@ -3530,7 +3532,7 @@ void yy::parser::error(const yy::parser::location_type& l, } -#line 3534 "./idlc/tidlc_y.cpp" // glr.c:2551 +#line 3536 "./idlc/tidlc_y.cpp" // glr.c:2551 /*------------------. | Report an error. | @@ -3547,7 +3549,7 @@ yyerror (const yy::parser::location_type *yylocationp, yy::parser& yyparser, tid namespace yy { -#line 3551 "./idlc/tidlc_y.cpp" // glr.c:2551 +#line 3553 "./idlc/tidlc_y.cpp" // glr.c:2551 /// Build a parser object. parser::parser (tidl::Parser* ps_yyarg) : @@ -3628,4 +3630,4 @@ namespace yy { #endif } // yy -#line 3632 "./idlc/tidlc_y.cpp" // glr.c:2551 +#line 3634 "./idlc/tidlc_y.cpp" // glr.c:2551 diff --git a/idlc/tidlc_y.hpp b/idlc/tidlc_y.hpp index 81993de..6dc7a6f 100644 --- a/idlc/tidlc_y.hpp +++ b/idlc/tidlc_y.hpp @@ -112,24 +112,25 @@ namespace yy { T_META_CLOSE = 269, T_EQUAL = 270, T_DELEGATE = 271, - T_ID = 272, - T_STRUCTURE = 273, - T_INTERFACE = 274, - T_CHAR = 275, - T_SHORT = 276, - T_INT = 277, - T_LONG = 278, - T_FLOAT = 279, - T_DOUBLE = 280, - T_VOID = 281, - T_BUNDLE = 282, - T_STRING = 283, - T_BOOL = 284, - T_LIST = 285, - T_ARRAY = 286, - T_VALUE = 287, - T_SB_OPEN = 288, - T_SB_CLOSE = 289 + T_UNKNOWN = 272, + T_ID = 273, + T_STRUCTURE = 274, + T_INTERFACE = 275, + T_CHAR = 276, + T_SHORT = 277, + T_INT = 278, + T_LONG = 279, + T_FLOAT = 280, + T_DOUBLE = 281, + T_VOID = 282, + T_BUNDLE = 283, + T_STRING = 284, + T_BOOL = 285, + T_LIST = 286, + T_ARRAY = 287, + T_VALUE = 288, + T_SB_OPEN = 289, + T_SB_CLOSE = 290 }; }; @@ -285,7 +286,7 @@ namespace yy { } // yy -#line 289 "./idlc/tidlc_y.hpp" // glr.cc:329 +#line 290 "./idlc/tidlc_y.hpp" // glr.cc:329 #endif // !YY_YY_IDLC_TIDLC_Y_HPP_INCLUDED -- 2.7.4