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 255 "parser.yy"
1009#line 1010 "parser.cc"
1013#line 260 "parser.yy"
1018#line 1019 "parser.cc"
1022#line 265 "parser.yy"
1027#line 1028 "parser.cc"
1031#line 270 "parser.yy"
1036#line 1037 "parser.cc"
1040#line 275 "parser.yy"
1057 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1060#line 1061 "parser.cc"
1064#line 296 "parser.yy"
1075 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1078#line 1079 "parser.cc"
1082#line 311 "parser.yy"
1087#line 1088 "parser.cc"
1091#line 316 "parser.yy"
1102 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1105#line 1106 "parser.cc"
1109#line 330 "parser.yy"
1120 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1123#line 1124 "parser.cc"
1127#line 344 "parser.yy"
1138 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1141#line 1142 "parser.cc"
1145#line 359 "parser.yy"
1150#line 1151 "parser.cc"
1154#line 364 "parser.yy"
1159#line 1160 "parser.cc"
1163#line 369 "parser.yy"
1168#line 1169 "parser.cc"
1172#line 374 "parser.yy"
1177#line 1178 "parser.cc"
1181#line 379 "parser.yy"
1186#line 1187 "parser.cc"
1190#line 384 "parser.yy"
1195#line 1196 "parser.cc"
1199#line 389 "parser.yy"
1204#line 1205 "parser.cc"
1208#line 394 "parser.yy"
1213#line 1214 "parser.cc"
1217#line 399 "parser.yy"
1222#line 1223 "parser.cc"
1226#line 404 "parser.yy"
1231#line 1232 "parser.cc"
1235#line 409 "parser.yy"
1240#line 1241 "parser.cc"
1244#line 414 "parser.yy"
1249#line 1250 "parser.cc"
1253#line 419 "parser.yy"
1262#line 1263 "parser.cc"
1266#line 428 "parser.yy"
1273 TokenVendor::ENTERPRISE_ID));
1276#line 1277 "parser.cc"
1280#line 438 "parser.yy"
1289#line 1290 "parser.cc"
1293#line 447 "parser.yy"
1303 TokenVendor::DATA, 0));
1306#line 1307 "parser.cc"
1310#line 460 "parser.yy"
1318 uint8_t index = ctx.
convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location);
1320 TokenVendor::DATA, index));
1323#line 1324 "parser.cc"
1327#line 473 "parser.yy"
1332#line 1333 "parser.cc"
1336#line 481 "parser.yy"
1338 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1340#line 1341 "parser.cc"
1344#line 487 "parser.yy"
1346 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1348#line 1349 "parser.cc"
1352#line 491 "parser.yy"
1354 yylhs.value.as < uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location);
1356#line 1357 "parser.cc"
1360#line 497 "parser.yy"
1362 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1364#line 1365 "parser.cc"
1368#line 503 "parser.yy"
1372#line 1373 "parser.cc"
1376#line 507 "parser.yy"
1380#line 1381 "parser.cc"
1384#line 513 "parser.yy"
1386 yylhs.value.as < int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location);
1388#line 1389 "parser.cc"
1392#line 522 "parser.yy"
1396#line 1397 "parser.cc"
1400#line 526 "parser.yy"
1404#line 1405 "parser.cc"
1408#line 530 "parser.yy"
1412#line 1413 "parser.cc"
1416#line 534 "parser.yy"
1420#line 1421 "parser.cc"
1424#line 540 "parser.yy"
1426 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1428#line 1429 "parser.cc"
1432#line 544 "parser.yy"
1434 yylhs.value.as < uint32_t > () = 0;
1436#line 1437 "parser.cc"
1440#line 550 "parser.yy"
1444#line 1445 "parser.cc"
1448#line 554 "parser.yy"
1452#line 1453 "parser.cc"
1456#line 558 "parser.yy"
1460#line 1461 "parser.cc"
1464#line 562 "parser.yy"
1468#line 1469 "parser.cc"
1472#line 566 "parser.yy"
1476#line 1477 "parser.cc"
1480#line 570 "parser.yy"
1484#line 1485 "parser.cc"
1488#line 574 "parser.yy"
1492#line 1493 "parser.cc"
1496#line 578 "parser.yy"
1500#line 1501 "parser.cc"
1504#line 582 "parser.yy"
1508#line 1509 "parser.cc"
1512#line 588 "parser.yy"
1516#line 1517 "parser.cc"
1520#line 592 "parser.yy"
1524#line 1525 "parser.cc"
1528#line 598 "parser.yy"
1532#line 1533 "parser.cc"
1536#line 602 "parser.yy"
1540#line 1541 "parser.cc"
1544#line 608 "parser.yy"
1549#line 1550 "parser.cc"
1553#line 615 "parser.yy"
1558#line 1559 "parser.cc"
1562#line 620 "parser.yy"
1567#line 1568 "parser.cc"
1571#line 1572 "parser.cc"
1580 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1590 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1604 std::string msg = yysyntax_error_ (yyctx);
1609 yyerror_range[1].location = yyla.
location;
1610 if (yyerrstatus_ == 3)
1618 else if (!yyla.
empty ())
1620 yy_destroy_ (
"Error: discarding", yyla);
1654 yyn = yypact_[+yystack_[0].state];
1655 if (!yy_pact_value_is_default_ (yyn))
1658 if (0 <= yyn && yyn <= yylast_
1661 yyn = yytable_[yyn];
1668 if (yystack_.size () == 1)
1671 yyerror_range[1].location = yystack_[0].location;
1672 yy_destroy_ (
"Error: popping", yystack_[0]);
1677 stack_symbol_type error_token;
1679 yyerror_range[2].location = yyla.
location;
1683 error_token.state = state_type (yyn);
1684 yypush_ (
"Shifting",
YY_MOVE (error_token));
1710 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1716 while (1 < yystack_.size ())
1718 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1727 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1731 yy_destroy_ (YY_NULLPTR, yyla);
1733 while (1 < yystack_.size ())
1735 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1755 EvalParser::yytnamerr_ (
const char *yystr)
1760 char const *yyp = yystr;
1767 goto do_not_strip_quotes;
1771 goto do_not_strip_quotes;
1783 do_not_strip_quotes: ;
1792 return yytnamerr_ (yytname_[yysymbol]);
1799 : yyparser_ (yyparser)
1809 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1810 if (!yy_pact_value_is_default_ (yyn))
1815 const int yyxbegin = yyn < 0 ? -yyn : 0;
1817 const int yychecklim = yylast_ - yyn + 1;
1819 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1821 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1825 else if (yycount == yyargn)
1832 if (yyarg && yycount == 0 && 0 < yyargn)
1843 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
1874 yyarg[0] = yyctx.
token ();
1875 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1883 EvalParser::yysyntax_error_ (
const context& yyctx)
const
1886 enum { YYARGS_MAX = 5 };
1889 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1891 char const* yyformat = YY_NULLPTR;
1894#define YYCASE_(N, S) \
1900 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1901 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1902 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1903 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1904 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1910 std::ptrdiff_t yyi = 0;
1911 for (
char const* yyp = yyformat; *yyp; ++yyp)
1912 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1923 const short EvalParser::yypact_ninf_ = -149;
1925 const signed char EvalParser::yytable_ninf_ = -1;
1928 EvalParser::yypact_[] =
1930 -16, 103, 149, 66, 103, 103, 87, 101, 102, 21,
1931 114, 121, 150, 161, 171, 178, 181, 195, 196, 203,
1932 210, 211, 212, 152, 72, 124, -149, -149, -149, -149,
1933 -149, 12, 39, -149, 149, 201, 202, 204, 165, 170,
1934 180, -149, 126, -1, -149, -34, 162, 163, 168, 98,
1935 51, 149, 149, 103, 149, 149, 149, 149, 149, 149,
1936 149, 149, 43, -38, 169, -38, 172, 103, 103, 149,
1937 149, 0, -34, 162, 163, -38, -38, -149, -149, -149,
1938 -149, 207, -149, 209, -149, 213, 216, -149, -149, -149,
1939 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1940 -149, -149, 69, 166, 29, 167, 1, 4, 5, 6,
1941 7, 10, 13, -149, -149, -149, -149, -149, 214, -149,
1942 215, -149, -149, 222, 180, -149, 217, 218, 219, 220,
1943 221, 223, 224, 225, -149, 173, 149, 149, 149, -149,
1944 -149, -149, -149, -149, -149, -149, 226, 227, 228, 229,
1945 230, 231, 232, 76, 91, 77, -149, 233, 22, 174,
1946 24, 9, 11, 79, 138, 90, 184, 241, 236, -149,
1947 -149, -149, -149, -149, -149, 237, -149, -149, -149, -13,
1948 -149, 149, -149, -149, 238, 239, -149, 240, 242, 243,
1949 162, 162, -149, -149, 235, 26, 197, 162, 162, 162,
1950 162, 244, 245, -149, -149, 246, 247, 248, 249, 250,
1951 251, 253, -149, 254, 255, 256, 257, 148, 153, 158,
1952 138, 138, 138, -149, -149, -149, -149, -149, -149
1956 EvalParser::yydefact_[] =
1958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1960 0, 0, 0, 0, 0, 0, 18, 48, 19, 20,
1961 2, 4, 0, 46, 0, 0, 0, 0, 0, 0,
1962 3, 1, 0, 0, 6, 0, 0, 0, 0, 0,
1963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1965 0, 0, 0, 0, 0, 0, 0, 5, 47, 49,
1966 50, 0, 51, 0, 54, 0, 0, 55, 56, 57,
1967 58, 25, 61, 62, 63, 64, 65, 66, 67, 68,
1968 69, 26, 0, 0, 0, 0, 0, 0, 0, 0,
1969 0, 0, 0, 70, 71, 27, 60, 59, 0, 42,
1970 0, 41, 7, 8, 9, 31, 0, 0, 0, 0,
1971 0, 0, 0, 0, 17, 0, 0, 0, 0, 34,
1972 35, 36, 37, 38, 39, 40, 0, 0, 0, 0,
1973 0, 0, 0, 0, 0, 0, 74, 0, 0, 0,
1974 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
1975 53, 10, 21, 12, 23, 0, 72, 73, 28, 0,
1976 30, 0, 33, 14, 44, 0, 15, 0, 0, 0,
1977 0, 0, 76, 75, 0, 0, 0, 0, 0, 0,
1978 0, 0, 0, 29, 32, 0, 0, 0, 0, 0,
1979 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
1980 0, 0, 0, 11, 22, 13, 24, 16, 43
1984 EvalParser::yypgoto_[] =
1986 -149, -149, -149, 8, -2, -149, 187, -72, -148, 193,
1987 -149, -42, -149, -149, -149, -149, -149
1991 EvalParser::yydefgoto_[] =
1993 0, 3, 30, 31, 32, 33, 81, 83, 172, 85,
1994 91, 118, 101, 115, 178, 157, 194
1998 EvalParser::yytable_[] =
2000 40, 127, 43, 78, 78, 139, 174, 69, 140, 141,
2001 142, 143, 42, 44, 144, 116, 174, 145, 67, 68,
2002 185, 117, 192, 120, 48, 79, 180, 80, 182, 183,
2003 204, 186, 71, 129, 130, 67, 68, 70, 70, 70,
2004 1, 2, 70, 70, 70, 70, 193, 69, 70, 102,
2005 103, 70, 105, 106, 107, 108, 109, 110, 111, 112,
2006 70, 104, 70, 184, 70, 137, 41, 124, 125, 224,
2007 226, 228, 224, 226, 228, 122, 123, 70, 92, 93,
2008 94, 95, 96, 97, 98, 168, 175, 63, 187, 64,
2009 176, 177, 113, 114, 169, 170, 171, 169, 170, 188,
2010 99, 100, 45, 176, 177, 135, 4, 70, 5, 169,
2011 170, 173, 6, 7, 8, 9, 46, 47, 201, 202,
2012 87, 88, 89, 90, 10, 206, 207, 208, 209, 11,
2013 77, 49, 67, 68, 158, 159, 160, 12, 50, 65,
2014 13, 66, 14, 15, 16, 17, 18, 19, 20, 21,
2015 22, 23, 34, 51, 24, 25, 169, 170, 35, 36,
2016 37, 26, 27, 28, 52, 29, 169, 170, 223, 62,
2017 10, 169, 170, 225, 53, 11, 169, 170, 227, 195,
2018 75, 54, 64, 12, 55, 76, 13, 66, 14, 15,
2019 16, 17, 18, 19, 20, 21, 22, 23, 56, 57,
2020 38, 39, 136, 138, 70, 70, 58, 26, 27, 28,
2021 181, 29, 70, 59, 60, 61, 72, 73, 70, 74,
2022 134, 82, 84, 131, 119, 132, 86, 121, 67, 133,
2023 146, 147, 156, 148, 149, 150, 151, 152, 184, 203,
2024 153, 154, 155, 161, 162, 163, 164, 165, 166, 167,
2025 189, 190, 191, 196, 197, 198, 205, 199, 200, 126,
2026 210, 211, 212, 213, 214, 215, 216, 128, 217, 179,
2027 218, 219, 220, 221, 222
2031 EvalParser::yycheck_[] =
2033 2, 73, 4, 4, 4, 4, 154, 8, 4, 4,
2034 4, 4, 4, 5, 4, 53, 164, 4, 6, 7,
2035 9, 59, 35, 65, 3, 59, 4, 61, 4, 20,
2036 4, 20, 34, 75, 76, 6, 7, 38, 38, 38,
2037 56, 57, 38, 38, 38, 38, 59, 8, 38, 51,
2038 52, 38, 54, 55, 56, 57, 58, 59, 60, 61,
2039 38, 53, 38, 54, 38, 36, 0, 69, 70, 217,
2040 218, 219, 220, 221, 222, 67, 68, 38, 27, 28,
2041 29, 30, 31, 32, 33, 9, 9, 15, 9, 17,
2042 13, 14, 49, 50, 18, 19, 20, 18, 19, 9,
2043 49, 50, 15, 13, 14, 36, 3, 38, 5, 18,
2044 19, 20, 9, 10, 11, 12, 15, 15, 190, 191,
2045 22, 23, 24, 25, 21, 197, 198, 199, 200, 26,
2046 4, 17, 6, 7, 136, 137, 138, 34, 17, 15,
2047 37, 17, 39, 40, 41, 42, 43, 44, 45, 46,
2048 47, 48, 3, 3, 51, 52, 18, 19, 9, 10,
2049 11, 58, 59, 60, 3, 62, 18, 19, 20, 17,
2050 21, 18, 19, 20, 3, 26, 18, 19, 20, 181,
2051 15, 3, 17, 34, 3, 15, 37, 17, 39, 40,
2052 41, 42, 43, 44, 45, 46, 47, 48, 3, 3,
2053 51, 52, 36, 36, 38, 38, 3, 58, 59, 60,
2054 36, 62, 38, 3, 3, 3, 15, 15, 38, 15,
2055 4, 59, 59, 16, 55, 16, 58, 55, 6, 16,
2056 16, 16, 59, 16, 16, 16, 16, 16, 54, 4,
2057 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
2058 9, 15, 15, 15, 15, 15, 59, 15, 15, 72,
2059 16, 16, 16, 16, 16, 16, 16, 74, 17, 36,
2064 EvalParser::yystos_[] =
2066 0, 56, 57, 64, 3, 5, 9, 10, 11, 12,
2067 21, 26, 34, 37, 39, 40, 41, 42, 43, 44,
2068 45, 46, 47, 48, 51, 52, 58, 59, 60, 62,
2069 65, 66, 67, 68, 3, 9, 10, 11, 51, 52,
2070 67, 0, 66, 67, 66, 15, 15, 15, 3, 17,
2071 17, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2072 3, 3, 17, 15, 17, 15, 17, 6, 7, 8,
2073 38, 67, 15, 15, 15, 15, 15, 4, 4, 59,
2074 61, 69, 59, 70, 59, 72, 58, 22, 23, 24,
2075 25, 73, 27, 28, 29, 30, 31, 32, 33, 49,
2076 50, 75, 67, 67, 66, 67, 67, 67, 67, 67,
2077 67, 67, 67, 49, 50, 76, 53, 59, 74, 55,
2078 74, 55, 66, 66, 67, 67, 69, 70, 72, 74,
2079 74, 16, 16, 16, 4, 36, 36, 36, 36, 4,
2080 4, 4, 4, 4, 4, 4, 16, 16, 16, 16,
2081 16, 16, 16, 17, 17, 17, 59, 78, 67, 67,
2082 67, 17, 17, 17, 17, 17, 17, 17, 9, 18,
2083 19, 20, 71, 20, 71, 9, 13, 14, 77, 36,
2084 4, 36, 4, 20, 54, 9, 20, 9, 9, 9,
2085 15, 15, 35, 59, 79, 67, 15, 15, 15, 15,
2086 15, 70, 70, 4, 4, 59, 70, 70, 70, 70,
2087 16, 16, 16, 16, 16, 16, 16, 17, 17, 17,
2088 17, 17, 17, 20, 71, 20, 71, 20, 71
2092 EvalParser::yyr1_[] =
2094 0, 63, 64, 64, 65, 66, 66, 66, 66, 66,
2095 66, 66, 66, 66, 66, 66, 66, 66, 67, 67,
2096 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
2097 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
2098 67, 67, 67, 67, 67, 67, 67, 67, 68, 69,
2099 69, 70, 71, 71, 72, 73, 73, 73, 73, 74,
2100 74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
2101 76, 76, 77, 77, 78, 79, 79
2105 EvalParser::yyr2_[] =
2107 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
2108 6, 11, 6, 11, 6, 6, 11, 4, 1, 1,
2109 1, 6, 11, 6, 11, 3, 3, 3, 6, 8,
2110 6, 3, 8, 6, 4, 4, 4, 4, 4, 4,
2111 4, 3, 3, 11, 6, 9, 1, 3, 1, 1,
2112 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2113 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2122 const EvalParser::yytname_[] =
2124 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2125 "\"not\"",
"\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
2126 "\"relay6\"",
"\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
2127 "\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
2128 "\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
2129 "\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
2130 "\"siaddr\"",
"\"substring\"",
"\"all\"",
"\",\"",
"\"concat\"",
"\"+\"",
2131 "\"ifelse\"",
"\"hexstring\"",
"\"addrtotext\"",
"\"int8totext\"",
2132 "\"int16totext\"",
"\"int32totext\"",
"\"uint8totext\"",
2133 "\"uint16totext\"",
"\"uint32totext\"",
"\"pkt6\"",
"\"msgtype\"",
2134 "\"transid\"",
"\"vendor-class\"",
"\"vendor\"",
"\"*\"",
"\"data\"",
2135 "\"enterprise\"",
"\"top-level bool\"",
"\"top-level string\"",
2136 "\"constant string\"",
"\"integer\"",
"\"constant hexstring\"",
2137 "\"option name\"",
"\"ip address\"",
"$accept",
"start",
"expression",
2138 "bool_expr",
"string_expr",
"integer_expr",
"option_code",
2139 "sub_option_code",
"option_repr_type",
"nest_level",
"pkt_metadata",
2140 "enterprise_id",
"pkt4_field",
"pkt6_field",
"relay6_field",
2141 "start_expr",
"length_expr", YY_NULLPTR
2148 EvalParser::yyrline_[] =
2150 0, 130, 130, 131, 136, 139, 140, 145, 150, 155,
2151 160, 165, 170, 190, 204, 213, 222, 232, 249, 254,
2152 259, 264, 269, 274, 295, 310, 315, 329, 343, 358,
2153 363, 368, 373, 378, 383, 388, 393, 398, 403, 408,
2154 413, 418, 427, 437, 446, 459, 472, 477, 480, 486,
2155 490, 496, 502, 506, 512, 521, 525, 529, 533, 539,
2156 543, 549, 553, 557, 561, 565, 569, 573, 577, 581,
2157 587, 591, 597, 601, 607, 614, 619
2161 EvalParser::yy_stack_print_ ()
const
2163 *yycdebug_ <<
"Stack now";
2164 for (stack_type::const_iterator
2165 i = yystack_.begin (),
2166 i_end = yystack_.end ();
2168 *yycdebug_ <<
' ' << int (i->state);
2173 EvalParser::yy_reduce_print_ (
int yyrule)
const
2175 int yylno = yyrline_[yyrule];
2176 int yynrhs = yyr2_[yyrule];
2178 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2179 <<
" (line " << yylno <<
"):\n";
2181 for (
int yyi = 0; yyi < yynrhs; yyi++)
2183 yystack_[(yynrhs) - (yyi + 1)]);
2190#line 2191 "parser.cc"
2192#line 626 "parser.yy"
2196 const std::string& what)
2198 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