Commit a4b4d1ac authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[4204] Regenerated parser and lexer files after recent changes.

parent 97003370
......@@ -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"
......
......@@ -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_[] =