From: Marcin Siodelski Date: Wed, 25 Nov 2015 10:30:15 +0000 (+0100) Subject: [4204] Regenerated parser and lexer files after recent changes. X-Git-Tag: trac4204fd_rebased^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4b4d1ac8302f7497ccf68389ce9b3cffdbf951a;p=thirdparty%2Fkea.git [4204] Regenerated parser and lexer files after recent changes. --- diff --git a/src/lib/eval/lexer.cc b/src/lib/eval/lexer.cc index bd76920f27..1fb321fdae 100644 --- a/src/lib/eval/lexer.cc +++ b/src/lib/eval/lexer.cc @@ -460,8 +460,8 @@ static void yy_fatal_error (yyconst char msg[] ); (yy_c_buf_p) = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 19 -#define YY_END_OF_BUFFER 20 +#define YY_NUM_RULES 20 +#define YY_END_OF_BUFFER 21 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -469,14 +469,14 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[52] = +static yyconst flex_int16_t yy_accept[55] = { 0, - 0, 0, 20, 18, 1, 2, 18, 13, 14, 17, - 18, 12, 5, 5, 18, 15, 16, 18, 18, 18, - 18, 18, 1, 2, 0, 3, 5, 0, 6, 0, - 0, 0, 0, 0, 4, 11, 9, 0, 0, 0, - 0, 0, 8, 0, 0, 7, 0, 0, 0, 10, - 0 + 0, 0, 21, 19, 1, 2, 19, 13, 14, 17, + 19, 12, 5, 5, 19, 19, 15, 16, 19, 19, + 19, 19, 19, 1, 2, 0, 3, 5, 0, 6, + 0, 0, 0, 0, 0, 0, 4, 18, 11, 9, + 0, 0, 0, 0, 0, 8, 0, 0, 7, 0, + 0, 0, 10, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -488,13 +488,13 @@ static yyconst flex_int32_t yy_ec[256] = 6, 1, 1, 7, 8, 9, 1, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, 12, 1, 1, 1, 13, 13, 13, 13, 13, 13, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 14, 1, 1, - 15, 1, 16, 1, 1, 1, 17, 18, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, 14, 14, + 16, 1, 17, 1, 18, 1, 19, 20, 13, 13, - 19, 13, 20, 21, 22, 1, 1, 23, 1, 24, - 25, 26, 1, 27, 28, 29, 30, 1, 1, 31, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 21, 13, 22, 23, 24, 14, 14, 25, 14, 26, + 27, 28, 14, 29, 30, 31, 32, 14, 14, 33, + 14, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -511,71 +511,77 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[32] = +static yyconst flex_int32_t yy_meta[34] = { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, - 3, 1, 3, 1, 1, 1, 3, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1 + 1, 1, 2, 1, 1, 1, 1, 3, 1, 4, + 4, 1, 4, 3, 3, 1, 1, 3, 4, 4, + 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3 } ; -static yyconst flex_int16_t yy_base[54] = +static yyconst flex_int16_t yy_base[58] = { 0, - 0, 0, 72, 73, 69, 67, 65, 73, 73, 73, - 22, 73, 24, 26, 56, 73, 73, 44, 47, 39, - 34, 44, 60, 58, 56, 73, 29, 0, 73, 36, - 26, 25, 35, 21, 0, 73, 73, 29, 22, 20, - 23, 18, 73, 22, 18, 73, 22, 19, 22, 73, - 73, 55, 38 + 0, 0, 98, 99, 95, 93, 91, 99, 99, 99, + 24, 99, 26, 28, 82, 0, 99, 99, 68, 71, + 63, 58, 68, 86, 84, 82, 99, 32, 0, 99, + 64, 23, 27, 30, 29, 33, 0, 99, 61, 59, + 28, 34, 36, 38, 37, 58, 45, 40, 57, 39, + 53, 55, 56, 99, 79, 81, 54 } ; -static yyconst flex_int16_t yy_def[54] = +static yyconst flex_int16_t yy_def[58] = { 0, - 51, 1, 51, 51, 51, 51, 52, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 52, 51, 51, 53, 51, 51, - 51, 51, 51, 51, 53, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 0, 51, 51 + 54, 1, 54, 54, 54, 54, 55, 54, 54, 54, + 54, 54, 54, 54, 54, 56, 54, 54, 56, 56, + 56, 56, 56, 54, 54, 55, 54, 54, 57, 54, + 56, 56, 56, 56, 56, 56, 57, 54, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 0, 54, 54, 54 } ; -static yyconst flex_int16_t yy_nxt[105] = +static yyconst flex_int16_t yy_nxt[133] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 4, 4, 16, 17, 18, 4, 4, 4, - 19, 4, 4, 4, 20, 4, 4, 21, 22, 4, - 4, 27, 27, 27, 27, 27, 27, 28, 27, 27, - 35, 50, 49, 48, 47, 46, 45, 44, 43, 42, - 41, 40, 39, 38, 28, 25, 37, 25, 36, 26, - 24, 23, 34, 33, 32, 31, 30, 29, 26, 24, - 23, 51, 3, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - - 51, 51, 51, 51 + 14, 15, 16, 16, 16, 17, 18, 4, 19, 16, + 16, 16, 20, 16, 16, 16, 21, 16, 16, 22, + 23, 16, 16, 28, 28, 28, 28, 28, 28, 38, + 29, 28, 28, 38, 38, 38, 38, 39, 42, 38, + 38, 44, 38, 38, 38, 38, 38, 37, 29, 40, + 41, 38, 51, 45, 47, 43, 46, 48, 50, 38, + 49, 38, 38, 38, 38, 38, 53, 38, 52, 26, + 38, 26, 26, 31, 31, 27, 25, 24, 36, 35, + 34, 33, 32, 30, 27, 25, 24, 54, 3, 54, + + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54 } ; -static yyconst flex_int16_t yy_chk[105] = +static yyconst flex_int16_t yy_chk[133] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 11, 11, 13, 13, 14, 14, 13, 27, 27, - 53, 49, 48, 47, 45, 44, 42, 41, 40, 39, - 38, 34, 33, 32, 13, 52, 31, 52, 30, 25, - 24, 23, 22, 21, 20, 19, 18, 15, 7, 6, - 5, 3, 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - - 51, 51, 51, 51 + 1, 1, 1, 11, 11, 13, 13, 14, 14, 32, + 13, 28, 28, 33, 41, 35, 34, 32, 35, 36, + 42, 41, 43, 45, 44, 50, 48, 57, 13, 33, + 34, 47, 50, 42, 44, 36, 43, 45, 48, 51, + 47, 52, 53, 49, 46, 40, 52, 39, 51, 55, + 31, 55, 55, 56, 56, 26, 25, 24, 23, 22, + 21, 20, 19, 15, 7, 6, 5, 3, 54, 54, + + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[20] = +static yyconst flex_int32_t yy_rule_can_match_eol[21] = { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }; + 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -583,10 +589,10 @@ static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; -static yyconst flex_int16_t yy_rule_linenum[19] = +static yyconst flex_int16_t yy_rule_linenum[20] = { 0, 83, 87, 93, 103, 109, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 136 + 128, 129, 130, 131, 132, 133, 134, 136, 143 } ; /* The intent behind this definition is that it'll catch @@ -653,7 +659,7 @@ static isc::eval::location loc; // by moving it ahead by yyleng bytes. yyleng specifies the length of the // currently matched token. #define YY_USER_ACTION loc.columns(yyleng); -#line 657 "lexer.cc" +#line 663 "lexer.cc" #define INITIAL 0 @@ -901,7 +907,7 @@ YY_DECL loc.step(); -#line 905 "lexer.cc" +#line 911 "lexer.cc" if ( !(yy_init) ) { @@ -964,13 +970,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 52 ) + if ( yy_current_state >= 55 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 51 ); + while ( yy_current_state != 54 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -999,13 +1005,13 @@ do_action: /* This label is used only to access EOF actions. */ { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 19 ) + else if ( yy_act < 20 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 19 ) + else if ( yy_act == 20 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 20 ) + else if ( yy_act == 21 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1139,20 +1145,33 @@ YY_RULE_SETUP return isc::eval::EvalParser::make_COMA(loc); YY_BREAK case 18: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 136 "lexer.ll" +{ + // This string specifies option name starting with a letter + // and further containing letters, digits, hyphens and + // underscores. + return isc::eval::EvalParser::make_OPTION_NAME(yytext, loc); +} + YY_BREAK +case 19: +YY_RULE_SETUP +#line 143 "lexer.ll" driver.error (loc, "Invalid character: " + std::string(yytext)); YY_BREAK case YY_STATE_EOF(INITIAL): -#line 137 "lexer.ll" +#line 144 "lexer.ll" return isc::eval::EvalParser::make_END(loc); YY_BREAK -case 19: +case 20: YY_RULE_SETUP -#line 138 "lexer.ll" +#line 145 "lexer.ll" ECHO; YY_BREAK -#line 1156 "lexer.cc" +#line 1175 "lexer.cc" case YY_END_OF_BUFFER: { @@ -1464,7 +1483,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 52 ) + if ( yy_current_state >= 55 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1497,11 +1516,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 52 ) + if ( yy_current_state >= 55 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 51); + yy_is_jam = (yy_current_state == 54); return yy_is_jam ? 0 : yy_current_state; } @@ -2249,7 +2268,7 @@ void yyfree (void * ptr ) /* %ok-for-header */ -#line 138 "lexer.ll" +#line 145 "lexer.ll" diff --git a/src/lib/eval/parser.cc b/src/lib/eval/parser.cc index d562990f23..46f902eb45 100644 --- a/src/lib/eval/parser.cc +++ b/src/lib/eval/parser.cc @@ -52,7 +52,7 @@ #line 40 "parser.yy" // lalr1.cc:413 # include "eval_context.h" -#line 72 "parser.yy" // lalr1.cc:413 +#line 73 "parser.yy" // lalr1.cc:413 namespace { @@ -281,7 +281,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.move< std::string > (that.value); break; @@ -303,7 +304,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.copy< std::string > (that.value); break; @@ -345,30 +347,37 @@ namespace isc { namespace eval { { case 15: // "constant string" -#line 69 "parser.yy" // lalr1.cc:636 +#line 70 "parser.yy" // lalr1.cc:636 { yyoutput << yysym.value.template as< std::string > (); } -#line 351 "parser.cc" // lalr1.cc:636 +#line 353 "parser.cc" // lalr1.cc:636 break; case 16: // "integer" -#line 69 "parser.yy" // lalr1.cc:636 +#line 70 "parser.yy" // lalr1.cc:636 { yyoutput << yysym.value.template as< std::string > (); } -#line 358 "parser.cc" // lalr1.cc:636 +#line 360 "parser.cc" // lalr1.cc:636 break; case 17: // "constant hexstring" -#line 69 "parser.yy" // lalr1.cc:636 +#line 70 "parser.yy" // lalr1.cc:636 { yyoutput << yysym.value.template as< std::string > (); } -#line 365 "parser.cc" // lalr1.cc:636 +#line 367 "parser.cc" // lalr1.cc:636 break; - case 18: // TOKEN + case 18: // "option name" -#line 69 "parser.yy" // lalr1.cc:636 +#line 70 "parser.yy" // lalr1.cc:636 { yyoutput << yysym.value.template as< std::string > (); } -#line 372 "parser.cc" // lalr1.cc:636 +#line 374 "parser.cc" // lalr1.cc:636 + break; + + case 19: // TOKEN + +#line 70 "parser.yy" // lalr1.cc:636 + { yyoutput << yysym.value.template as< std::string > (); } +#line 381 "parser.cc" // lalr1.cc:636 break; @@ -571,7 +580,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN yylhs.value.build< std::string > (); break; @@ -593,54 +603,54 @@ namespace isc { namespace eval { switch (yyn) { case 3: -#line 110 "parser.yy" // lalr1.cc:859 +#line 111 "parser.yy" // lalr1.cc:859 { TokenPtr eq(new TokenEqual()); ctx.expression.push_back(eq); } -#line 602 "parser.cc" // lalr1.cc:859 +#line 612 "parser.cc" // lalr1.cc:859 break; case 4: -#line 117 "parser.yy" // lalr1.cc:859 +#line 118 "parser.yy" // lalr1.cc:859 { TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); ctx.expression.push_back(str); } -#line 611 "parser.cc" // lalr1.cc:859 +#line 621 "parser.cc" // lalr1.cc:859 break; case 5: -#line 122 "parser.yy" // lalr1.cc:859 +#line 123 "parser.yy" // lalr1.cc:859 { TokenPtr hex(new TokenHexString(yystack_[0].value.as< std::string > ())); ctx.expression.push_back(hex); } -#line 620 "parser.cc" // lalr1.cc:859 +#line 630 "parser.cc" // lalr1.cc:859 break; case 6: -#line 127 "parser.yy" // lalr1.cc:859 +#line 128 "parser.yy" // lalr1.cc:859 { uint16_t numeric_code = convert_option_code(yystack_[3].value.as< std::string > (), yystack_[3].location, ctx); TokenPtr opt(new TokenOption(numeric_code, TokenOption::TEXTUAL)); ctx.expression.push_back(opt); } -#line 630 "parser.cc" // lalr1.cc:859 +#line 640 "parser.cc" // lalr1.cc:859 break; case 7: -#line 133 "parser.yy" // lalr1.cc:859 +#line 134 "parser.yy" // lalr1.cc:859 { uint16_t numeric_code = convert_option_code(yystack_[3].value.as< std::string > (), yystack_[3].location, ctx); TokenPtr opt(new TokenOption(numeric_code, TokenOption::HEXADECIMAL)); ctx.expression.push_back(opt); } -#line 640 "parser.cc" // lalr1.cc:859 +#line 650 "parser.cc" // lalr1.cc:859 break; case 8: -#line 139 "parser.yy" // lalr1.cc:859 +#line 140 "parser.yy" // lalr1.cc:859 { try { // This may result in exception if the specified @@ -653,11 +663,11 @@ namespace isc { namespace eval { ctx.error(yystack_[3].location, ex.what()); } } -#line 657 "parser.cc" // lalr1.cc:859 +#line 667 "parser.cc" // lalr1.cc:859 break; case 9: -#line 152 "parser.yy" // lalr1.cc:859 +#line 153 "parser.yy" // lalr1.cc:859 { try { // This may result in exception if the specified @@ -670,47 +680,47 @@ namespace isc { namespace eval { ctx.error(yystack_[3].location, ex.what()); } } -#line 674 "parser.cc" // lalr1.cc:859 +#line 684 "parser.cc" // lalr1.cc:859 break; case 10: -#line 165 "parser.yy" // lalr1.cc:859 +#line 166 "parser.yy" // lalr1.cc:859 { TokenPtr sub(new TokenSubstring()); ctx.expression.push_back(sub); } -#line 683 "parser.cc" // lalr1.cc:859 +#line 693 "parser.cc" // lalr1.cc:859 break; case 12: -#line 174 "parser.yy" // lalr1.cc:859 +#line 175 "parser.yy" // lalr1.cc:859 { TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); ctx.expression.push_back(str); } -#line 692 "parser.cc" // lalr1.cc:859 +#line 702 "parser.cc" // lalr1.cc:859 break; case 13: -#line 181 "parser.yy" // lalr1.cc:859 +#line 182 "parser.yy" // lalr1.cc:859 { TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); ctx.expression.push_back(str); } -#line 701 "parser.cc" // lalr1.cc:859 +#line 711 "parser.cc" // lalr1.cc:859 break; case 14: -#line 186 "parser.yy" // lalr1.cc:859 +#line 187 "parser.yy" // lalr1.cc:859 { TokenPtr str(new TokenString("all")); ctx.expression.push_back(str); } -#line 710 "parser.cc" // lalr1.cc:859 +#line 720 "parser.cc" // lalr1.cc:859 break; -#line 714 "parser.cc" // lalr1.cc:859 +#line 724 "parser.cc" // lalr1.cc:859 default: break; } @@ -965,17 +975,17 @@ namespace isc { namespace eval { } - const signed char EvalParser::yypact_ninf_ = -10; + const signed char EvalParser::yypact_ninf_ = -14; const signed char EvalParser::yytable_ninf_ = -1; const signed char EvalParser::yypact_[] = { - -4, -1, 6, -10, -10, -10, 4, -10, 15, -9, - -4, -10, -4, 5, 7, 10, -10, 13, 14, 8, - 2, 9, -10, 16, -10, -10, -10, -10, -6, -10, - -10, 17, -10 + -4, -9, -5, -14, -14, -14, 8, -14, 9, -13, + -4, -14, -4, 0, 6, 11, -14, 13, 14, 15, + 10, 12, -14, 16, -14, -14, -14, -14, -6, -14, + -14, 17, -14 }; const unsigned char @@ -983,14 +993,14 @@ namespace isc { namespace eval { { 0, 0, 0, 4, 5, 11, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 12, 0, 8, 9, 6, 7, 0, 14, + 0, 0, 12, 0, 6, 7, 8, 9, 0, 14, 13, 0, 10 }; const signed char EvalParser::yypgoto_[] = { - -10, -10, -10, -7, -10, -10 + -14, -14, -14, -3, -14, -14 }; const signed char @@ -1002,33 +1012,35 @@ namespace isc { namespace eval { const unsigned char EvalParser::yytable_[] = { - 1, 2, 29, 15, 11, 16, 13, 14, 24, 25, - 30, 3, 9, 4, 5, 26, 27, 10, 12, 17, - 19, 18, 20, 21, 22, 0, 28, 0, 0, 32 + 1, 2, 29, 13, 9, 14, 10, 15, 11, 16, + 30, 3, 12, 4, 17, 5, 24, 25, 26, 27, + 18, 19, 20, 21, 0, 0, 28, 0, 0, 32, + 0, 22 }; const signed char EvalParser::yycheck_[] = { - 4, 5, 8, 10, 0, 12, 15, 16, 6, 7, - 16, 15, 13, 17, 18, 6, 7, 11, 3, 14, - 10, 14, 9, 9, 16, -1, 10, -1, -1, 12 + 4, 5, 8, 16, 13, 18, 11, 10, 0, 12, + 16, 15, 3, 17, 14, 19, 6, 7, 6, 7, + 14, 10, 9, 9, -1, -1, 10, -1, -1, 12, + -1, 16 }; const unsigned char EvalParser::yystos_[] = { - 0, 4, 5, 15, 17, 18, 20, 21, 22, 13, - 11, 0, 3, 15, 16, 22, 22, 14, 14, 10, - 9, 9, 16, 23, 6, 7, 6, 7, 10, 8, - 16, 24, 12 + 0, 4, 5, 15, 17, 19, 21, 22, 23, 13, + 11, 0, 3, 16, 18, 23, 23, 14, 14, 10, + 9, 9, 16, 24, 6, 7, 6, 7, 10, 8, + 16, 25, 12 }; const unsigned char EvalParser::yyr1_[] = { - 0, 19, 20, 21, 22, 22, 22, 22, 22, 22, - 22, 22, 23, 24, 24 + 0, 20, 21, 22, 23, 23, 23, 23, 23, 23, + 23, 23, 24, 25, 25 }; const unsigned char @@ -1048,16 +1060,16 @@ namespace isc { namespace eval { "\"end of file\"", "error", "$undefined", "\"==\"", "\"option\"", "\"substring\"", "\"text\"", "\"hex\"", "\"all\"", "\".\"", "\",\"", "\"(\"", "\")\"", "\"[\"", "\"]\"", "\"constant string\"", "\"integer\"", - "\"constant hexstring\"", "TOKEN", "$accept", "expression", "bool_expr", - "string_expr", "start_expr", "length_expr", YY_NULLPTR + "\"constant hexstring\"", "\"option name\"", "TOKEN", "$accept", + "expression", "bool_expr", "string_expr", "start_expr", "length_expr", YY_NULLPTR }; #if YYDEBUG const unsigned char EvalParser::yyrline_[] = { - 0, 106, 106, 109, 116, 121, 126, 132, 138, 151, - 164, 169, 173, 180, 185 + 0, 107, 107, 110, 117, 122, 127, 133, 139, 152, + 165, 170, 174, 181, 186 }; // Print the state stack on the debug stream. @@ -1092,8 +1104,8 @@ namespace isc { namespace eval { #line 21 "parser.yy" // lalr1.cc:1167 } } // isc::eval -#line 1096 "parser.cc" // lalr1.cc:1167 -#line 192 "parser.yy" // lalr1.cc:1168 +#line 1108 "parser.cc" // lalr1.cc:1167 +#line 193 "parser.yy" // lalr1.cc:1168 void isc::eval::EvalParser::error(const location_type& loc, diff --git a/src/lib/eval/parser.h b/src/lib/eval/parser.h index 023e861dd7..309daf747f 100644 --- a/src/lib/eval/parser.h +++ b/src/lib/eval/parser.h @@ -298,6 +298,7 @@ namespace isc { namespace eval { // "constant string" // "integer" // "constant hexstring" + // "option name" // TOKEN char dummy1[sizeof(std::string)]; }; @@ -338,7 +339,8 @@ namespace isc { namespace eval { TOKEN_STRING = 270, TOKEN_INTEGER = 271, TOKEN_HEXSTRING = 272, - TOKEN_TOKEN = 273 + TOKEN_OPTION_NAME = 273, + TOKEN_TOKEN = 274 }; }; @@ -509,6 +511,10 @@ namespace isc { namespace eval { symbol_type make_HEXSTRING (const std::string& v, const location_type& l); + static inline + symbol_type + make_OPTION_NAME (const std::string& v, const location_type& l); + static inline symbol_type make_TOKEN (const std::string& v, const location_type& l); @@ -718,12 +724,12 @@ namespace isc { namespace eval { enum { yyeof_ = 0, - yylast_ = 29, ///< Last index in yytable_. + yylast_ = 31, ///< Last index in yytable_. yynnts_ = 6, ///< Number of nonterminal symbols. yyfinal_ = 11, ///< Termination state number. yyterror_ = 1, yyerrcode_ = 256, - yyntokens_ = 19 ///< Number of tokens. + yyntokens_ = 20 ///< Number of tokens. }; @@ -768,9 +774,9 @@ namespace isc { namespace eval { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18 + 15, 16, 17, 18, 19 }; - const unsigned int user_token_number_max_ = 273; + const unsigned int user_token_number_max_ = 274; const token_number_type undef_token_ = 2; if (static_cast(t) <= yyeof_) @@ -806,7 +812,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.copy< std::string > (other.value); break; @@ -830,7 +837,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.copy< std::string > (v); break; @@ -885,7 +893,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.template destroy< std::string > (); break; @@ -915,7 +924,8 @@ namespace isc { namespace eval { case 15: // "constant string" case 16: // "integer" case 17: // "constant hexstring" - case 18: // TOKEN + case 18: // "option name" + case 19: // TOKEN value.move< std::string > (s.value); break; @@ -975,7 +985,7 @@ namespace isc { namespace eval { yytoken_number_[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273 + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274 }; return static_cast (yytoken_number_[type]); } @@ -1076,6 +1086,12 @@ namespace isc { namespace eval { return symbol_type (token::TOKEN_HEXSTRING, v, l); } + EvalParser::symbol_type + EvalParser::make_OPTION_NAME (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_NAME, v, l); + } + EvalParser::symbol_type EvalParser::make_TOKEN (const std::string& v, const location_type& l) { @@ -1085,7 +1101,7 @@ namespace isc { namespace eval { #line 21 "parser.yy" // lalr1.cc:392 } } // isc::eval -#line 1089 "parser.h" // lalr1.cc:392 +#line 1105 "parser.h" // lalr1.cc:392