Commit e9cca438 authored by Francis Dupont's avatar Francis Dupont
Browse files

[4088fd] Regenerated flex/bison

parent 18906ef1
......@@ -469,8 +469,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 11
#define YY_END_OF_BUFFER 12
#define YY_NUM_RULES 12
#define YY_END_OF_BUFFER 13
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
......@@ -478,12 +478,12 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[36] =
static yyconst flex_int16_t yy_accept[39] =
{ 0,
0, 0, 12, 10, 1, 2, 10, 7, 8, 9,
10, 10, 10, 1, 2, 3, 0, 5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 4, 6, 0
0, 0, 13, 11, 1, 2, 11, 8, 9, 10,
11, 11, 11, 11, 1, 2, 3, 0, 0, 6,
0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 5, 7, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
......@@ -492,16 +492,16 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 1, 4, 5,
6, 1, 1, 7, 1, 1, 1, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
9, 1, 1, 1, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
11, 1, 12, 1, 10, 1, 10, 13, 10, 10,
10, 10, 14, 10, 15, 10, 10, 10, 10, 16,
17, 18, 10, 19, 20, 21, 22, 10, 10, 10,
10, 10, 1, 1, 1, 1, 1, 1, 1, 1,
6, 1, 1, 7, 1, 1, 1, 8, 9, 9,
9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
10, 1, 1, 1, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 13, 12, 12,
14, 1, 15, 1, 12, 1, 11, 16, 11, 11,
11, 11, 17, 12, 18, 12, 12, 12, 12, 19,
20, 21, 12, 22, 23, 24, 25, 12, 12, 13,
12, 12, 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,
......@@ -518,57 +518,61 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[23] =
static yyconst flex_int32_t yy_meta[26] =
{ 0,
1, 1, 1, 2, 1, 1, 1, 2, 1, 2,
1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2
1, 1, 1, 2, 1, 1, 1, 3, 3, 1,
3, 2, 2, 1, 1, 3, 2, 2, 2, 2,
2, 2, 2, 2, 2
} ;
static yyconst flex_int16_t yy_base[37] =
static yyconst flex_int16_t yy_base[42] =
{ 0,
0, 0, 48, 49, 45, 43, 41, 49, 49, 49,
35, 25, 20, 39, 37, 49, 35, 49, 17, 24,
21, 15, 17, 12, 16, 12, 19, 14, 20, 10,
15, 11, 49, 49, 49, 22
0, 22, 58, 59, 55, 53, 51, 59, 59, 59,
41, 43, 31, 26, 42, 40, 59, 37, 0, 59,
16, 23, 0, 20, 14, 16, 11, 15, 11, 17,
4, 3, 0, 6, 0, 59, 59, 59, 45, 47,
6
} ;
static yyconst flex_int16_t yy_def[37] =
static yyconst flex_int16_t yy_def[42] =
{ 0,
35, 1, 35, 35, 35, 35, 36, 35, 35, 35,
35, 35, 35, 35, 35, 35, 36, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 0, 35
39, 39, 38, 38, 38, 38, 40, 38, 38, 38,
38, 38, 38, 38, 38, 38, 38, 40, 41, 38,
38, 38, 41, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38, 38, 38, 38, 0, 38, 38,
38
} ;
static yyconst flex_int16_t yy_nxt[72] =
static yyconst flex_int16_t yy_nxt[85] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 4, 11, 4,
4, 4, 4, 4, 4, 4, 12, 4, 4, 13,
4, 4, 31, 17, 34, 32, 33, 31, 30, 29,
28, 27, 26, 25, 24, 23, 22, 21, 16, 15,
14, 20, 19, 18, 16, 15, 14, 35, 3, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35
38, 5, 6, 7, 8, 9, 10, 11, 23, 12,
34, 34, 38, 34, 34, 38, 37, 38, 35, 13,
36, 33, 14, 5, 6, 7, 8, 9, 10, 11,
32, 12, 31, 30, 29, 28, 27, 26, 25, 24,
17, 13, 16, 15, 14, 4, 4, 4, 18, 18,
22, 21, 20, 19, 17, 16, 15, 38, 3, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38
} ;
static yyconst flex_int16_t yy_chk[72] =
static yyconst flex_int16_t yy_chk[85] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 31, 36, 32, 30, 31, 29, 28, 27,
26, 25, 24, 23, 22, 21, 20, 19, 17, 15,
14, 13, 12, 11, 7, 6, 5, 3, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35
0, 1, 1, 1, 1, 1, 1, 1, 41, 1,
32, 32, 0, 34, 34, 0, 35, 0, 33, 1,
34, 31, 1, 2, 2, 2, 2, 2, 2, 2,
30, 2, 29, 28, 27, 26, 25, 24, 22, 21,
18, 2, 16, 15, 2, 39, 39, 39, 40, 40,
14, 13, 12, 11, 7, 6, 5, 3, 38, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
38, 38, 38, 38
} ;
/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[12] =
static yyconst flex_int32_t yy_rule_can_match_eol[13] =
{ 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
......@@ -576,9 +580,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[11] =
static yyconst flex_int16_t yy_rule_linenum[12] =
{ 0,
83, 87, 93, 103, 154, 155, 156, 157, 158, 160
84, 88, 94, 104, 110, 161, 162, 163, 164, 165,
167
} ;
/* The intent behind this definition is that it'll catch
......@@ -640,12 +645,12 @@ static isc::eval::location loc;
useful in more complex cases. */
/* These are not token expressions yet, just convenience expressions that
can be used during actual token definitions. */
#line 70 "lexer.ll"
#line 71 "lexer.ll"
// This code run each time a pattern is matched. It updates the location
// by moving it ahead by yyleng bytes. yyleng specifies the length of the
// currently matched token.
#define YY_USER_ACTION loc.columns(yyleng);
#line 649 "lexer.cc"
#line 654 "lexer.cc"
#define INITIAL 0
......@@ -920,7 +925,7 @@ YY_DECL
{
/* %% [7.0] user's declarations go here */
#line 76 "lexer.ll"
#line 77 "lexer.ll"
......@@ -928,7 +933,7 @@ YY_DECL
loc.step();
#line 932 "lexer.cc"
#line 937 "lexer.cc"
while ( 1 ) /* loops until end-of-file is reached */
{
......@@ -957,13 +962,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 >= 36 )
if ( yy_current_state >= 39 )
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 != 35 );
while ( yy_current_state != 38 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
......@@ -992,13 +997,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 < 11 )
else if ( yy_act < 12 )
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
(long)yy_rule_linenum[yy_act], yytext );
else if ( yy_act == 11 )
else if ( yy_act == 12 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
yytext );
else if ( yy_act == 12 )
else if ( yy_act == 13 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
......@@ -1016,7 +1021,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 83 "lexer.ll"
#line 84 "lexer.ll"
{
// Ok, we found a with space. Let's ignore it and update loc variable.
loc.step();
......@@ -1025,7 +1030,7 @@ YY_RULE_SETUP
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 87 "lexer.ll"
#line 88 "lexer.ll"
{
// Newline found. Let's update the location and continue.
loc.lines(yyleng);
......@@ -1034,7 +1039,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
#line 93 "lexer.ll"
#line 94 "lexer.ll"
{
// A string has been matched. It contains the actual string and single quotes.
// We need to get those quotes out of the way and just use its content, e.g.
......@@ -1047,7 +1052,16 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
#line 103 "lexer.ll"
#line 104 "lexer.ll"
{
// A hex string has been matched. It contains the '0x' or '0X' header
// followed by at least one hexadecimal digit.
return isc::eval::EvalParser::make_HEXSTRING(yytext, loc);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 110 "lexer.ll"
{
// option[123] token found. Let's see if the numeric value can be
// converted to integer and if it has a reasonable value.
......@@ -1099,46 +1113,46 @@ YY_RULE_SETUP
return isc::eval::EvalParser::make_OPTION(n, loc);
}
YY_BREAK
case 5:
case 6:
YY_RULE_SETUP
#line 154 "lexer.ll"
#line 161 "lexer.ll"
return isc::eval::EvalParser::make_EQUAL(loc);
YY_BREAK
case 6:
case 7:
YY_RULE_SETUP
#line 155 "lexer.ll"
#line 162 "lexer.ll"
return isc::eval::EvalParser::make_SUBSTRING(loc);
YY_BREAK
case 7:
case 8:
YY_RULE_SETUP
#line 156 "lexer.ll"
#line 163 "lexer.ll"
return isc::eval::EvalParser::make_LPAREN(loc);
YY_BREAK
case 8:
case 9:
YY_RULE_SETUP
#line 157 "lexer.ll"
#line 164 "lexer.ll"
return isc::eval::EvalParser::make_RPAREN(loc);
YY_BREAK
case 9:
case 10:
YY_RULE_SETUP
#line 158 "lexer.ll"
#line 165 "lexer.ll"
return isc::eval::EvalParser::make_COMA(loc);
YY_BREAK
case 10:
case 11:
YY_RULE_SETUP
#line 160 "lexer.ll"
#line 167 "lexer.ll"
driver.error (loc, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 161 "lexer.ll"
#line 168 "lexer.ll"
return isc::eval::EvalParser::make_END(loc);
YY_BREAK
case 11:
case 12:
YY_RULE_SETUP
#line 162 "lexer.ll"
#line 169 "lexer.ll"
ECHO;
YY_BREAK
#line 1142 "lexer.cc"
#line 1156 "lexer.cc"
case YY_END_OF_BUFFER:
{
......@@ -1451,7 +1465,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 >= 36 )
if ( yy_current_state >= 39 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
......@@ -1484,11 +1498,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 >= 36 )
if ( yy_current_state >= 39 )
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 == 35);
yy_is_jam = (yy_current_state == 38);
return yy_is_jam ? 0 : yy_current_state;
}
......@@ -2226,7 +2240,7 @@ void yyfree (void * ptr )
/* %ok-for-header */
#line 162 "lexer.ll"
#line 169 "lexer.ll"
......
......@@ -251,11 +251,12 @@ namespace isc { namespace eval {
{
switch (that.type_get ())
{
case 9: // "option code"
case 10: // "option code"
value.move< int > (that.value);
break;
case 8: // "constant string"
case 9: // "constant hexstring"
value.move< std::string > (that.value);
break;
......@@ -274,11 +275,12 @@ namespace isc { namespace eval {
state = that.state;
switch (that.type_get ())
{
case 9: // "option code"
case 10: // "option code"
value.copy< int > (that.value);
break;
case 8: // "constant string"
case 9: // "constant hexstring"
value.copy< std::string > (that.value);
break;
......@@ -320,16 +322,23 @@ namespace isc { namespace eval {
{
case 8: // "constant string"
#line 57 "parser.yy" // lalr1.cc:636
#line 58 "parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< std::string > (); }
#line 326 "parser.cc" // lalr1.cc:636
#line 328 "parser.cc" // lalr1.cc:636
break;
case 9: // "option code"
case 9: // "constant hexstring"
#line 57 "parser.yy" // lalr1.cc:636
#line 58 "parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< std::string > (); }
#line 335 "parser.cc" // lalr1.cc:636
break;
case 10: // "option code"
#line 58 "parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< int > (); }
#line 333 "parser.cc" // lalr1.cc:636
#line 342 "parser.cc" // lalr1.cc:636
break;
......@@ -448,7 +457,7 @@ namespace isc { namespace eval {
yyla.location.begin.filename = yyla.location.end.filename = &ctx.file;
}
#line 452 "parser.cc" // lalr1.cc:745
#line 461 "parser.cc" // lalr1.cc:745
/* Initialize the stack. The initial state will be set in
yynewstate, since the latter expects the semantical and the
......@@ -538,11 +547,12 @@ namespace isc { namespace eval {
when using variants. */
switch (yyr1_[yyn])
{
case 9: // "option code"
case 10: // "option code"
yylhs.value.build< int > ();
break;
case 8: // "constant string"
case 9: // "constant hexstring"
yylhs.value.build< std::string > ();
break;
......@@ -564,42 +574,51 @@ namespace isc { namespace eval {
switch (yyn)
{
case 2:
#line 65 "parser.yy" // lalr1.cc:859
#line 67 "parser.yy" // lalr1.cc:859
{
TokenPtr eq(new TokenEqual());
ctx.expression.push_back(eq);
}
#line 573 "parser.cc" // lalr1.cc:859
}
#line 583 "parser.cc" // lalr1.cc:859
break;
case 4:
#line 72 "parser.yy" // lalr1.cc:859
#line 75 "parser.yy" // lalr1.cc:859
{
TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(str);
}
#line 582 "parser.cc" // lalr1.cc:859
}
#line 592 "parser.cc" // lalr1.cc:859
break;
case 5:
#line 76 "parser.yy" // lalr1.cc:859
#line 79 "parser.yy" // lalr1.cc:859
{
TokenPtr hex(new TokenHexString(yystack_[0].value.as< std::string > ()));
ctx.expression.push_back(hex);
}
#line 601 "parser.cc" // lalr1.cc:859
break;
case 6:
#line 83 "parser.yy" // lalr1.cc:859
{
TokenPtr opt(new TokenOption(yystack_[0].value.as< int > ()));
ctx.expression.push_back(opt);
}
#line 591 "parser.cc" // lalr1.cc:859
}
#line 610 "parser.cc" // lalr1.cc:859
break;
case 6:
#line 80 "parser.yy" // lalr1.cc:859
case 7:
#line 87 "parser.yy" // lalr1.cc:859
{
/* push back TokenSubstring */
}
#line 599 "parser.cc" // lalr1.cc:859
#line 618 "parser.cc" // lalr1.cc:859
break;
#line 603 "parser.cc" // lalr1.cc:859
#line 622 "parser.cc" // lalr1.cc:859
default:
break;
}
......@@ -854,67 +873,67 @@ namespace isc { namespace eval {
}
const signed char EvalParser::yypact_ninf_ = -7;
const signed char EvalParser::yypact_ninf_ = -8;
const signed char EvalParser::yytable_ninf_ = -1;
const signed char
EvalParser::yypact_[] =
{
0, -5, -7, -7, 3, 7, 0, -7, 0, 1,
-7, 0, 6, 0, 5, -7
0, -5, -8, -8, -8, 3, 8, 0, -8, 0,
1, -8, 0, 7, 0, 6, -8
};
const unsigned char
EvalParser::yydefact_[] =
{
0, 0, 4, 5, 0, 3, 0, 1, 0, 0,
2, 0, 0, 0, 0, 6
0, 0, 4, 5, 6, 0, 3, 0, 1, 0,
0, 2, 0, 0, 0, 0, 7
};
const signed char
EvalParser::yypgoto_[] =
{
-7, -7, -6
-8, -8, -7
};
const signed char
EvalParser::yydefgoto_[] =
{
-1, 4, 5
-1, 5, 6
};
const unsigned char
EvalParser::yytable_[] =
{
9, 6, 10, 7, 1, 12, 11, 14, 2, 3,
8, 13, 15
10, 7, 11, 8, 1, 13, 12, 15, 2, 3,
4, 9, 14, 16
};
const unsigned char
EvalParser::yycheck_[] =
{
6, 6, 8, 0, 4, 11, 5, 13, 8, 9,
3, 5, 7
7, 6, 9, 0, 4, 12, 5, 14, 8, 9,
10, 3, 5, 7
};
const unsigned char
EvalParser::yystos_[] =
{
0, 4, 8, 9, 11, 12, 6, 0, 3, 12,
12, 5, 12, 5, 12, 7
0, 4, 8, 9, 10, 12, 13, 6, 0, 3,
13, 13, 5, 13, 5, 13, 7
};
const unsigned char
EvalParser::yyr1_[] =
{
0, 10, 11, 11, 12, 12, 12
0, 11, 12, 12, 13, 13, 13, 13
};
const unsigned char
EvalParser::yyr2_[] =
{
0, 2, 3, 1, 1, 1, 8
0, 2, 3, 1, 1, 1, 1, 8
};
......@@ -925,15 +944,16 @@ namespace isc { namespace eval {
const EvalParser::yytname_[] =
{
"\"end of file\"", "error", "$undefined", "\"==\"", "\"substring\"",
"\",\"", "\"(\"", "\")\"", "\"constant string\"", "\"option code\"",
"$accept", "expression", "token", YY_NULLPTR
"\",\"", "\"(\"", "\")\"", "\"constant string\"",
"\"constant hexstring\"", "\"option code\"", "$accept", "expression",
"token", YY_NULLPTR
};
#if YYDEBUG
const unsigned char
EvalParser::yyrline_[] =