52#if defined(__GNUC__) || defined(__clang__)
53#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
60# if defined YYENABLE_NLS && YYENABLE_NLS
63# define YY_(msgid) dgettext ("bison-runtime", msgid)
67# define YY_(msgid) msgid
74# if defined __GNUC__ && !defined __EXCEPTIONS
75# define YY_EXCEPTIONS 0
77# define YY_EXCEPTIONS 1
81#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
86# ifndef YYLLOC_DEFAULT
87# define YYLLOC_DEFAULT(Current, Rhs, N) \
91 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
92 (Current).end = YYRHSLOC (Rhs, N).end; \
96 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
106# define YYCDEBUG if (yydebug_) (*yycdebug_)
108# define YY_SYMBOL_PRINT(Title, Symbol) \
112 *yycdebug_ << Title << ' '; \
113 yy_print_ (*yycdebug_, Symbol); \
114 *yycdebug_ << '\n'; \
118# define YY_REDUCE_PRINT(Rule) \
121 yy_reduce_print_ (Rule); \
124# define YY_STACK_PRINT() \
127 yy_stack_print_ (); \
132# define YYCDEBUG if (false) std::cerr
133# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
134# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
135# define YY_STACK_PRINT() static_cast<void> (0)
139#define yyerrok (yyerrstatus_ = 0)
140#define yyclearin (yyla.clear ())
142#define YYACCEPT goto yyacceptlab
143#define YYABORT goto yyabortlab
144#define YYERROR goto yyerrorlab
145#define YYRECOVERING() (!!yyerrstatus_)
148namespace isc {
namespace eval {
155 yycdebug_ (&std::cerr),
176 : state (empty_state)
179 EvalParser::by_state::by_state (
const by_state& that)
YY_NOEXCEPT
190 EvalParser::by_state::move (by_state& that)
196 EvalParser::by_state::by_state (state_type s)
YY_NOEXCEPT
203 if (state == empty_state)
209 EvalParser::stack_symbol_type::stack_symbol_type ()
212 EvalParser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
215 switch (that.kind ())
238 value.YY_MOVE_OR_COPY< int8_t > (
YY_MOVE (that.value));
246 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (that.value));
251 value.YY_MOVE_OR_COPY< uint16_t > (
YY_MOVE (that.value));
256 value.YY_MOVE_OR_COPY< uint32_t > (
YY_MOVE (that.value));
263#if 201103L <= YY_CPLUSPLUS
265 that.state = empty_state;
269 EvalParser::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
270 : super_type (s,
YY_MOVE (that.location))
272 switch (that.kind ())
295 value.move< int8_t > (
YY_MOVE (that.value));
303 value.move< std::string > (
YY_MOVE (that.value));
308 value.move< uint16_t > (
YY_MOVE (that.value));
313 value.move< uint32_t > (
YY_MOVE (that.value));
324#if YY_CPLUSPLUS < 201103L
325 EvalParser::stack_symbol_type&
326 EvalParser::stack_symbol_type::operator= (
const stack_symbol_type& that)
329 switch (that.kind ())
352 value.copy< int8_t > (that.value);
360 value.copy< std::string > (that.value);
365 value.copy< uint16_t > (that.value);
370 value.copy< uint32_t > (that.value);
377 location = that.location;
381 EvalParser::stack_symbol_type&
382 EvalParser::stack_symbol_type::operator= (stack_symbol_type& that)
385 switch (that.kind ())
408 value.move< int8_t > (that.value);
416 value.move< std::string > (that.value);
421 value.move< uint16_t > (that.value);
426 value.move< uint32_t > (that.value);
433 location = that.location;
435 that.state = empty_state;
440 template <
typename Base>
442 EvalParser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
449 template <
typename Base>
451 EvalParser::yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const
453 std::ostream& yyoutput = yyo;
456 yyo <<
"empty symbol";
460 yyo << (yykind <
YYNTOKENS ?
"token" :
"nterm")
461 <<
' ' << yysym.name () <<
" ("
462 << yysym.location <<
": ";
467 { yyoutput << yysym.value.template as < std::string > (); }
473 { yyoutput << yysym.value.template as < std::string > (); }
479 { yyoutput << yysym.value.template as < std::string > (); }
485 { yyoutput << yysym.value.template as < std::string > (); }
491 { yyoutput << yysym.value.template as < std::string > (); }
497 { yyoutput << yysym.value.template as < uint32_t > (); }
503 { yyoutput << yysym.value.template as < uint16_t > (); }
509 { yyoutput << yysym.value.template as < uint16_t > (); }
515 { yyoutput << yysym.value.template as < TokenOption::RepresentationType > (); }
521 { yyoutput << yysym.value.template as < int8_t > (); }
527 { yyoutput << yysym.value.template as < TokenPkt::MetadataType > (); }
533 { yyoutput << yysym.value.template as < uint32_t > (); }
539 { yyoutput << yysym.value.template as < TokenPkt4::FieldType > (); }
545 { yyoutput << yysym.value.template as < TokenPkt6::FieldType > (); }
551 { yyoutput << yysym.value.template as < TokenRelay6Field::FieldType > (); }
564 EvalParser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
572 EvalParser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym)
574#if 201103L <= YY_CPLUSPLUS
575 yypush_ (m, stack_symbol_type (s, std::move (sym)));
577 stack_symbol_type ss (s, sym);
590 EvalParser::debug_stream ()
const
596 EvalParser::set_debug_stream (std::ostream& o)
602 EvalParser::debug_level_type
603 EvalParser::debug_level ()
const
609 EvalParser::set_debug_level (debug_level_type l)
615 EvalParser::state_type
616 EvalParser::yy_lr_goto_state_ (state_type yystate,
int yysym)
618 int yyr = yypgoto_[yysym -
YYNTOKENS] + yystate;
619 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
620 return yytable_[yyr];
626 EvalParser::yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT
628 return yyvalue == yypact_ninf_;
632 EvalParser::yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT
634 return yyvalue == yytable_ninf_;
652 int yyerrstatus_ = 0;
658 stack_symbol_type yyerror_range[3];
675 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
681 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
685 if (yystack_[0].state == yyfinal_)
696 yyn = yypact_[+yystack_[0].state];
697 if (yy_pact_value_is_default_ (yyn))
709 yyla.move (yylookahead);
714 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
735 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ())
744 if (yy_table_value_is_error_ (yyn))
755 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
763 yyn = yydefact_[+yystack_[0].state];
775 stack_symbol_type yylhs;
776 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
803 yylhs.value.emplace< int8_t > ();
811 yylhs.value.emplace< std::string > ();
816 yylhs.value.emplace< uint16_t > ();
821 yylhs.value.emplace< uint32_t > ();
833 yyerror_range[1].location = yylhs.location;
916 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
934 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
989 std::string cc = yystack_[1].value.as < std::string > ();
991 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
1000#line 257 "parser.yy"
1009#line 1010 "parser.cc"
1013#line 268 "parser.yy"
1018#line 1019 "parser.cc"
1022#line 273 "parser.yy"
1027#line 1028 "parser.cc"
1031#line 278 "parser.yy"
1036#line 1037 "parser.cc"
1040#line 283 "parser.yy"
1045#line 1046 "parser.cc"
1049#line 288 "parser.yy"
1054#line 1055 "parser.cc"
1058#line 293 "parser.yy"
1075 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1078#line 1079 "parser.cc"
1082#line 314 "parser.yy"
1093 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1096#line 1097 "parser.cc"
1100#line 329 "parser.yy"
1105#line 1106 "parser.cc"
1109#line 334 "parser.yy"
1120 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1123#line 1124 "parser.cc"
1127#line 348 "parser.yy"
1138 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1141#line 1142 "parser.cc"
1145#line 362 "parser.yy"
1156 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1159#line 1160 "parser.cc"
1163#line 377 "parser.yy"
1168#line 1169 "parser.cc"
1172#line 382 "parser.yy"
1177#line 1178 "parser.cc"
1181#line 387 "parser.yy"
1186#line 1187 "parser.cc"
1190#line 392 "parser.yy"
1195#line 1196 "parser.cc"
1199#line 397 "parser.yy"
1204#line 1205 "parser.cc"
1208#line 402 "parser.yy"
1213#line 1214 "parser.cc"
1217#line 407 "parser.yy"
1222#line 1223 "parser.cc"
1226#line 412 "parser.yy"
1231#line 1232 "parser.cc"
1235#line 417 "parser.yy"
1240#line 1241 "parser.cc"
1244#line 422 "parser.yy"
1249#line 1250 "parser.cc"
1253#line 427 "parser.yy"
1258#line 1259 "parser.cc"
1262#line 432 "parser.yy"
1267#line 1268 "parser.cc"
1271#line 437 "parser.yy"
1276#line 1277 "parser.cc"
1280#line 442 "parser.yy"
1285#line 1286 "parser.cc"
1289#line 447 "parser.yy"
1294#line 1295 "parser.cc"
1298#line 452 "parser.yy"
1307#line 1308 "parser.cc"
1311#line 461 "parser.yy"
1321#line 1322 "parser.cc"
1325#line 471 "parser.yy"
1334#line 1335 "parser.cc"
1338#line 480 "parser.yy"
1351#line 1352 "parser.cc"
1355#line 493 "parser.yy"
1363 uint8_t index = ctx.
convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location);
1368#line 1369 "parser.cc"
1372#line 506 "parser.yy"
1377#line 1378 "parser.cc"
1381#line 514 "parser.yy"
1383 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1385#line 1386 "parser.cc"
1389#line 520 "parser.yy"
1391 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1393#line 1394 "parser.cc"
1397#line 524 "parser.yy"
1399 yylhs.value.as < uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location);
1401#line 1402 "parser.cc"
1405#line 530 "parser.yy"
1407 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1409#line 1410 "parser.cc"
1413#line 536 "parser.yy"
1417#line 1418 "parser.cc"
1421#line 540 "parser.yy"
1425#line 1426 "parser.cc"
1429#line 546 "parser.yy"
1431 yylhs.value.as < int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location);
1433#line 1434 "parser.cc"
1437#line 555 "parser.yy"
1441#line 1442 "parser.cc"
1445#line 559 "parser.yy"
1449#line 1450 "parser.cc"
1453#line 563 "parser.yy"
1457#line 1458 "parser.cc"
1461#line 567 "parser.yy"
1465#line 1466 "parser.cc"
1469#line 573 "parser.yy"
1471 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1473#line 1474 "parser.cc"
1477#line 577 "parser.yy"
1479 yylhs.value.as < uint32_t > () = 0;
1481#line 1482 "parser.cc"
1485#line 583 "parser.yy"
1489#line 1490 "parser.cc"
1493#line 587 "parser.yy"
1497#line 1498 "parser.cc"
1501#line 591 "parser.yy"
1505#line 1506 "parser.cc"
1509#line 595 "parser.yy"
1513#line 1514 "parser.cc"
1517#line 599 "parser.yy"
1521#line 1522 "parser.cc"
1525#line 603 "parser.yy"
1529#line 1530 "parser.cc"
1533#line 607 "parser.yy"
1537#line 1538 "parser.cc"
1541#line 611 "parser.yy"
1545#line 1546 "parser.cc"
1549#line 615 "parser.yy"
1553#line 1554 "parser.cc"
1557#line 621 "parser.yy"
1561#line 1562 "parser.cc"
1565#line 625 "parser.yy"
1569#line 1570 "parser.cc"
1573#line 631 "parser.yy"
1577#line 1578 "parser.cc"
1581#line 635 "parser.yy"
1585#line 1586 "parser.cc"
1589#line 641 "parser.yy"
1594#line 1595 "parser.cc"
1598#line 648 "parser.yy"
1603#line 1604 "parser.cc"
1607#line 653 "parser.yy"
1612#line 1613 "parser.cc"
1616#line 659 "parser.yy"
1621#line 1622 "parser.cc"
1625#line 1626 "parser.cc"
1634 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1644 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1658 std::string msg = yysyntax_error_ (yyctx);
1663 yyerror_range[1].location = yyla.location;
1664 if (yyerrstatus_ == 3)
1672 else if (!yyla.empty ())
1674 yy_destroy_ (
"Error: discarding", yyla);
1708 yyn = yypact_[+yystack_[0].state];
1709 if (!yy_pact_value_is_default_ (yyn))
1712 if (0 <= yyn && yyn <= yylast_
1715 yyn = yytable_[yyn];
1722 if (yystack_.size () == 1)
1725 yyerror_range[1].location = yystack_[0].location;
1726 yy_destroy_ (
"Error: popping", yystack_[0]);
1731 stack_symbol_type error_token;
1733 yyerror_range[2].location = yyla.location;
1737 error_token.state = state_type (yyn);
1738 yypush_ (
"Shifting",
YY_MOVE (error_token));
1764 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1770 while (1 < yystack_.size ())
1772 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1781 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1785 yy_destroy_ (YY_NULLPTR, yyla);
1787 while (1 < yystack_.size ())
1789 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1800 error (yyexc.location, yyexc.what ());
1809 EvalParser::yytnamerr_ (
const char *yystr)
1814 char const *yyp = yystr;
1821 goto do_not_strip_quotes;
1825 goto do_not_strip_quotes;
1837 do_not_strip_quotes: ;
1846 return yytnamerr_ (yytname_[yysymbol]);
1853 : yyparser_ (yyparser)
1863 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1864 if (!yy_pact_value_is_default_ (yyn))
1869 const int yyxbegin = yyn < 0 ? -yyn : 0;
1871 const int yychecklim = yylast_ - yyn + 1;
1873 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1875 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1879 else if (yycount == yyargn)
1886 if (yyarg && yycount == 0 && 0 < yyargn)
1897 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
1925 if (!yyctx.lookahead ().empty ())
1928 yyarg[0] = yyctx.token ();
1929 int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1937 EvalParser::yysyntax_error_ (
const context& yyctx)
const
1940 enum { YYARGS_MAX = 5 };
1943 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1945 char const* yyformat = YY_NULLPTR;
1948#define YYCASE_(N, S) \
1954 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1955 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1956 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1957 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1958 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1964 std::ptrdiff_t yyi = 0;
1965 for (
char const* yyp = yyformat; *yyp; ++yyp)
1966 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1977 const short EvalParser::yypact_ninf_ = -164;
1979 const signed char EvalParser::yytable_ninf_ = -1;
1982 EvalParser::yypact_[] =
1984 55, 124, 182, 22, 124, 124, 56, 59, 68, 27,
1985 108, 115, 45, 100, 154, 157, 160, 178, 181, 186,
1986 210, 211, 212, 215, 216, 218, 217, 83, 111, 232,
1987 -164, -164, -164, -164, -164, 131, 10, -164, 182, 223,
1988 224, 225, 165, 179, 202, -164, 19, 0, -164, 132,
1989 180, 184, 187, 96, 61, 182, 182, 182, 124, 182,
1990 182, 182, 182, 182, 182, 182, 182, 182, 182, 91,
1991 -36, 192, -36, 193, 190, 124, 124, 182, 182, 2,
1992 132, 180, 184, -36, -36, -164, -164, -164, -164, 226,
1993 -164, 237, -164, 238, 251, -164, -164, -164, -164, -164,
1994 -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
1995 162, 163, 167, 80, 168, 5, 6, 7, 8, 11,
1996 12, 13, 17, 29, -164, -164, -164, -164, -164, 240,
1997 -164, 241, -164, 221, -164, 253, 202, -164, 244, 245,
1998 246, 247, 248, 249, 250, 252, -164, 205, 182, 182,
1999 182, 182, -164, -164, -164, -164, -164, -164, -164, -164,
2000 -164, 254, 255, 182, 256, 257, 258, 259, 260, 86,
2001 92, 15, -164, 228, 172, 30, 173, 31, -17, 87,
2002 33, 90, 158, 88, 213, 269, 264, -164, -164, -164,
2003 -164, -164, -164, 265, -164, -164, -164, -31, 219, -164,
2004 182, -164, -164, 266, 268, -164, -164, 270, 271, 272,
2005 180, 180, -164, -164, 280, -164, 284, 34, 227, 180,
2006 180, 180, 180, 273, 275, -164, -164, -164, 276, 277,
2007 278, 279, 281, 282, 283, -164, 285, 286, 287, 288,
2008 104, 133, 136, 158, 158, 158, -164, -164, -164, -164,
2013 EvalParser::yydefact_[] =
2015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2017 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2018 19, 52, 20, 21, 2, 4, 0, 50, 0, 0,
2019 0, 0, 0, 0, 3, 1, 0, 0, 6, 0,
2020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2023 0, 0, 0, 0, 0, 5, 51, 53, 54, 0,
2024 55, 0, 58, 0, 0, 59, 60, 61, 62, 26,
2025 65, 66, 67, 68, 69, 70, 71, 72, 73, 27,
2026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2027 0, 0, 0, 0, 74, 75, 28, 64, 63, 0,
2028 46, 0, 45, 0, 7, 8, 9, 33, 0, 0,
2029 0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
2030 0, 0, 38, 39, 40, 41, 42, 43, 44, 34,
2031 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2032 0, 0, 78, 0, 0, 0, 0, 0, 0, 0,
2033 0, 0, 0, 0, 0, 0, 0, 56, 57, 10,
2034 22, 12, 24, 0, 76, 77, 29, 0, 0, 32,
2035 0, 37, 14, 48, 0, 15, 18, 0, 0, 0,
2036 0, 0, 80, 79, 0, 81, 0, 0, 0, 0,
2037 0, 0, 0, 0, 0, 30, 31, 36, 0, 0,
2038 0, 0, 0, 0, 0, 49, 0, 0, 0, 0,
2039 0, 0, 0, 0, 0, 0, 11, 23, 13, 25,
2044 EvalParser::yypgoto_[] =
2046 -164, -164, -164, 9, -2, -164, 229, -80, -163, 214,
2047 -164, -41, -164, -164, -164, -164, -164, -164
2051 EvalParser::yydefgoto_[] =
2053 0, 3, 34, 35, 36, 37, 89, 91, 190, 93,
2054 99, 129, 109, 126, 196, 173, 214, 216
2058 EvalParser::yytable_[] =
2060 44, 139, 47, 202, 86, 212, 86, 192, 77, 152,
2061 153, 154, 155, 46, 48, 156, 157, 158, 77, 192,
2062 127, 159, 45, 85, 193, 75, 76, 128, 194, 195,
2063 52, 131, 213, 160, 199, 201, 79, 206, 227, 78,
2064 203, 78, 141, 142, 78, 78, 78, 78, 55, 78,
2065 78, 78, 78, 110, 111, 112, 78, 114, 115, 116,
2066 117, 118, 119, 120, 121, 122, 123, 113, 78, 78,
2067 78, 49, 78, 78, 50, 136, 137, 247, 249, 251,
2068 247, 249, 251, 51, 134, 135, 75, 76, 100, 101,
2069 102, 103, 104, 105, 106, 186, 204, 208, 70, 207,
2070 71, 194, 195, 56, 187, 188, 189, 205, 187, 188,
2071 187, 188, 191, 107, 108, 1, 2, 150, 95, 96,
2072 97, 98, 187, 188, 246, 53, 72, 4, 73, 5,
2073 223, 224, 54, 6, 7, 8, 9, 75, 76, 229,
2074 230, 231, 232, 124, 125, 10, 174, 175, 176, 177,
2075 11, 187, 188, 248, 187, 188, 250, 57, 12, 13,
2076 58, 180, 14, 59, 15, 16, 17, 18, 19, 20,
2077 21, 22, 23, 24, 25, 26, 187, 188, 27, 28,
2078 83, 60, 71, 29, 61, 38, 30, 31, 32, 62,
2079 33, 39, 40, 41, 84, 87, 73, 88, 217, 147,
2080 148, 78, 78, 10, 149, 151, 78, 78, 11, 198,
2081 200, 78, 78, 63, 64, 65, 12, 13, 66, 67,
2082 14, 68, 15, 16, 17, 18, 19, 20, 21, 22,
2083 23, 24, 25, 26, 69, 74, 42, 43, 80, 81,
2084 82, 78, 143, 90, 30, 31, 32, 92, 33, 94,
2085 130, 132, 133, 144, 145, 146, 161, 162, 163, 75,
2086 164, 165, 166, 167, 168, 197, 169, 170, 172, 171,
2087 203, 178, 179, 181, 182, 183, 184, 185, 209, 210,
2088 211, 218, 215, 219, 225, 220, 221, 222, 226, 233,
2089 228, 234, 235, 236, 237, 238, 140, 239, 0, 240,
2090 241, 0, 242, 243, 244, 245, 0, 0, 0, 138
2094 EvalParser::yycheck_[] =
2096 2, 81, 4, 20, 4, 36, 4, 170, 8, 4,
2097 4, 4, 4, 4, 5, 4, 4, 4, 8, 182,
2098 56, 4, 0, 4, 9, 6, 7, 63, 13, 14,
2099 3, 72, 63, 4, 4, 4, 38, 4, 4, 39,
2100 57, 39, 83, 84, 39, 39, 39, 39, 3, 39,
2101 39, 39, 39, 55, 56, 57, 39, 59, 60, 61,
2102 62, 63, 64, 65, 66, 67, 68, 58, 39, 39,
2103 39, 15, 39, 39, 15, 77, 78, 240, 241, 242,
2104 243, 244, 245, 15, 75, 76, 6, 7, 27, 28,
2105 29, 30, 31, 32, 33, 9, 9, 9, 15, 9,
2106 17, 13, 14, 3, 18, 19, 20, 20, 18, 19,
2107 18, 19, 20, 52, 53, 60, 61, 37, 22, 23,
2108 24, 25, 18, 19, 20, 17, 15, 3, 17, 5,
2109 210, 211, 17, 9, 10, 11, 12, 6, 7, 219,
2110 220, 221, 222, 52, 53, 21, 148, 149, 150, 151,
2111 26, 18, 19, 20, 18, 19, 20, 3, 34, 35,
2112 3, 163, 38, 3, 40, 41, 42, 43, 44, 45,
2113 46, 47, 48, 49, 50, 51, 18, 19, 54, 55,
2114 15, 3, 17, 59, 3, 3, 62, 63, 64, 3,
2115 66, 9, 10, 11, 15, 63, 17, 65, 200, 37,
2116 37, 39, 39, 21, 37, 37, 39, 39, 26, 37,
2117 37, 39, 39, 3, 3, 3, 34, 35, 3, 3,
2118 38, 3, 40, 41, 42, 43, 44, 45, 46, 47,
2119 48, 49, 50, 51, 17, 3, 54, 55, 15, 15,
2120 15, 39, 16, 63, 62, 63, 64, 63, 66, 62,
2121 58, 58, 62, 16, 16, 4, 16, 16, 37, 6,
2122 16, 16, 16, 16, 16, 37, 17, 17, 63, 17,
2123 57, 17, 17, 17, 17, 17, 17, 17, 9, 15,
2124 15, 15, 63, 15, 4, 15, 15, 15, 4, 16,
2125 63, 16, 16, 16, 16, 16, 82, 16, -1, 17,
2126 17, -1, 17, 17, 17, 17, -1, -1, -1, 80
2130 EvalParser::yystos_[] =
2132 0, 60, 61, 68, 3, 5, 9, 10, 11, 12,
2133 21, 26, 34, 35, 38, 40, 41, 42, 43, 44,
2134 45, 46, 47, 48, 49, 50, 51, 54, 55, 59,
2135 62, 63, 64, 66, 69, 70, 71, 72, 3, 9,
2136 10, 11, 54, 55, 71, 0, 70, 71, 70, 15,
2137 15, 15, 3, 17, 17, 3, 3, 3, 3, 3,
2138 3, 3, 3, 3, 3, 3, 3, 3, 3, 17,
2139 15, 17, 15, 17, 3, 6, 7, 8, 39, 71,
2140 15, 15, 15, 15, 15, 4, 4, 63, 65, 73,
2141 63, 74, 63, 76, 62, 22, 23, 24, 25, 77,
2142 27, 28, 29, 30, 31, 32, 33, 52, 53, 79,
2143 71, 71, 71, 70, 71, 71, 71, 71, 71, 71,
2144 71, 71, 71, 71, 52, 53, 80, 56, 63, 78,
2145 58, 78, 58, 62, 70, 70, 71, 71, 73, 74,
2146 76, 78, 78, 16, 16, 16, 4, 37, 37, 37,
2147 37, 37, 4, 4, 4, 4, 4, 4, 4, 4,
2148 4, 16, 16, 37, 16, 16, 16, 16, 16, 17,
2149 17, 17, 63, 82, 71, 71, 71, 71, 17, 17,
2150 71, 17, 17, 17, 17, 17, 9, 18, 19, 20,
2151 75, 20, 75, 9, 13, 14, 81, 37, 37, 4,
2152 37, 4, 20, 57, 9, 20, 4, 9, 9, 9,
2153 15, 15, 36, 63, 83, 63, 84, 71, 15, 15,
2154 15, 15, 15, 74, 74, 4, 4, 4, 63, 74,
2155 74, 74, 74, 16, 16, 16, 16, 16, 16, 16,
2156 17, 17, 17, 17, 17, 17, 20, 75, 20, 75,
2161 EvalParser::yyr1_[] =
2163 0, 67, 68, 68, 69, 70, 70, 70, 70, 70,
2164 70, 70, 70, 70, 70, 70, 70, 70, 70, 71,
2165 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
2166 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
2167 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
2168 71, 71, 72, 73, 73, 74, 75, 75, 76, 77,
2169 77, 77, 77, 78, 78, 79, 79, 79, 79, 79,
2170 79, 79, 79, 79, 80, 80, 81, 81, 82, 83,
2175 EvalParser::yyr2_[] =
2177 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
2178 6, 11, 6, 11, 6, 6, 11, 4, 6, 1,
2179 1, 1, 6, 11, 6, 11, 3, 3, 3, 6,
2180 8, 8, 6, 3, 4, 4, 8, 6, 4, 4,
2181 4, 4, 4, 4, 4, 3, 3, 11, 6, 9,
2182 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2193 const EvalParser::yytname_[] =
2195 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2196 "\"not\"",
"\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
2197 "\"relay6\"",
"\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
2198 "\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
2199 "\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
2200 "\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
2201 "\"siaddr\"",
"\"substring\"",
"\"split\"",
"\"all\"",
"\",\"",
2202 "\"concat\"",
"\"+\"",
"\"ifelse\"",
"\"hexstring\"",
"\"addrtotext\"",
2203 "\"int8totext\"",
"\"int16totext\"",
"\"int32totext\"",
2204 "\"uint8totext\"",
"\"uint16totext\"",
"\"uint32totext\"",
"\"lcase\"",
2205 "\"ucase\"",
"\"pkt6\"",
"\"msgtype\"",
"\"transid\"",
2206 "\"vendor-class\"",
"\"vendor\"",
"\"*\"",
"\"data\"",
"\"enterprise\"",
2207 "\"match\"",
"\"top-level bool\"",
"\"top-level string\"",
2208 "\"constant string\"",
"\"integer\"",
"\"constant hexstring\"",
2209 "\"option name\"",
"\"ip address\"",
"$accept",
"start",
"expression",
2210 "bool_expr",
"string_expr",
"integer_expr",
"option_code",
2211 "sub_option_code",
"option_repr_type",
"nest_level",
"pkt_metadata",
2212 "enterprise_id",
"pkt4_field",
"pkt6_field",
"relay6_field",
2213 "start_expr",
"length_expr",
"int_expr", YY_NULLPTR
2220 EvalParser::yyrline_[] =
2222 0, 139, 139, 140, 145, 148, 149, 154, 159, 164,
2223 169, 174, 179, 199, 213, 222, 231, 241, 256, 267,
2224 272, 277, 282, 287, 292, 313, 328, 333, 347, 361,
2225 376, 381, 386, 391, 396, 401, 406, 411, 416, 421,
2226 426, 431, 436, 441, 446, 451, 460, 470, 479, 492,
2227 505, 510, 513, 519, 523, 529, 535, 539, 545, 554,
2228 558, 562, 566, 572, 576, 582, 586, 590, 594, 598,
2229 602, 606, 610, 614, 620, 624, 630, 634, 640, 647,
2234 EvalParser::yy_stack_print_ ()
const
2236 *yycdebug_ <<
"Stack now";
2237 for (stack_type::const_iterator
2238 i = yystack_.begin (),
2239 i_end = yystack_.end ();
2241 *yycdebug_ <<
' ' <<
int (i->state);
2246 EvalParser::yy_reduce_print_ (
int yyrule)
const
2248 int yylno = yyrline_[yyrule];
2249 int yynrhs = yyr2_[yyrule];
2251 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2252 <<
" (line " << yylno <<
"):\n";
2254 for (
int yyi = 0; yyi < yynrhs; yyi++)
2256 yystack_[(yynrhs) - (yyi + 1)]);
2263#line 2264 "parser.cc"
2265#line 665 "parser.yy"
2269 const std::string& what)
2271 ctx.error(loc, what);
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Symbol)
#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 representing a constant lower case string.
Token that represents regular expression (regex) matching.
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.
@ CIADDR
ciaddr (IPv4 address)
@ HLEN
hlen (hardware address length)
@ HTYPE
htype (hardware address type)
@ GIADDR
giaddr (IPv4 address)
@ CHADDR
chaddr field (up to 16 bytes link-layer address)
@ YIADDR
yiaddr (IPv4 address)
@ SIADDR
siaddr (IPv4 address)
@ TRANSID
transaction-id (xid)
@ MSGTYPE
message type (not really a field, content of option 53)
Token that represents fields of DHCPv6 packet.
FieldType
enum value that determines the field.
@ TRANSID
transaction id (integer but manipulated as a string)
Token that represents meta data of a DHCP packet.
MetadataType
enum value that determines the field.
@ DST
destination (IP address)
@ IFACE
interface name (string)
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.
@ LINKADDR
Link address field (IPv6 address)
@ PEERADDR
Peer address field (IPv6 address)
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 representing a constant upper case string.
Token that represents vendor class options in DHCPv4 and DHCPv6.
Token that represents vendor options in DHCPv4 and DHCPv6.
@ DATA
data chunk, used in derived vendor-class only
@ ENTERPRISE_ID
enterprise-id field (vendor-info, vendor-class)
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.
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)
Present a slice of the top of a stack.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
virtual int parse()
Parse.
location location_type
Symbol locations.
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 the isc::eval::parser class.
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW