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 ())
217 case symbol_kind::S_option_repr_type:
218 value.YY_MOVE_OR_COPY< TokenOption::RepresentationType > (YY_MOVE (that.value));
221 case symbol_kind::S_pkt4_field:
222 value.YY_MOVE_OR_COPY< TokenPkt4::FieldType > (YY_MOVE (that.value));
225 case symbol_kind::S_pkt6_field:
226 value.YY_MOVE_OR_COPY< TokenPkt6::FieldType > (YY_MOVE (that.value));
229 case symbol_kind::S_pkt_metadata:
230 value.YY_MOVE_OR_COPY< TokenPkt::MetadataType > (YY_MOVE (that.value));
233 case symbol_kind::S_relay6_field:
234 value.YY_MOVE_OR_COPY< TokenRelay6Field::FieldType > (YY_MOVE (that.value));
237 case symbol_kind::S_nest_level:
238 value.YY_MOVE_OR_COPY< int8_t > (YY_MOVE (that.value));
241 case symbol_kind::S_STRING:
242 case symbol_kind::S_INTEGER:
243 case symbol_kind::S_HEXSTRING:
244 case symbol_kind::S_OPTION_NAME:
245 case symbol_kind::S_IP_ADDRESS:
246 value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
249 case symbol_kind::S_option_code:
250 case symbol_kind::S_sub_option_code:
251 value.YY_MOVE_OR_COPY< uint16_t > (YY_MOVE (that.value));
254 case symbol_kind::S_integer_expr:
255 case symbol_kind::S_enterprise_id:
256 value.YY_MOVE_OR_COPY< uint32_t > (YY_MOVE (that.value));
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 ())
274 case symbol_kind::S_option_repr_type:
275 value.move< TokenOption::RepresentationType > (YY_MOVE (that.value));
278 case symbol_kind::S_pkt4_field:
279 value.move< TokenPkt4::FieldType > (YY_MOVE (that.value));
282 case symbol_kind::S_pkt6_field:
283 value.move< TokenPkt6::FieldType > (YY_MOVE (that.value));
286 case symbol_kind::S_pkt_metadata:
287 value.move< TokenPkt::MetadataType > (YY_MOVE (that.value));
290 case symbol_kind::S_relay6_field:
291 value.move< TokenRelay6Field::FieldType > (YY_MOVE (that.value));
294 case symbol_kind::S_nest_level:
295 value.move< int8_t > (YY_MOVE (that.value));
298 case symbol_kind::S_STRING:
299 case symbol_kind::S_INTEGER:
300 case symbol_kind::S_HEXSTRING:
301 case symbol_kind::S_OPTION_NAME:
302 case symbol_kind::S_IP_ADDRESS:
303 value.move< std::string > (YY_MOVE (that.value));
306 case symbol_kind::S_option_code:
307 case symbol_kind::S_sub_option_code:
308 value.move< uint16_t > (YY_MOVE (that.value));
311 case symbol_kind::S_integer_expr:
312 case symbol_kind::S_enterprise_id:
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]);
831 stack_type::slice range (yystack_, yylen);
856 unsigned target = ++ctx.
label_;
867 unsigned target = ctx.
labels_.back();
887 unsigned target = ++ctx.
label_;
898 unsigned target = ctx.
labels_.back();
960 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
978 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1007#line 1008 "parser.cc"
1011#line 261 "parser.yy"
1021#line 1022 "parser.cc"
1025#line 271 "parser.yy"
1033 std::string cc = yystack_[1].value.as < std::string > ();
1035 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
1040#line 1041 "parser.cc"
1044#line 286 "parser.yy"
1053#line 1054 "parser.cc"
1057#line 297 "parser.yy"
1062#line 1063 "parser.cc"
1066#line 302 "parser.yy"
1071#line 1072 "parser.cc"
1075#line 307 "parser.yy"
1080#line 1081 "parser.cc"
1084#line 312 "parser.yy"
1089#line 1090 "parser.cc"
1093#line 317 "parser.yy"
1098#line 1099 "parser.cc"
1102#line 322 "parser.yy"
1119 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1122#line 1123 "parser.cc"
1126#line 343 "parser.yy"
1137 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1140#line 1141 "parser.cc"
1144#line 358 "parser.yy"
1149#line 1150 "parser.cc"
1153#line 363 "parser.yy"
1164 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1167#line 1168 "parser.cc"
1171#line 377 "parser.yy"
1182 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1185#line 1186 "parser.cc"
1189#line 391 "parser.yy"
1200 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1203#line 1204 "parser.cc"
1207#line 406 "parser.yy"
1212#line 1213 "parser.cc"
1216#line 411 "parser.yy"
1221#line 1222 "parser.cc"
1225#line 416 "parser.yy"
1230#line 1231 "parser.cc"
1234#line 421 "parser.yy"
1239#line 1240 "parser.cc"
1243#line 426 "parser.yy"
1248#line 1249 "parser.cc"
1252#line 431 "parser.yy"
1257#line 1258 "parser.cc"
1261#line 436 "parser.yy"
1263 unsigned target = ++ctx.
label_;
1264 ctx.
labels_.push_back(target);
1268#line 1269 "parser.cc"
1272#line 441 "parser.yy"
1274 unsigned target = ctx.
labels_.back();
1276 unsigned target2 = ++ctx.
label_;
1277 ctx.
labels_.push_back(target2);
1283#line 1284 "parser.cc"
1287#line 450 "parser.yy"
1289 unsigned target = ctx.
labels_.back();
1294#line 1295 "parser.cc"
1298#line 457 "parser.yy"
1303#line 1304 "parser.cc"
1307#line 462 "parser.yy"
1312#line 1313 "parser.cc"
1316#line 467 "parser.yy"
1321#line 1322 "parser.cc"
1325#line 472 "parser.yy"
1330#line 1331 "parser.cc"
1334#line 477 "parser.yy"
1339#line 1340 "parser.cc"
1343#line 482 "parser.yy"
1348#line 1349 "parser.cc"
1352#line 487 "parser.yy"
1357#line 1358 "parser.cc"
1361#line 492 "parser.yy"
1366#line 1367 "parser.cc"
1370#line 497 "parser.yy"
1375#line 1376 "parser.cc"
1379#line 502 "parser.yy"
1388#line 1389 "parser.cc"
1392#line 511 "parser.yy"
1402#line 1403 "parser.cc"
1406#line 521 "parser.yy"
1415#line 1416 "parser.cc"
1419#line 530 "parser.yy"
1432#line 1433 "parser.cc"
1436#line 543 "parser.yy"
1444 uint8_t index = ctx.
convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location);
1449#line 1450 "parser.cc"
1453#line 556 "parser.yy"
1458#line 1459 "parser.cc"
1462#line 564 "parser.yy"
1464 yylhs.
value.
as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1466#line 1467 "parser.cc"
1470#line 570 "parser.yy"
1472 yylhs.
value.
as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1474#line 1475 "parser.cc"
1478#line 574 "parser.yy"
1480 yylhs.
value.
as < uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location);
1482#line 1483 "parser.cc"
1486#line 580 "parser.yy"
1488 yylhs.
value.
as < uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location);
1490#line 1491 "parser.cc"
1494#line 586 "parser.yy"
1498#line 1499 "parser.cc"
1502#line 590 "parser.yy"
1506#line 1507 "parser.cc"
1510#line 596 "parser.yy"
1514#line 1515 "parser.cc"
1518#line 605 "parser.yy"
1522#line 1523 "parser.cc"
1526#line 609 "parser.yy"
1530#line 1531 "parser.cc"
1534#line 613 "parser.yy"
1538#line 1539 "parser.cc"
1542#line 617 "parser.yy"
1546#line 1547 "parser.cc"
1550#line 623 "parser.yy"
1552 yylhs.
value.
as < uint32_t > () = ctx.
convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location);
1554#line 1555 "parser.cc"
1558#line 627 "parser.yy"
1560 yylhs.
value.
as < uint32_t > () = 0;
1562#line 1563 "parser.cc"
1566#line 633 "parser.yy"
1570#line 1571 "parser.cc"
1574#line 637 "parser.yy"
1578#line 1579 "parser.cc"
1582#line 641 "parser.yy"
1586#line 1587 "parser.cc"
1590#line 645 "parser.yy"
1594#line 1595 "parser.cc"
1598#line 649 "parser.yy"
1602#line 1603 "parser.cc"
1606#line 653 "parser.yy"
1610#line 1611 "parser.cc"
1614#line 657 "parser.yy"
1618#line 1619 "parser.cc"
1622#line 661 "parser.yy"
1626#line 1627 "parser.cc"
1630#line 665 "parser.yy"
1634#line 1635 "parser.cc"
1638#line 671 "parser.yy"
1642#line 1643 "parser.cc"
1646#line 675 "parser.yy"
1650#line 1651 "parser.cc"
1654#line 681 "parser.yy"
1658#line 1659 "parser.cc"
1662#line 685 "parser.yy"
1666#line 1667 "parser.cc"
1670#line 691 "parser.yy"
1675#line 1676 "parser.cc"
1679#line 698 "parser.yy"
1684#line 1685 "parser.cc"
1688#line 703 "parser.yy"
1693#line 1694 "parser.cc"
1697#line 710 "parser.yy"
1702#line 1703 "parser.cc"
1706#line 1707 "parser.cc"
1715 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1725 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1739 std::string msg = yysyntax_error_ (yyctx);
1745 if (yyerrstatus_ == 3)
1753 else if (!yyla.
empty ())
1755 yy_destroy_ (
"Error: discarding", yyla);
1789 yyn = yypact_[+yystack_[0].state];
1790 if (!yy_pact_value_is_default_ (yyn))
1793 if (0 <= yyn && yyn <= yylast_
1796 yyn = yytable_[yyn];
1803 if (yystack_.size () == 1)
1806 yyerror_range[1].
location = yystack_[0].location;
1807 yy_destroy_ (
"Error: popping", yystack_[0]);
1812 stack_symbol_type error_token;
1818 error_token.state = state_type (yyn);
1819 yypush_ (
"Shifting",
YY_MOVE (error_token));
1845 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1851 while (1 < yystack_.size ())
1853 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1862 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1866 yy_destroy_ (YY_NULLPTR, yyla);
1868 while (1 < yystack_.size ())
1870 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1890 EvalParser::yytnamerr_ (
const char *yystr)
1895 char const *yyp = yystr;
1902 goto do_not_strip_quotes;
1906 goto do_not_strip_quotes;
1918 do_not_strip_quotes: ;
1927 return yytnamerr_ (yytname_[yysymbol]);
1934 : yyparser_ (yyparser)
1944 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1945 if (!yy_pact_value_is_default_ (yyn))
1950 const int yyxbegin = yyn < 0 ? -yyn : 0;
1952 const int yychecklim = yylast_ - yyn + 1;
1954 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1956 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1960 else if (yycount == yyargn)
1967 if (yyarg && yycount == 0 && 0 < yyargn)
1978 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
2009 yyarg[0] = yyctx.
token ();
2010 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2018 EvalParser::yysyntax_error_ (
const context& yyctx)
const
2021 enum { YYARGS_MAX = 5 };
2024 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
2026 char const* yyformat = YY_NULLPTR;
2029#define YYCASE_(N, S) \
2035 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
2036 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2037 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2038 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2039 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2045 std::ptrdiff_t yyi = 0;
2046 for (
char const* yyp = yyformat; *yyp; ++yyp)
2047 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
2058 const short EvalParser::yypact_ninf_ = -173;
2060 const signed char EvalParser::yytable_ninf_ = -1;
2063 EvalParser::yypact_[] =
2065 -45, 175, 236, 4, 175, 175, 61, 101, 107, 25,
2066 26, 82, 102, 149, 159, 179, 182, 192, 198, 205,
2067 206, 210, 211, 213, 227, 228, 232, 136, 156, 157,
2068 240, -173, -173, -173, -173, -173, 134, 7, -173, 236,
2069 151, 229, 233, 160, 164, 126, -173, 113, 1, -173,
2070 124, 185, 186, 180, 120, 79, 236, 236, 236, 175,
2071 175, 236, 236, 236, 236, 236, 236, 236, 236, 236,
2072 236, -33, -35, 193, -35, 194, 188, -173, 175, -173,
2073 175, 236, 236, 2, 124, 185, 186, -35, -35, -173,
2074 -173, -173, -173, 238, -173, 239, -173, 242, 254, -173,
2075 -173, -173, -173, -173, -173, -173, -173, -173, -173, -173,
2076 -173, -173, -173, -173, 152, 155, 158, 68, 84, 161,
2077 3, 5, 6, 8, 9, 10, 11, 12, 16, -173,
2078 -173, -173, -173, -173, 243, -173, 244, -173, 224, 175,
2079 259, 175, 125, 126, -173, 248, 249, 250, 251, 252,
2080 255, 256, 258, -173, 225, 236, 236, -173, 236, 236,
2081 -173, -173, -173, -173, -173, -173, -173, -173, -173, 273,
2082 276, 236, -173, 91, 277, 278, 279, 280, 281, 74,
2083 106, 88, -173, 265, 165, 28, 236, 166, 29, -19,
2084 18, 30, 95, 116, 114, 246, 260, 290, -173, -173,
2085 -173, -173, -173, -173, 291, -173, -173, -173, -8, 245,
2086 -173, 195, 236, -173, -173, 292, 293, -173, -173, 295,
2087 296, 297, 185, 185, -173, -173, 311, -173, 312, -173,
2088 31, 253, 185, 185, 185, 185, 299, 300, -173, -173,
2089 236, -173, 302, 303, 304, 305, 306, 307, 308, 32,
2090 -173, 309, 310, 313, 314, 138, 144, -173, 150, 116,
2091 116, 116, -173, -173, -173, -173, -173, -173
2095 EvalParser::yydefact_[] =
2097 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2098 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2100 0, 23, 59, 24, 25, 2, 4, 0, 57, 0,
2101 0, 0, 0, 0, 0, 3, 1, 0, 0, 6,
2102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2104 0, 0, 0, 0, 0, 0, 0, 7, 0, 10,
2105 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2106 58, 60, 61, 0, 62, 0, 65, 0, 0, 66,
2107 67, 68, 69, 30, 72, 73, 74, 75, 76, 77,
2108 78, 79, 80, 31, 0, 0, 0, 0, 0, 0,
2109 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
2110 82, 32, 71, 70, 0, 53, 0, 52, 0, 0,
2111 9, 0, 12, 13, 37, 0, 0, 0, 0, 0,
2112 0, 0, 0, 21, 0, 0, 0, 40, 0, 0,
2113 45, 46, 47, 48, 49, 50, 51, 38, 39, 0,
2114 0, 0, 8, 11, 0, 0, 0, 0, 0, 0,
2115 0, 0, 85, 0, 0, 0, 0, 0, 0, 0,
2116 0, 0, 0, 0, 0, 0, 0, 0, 63, 64,
2117 14, 26, 16, 28, 0, 83, 84, 33, 0, 0,
2118 36, 0, 0, 44, 18, 55, 0, 19, 22, 0,
2119 0, 0, 0, 0, 87, 86, 0, 88, 0, 41,
2120 0, 0, 0, 0, 0, 0, 0, 0, 34, 35,
2121 0, 43, 0, 0, 0, 0, 0, 0, 0, 0,
2122 56, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2123 0, 0, 15, 27, 17, 29, 20, 54
2127 EvalParser::yypgoto_[] =
2129 -173, -173, -173, 22, -173, -173, -2, -173, -173, -173,
2130 241, -84, -172, 257, -173, -49, -173, -173, -173, -173,
2135 EvalParser::yydefgoto_[] =
2137 0, 3, 35, 36, 139, 141, 37, 186, 240, 38,
2138 93, 95, 201, 97, 103, 134, 113, 131, 207, 183,
2143 EvalParser::yytable_[] =
2145 45, 146, 48, 214, 46, 90, 90, 160, 203, 161,
2146 162, 81, 163, 164, 165, 166, 167, 81, 1, 2,
2147 168, 203, 129, 130, 132, 136, 47, 49, 53, 216,
2148 224, 133, 210, 213, 218, 241, 257, 83, 148, 149,
2149 217, 215, 82, 82, 82, 54, 82, 82, 82, 82,
2150 82, 82, 82, 82, 114, 115, 116, 82, 225, 119,
2151 120, 121, 122, 123, 124, 125, 126, 127, 128, 82,
2152 82, 82, 82, 82, 77, 78, 79, 80, 50, 143,
2153 144, 117, 118, 263, 265, 197, 267, 263, 265, 267,
2154 77, 78, 79, 80, 198, 199, 200, 77, 78, 204,
2155 140, 55, 142, 205, 206, 56, 219, 157, 104, 105,
2156 106, 107, 108, 109, 110, 198, 199, 89, 51, 77,
2157 78, 79, 80, 158, 52, 220, 198, 199, 202, 205,
2158 206, 77, 78, 79, 111, 112, 198, 199, 236, 237,
2159 77, 78, 79, 80, 99, 100, 101, 102, 243, 244,
2160 245, 246, 57, 184, 185, 71, 187, 188, 198, 199,
2161 262, 172, 58, 173, 198, 199, 264, 82, 84, 191,
2162 198, 199, 266, 72, 74, 73, 75, 87, 4, 73,
2163 5, 88, 59, 75, 211, 60, 6, 7, 8, 9,
2164 91, 154, 92, 82, 155, 61, 82, 156, 10, 82,
2165 159, 62, 82, 11, 209, 212, 82, 82, 63, 64,
2166 230, 12, 13, 65, 66, 14, 67, 15, 16, 17,
2167 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
2168 68, 69, 28, 29, 229, 70, 82, 30, 249, 39,
2169 31, 32, 33, 76, 34, 98, 85, 40, 41, 42,
2170 86, 94, 96, 138, 135, 137, 150, 151, 153, 10,
2171 152, 169, 170, 171, 11, 77, 174, 175, 176, 177,
2172 178, 221, 12, 13, 179, 180, 14, 181, 15, 16,
2173 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
2174 27, 182, 189, 43, 44, 190, 192, 193, 194, 195,
2175 196, 31, 32, 33, 208, 34, 215, 222, 223, 231,
2176 232, 227, 233, 234, 235, 238, 239, 247, 248, 242,
2177 250, 251, 252, 253, 254, 145, 255, 256, 258, 259,
2178 0, 0, 260, 261, 0, 0, 0, 0, 0, 0,
2183 EvalParser::yycheck_[] =
2185 2, 85, 4, 22, 0, 4, 4, 4, 180, 4,
2186 4, 10, 4, 4, 4, 4, 4, 10, 63, 64,
2187 4, 193, 55, 56, 59, 74, 4, 5, 3, 11,
2188 38, 66, 4, 4, 4, 4, 4, 39, 87, 88,
2189 22, 60, 41, 41, 41, 19, 41, 41, 41, 41,
2190 41, 41, 41, 41, 56, 57, 58, 41, 66, 61,
2191 62, 63, 64, 65, 66, 67, 68, 69, 70, 41,
2192 41, 41, 41, 41, 6, 7, 8, 9, 17, 81,
2193 82, 59, 60, 255, 256, 11, 258, 259, 260, 261,
2194 6, 7, 8, 9, 20, 21, 22, 6, 7, 11,
2195 78, 19, 80, 15, 16, 3, 11, 39, 29, 30,
2196 31, 32, 33, 34, 35, 20, 21, 4, 17, 6,
2197 7, 8, 9, 39, 17, 11, 20, 21, 22, 15,
2198 16, 6, 7, 8, 55, 56, 20, 21, 222, 223,
2199 6, 7, 8, 9, 24, 25, 26, 27, 232, 233,
2200 234, 235, 3, 155, 156, 19, 158, 159, 20, 21,
2201 22, 139, 3, 141, 20, 21, 22, 41, 17, 171,
2202 20, 21, 22, 17, 17, 19, 19, 17, 3, 19,
2203 5, 17, 3, 19, 186, 3, 11, 12, 13, 14,
2204 66, 39, 68, 41, 39, 3, 41, 39, 23, 41,
2205 39, 3, 41, 28, 39, 39, 41, 41, 3, 3,
2206 212, 36, 37, 3, 3, 40, 3, 42, 43, 44,
2207 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2208 3, 3, 57, 58, 39, 3, 41, 62, 240, 3,
2209 65, 66, 67, 3, 69, 65, 17, 11, 12, 13,
2210 17, 66, 66, 65, 61, 61, 18, 18, 4, 23,
2211 18, 18, 18, 39, 28, 6, 18, 18, 18, 18,
2212 18, 11, 36, 37, 19, 19, 40, 19, 42, 43,
2213 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
2214 54, 66, 19, 57, 58, 19, 19, 19, 19, 19,
2215 19, 65, 66, 67, 39, 69, 60, 17, 17, 17,
2216 17, 66, 17, 17, 17, 4, 4, 18, 18, 66,
2217 18, 18, 18, 18, 18, 84, 19, 19, 19, 19,
2218 -1, -1, 19, 19, -1, -1, -1, -1, -1, -1,
2223 EvalParser::yystos_[] =
2225 0, 63, 64, 71, 3, 5, 11, 12, 13, 14,
2226 23, 28, 36, 37, 40, 42, 43, 44, 45, 46,
2227 47, 48, 49, 50, 51, 52, 53, 54, 57, 58,
2228 62, 65, 66, 67, 69, 72, 73, 76, 79, 3,
2229 11, 12, 13, 57, 58, 76, 0, 73, 76, 73,
2230 17, 17, 17, 3, 19, 19, 3, 3, 3, 3,
2231 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2232 3, 19, 17, 19, 17, 19, 3, 6, 7, 8,
2233 9, 10, 41, 76, 17, 17, 17, 17, 17, 4,
2234 4, 66, 68, 80, 66, 81, 66, 83, 65, 24,
2235 25, 26, 27, 84, 29, 30, 31, 32, 33, 34,
2236 35, 55, 56, 86, 76, 76, 76, 73, 73, 76,
2237 76, 76, 76, 76, 76, 76, 76, 76, 76, 55,
2238 56, 87, 59, 66, 85, 61, 85, 61, 65, 74,
2239 73, 75, 73, 76, 76, 80, 81, 83, 85, 85,
2240 18, 18, 18, 4, 39, 39, 39, 39, 39, 39,
2241 4, 4, 4, 4, 4, 4, 4, 4, 4, 18,
2242 18, 39, 73, 73, 18, 18, 18, 18, 18, 19,
2243 19, 19, 66, 89, 76, 76, 77, 76, 76, 19,
2244 19, 76, 19, 19, 19, 19, 19, 11, 20, 21,
2245 22, 82, 22, 82, 11, 15, 16, 88, 39, 39,
2246 4, 76, 39, 4, 22, 60, 11, 22, 4, 11,
2247 11, 11, 17, 17, 38, 66, 90, 66, 91, 39,
2248 76, 17, 17, 17, 17, 17, 81, 81, 4, 4,
2249 78, 4, 66, 81, 81, 81, 81, 18, 18, 76,
2250 18, 18, 18, 18, 18, 19, 19, 4, 19, 19,
2251 19, 19, 22, 82, 22, 82, 22, 82
2255 EvalParser::yyr1_[] =
2257 0, 70, 71, 71, 72, 73, 73, 74, 73, 73,
2258 75, 73, 73, 73, 73, 73, 73, 73, 73, 73,
2259 73, 73, 73, 76, 76, 76, 76, 76, 76, 76,
2260 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
2261 77, 78, 76, 76, 76, 76, 76, 76, 76, 76,
2262 76, 76, 76, 76, 76, 76, 76, 76, 76, 79,
2263 80, 80, 81, 82, 82, 83, 84, 84, 84, 84,
2264 85, 85, 86, 86, 86, 86, 86, 86, 86, 86,
2265 86, 87, 87, 88, 88, 89, 90, 90, 91
2269 EvalParser::yyr2_[] =
2271 0, 2, 2, 2, 1, 3, 2, 0, 4, 3,
2272 0, 4, 3, 3, 6, 11, 6, 11, 6, 6,
2273 11, 4, 6, 1, 1, 1, 6, 11, 6, 11,
2274 3, 3, 3, 6, 8, 8, 6, 3, 4, 4,
2275 0, 0, 10, 8, 6, 4, 4, 4, 4, 4,
2276 4, 4, 3, 3, 11, 6, 9, 1, 3, 1,
2277 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2278 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2279 1, 1, 1, 1, 1, 1, 1, 1, 1
2287 const EvalParser::yytname_[] =
2289 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2290 "\"not\"",
"\"and\"",
"\"sand\"",
"\"or\"",
"\"sor\"",
"\"==\"",
2291 "\"option\"",
"\"relay4\"",
"\"relay6\"",
"\"member\"",
"\"peeraddr\"",
2292 "\"linkaddr\"",
"\"[\"",
"\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
2293 "\"exists\"",
"\"pkt\"",
"\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
2294 "\"pkt4\"",
"\"mac\"",
"\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
2295 "\"giaddr\"",
"\"yiaddr\"",
"\"siaddr\"",
"\"substring\"",
"\"split\"",
2296 "\"all\"",
"\",\"",
"\"concat\"",
"\"+\"",
"\"ifelse\"",
"\"sifelse\"",
2297 "\"hexstring\"",
"\"addrtotext\"",
"\"int8totext\"",
"\"int16totext\"",
2298 "\"int32totext\"",
"\"uint8totext\"",
"\"uint16totext\"",
2299 "\"uint32totext\"",
"\"lcase\"",
"\"ucase\"",
"\"pkt6\"",
"\"msgtype\"",
2300 "\"transid\"",
"\"vendor-class\"",
"\"vendor\"",
"\"*\"",
"\"data\"",
2301 "\"enterprise\"",
"\"match\"",
"\"top-level bool\"",
2302 "\"top-level string\"",
"\"constant string\"",
"\"integer\"",
2303 "\"constant hexstring\"",
"\"option name\"",
"\"ip address\"",
"$accept",
2304 "start",
"expression",
"bool_expr",
"$@1",
"$@2",
"string_expr",
"$@3",
2305 "$@4",
"integer_expr",
"option_code",
"sub_option_code",
2306 "option_repr_type",
"nest_level",
"pkt_metadata",
"enterprise_id",
2307 "pkt4_field",
"pkt6_field",
"relay6_field",
"start_expr",
"length_expr",
2308 "int_expr", YY_NULLPTR
2315 EvalParser::yyrline_[] =
2317 0, 144, 144, 145, 150, 153, 154, 160, 159, 171,
2318 177, 176, 188, 193, 198, 203, 208, 228, 242, 251,
2319 260, 270, 285, 296, 301, 306, 311, 316, 321, 342,
2320 357, 362, 376, 390, 405, 410, 415, 420, 425, 430,
2321 436, 441, 435, 456, 461, 466, 471, 476, 481, 486,
2322 491, 496, 501, 510, 520, 529, 542, 555, 560, 563,
2323 569, 573, 579, 585, 589, 595, 604, 608, 612, 616,
2324 622, 626, 632, 636, 640, 644, 648, 652, 656, 660,
2325 664, 670, 674, 680, 684, 690, 697, 702, 709
2329 EvalParser::yy_stack_print_ ()
const
2331 *yycdebug_ <<
"Stack now";
2332 for (stack_type::const_iterator
2333 i = yystack_.begin (),
2334 i_end = yystack_.end ();
2336 *yycdebug_ <<
' ' << int (i->state);
2341 EvalParser::yy_reduce_print_ (
int yyrule)
const
2343 int yylno = yyrline_[yyrule];
2344 int yynrhs = yyr2_[yyrule];
2346 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2347 <<
" (line " << yylno <<
"):\n";
2349 for (
int yyi = 0; yyi < yynrhs; yyi++)
2351 yystack_[(yynrhs) - (yyi + 1)]);
2358#line 2359 "parser.cc"
2360#line 716 "parser.yy"
2364 const std::string& what)
2366 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 unconditional branch.
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)
Token that represents pop and branch if false.
Token that represents pop or branch if false.
Token that represents pop or branch if true.
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.
unsigned label_
Label counter.
std::vector< unsigned > labels_
Label stack.
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.
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.
isc::dhcp::Expression expression_
Parsed expression (output tokens are stored here)
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
T & as() YY_NOEXCEPT
Accessor to a built T.
T & emplace()
Instantiate an empty T in here.
virtual int parse()
Parse.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
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.
location location_type
Symbol locations.
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.
value_type value
The semantic value.
bool empty() const YY_NOEXCEPT
Whether empty.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
symbol_kind_type kind_
The symbol kind.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW