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 258 "parser.yy"
1005#line 1006 "parser.cc"
1009#line 263 "parser.yy"
1014#line 1015 "parser.cc"
1018#line 268 "parser.yy"
1023#line 1024 "parser.cc"
1027#line 273 "parser.yy"
1032#line 1033 "parser.cc"
1036#line 278 "parser.yy"
1041#line 1042 "parser.cc"
1045#line 283 "parser.yy"
1062 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1065#line 1066 "parser.cc"
1069#line 304 "parser.yy"
1080 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1083#line 1084 "parser.cc"
1087#line 319 "parser.yy"
1092#line 1093 "parser.cc"
1096#line 324 "parser.yy"
1107 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1110#line 1111 "parser.cc"
1114#line 338 "parser.yy"
1125 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1128#line 1129 "parser.cc"
1132#line 352 "parser.yy"
1143 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1146#line 1147 "parser.cc"
1150#line 367 "parser.yy"
1155#line 1156 "parser.cc"
1159#line 372 "parser.yy"
1164#line 1165 "parser.cc"
1168#line 377 "parser.yy"
1173#line 1174 "parser.cc"
1177#line 382 "parser.yy"
1182#line 1183 "parser.cc"
1186#line 387 "parser.yy"
1191#line 1192 "parser.cc"
1195#line 392 "parser.yy"
1200#line 1201 "parser.cc"
1204#line 397 "parser.yy"
1209#line 1210 "parser.cc"
1213#line 402 "parser.yy"
1218#line 1219 "parser.cc"
1222#line 407 "parser.yy"
1227#line 1228 "parser.cc"
1231#line 412 "parser.yy"
1236#line 1237 "parser.cc"
1240#line 417 "parser.yy"
1245#line 1246 "parser.cc"
1249#line 422 "parser.yy"
1254#line 1255 "parser.cc"
1258#line 427 "parser.yy"
1263#line 1264 "parser.cc"
1267#line 432 "parser.yy"
1272#line 1273 "parser.cc"
1276#line 437 "parser.yy"
1281#line 1282 "parser.cc"
1285#line 442 "parser.yy"
1294#line 1295 "parser.cc"
1298#line 451 "parser.yy"
1308#line 1309 "parser.cc"
1312#line 461 "parser.yy"
1321#line 1322 "parser.cc"
1325#line 470 "parser.yy"
1338#line 1339 "parser.cc"
1342#line 483 "parser.yy"
1350 uint8_t index = ctx.
convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location);
1355#line 1356 "parser.cc"
1359#line 496 "parser.yy"
1364#line 1365 "parser.cc"
1368#line 504 "parser.yy"
1370 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1372#line 1373 "parser.cc"
1376#line 510 "parser.yy"
1378 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1380#line 1381 "parser.cc"
1384#line 514 "parser.yy"
1386 yylhs.value.as < uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location);
1388#line 1389 "parser.cc"
1392#line 520 "parser.yy"
1394 yylhs.value.as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
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 536 "parser.yy"
1418 yylhs.value.as < int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location);
1420#line 1421 "parser.cc"
1424#line 545 "parser.yy"
1428#line 1429 "parser.cc"
1432#line 549 "parser.yy"
1436#line 1437 "parser.cc"
1440#line 553 "parser.yy"
1444#line 1445 "parser.cc"
1448#line 557 "parser.yy"
1452#line 1453 "parser.cc"
1456#line 563 "parser.yy"
1458 yylhs.value.as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1460#line 1461 "parser.cc"
1464#line 567 "parser.yy"
1466 yylhs.value.as < uint32_t > () = 0;
1468#line 1469 "parser.cc"
1472#line 573 "parser.yy"
1476#line 1477 "parser.cc"
1480#line 577 "parser.yy"
1484#line 1485 "parser.cc"
1488#line 581 "parser.yy"
1492#line 1493 "parser.cc"
1496#line 585 "parser.yy"
1500#line 1501 "parser.cc"
1504#line 589 "parser.yy"
1508#line 1509 "parser.cc"
1512#line 593 "parser.yy"
1516#line 1517 "parser.cc"
1520#line 597 "parser.yy"
1524#line 1525 "parser.cc"
1528#line 601 "parser.yy"
1532#line 1533 "parser.cc"
1536#line 605 "parser.yy"
1540#line 1541 "parser.cc"
1544#line 611 "parser.yy"
1548#line 1549 "parser.cc"
1552#line 615 "parser.yy"
1556#line 1557 "parser.cc"
1560#line 621 "parser.yy"
1564#line 1565 "parser.cc"
1568#line 625 "parser.yy"
1572#line 1573 "parser.cc"
1576#line 631 "parser.yy"
1581#line 1582 "parser.cc"
1585#line 638 "parser.yy"
1590#line 1591 "parser.cc"
1594#line 643 "parser.yy"
1599#line 1600 "parser.cc"
1603#line 649 "parser.yy"
1608#line 1609 "parser.cc"
1612#line 1613 "parser.cc"
1621 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1631 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1645 std::string msg = yysyntax_error_ (yyctx);
1650 yyerror_range[1].location = yyla.
location;
1651 if (yyerrstatus_ == 3)
1659 else if (!yyla.
empty ())
1661 yy_destroy_ (
"Error: discarding", yyla);
1695 yyn = yypact_[+yystack_[0].state];
1696 if (!yy_pact_value_is_default_ (yyn))
1699 if (0 <= yyn && yyn <= yylast_
1702 yyn = yytable_[yyn];
1709 if (yystack_.size () == 1)
1712 yyerror_range[1].location = yystack_[0].location;
1713 yy_destroy_ (
"Error: popping", yystack_[0]);
1718 stack_symbol_type error_token;
1720 yyerror_range[2].location = yyla.
location;
1724 error_token.state = state_type (yyn);
1725 yypush_ (
"Shifting",
YY_MOVE (error_token));
1751 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1757 while (1 < yystack_.size ())
1759 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1768 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1772 yy_destroy_ (YY_NULLPTR, yyla);
1774 while (1 < yystack_.size ())
1776 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1796 EvalParser::yytnamerr_ (
const char *yystr)
1801 char const *yyp = yystr;
1808 goto do_not_strip_quotes;
1812 goto do_not_strip_quotes;
1824 do_not_strip_quotes: ;
1833 return yytnamerr_ (yytname_[yysymbol]);
1840 : yyparser_ (yyparser)
1850 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1851 if (!yy_pact_value_is_default_ (yyn))
1856 const int yyxbegin = yyn < 0 ? -yyn : 0;
1858 const int yychecklim = yylast_ - yyn + 1;
1860 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1862 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1866 else if (yycount == yyargn)
1873 if (yyarg && yycount == 0 && 0 < yyargn)
1884 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
1915 yyarg[0] = yyctx.
token ();
1916 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1924 EvalParser::yysyntax_error_ (
const context& yyctx)
const
1927 enum { YYARGS_MAX = 5 };
1930 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1932 char const* yyformat = YY_NULLPTR;
1935#define YYCASE_(N, S) \
1941 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1942 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1943 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1944 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1945 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1951 std::ptrdiff_t yyi = 0;
1952 for (
char const* yyp = yyformat; *yyp; ++yyp)
1953 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1964 const short EvalParser::yypact_ninf_ = -160;
1966 const signed char EvalParser::yytable_ninf_ = -1;
1969 EvalParser::yypact_[] =
1971 -38, 113, 162, 17, 113, 113, 23, 73, 88, 126,
1972 100, 132, 163, 166, 183, 191, 195, 198, 211, 212,
1973 219, 231, 233, 234, 235, 236, 153, 135, 167, -160,
1974 -160, -160, -160, -160, 36, 62, -160, 162, 180, 184,
1975 225, 170, 174, 138, -160, 124, 0, -160, 128, 179,
1976 185, 187, 86, -4, 162, 162, 162, 113, 162, 162,
1977 162, 162, 162, 162, 162, 162, 162, 162, 42, 31,
1978 186, 31, 188, 113, 113, 162, 162, 2, 128, 179,
1979 185, 31, 31, -160, -160, -160, -160, 226, -160, 227,
1980 -160, 229, 245, -160, -160, -160, -160, -160, -160, -160,
1981 -160, -160, -160, -160, -160, -160, -160, -160, 181, 182,
1982 189, 78, 192, 5, 6, 7, 8, 11, 12, 16,
1983 28, 29, -160, -160, -160, -160, -160, 237, -160, 238,
1984 -160, -160, 244, 138, -160, 239, 240, 241, 242, 243,
1985 246, 247, 248, -160, 190, 162, 162, 162, 162, -160,
1986 -160, -160, -160, -160, -160, -160, -160, -160, 249, 250,
1987 251, 252, 253, 254, 255, 72, 94, 91, -160, 214,
1988 193, 30, 196, 32, -17, 10, 80, 114, 93, 203,
1989 264, 259, -160, -160, -160, -160, -160, -160, 260, -160,
1990 -160, -160, -31, 199, -160, 162, -160, -160, 261, 262,
1991 -160, 263, 265, 266, 179, 179, -160, -160, 258, -160,
1992 275, 33, 220, 179, 179, 179, 179, 267, 268, -160,
1993 -160, -160, 269, 270, 271, 272, 273, 274, 276, -160,
1994 277, 278, 279, 280, 101, 122, 161, 114, 114, 114,
1995 -160, -160, -160, -160, -160, -160
1999 EvalParser::yydefact_[] =
2001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2003 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
2004 51, 19, 20, 2, 4, 0, 49, 0, 0, 0,
2005 0, 0, 0, 3, 1, 0, 0, 6, 0, 0,
2006 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2007 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2009 0, 0, 0, 5, 50, 52, 53, 0, 54, 0,
2010 57, 0, 0, 58, 59, 60, 61, 25, 64, 65,
2011 66, 67, 68, 69, 70, 71, 72, 26, 0, 0,
2012 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2013 0, 0, 73, 74, 27, 63, 62, 0, 45, 0,
2014 44, 7, 8, 9, 32, 0, 0, 0, 0, 0,
2015 0, 0, 0, 17, 0, 0, 0, 0, 0, 37,
2016 38, 39, 40, 41, 42, 43, 33, 34, 0, 0,
2017 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
2018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2019 0, 0, 55, 56, 10, 21, 12, 23, 0, 75,
2020 76, 28, 0, 0, 31, 0, 36, 14, 47, 0,
2021 15, 0, 0, 0, 0, 0, 79, 78, 0, 80,
2022 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
2023 30, 35, 0, 0, 0, 0, 0, 0, 0, 48,
2024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2025 11, 22, 13, 24, 16, 46
2029 EvalParser::yypgoto_[] =
2031 -160, -160, -160, 9, -2, -160, 221, -78, -159, 210,
2032 -160, 15, -160, -160, -160, -160, -160, -160
2036 EvalParser::yydefgoto_[] =
2038 0, 3, 33, 34, 35, 36, 87, 89, 185, 91,
2039 97, 127, 107, 124, 191, 169, 208, 210
2043 EvalParser::yytable_[] =
2045 43, 136, 46, 197, 84, 206, 84, 187, 75, 149,
2046 150, 151, 152, 45, 47, 153, 154, 44, 187, 199,
2047 155, 1, 2, 98, 99, 100, 101, 102, 103, 104,
2048 200, 207, 156, 157, 194, 77, 196, 221, 48, 76,
2049 198, 76, 73, 74, 76, 76, 76, 76, 105, 106,
2050 76, 76, 108, 109, 110, 76, 112, 113, 114, 115,
2051 116, 117, 118, 119, 120, 121, 111, 76, 76, 76,
2052 75, 76, 76, 133, 134, 241, 243, 245, 241, 243,
2053 245, 181, 131, 132, 73, 74, 129, 125, 49, 201,
2054 182, 183, 184, 126, 122, 123, 138, 139, 182, 183,
2055 188, 76, 202, 50, 189, 190, 189, 190, 93, 94,
2056 95, 96, 182, 183, 186, 147, 4, 52, 5, 182,
2057 183, 240, 6, 7, 8, 9, 217, 218, 83, 51,
2058 73, 74, 182, 183, 10, 223, 224, 225, 226, 11,
2059 182, 183, 242, 170, 171, 172, 173, 12, 13, 53,
2060 69, 14, 70, 15, 16, 17, 18, 19, 20, 21,
2061 22, 23, 24, 25, 26, 37, 54, 27, 28, 55,
2062 68, 38, 39, 40, 29, 30, 31, 76, 32, 182,
2063 183, 244, 71, 10, 72, 81, 56, 70, 11, 82,
2064 85, 72, 86, 211, 57, 78, 12, 13, 58, 79,
2065 14, 59, 15, 16, 17, 18, 19, 20, 21, 22,
2066 23, 24, 25, 26, 60, 61, 41, 42, 144, 145,
2067 76, 76, 62, 29, 30, 31, 146, 32, 76, 148,
2068 193, 76, 76, 195, 63, 76, 64, 65, 66, 67,
2069 80, 88, 140, 141, 128, 142, 130, 90, 92, 143,
2070 73, 192, 168, 158, 159, 160, 161, 162, 163, 164,
2071 198, 209, 219, 165, 166, 167, 174, 175, 176, 177,
2072 178, 179, 180, 203, 204, 205, 212, 213, 214, 220,
2073 215, 216, 222, 227, 228, 229, 230, 231, 232, 233,
2074 137, 234, 0, 235, 236, 237, 238, 239, 0, 135
2078 EvalParser::yycheck_[] =
2080 2, 79, 4, 20, 4, 36, 4, 166, 8, 4,
2081 4, 4, 4, 4, 5, 4, 4, 0, 177, 9,
2082 4, 59, 60, 27, 28, 29, 30, 31, 32, 33,
2083 20, 62, 4, 4, 4, 37, 4, 4, 15, 39,
2084 57, 39, 6, 7, 39, 39, 39, 39, 52, 53,
2085 39, 39, 54, 55, 56, 39, 58, 59, 60, 61,
2086 62, 63, 64, 65, 66, 67, 57, 39, 39, 39,
2087 8, 39, 39, 75, 76, 234, 235, 236, 237, 238,
2088 239, 9, 73, 74, 6, 7, 71, 56, 15, 9,
2089 18, 19, 20, 62, 52, 53, 81, 82, 18, 19,
2090 9, 39, 9, 15, 13, 14, 13, 14, 22, 23,
2091 24, 25, 18, 19, 20, 37, 3, 17, 5, 18,
2092 19, 20, 9, 10, 11, 12, 204, 205, 4, 3,
2093 6, 7, 18, 19, 21, 213, 214, 215, 216, 26,
2094 18, 19, 20, 145, 146, 147, 148, 34, 35, 17,
2095 15, 38, 17, 40, 41, 42, 43, 44, 45, 46,
2096 47, 48, 49, 50, 51, 3, 3, 54, 55, 3,
2097 17, 9, 10, 11, 61, 62, 63, 39, 65, 18,
2098 19, 20, 15, 21, 17, 15, 3, 17, 26, 15,
2099 62, 17, 64, 195, 3, 15, 34, 35, 3, 15,
2100 38, 3, 40, 41, 42, 43, 44, 45, 46, 47,
2101 48, 49, 50, 51, 3, 3, 54, 55, 37, 37,
2102 39, 39, 3, 61, 62, 63, 37, 65, 39, 37,
2103 37, 39, 39, 37, 3, 39, 3, 3, 3, 3,
2104 15, 62, 16, 16, 58, 16, 58, 62, 61, 4,
2105 6, 37, 62, 16, 16, 16, 16, 16, 16, 16,
2106 57, 62, 4, 17, 17, 17, 17, 17, 17, 17,
2107 17, 17, 17, 9, 15, 15, 15, 15, 15, 4,
2108 15, 15, 62, 16, 16, 16, 16, 16, 16, 16,
2109 80, 17, -1, 17, 17, 17, 17, 17, -1, 78
2113 EvalParser::yystos_[] =
2115 0, 59, 60, 67, 3, 5, 9, 10, 11, 12,
2116 21, 26, 34, 35, 38, 40, 41, 42, 43, 44,
2117 45, 46, 47, 48, 49, 50, 51, 54, 55, 61,
2118 62, 63, 65, 68, 69, 70, 71, 3, 9, 10,
2119 11, 54, 55, 70, 0, 69, 70, 69, 15, 15,
2120 15, 3, 17, 17, 3, 3, 3, 3, 3, 3,
2121 3, 3, 3, 3, 3, 3, 3, 3, 17, 15,
2122 17, 15, 17, 6, 7, 8, 39, 70, 15, 15,
2123 15, 15, 15, 4, 4, 62, 64, 72, 62, 73,
2124 62, 75, 61, 22, 23, 24, 25, 76, 27, 28,
2125 29, 30, 31, 32, 33, 52, 53, 78, 70, 70,
2126 70, 69, 70, 70, 70, 70, 70, 70, 70, 70,
2127 70, 70, 52, 53, 79, 56, 62, 77, 58, 77,
2128 58, 69, 69, 70, 70, 72, 73, 75, 77, 77,
2129 16, 16, 16, 4, 37, 37, 37, 37, 37, 4,
2130 4, 4, 4, 4, 4, 4, 4, 4, 16, 16,
2131 16, 16, 16, 16, 16, 17, 17, 17, 62, 81,
2132 70, 70, 70, 70, 17, 17, 17, 17, 17, 17,
2133 17, 9, 18, 19, 20, 74, 20, 74, 9, 13,
2134 14, 80, 37, 37, 4, 37, 4, 20, 57, 9,
2135 20, 9, 9, 9, 15, 15, 36, 62, 82, 62,
2136 83, 70, 15, 15, 15, 15, 15, 73, 73, 4,
2137 4, 4, 62, 73, 73, 73, 73, 16, 16, 16,
2138 16, 16, 16, 16, 17, 17, 17, 17, 17, 17,
2139 20, 74, 20, 74, 20, 74
2143 EvalParser::yyr1_[] =
2145 0, 66, 67, 67, 68, 69, 69, 69, 69, 69,
2146 69, 69, 69, 69, 69, 69, 69, 69, 70, 70,
2147 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
2148 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
2149 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
2150 70, 71, 72, 72, 73, 74, 74, 75, 76, 76,
2151 76, 76, 77, 77, 78, 78, 78, 78, 78, 78,
2152 78, 78, 78, 79, 79, 80, 80, 81, 82, 82,
2157 EvalParser::yyr2_[] =
2159 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
2160 6, 11, 6, 11, 6, 6, 11, 4, 1, 1,
2161 1, 6, 11, 6, 11, 3, 3, 3, 6, 8,
2162 8, 6, 3, 4, 4, 8, 6, 4, 4, 4,
2163 4, 4, 4, 4, 3, 3, 11, 6, 9, 1,
2164 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2165 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2175 const EvalParser::yytname_[] =
2177 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2178 "\"not\"",
"\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
2179 "\"relay6\"",
"\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
2180 "\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
2181 "\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
2182 "\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
2183 "\"siaddr\"",
"\"substring\"",
"\"split\"",
"\"all\"",
"\",\"",
2184 "\"concat\"",
"\"+\"",
"\"ifelse\"",
"\"hexstring\"",
"\"addrtotext\"",
2185 "\"int8totext\"",
"\"int16totext\"",
"\"int32totext\"",
2186 "\"uint8totext\"",
"\"uint16totext\"",
"\"uint32totext\"",
"\"lcase\"",
2187 "\"ucase\"",
"\"pkt6\"",
"\"msgtype\"",
"\"transid\"",
2188 "\"vendor-class\"",
"\"vendor\"",
"\"*\"",
"\"data\"",
"\"enterprise\"",
2189 "\"top-level bool\"",
"\"top-level string\"",
"\"constant string\"",
2190 "\"integer\"",
"\"constant hexstring\"",
"\"option name\"",
2191 "\"ip address\"",
"$accept",
"start",
"expression",
"bool_expr",
2192 "string_expr",
"integer_expr",
"option_code",
"sub_option_code",
2193 "option_repr_type",
"nest_level",
"pkt_metadata",
"enterprise_id",
2194 "pkt4_field",
"pkt6_field",
"relay6_field",
"start_expr",
"length_expr",
2195 "int_expr", YY_NULLPTR
2202 EvalParser::yyrline_[] =
2204 0, 138, 138, 139, 144, 147, 148, 153, 158, 163,
2205 168, 173, 178, 198, 212, 221, 230, 240, 257, 262,
2206 267, 272, 277, 282, 303, 318, 323, 337, 351, 366,
2207 371, 376, 381, 386, 391, 396, 401, 406, 411, 416,
2208 421, 426, 431, 436, 441, 450, 460, 469, 482, 495,
2209 500, 503, 509, 513, 519, 525, 529, 535, 544, 548,
2210 552, 556, 562, 566, 572, 576, 580, 584, 588, 592,
2211 596, 600, 604, 610, 614, 620, 624, 630, 637, 642,
2216 EvalParser::yy_stack_print_ ()
const
2218 *yycdebug_ <<
"Stack now";
2219 for (stack_type::const_iterator
2220 i = yystack_.begin (),
2221 i_end = yystack_.end ();
2223 *yycdebug_ <<
' ' << int (i->state);
2228 EvalParser::yy_reduce_print_ (
int yyrule)
const
2230 int yylno = yyrline_[yyrule];
2231 int yynrhs = yyr2_[yyrule];
2233 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2234 <<
" (line " << yylno <<
"):\n";
2236 for (
int yyi = 0; yyi < yynrhs; yyi++)
2238 yystack_[(yynrhs) - (yyi + 1)]);
2245#line 2246 "parser.cc"
2247#line 655 "parser.yy"
2251 const std::string& what)
2253 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 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.
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.
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.
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