55# if defined YYENABLE_NLS && YYENABLE_NLS
58# define YY_(msgid) dgettext ("bison-runtime", msgid)
62# define YY_(msgid) msgid
69# if defined __GNUC__ && !defined __EXCEPTIONS
70# define YY_EXCEPTIONS 0
72# define YY_EXCEPTIONS 1
76#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
81# ifndef YYLLOC_DEFAULT
82# define YYLLOC_DEFAULT(Current, Rhs, N) \
86 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
87 (Current).end = YYRHSLOC (Rhs, N).end; \
91 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
101# define YYCDEBUG if (yydebug_) (*yycdebug_)
103# define YY_SYMBOL_PRINT(Title, Symbol) \
107 *yycdebug_ << Title << ' '; \
108 yy_print_ (*yycdebug_, Symbol); \
109 *yycdebug_ << '\n'; \
113# define YY_REDUCE_PRINT(Rule) \
116 yy_reduce_print_ (Rule); \
119# define YY_STACK_PRINT() \
122 yy_stack_print_ (); \
127# define YYCDEBUG if (false) std::cerr
128# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
129# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
130# define YY_STACK_PRINT() static_cast<void> (0)
134#define yyerrok (yyerrstatus_ = 0)
135#define yyclearin (yyla.clear ())
137#define YYACCEPT goto yyacceptlab
138#define YYABORT goto yyabortlab
139#define YYERROR goto yyerrorlab
140#define YYRECOVERING() (!!yyerrstatus_)
143namespace isc {
namespace eval {
150 yycdebug_ (&std::cerr),
171 : state (empty_state)
174 EvalParser::by_state::by_state (
const by_state& that)
YY_NOEXCEPT
185 EvalParser::by_state::move (by_state& that)
191 EvalParser::by_state::by_state (state_type s)
YY_NOEXCEPT
198 if (state == empty_state)
204 EvalParser::stack_symbol_type::stack_symbol_type ()
207 EvalParser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
210 switch (that.kind ())
233 value.YY_MOVE_OR_COPY< int8_t > (
YY_MOVE (that.value));
241 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (that.value));
246 value.YY_MOVE_OR_COPY< uint16_t > (
YY_MOVE (that.value));
251 value.YY_MOVE_OR_COPY< uint32_t > (
YY_MOVE (that.value));
258#if 201103L <= YY_CPLUSPLUS
260 that.state = empty_state;
264 EvalParser::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
265 : super_type (s,
YY_MOVE (that.location))
267 switch (that.kind ())
290 value.move< int8_t > (
YY_MOVE (that.value));
298 value.move< std::string > (
YY_MOVE (that.value));
303 value.move< uint16_t > (
YY_MOVE (that.value));
308 value.move< uint32_t > (
YY_MOVE (that.value));
319#if YY_CPLUSPLUS < 201103L
320 EvalParser::stack_symbol_type&
321 EvalParser::stack_symbol_type::operator= (
const stack_symbol_type& that)
324 switch (that.kind ())
347 value.copy< int8_t > (that.value);
355 value.copy< std::string > (that.value);
360 value.copy< uint16_t > (that.value);
365 value.copy< uint32_t > (that.value);
372 location = that.location;
376 EvalParser::stack_symbol_type&
377 EvalParser::stack_symbol_type::operator= (stack_symbol_type& that)
380 switch (that.kind ())
403 value.move< int8_t > (that.value);
411 value.move< std::string > (that.value);
416 value.move< uint16_t > (that.value);
421 value.move< uint32_t > (that.value);
428 location = that.location;
430 that.state = empty_state;
435 template <
typename Base>
437 EvalParser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
444 template <
typename Base>
446 EvalParser::yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const
448 std::ostream& yyoutput = yyo;
451 yyo <<
"empty symbol";
455 yyo << (yykind <
YYNTOKENS ?
"token" :
"nterm")
456 <<
' ' << yysym.name () <<
" ("
457 << yysym.location <<
": ";
462 { yyoutput << yysym.value.template as < std::string > (); }
468 { yyoutput << yysym.value.template as < std::string > (); }
474 { yyoutput << yysym.value.template as < std::string > (); }
480 { yyoutput << yysym.value.template as < std::string > (); }
486 { yyoutput << yysym.value.template as < std::string > (); }
492 { yyoutput << yysym.value.template as < uint32_t > (); }
498 { yyoutput << yysym.value.template as < uint16_t > (); }
504 { yyoutput << yysym.value.template as < uint16_t > (); }
510 { yyoutput << yysym.value.template as < TokenOption::RepresentationType > (); }
516 { yyoutput << yysym.value.template as < int8_t > (); }
522 { yyoutput << yysym.value.template as < TokenPkt::MetadataType > (); }
528 { yyoutput << yysym.value.template as < uint32_t > (); }
534 { yyoutput << yysym.value.template as < TokenPkt4::FieldType > (); }
540 { yyoutput << yysym.value.template as < TokenPkt6::FieldType > (); }
546 { yyoutput << yysym.value.template as < TokenRelay6Field::FieldType > (); }
559 EvalParser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
567 EvalParser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym)
569#if 201103L <= YY_CPLUSPLUS
570 yypush_ (m, stack_symbol_type (s, std::move (sym)));
572 stack_symbol_type ss (s, sym);
610 EvalParser::state_type
611 EvalParser::yy_lr_goto_state_ (state_type yystate,
int yysym)
613 int yyr = yypgoto_[yysym -
YYNTOKENS] + yystate;
614 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
615 return yytable_[yyr];
621 EvalParser::yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT
623 return yyvalue == yypact_ninf_;
627 EvalParser::yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT
629 return yyvalue == yytable_ninf_;
647 int yyerrstatus_ = 0;
653 stack_symbol_type yyerror_range[3];
670 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
676 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
680 if (yystack_[0].state == yyfinal_)
691 yyn = yypact_[+yystack_[0].state];
692 if (yy_pact_value_is_default_ (yyn))
704 yyla.
move (yylookahead);
709 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
730 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ())
739 if (yy_table_value_is_error_ (yyn))
750 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
758 yyn = yydefact_[+yystack_[0].state];
770 stack_symbol_type yylhs;
771 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
798 yylhs.value.emplace< int8_t > ();
806 yylhs.value.emplace< std::string > ();
811 yylhs.value.emplace< uint16_t > ();
816 yylhs.value.emplace< uint32_t > ();
828 yyerror_range[1].location = yylhs.location;
887 TokenPtr opt(
new TokenSubOption(yystack_[8].value.as < uint16_t > (), yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS));
911 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
923 TokenPtr opt(
new TokenRelay6Option(yystack_[8].value.as < int8_t > (), yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS));
929 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
969 TokenPtr exist(
new TokenVendor(ctx.
getUniverse(), yystack_[8].value.as < uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as < uint16_t > ()));
984 std::string cc = yystack_[1].value.as < std::string > ();
986 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
1000#line 1001 "parser.cc"
1004#line 256 "parser.yy"
1009#line 1010 "parser.cc"
1013#line 261 "parser.yy"
1018#line 1019 "parser.cc"
1022#line 266 "parser.yy"
1027#line 1028 "parser.cc"
1031#line 271 "parser.yy"
1036#line 1037 "parser.cc"
1040#line 276 "parser.yy"
1057 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1060#line 1061 "parser.cc"
1064#line 297 "parser.yy"
1075 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1078#line 1079 "parser.cc"
1082#line 312 "parser.yy"
1087#line 1088 "parser.cc"
1091#line 317 "parser.yy"
1102 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1105#line 1106 "parser.cc"
1109#line 331 "parser.yy"
1120 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1123#line 1124 "parser.cc"
1127#line 345 "parser.yy"
1138 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1141#line 1142 "parser.cc"
1145#line 360 "parser.yy"
1150#line 1151 "parser.cc"
1154#line 365 "parser.yy"
1159#line 1160 "parser.cc"
1163#line 370 "parser.yy"
1168#line 1169 "parser.cc"
1172#line 375 "parser.yy"
1177#line 1178 "parser.cc"
1181#line 380 "parser.yy"
1186#line 1187 "parser.cc"
1190#line 385 "parser.yy"
1195#line 1196 "parser.cc"
1199#line 390 "parser.yy"
1204#line 1205 "parser.cc"
1208#line 395 "parser.yy"
1213#line 1214 "parser.cc"
1217#line 400 "parser.yy"
1222#line 1223 "parser.cc"
1226#line 405 "parser.yy"
1231#line 1232 "parser.cc"
1235#line 410 "parser.yy"
1240#line 1241 "parser.cc"
1244#line 415 "parser.yy"
1249#line 1250 "parser.cc"
1253#line 420 "parser.yy"
1258#line 1259 "parser.cc"
1262#line 425 "parser.yy"
1271#line 1272 "parser.cc"
1275#line 434 "parser.yy"
1282 TokenVendor::ENTERPRISE_ID));
1285#line 1286 "parser.cc"
1289#line 444 "parser.yy"
1298#line 1299 "parser.cc"
1302#line 453 "parser.yy"
1312 TokenVendor::DATA, 0));
1315#line 1316 "parser.cc"
1319#line 466 "parser.yy"
1327 uint8_t index = ctx.
convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location);
1329 TokenVendor::DATA, index));
1332#line 1333 "parser.cc"
1336#line 479 "parser.yy"
1341#line 1342 "parser.cc"
1345#line 487 "parser.yy"
1347 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1349#line 1350 "parser.cc"
1353#line 493 "parser.yy"
1355 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1357#line 1358 "parser.cc"
1361#line 497 "parser.yy"
1363 yylhs.value.as < uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location);
1365#line 1366 "parser.cc"
1369#line 503 "parser.yy"
1371 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1373#line 1374 "parser.cc"
1377#line 509 "parser.yy"
1381#line 1382 "parser.cc"
1385#line 513 "parser.yy"
1389#line 1390 "parser.cc"
1393#line 519 "parser.yy"
1395 yylhs.value.as < int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location);
1397#line 1398 "parser.cc"
1401#line 528 "parser.yy"
1405#line 1406 "parser.cc"
1409#line 532 "parser.yy"
1413#line 1414 "parser.cc"
1417#line 536 "parser.yy"
1421#line 1422 "parser.cc"
1425#line 540 "parser.yy"
1429#line 1430 "parser.cc"
1433#line 546 "parser.yy"
1435 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1437#line 1438 "parser.cc"
1441#line 550 "parser.yy"
1443 yylhs.value.as < uint32_t > () = 0;
1445#line 1446 "parser.cc"
1449#line 556 "parser.yy"
1453#line 1454 "parser.cc"
1457#line 560 "parser.yy"
1461#line 1462 "parser.cc"
1465#line 564 "parser.yy"
1469#line 1470 "parser.cc"
1473#line 568 "parser.yy"
1477#line 1478 "parser.cc"
1481#line 572 "parser.yy"
1485#line 1486 "parser.cc"
1489#line 576 "parser.yy"
1493#line 1494 "parser.cc"
1497#line 580 "parser.yy"
1501#line 1502 "parser.cc"
1505#line 584 "parser.yy"
1509#line 1510 "parser.cc"
1513#line 588 "parser.yy"
1517#line 1518 "parser.cc"
1521#line 594 "parser.yy"
1525#line 1526 "parser.cc"
1529#line 598 "parser.yy"
1533#line 1534 "parser.cc"
1537#line 604 "parser.yy"
1541#line 1542 "parser.cc"
1545#line 608 "parser.yy"
1549#line 1550 "parser.cc"
1553#line 614 "parser.yy"
1558#line 1559 "parser.cc"
1562#line 621 "parser.yy"
1567#line 1568 "parser.cc"
1571#line 626 "parser.yy"
1576#line 1577 "parser.cc"
1580#line 632 "parser.yy"
1585#line 1586 "parser.cc"
1589#line 1590 "parser.cc"
1598 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1608 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1622 std::string msg = yysyntax_error_ (yyctx);
1627 yyerror_range[1].location = yyla.
location;
1628 if (yyerrstatus_ == 3)
1636 else if (!yyla.
empty ())
1638 yy_destroy_ (
"Error: discarding", yyla);
1672 yyn = yypact_[+yystack_[0].state];
1673 if (!yy_pact_value_is_default_ (yyn))
1676 if (0 <= yyn && yyn <= yylast_
1679 yyn = yytable_[yyn];
1686 if (yystack_.size () == 1)
1689 yyerror_range[1].location = yystack_[0].location;
1690 yy_destroy_ (
"Error: popping", yystack_[0]);
1695 stack_symbol_type error_token;
1697 yyerror_range[2].location = yyla.
location;
1701 error_token.state = state_type (yyn);
1702 yypush_ (
"Shifting",
YY_MOVE (error_token));
1728 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1734 while (1 < yystack_.size ())
1736 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1745 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1749 yy_destroy_ (YY_NULLPTR, yyla);
1751 while (1 < yystack_.size ())
1753 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1773 EvalParser::yytnamerr_ (
const char *yystr)
1778 char const *yyp = yystr;
1785 goto do_not_strip_quotes;
1789 goto do_not_strip_quotes;
1801 do_not_strip_quotes: ;
1810 return yytnamerr_ (yytname_[yysymbol]);
1817 : yyparser_ (yyparser)
1827 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1828 if (!yy_pact_value_is_default_ (yyn))
1833 const int yyxbegin = yyn < 0 ? -yyn : 0;
1835 const int yychecklim = yylast_ - yyn + 1;
1837 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1839 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1843 else if (yycount == yyargn)
1850 if (yyarg && yycount == 0 && 0 < yyargn)
1861 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
1892 yyarg[0] = yyctx.
token ();
1893 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1901 EvalParser::yysyntax_error_ (
const context& yyctx)
const
1904 enum { YYARGS_MAX = 5 };
1907 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1909 char const* yyformat = YY_NULLPTR;
1912#define YYCASE_(N, S) \
1918 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1919 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1920 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1921 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1922 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1928 std::ptrdiff_t yyi = 0;
1929 for (
char const* yyp = yyformat; *yyp; ++yyp)
1930 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1941 const short EvalParser::yypact_ninf_ = -156;
1943 const signed char EvalParser::yytable_ninf_ = -1;
1946 EvalParser::yypact_[] =
1948 43, 109, 156, 20, 109, 109, 73, 94, 98, 90,
1949 79, 111, 133, 142, 157, 168, 177, 180, 185, 189,
1950 190, 192, 211, 219, 207, 112, 131, -156, -156, -156,
1951 -156, -156, 135, 29, -156, 156, 210, 212, 213, 161,
1952 164, 187, -156, 104, 0, -156, -34, 169, 170, 172,
1953 82, 52, 156, 156, 156, 109, 156, 156, 156, 156,
1954 156, 156, 156, 156, 113, -39, 176, -39, 178, 109,
1955 109, 156, 156, 1, -34, 169, 170, -39, -39, -156,
1956 -156, -156, -156, 217, -156, 220, -156, 221, 231, -156,
1957 -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
1958 -156, -156, -156, -156, 147, 150, 173, 10, 174, 2,
1959 3, 5, 6, 7, 14, 23, -156, -156, -156, -156,
1960 -156, 222, -156, 223, -156, -156, 234, 187, -156, 225,
1961 226, 227, 228, 229, 230, 232, 233, -156, 186, 156,
1962 156, 156, 156, -156, -156, -156, -156, -156, -156, -156,
1963 235, 236, 237, 238, 239, 240, 241, 16, 4, 78,
1964 -156, 214, 181, 25, 184, 26, 11, 77, 80, 188,
1965 81, 193, 250, 245, -156, -156, -156, -156, -156, -156,
1966 246, -156, -156, -156, -17, 202, -156, 156, -156, -156,
1967 248, 249, -156, 251, 252, 253, 169, 169, -156, -156,
1968 261, -156, 265, 28, 215, 169, 169, 169, 169, 254,
1969 255, -156, -156, -156, 256, 257, 258, 260, 262, 263,
1970 264, -156, 266, 267, 268, 269, 97, 106, 155, 188,
1971 188, 188, -156, -156, -156, -156, -156, -156
1975 EvalParser::yydefact_[] =
1977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1979 0, 0, 0, 0, 0, 0, 0, 18, 49, 19,
1980 20, 2, 4, 0, 47, 0, 0, 0, 0, 0,
1981 0, 3, 1, 0, 0, 6, 0, 0, 0, 0,
1982 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1984 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
1985 48, 50, 51, 0, 52, 0, 55, 0, 0, 56,
1986 57, 58, 59, 25, 62, 63, 64, 65, 66, 67,
1987 68, 69, 70, 26, 0, 0, 0, 0, 0, 0,
1988 0, 0, 0, 0, 0, 0, 71, 72, 27, 61,
1989 60, 0, 43, 0, 42, 7, 8, 9, 32, 0,
1990 0, 0, 0, 0, 0, 0, 0, 17, 0, 0,
1991 0, 0, 0, 35, 36, 37, 38, 39, 40, 41,
1992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1993 75, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1994 0, 0, 0, 0, 53, 54, 10, 21, 12, 23,
1995 0, 73, 74, 28, 0, 0, 31, 0, 34, 14,
1996 45, 0, 15, 0, 0, 0, 0, 0, 77, 76,
1997 0, 78, 0, 0, 0, 0, 0, 0, 0, 0,
1998 0, 29, 30, 33, 0, 0, 0, 0, 0, 0,
1999 0, 46, 0, 0, 0, 0, 0, 0, 0, 0,
2000 0, 0, 11, 22, 13, 24, 16, 44
2004 EvalParser::yypgoto_[] =
2006 -156, -156, -156, 8, -2, -156, 203, -74, -155, 206,
2007 -156, -29, -156, -156, -156, -156, -156, -156
2011 EvalParser::yydefgoto_[] =
2013 0, 3, 31, 32, 33, 34, 83, 85, 177, 87,
2014 93, 121, 103, 118, 183, 161, 200, 202
2018 EvalParser::yytable_[] =
2020 41, 130, 44, 179, 80, 80, 143, 144, 71, 145,
2021 146, 147, 43, 45, 179, 119, 69, 70, 148, 198,
2022 42, 120, 174, 175, 178, 173, 81, 149, 82, 186,
2023 188, 189, 213, 73, 174, 175, 176, 71, 123, 72,
2024 72, 72, 72, 199, 72, 72, 72, 141, 132, 133,
2025 104, 105, 106, 72, 108, 109, 110, 111, 112, 113,
2026 114, 115, 72, 107, 72, 72, 190, 72, 72, 127,
2027 128, 233, 235, 237, 233, 235, 237, 125, 126, 94,
2028 95, 96, 97, 98, 99, 100, 191, 180, 46, 193,
2029 194, 181, 182, 49, 181, 182, 50, 192, 174, 175,
2030 1, 2, 101, 102, 89, 90, 91, 92, 79, 47,
2031 69, 70, 4, 48, 5, 174, 175, 232, 6, 7,
2032 8, 9, 209, 210, 174, 175, 234, 65, 51, 66,
2033 10, 215, 216, 217, 218, 11, 52, 162, 163, 164,
2034 165, 69, 70, 12, 13, 53, 67, 14, 68, 15,
2035 16, 17, 18, 19, 20, 21, 22, 23, 24, 35,
2036 54, 25, 26, 116, 117, 36, 37, 38, 27, 28,
2037 29, 55, 30, 174, 175, 236, 77, 10, 66, 78,
2038 56, 68, 11, 57, 138, 203, 72, 139, 58, 72,
2039 12, 13, 59, 60, 14, 61, 15, 16, 17, 18,
2040 19, 20, 21, 22, 23, 24, 174, 175, 39, 40,
2041 140, 142, 72, 72, 62, 27, 28, 29, 185, 30,
2042 72, 187, 63, 72, 64, 74, 72, 75, 76, 84,
2043 86, 88, 122, 134, 124, 137, 135, 136, 150, 151,
2044 69, 152, 153, 154, 155, 156, 160, 157, 190, 158,
2045 159, 184, 166, 167, 168, 169, 170, 171, 172, 195,
2046 196, 197, 201, 204, 205, 211, 206, 207, 208, 212,
2047 219, 220, 221, 222, 223, 214, 224, 129, 225, 0,
2048 226, 227, 131, 228, 229, 230, 231
2052 EvalParser::yycheck_[] =
2054 2, 75, 4, 158, 4, 4, 4, 4, 8, 4,
2055 4, 4, 4, 5, 169, 54, 6, 7, 4, 36,
2056 0, 60, 18, 19, 20, 9, 60, 4, 62, 4,
2057 4, 20, 4, 35, 18, 19, 20, 8, 67, 39,
2058 39, 39, 39, 60, 39, 39, 39, 37, 77, 78,
2059 52, 53, 54, 39, 56, 57, 58, 59, 60, 61,
2060 62, 63, 39, 55, 39, 39, 55, 39, 39, 71,
2061 72, 226, 227, 228, 229, 230, 231, 69, 70, 27,
2062 28, 29, 30, 31, 32, 33, 9, 9, 15, 9,
2063 9, 13, 14, 3, 13, 14, 17, 20, 18, 19,
2064 57, 58, 50, 51, 22, 23, 24, 25, 4, 15,
2065 6, 7, 3, 15, 5, 18, 19, 20, 9, 10,
2066 11, 12, 196, 197, 18, 19, 20, 15, 17, 17,
2067 21, 205, 206, 207, 208, 26, 3, 139, 140, 141,
2068 142, 6, 7, 34, 35, 3, 15, 38, 17, 40,
2069 41, 42, 43, 44, 45, 46, 47, 48, 49, 3,
2070 3, 52, 53, 50, 51, 9, 10, 11, 59, 60,
2071 61, 3, 63, 18, 19, 20, 15, 21, 17, 15,
2072 3, 17, 26, 3, 37, 187, 39, 37, 3, 39,
2073 34, 35, 3, 3, 38, 3, 40, 41, 42, 43,
2074 44, 45, 46, 47, 48, 49, 18, 19, 52, 53,
2075 37, 37, 39, 39, 3, 59, 60, 61, 37, 63,
2076 39, 37, 3, 39, 17, 15, 39, 15, 15, 60,
2077 60, 59, 56, 16, 56, 4, 16, 16, 16, 16,
2078 6, 16, 16, 16, 16, 16, 60, 17, 55, 17,
2079 17, 37, 17, 17, 17, 17, 17, 17, 17, 9,
2080 15, 15, 60, 15, 15, 4, 15, 15, 15, 4,
2081 16, 16, 16, 16, 16, 60, 16, 74, 16, -1,
2082 17, 17, 76, 17, 17, 17, 17
2086 EvalParser::yystos_[] =
2088 0, 57, 58, 65, 3, 5, 9, 10, 11, 12,
2089 21, 26, 34, 35, 38, 40, 41, 42, 43, 44,
2090 45, 46, 47, 48, 49, 52, 53, 59, 60, 61,
2091 63, 66, 67, 68, 69, 3, 9, 10, 11, 52,
2092 53, 68, 0, 67, 68, 67, 15, 15, 15, 3,
2093 17, 17, 3, 3, 3, 3, 3, 3, 3, 3,
2094 3, 3, 3, 3, 17, 15, 17, 15, 17, 6,
2095 7, 8, 39, 68, 15, 15, 15, 15, 15, 4,
2096 4, 60, 62, 70, 60, 71, 60, 73, 59, 22,
2097 23, 24, 25, 74, 27, 28, 29, 30, 31, 32,
2098 33, 50, 51, 76, 68, 68, 68, 67, 68, 68,
2099 68, 68, 68, 68, 68, 68, 50, 51, 77, 54,
2100 60, 75, 56, 75, 56, 67, 67, 68, 68, 70,
2101 71, 73, 75, 75, 16, 16, 16, 4, 37, 37,
2102 37, 37, 37, 4, 4, 4, 4, 4, 4, 4,
2103 16, 16, 16, 16, 16, 16, 16, 17, 17, 17,
2104 60, 79, 68, 68, 68, 68, 17, 17, 17, 17,
2105 17, 17, 17, 9, 18, 19, 20, 72, 20, 72,
2106 9, 13, 14, 78, 37, 37, 4, 37, 4, 20,
2107 55, 9, 20, 9, 9, 9, 15, 15, 36, 60,
2108 80, 60, 81, 68, 15, 15, 15, 15, 15, 71,
2109 71, 4, 4, 4, 60, 71, 71, 71, 71, 16,
2110 16, 16, 16, 16, 16, 16, 17, 17, 17, 17,
2111 17, 17, 20, 72, 20, 72, 20, 72
2115 EvalParser::yyr1_[] =
2117 0, 64, 65, 65, 66, 67, 67, 67, 67, 67,
2118 67, 67, 67, 67, 67, 67, 67, 67, 68, 68,
2119 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
2120 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
2121 68, 68, 68, 68, 68, 68, 68, 68, 68, 69,
2122 70, 70, 71, 72, 72, 73, 74, 74, 74, 74,
2123 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
2124 76, 77, 77, 78, 78, 79, 80, 80, 81
2128 EvalParser::yyr2_[] =
2130 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
2131 6, 11, 6, 11, 6, 6, 11, 4, 1, 1,
2132 1, 6, 11, 6, 11, 3, 3, 3, 6, 8,
2133 8, 6, 3, 8, 6, 4, 4, 4, 4, 4,
2134 4, 4, 3, 3, 11, 6, 9, 1, 3, 1,
2135 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2136 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2137 1, 1, 1, 1, 1, 1, 1, 1, 1
2145 const EvalParser::yytname_[] =
2147 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2148 "\"not\"",
"\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
2149 "\"relay6\"",
"\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
2150 "\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
2151 "\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
2152 "\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
2153 "\"siaddr\"",
"\"substring\"",
"\"split\"",
"\"all\"",
"\",\"",
2154 "\"concat\"",
"\"+\"",
"\"ifelse\"",
"\"hexstring\"",
"\"addrtotext\"",
2155 "\"int8totext\"",
"\"int16totext\"",
"\"int32totext\"",
2156 "\"uint8totext\"",
"\"uint16totext\"",
"\"uint32totext\"",
"\"pkt6\"",
2157 "\"msgtype\"",
"\"transid\"",
"\"vendor-class\"",
"\"vendor\"",
"\"*\"",
2158 "\"data\"",
"\"enterprise\"",
"\"top-level bool\"",
2159 "\"top-level string\"",
"\"constant string\"",
"\"integer\"",
2160 "\"constant hexstring\"",
"\"option name\"",
"\"ip address\"",
"$accept",
2161 "start",
"expression",
"bool_expr",
"string_expr",
"integer_expr",
2162 "option_code",
"sub_option_code",
"option_repr_type",
"nest_level",
2163 "pkt_metadata",
"enterprise_id",
"pkt4_field",
"pkt6_field",
2164 "relay6_field",
"start_expr",
"length_expr",
"int_expr", YY_NULLPTR
2171 EvalParser::yyrline_[] =
2173 0, 131, 131, 132, 137, 140, 141, 146, 151, 156,
2174 161, 166, 171, 191, 205, 214, 223, 233, 250, 255,
2175 260, 265, 270, 275, 296, 311, 316, 330, 344, 359,
2176 364, 369, 374, 379, 384, 389, 394, 399, 404, 409,
2177 414, 419, 424, 433, 443, 452, 465, 478, 483, 486,
2178 492, 496, 502, 508, 512, 518, 527, 531, 535, 539,
2179 545, 549, 555, 559, 563, 567, 571, 575, 579, 583,
2180 587, 593, 597, 603, 607, 613, 620, 625, 631
2184 EvalParser::yy_stack_print_ ()
const
2186 *yycdebug_ <<
"Stack now";
2187 for (stack_type::const_iterator
2188 i = yystack_.begin (),
2189 i_end = yystack_.end ();
2191 *yycdebug_ <<
' ' << int (i->state);
2196 EvalParser::yy_reduce_print_ (
int yyrule)
const
2198 int yylno = yyrline_[yyrule];
2199 int yynrhs = yyr2_[yyrule];
2201 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2202 <<
" (line " << yylno <<
"):\n";
2204 for (
int yyi = 0; yyi < yynrhs; yyi++)
2206 yystack_[(yynrhs) - (yyi + 1)]);
2213#line 2214 "parser.cc"
2215#line 638 "parser.yy"
2219 const std::string& what)
2221 ctx.error(loc, what);
#define YY_CAST(Type, Val)
#define YY_MOVE_REF(Type)
Token that represents logical and operator.
Token that represents concat operator (concatenates two other tokens)
Token that represents equality operator (compares two other tokens)
Token representing a constant string in hexadecimal format.
Token that represents an alternative.
Token representing a 16 bit integer as a string.
Token representing a 32 bit integer as a string.
Token representing an 8 bit integer as a string.
Token representing an unsigned 32 bit integer.
Token representing an IP address as a string.
Token representing an IP address as a constant string.
Token that represents client class membership.
Token that represents logical negation operator.
Token that represents a value of an option.
RepresentationType
Token representation type.
Token that represents logical or operator.
Token that represents fields of a DHCPv4 packet.
FieldType
enum value that determines the field.
Token that represents fields of DHCPv6 packet.
FieldType
enum value that determines the field.
Token that represents meta data of a DHCP packet.
MetadataType
enum value that determines the field.
Represents a sub-option inserted by the DHCPv4 relay.
Token that represents a value of a field within a DHCPv6 relay encapsulation.
FieldType
enum value that determines the field.
Token that represents a value of an option within a DHCPv6 relay encapsulation.
The order where Token subtypes are declared should be:
Token that represents sub-options in DHCPv4 and DHCPv6.
Token that represents the substring operator (returns a portion of the supplied string)
Token that converts to hexadecimal string.
Token representing a 16 bit unsigned integer as a string.
Token representing a 32 bit unsigned integer as a string.
Token representing an 8 bit unsigned integer as a string.
Token that represents vendor class options in DHCPv4 and DHCPv6.
Token that represents vendor options in DHCPv4 and DHCPv6.
Evaluation context, an interface to the expression evaluation.
int8_t convertNestLevelNumber(const std::string &nest_level, const isc::eval::location &loc)
Nest level conversion.
uint16_t convertOptionCode(const std::string &option_code, const isc::eval::location &loc)
Option code conversion.
uint16_t convertOptionName(const std::string &option_name, const isc::eval::location &loc)
Option name conversion.
isc::dhcp::Expression expression
Parsed expression (output tokens are stored here)
Option::Universe getUniverse()
Returns the universe (v4 or v6)
static uint32_t convertUint32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 32bit integer.
bool isClientClassDefined(const ClientClass &client_class)
Check if a client class is already defined.
static uint8_t convertUint8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 8bit integer.
const symbol_type & lookahead() const YY_NOEXCEPT
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Put in YYARG at most YYARGN of the expected tokens, and return the number of tokens stored in YYARG.
context(const EvalParser &yyparser, const symbol_type &yyla)
symbol_kind_type token() const YY_NOEXCEPT
Present a slice of the top of a stack.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
virtual int parse()
Parse.
int debug_level_type
Type for debugging levels.
location location_type
Symbol locations.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
void set_debug_level(debug_level_type l)
Set the current debugging level.
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
EvalParser(EvalContext &ctx_yyarg)
Build a parser object.
static const symbol_kind_type YYNTOKENS
The number of tokens.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
boost::shared_ptr< Token > TokenPtr
Pointer to a single Token.
Defines the logger used by the top-level component of kea-lfc.
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Symbol)
Define the isc::eval::parser class.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
location_type location
The location.
bool empty() const YY_NOEXCEPT
Whether empty.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW