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_)
143 namespace isc {
namespace eval {
144 #line 145 "parser.cc"
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 <<
": ";
461 #line 121 "parser.yy"
462 { yyoutput << yysym.value.template as < std::string > (); }
463 #line 464 "parser.cc"
467 #line 121 "parser.yy"
468 { yyoutput << yysym.value.template as < std::string > (); }
469 #line 470 "parser.cc"
473 #line 121 "parser.yy"
474 { yyoutput << yysym.value.template as < std::string > (); }
475 #line 476 "parser.cc"
479 #line 121 "parser.yy"
480 { yyoutput << yysym.value.template as < std::string > (); }
481 #line 482 "parser.cc"
485 #line 121 "parser.yy"
486 { yyoutput << yysym.value.template as < std::string > (); }
487 #line 488 "parser.cc"
491 #line 121 "parser.yy"
492 { yyoutput << yysym.value.template as < uint32_t > (); }
493 #line 494 "parser.cc"
497 #line 121 "parser.yy"
498 { yyoutput << yysym.value.template as < uint16_t > (); }
499 #line 500 "parser.cc"
503 #line 121 "parser.yy"
504 { yyoutput << yysym.value.template as < uint16_t > (); }
505 #line 506 "parser.cc"
509 #line 121 "parser.yy"
510 { yyoutput << yysym.value.template as < TokenOption::RepresentationType > (); }
511 #line 512 "parser.cc"
515 #line 121 "parser.yy"
516 { yyoutput << yysym.value.template as < int8_t > (); }
517 #line 518 "parser.cc"
521 #line 121 "parser.yy"
522 { yyoutput << yysym.value.template as < TokenPkt::MetadataType > (); }
523 #line 524 "parser.cc"
527 #line 121 "parser.yy"
528 { yyoutput << yysym.value.template as < uint32_t > (); }
529 #line 530 "parser.cc"
533 #line 121 "parser.yy"
534 { yyoutput << yysym.value.template as < TokenPkt4::FieldType > (); }
535 #line 536 "parser.cc"
539 #line 121 "parser.yy"
540 { yyoutput << yysym.value.template as < TokenPkt6::FieldType > (); }
541 #line 542 "parser.cc"
545 #line 121 "parser.yy"
546 { yyoutput << yysym.value.template as < TokenRelay6Field::FieldType > (); }
547 #line 548 "parser.cc"
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);
578 EvalParser::yypop_ (
int n)
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)
623 return yyvalue == yypact_ninf_;
627 EvalParser::yy_table_value_is_error_ (
int yyvalue)
629 return yyvalue == yytable_ninf_;
647 int yyerrstatus_ = 0;
653 stack_symbol_type yyerror_range[3];
660 #endif // YY_EXCEPTIONS
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))
701 #endif // YY_EXCEPTIONS
704 yyla.
move (yylookahead);
709 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
713 #endif // YY_EXCEPTIONS
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 > ();
826 stack_type::slice range (yystack_, yylen);
828 yyerror_range[1].location = yylhs.location;
835 #endif // YY_EXCEPTIONS
840 #line 141 "parser.yy"
845 #line 846 "parser.cc"
849 #line 146 "parser.yy"
854 #line 855 "parser.cc"
858 #line 151 "parser.yy"
863 #line 864 "parser.cc"
867 #line 156 "parser.yy"
872 #line 873 "parser.cc"
876 #line 161 "parser.yy"
881 #line 882 "parser.cc"
885 #line 166 "parser.yy"
887 TokenPtr opt(
new TokenSubOption(yystack_[8].value.as < uint16_t > (), yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS));
890 #line 891 "parser.cc"
894 #line 171 "parser.yy"
911 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
914 #line 915 "parser.cc"
918 #line 191 "parser.yy"
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.");
932 #line 933 "parser.cc"
936 #line 205 "parser.yy"
945 #line 946 "parser.cc"
949 #line 214 "parser.yy"
958 #line 959 "parser.cc"
962 #line 223 "parser.yy"
969 TokenPtr exist(
new TokenVendor(ctx.
getUniverse(), yystack_[8].value.as < uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as < uint16_t > ()));
972 #line 973 "parser.cc"
976 #line 233 "parser.yy"
984 std::string cc = yystack_[1].value.as < std::string > ();
986 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
991 #line 992 "parser.cc"
995 #line 250 "parser.yy"
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';
1584 #endif // YY_EXCEPTIONS
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]);
1740 #endif // YY_EXCEPTIONS
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 int yyn = yypact_[+yyparser_.yystack_[0].state];
1810 if (!yy_pact_value_is_default_ (yyn))
1815 int yyxbegin = yyn < 0 ? -yyn : 0;
1817 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)
1840 EvalParser::yy_syntax_error_arguments_ (
const context& yyctx,
1871 yyarg[0] = yyctx.
token ();
1872 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1880 EvalParser::yysyntax_error_ (
const context& yyctx)
const
1883 enum { YYARGS_MAX = 5 };
1886 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1888 char const* yyformat = YY_NULLPTR;
1891 #define YYCASE_(N, S) \
1897 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1898 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1899 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1900 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1901 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1907 std::ptrdiff_t yyi = 0;
1908 for (
char const* yyp = yyformat; *yyp; ++yyp)
1909 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1920 const short EvalParser::yypact_ninf_ = -149;
1922 const signed char EvalParser::yytable_ninf_ = -1;
1925 EvalParser::yypact_[] =
1927 -16, 103, 149, 66, 103, 103, 87, 101, 102, 21,
1928 114, 121, 150, 161, 171, 178, 181, 195, 196, 203,
1929 210, 211, 212, 152, 72, 124, -149, -149, -149, -149,
1930 -149, 12, 39, -149, 149, 201, 202, 204, 165, 170,
1931 180, -149, 126, -1, -149, -34, 162, 163, 168, 98,
1932 51, 149, 149, 103, 149, 149, 149, 149, 149, 149,
1933 149, 149, 43, -38, 169, -38, 172, 103, 103, 149,
1934 149, 0, -34, 162, 163, -38, -38, -149, -149, -149,
1935 -149, 207, -149, 209, -149, 213, 216, -149, -149, -149,
1936 -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
1937 -149, -149, 69, 166, 29, 167, 1, 4, 5, 6,
1938 7, 10, 13, -149, -149, -149, -149, -149, 214, -149,
1939 215, -149, -149, 222, 180, -149, 217, 218, 219, 220,
1940 221, 223, 224, 225, -149, 173, 149, 149, 149, -149,
1941 -149, -149, -149, -149, -149, -149, 226, 227, 228, 229,
1942 230, 231, 232, 76, 91, 77, -149, 233, 22, 174,
1943 24, 9, 11, 79, 138, 90, 184, 241, 236, -149,
1944 -149, -149, -149, -149, -149, 237, -149, -149, -149, -13,
1945 -149, 149, -149, -149, 238, 239, -149, 240, 242, 243,
1946 162, 162, -149, -149, 235, 26, 197, 162, 162, 162,
1947 162, 244, 245, -149, -149, 246, 247, 248, 249, 250,
1948 251, 253, -149, 254, 255, 256, 257, 148, 153, 158,
1949 138, 138, 138, -149, -149, -149, -149, -149, -149
1953 EvalParser::yydefact_[] =
1955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1957 0, 0, 0, 0, 0, 0, 18, 48, 19, 20,
1958 2, 4, 0, 46, 0, 0, 0, 0, 0, 0,
1959 3, 1, 0, 0, 6, 0, 0, 0, 0, 0,
1960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1962 0, 0, 0, 0, 0, 0, 0, 5, 47, 49,
1963 50, 0, 51, 0, 54, 0, 0, 55, 56, 57,
1964 58, 25, 61, 62, 63, 64, 65, 66, 67, 68,
1965 69, 26, 0, 0, 0, 0, 0, 0, 0, 0,
1966 0, 0, 0, 70, 71, 27, 60, 59, 0, 42,
1967 0, 41, 7, 8, 9, 31, 0, 0, 0, 0,
1968 0, 0, 0, 0, 17, 0, 0, 0, 0, 34,
1969 35, 36, 37, 38, 39, 40, 0, 0, 0, 0,
1970 0, 0, 0, 0, 0, 0, 74, 0, 0, 0,
1971 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
1972 53, 10, 21, 12, 23, 0, 72, 73, 28, 0,
1973 30, 0, 33, 14, 44, 0, 15, 0, 0, 0,
1974 0, 0, 76, 75, 0, 0, 0, 0, 0, 0,
1975 0, 0, 0, 29, 32, 0, 0, 0, 0, 0,
1976 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
1977 0, 0, 0, 11, 22, 13, 24, 16, 43
1981 EvalParser::yypgoto_[] =
1983 -149, -149, -149, 8, -2, -149, 187, -72, -148, 193,
1984 -149, -42, -149, -149, -149, -149, -149
1988 EvalParser::yydefgoto_[] =
1990 0, 3, 30, 31, 32, 33, 81, 83, 172, 85,
1991 91, 118, 101, 115, 178, 157, 194
1995 EvalParser::yytable_[] =
1997 40, 127, 43, 78, 78, 139, 174, 69, 140, 141,
1998 142, 143, 42, 44, 144, 116, 174, 145, 67, 68,
1999 185, 117, 192, 120, 48, 79, 180, 80, 182, 183,
2000 204, 186, 71, 129, 130, 67, 68, 70, 70, 70,
2001 1, 2, 70, 70, 70, 70, 193, 69, 70, 102,
2002 103, 70, 105, 106, 107, 108, 109, 110, 111, 112,
2003 70, 104, 70, 184, 70, 137, 41, 124, 125, 224,
2004 226, 228, 224, 226, 228, 122, 123, 70, 92, 93,
2005 94, 95, 96, 97, 98, 168, 175, 63, 187, 64,
2006 176, 177, 113, 114, 169, 170, 171, 169, 170, 188,
2007 99, 100, 45, 176, 177, 135, 4, 70, 5, 169,
2008 170, 173, 6, 7, 8, 9, 46, 47, 201, 202,
2009 87, 88, 89, 90, 10, 206, 207, 208, 209, 11,
2010 77, 49, 67, 68, 158, 159, 160, 12, 50, 65,
2011 13, 66, 14, 15, 16, 17, 18, 19, 20, 21,
2012 22, 23, 34, 51, 24, 25, 169, 170, 35, 36,
2013 37, 26, 27, 28, 52, 29, 169, 170, 223, 62,
2014 10, 169, 170, 225, 53, 11, 169, 170, 227, 195,
2015 75, 54, 64, 12, 55, 76, 13, 66, 14, 15,
2016 16, 17, 18, 19, 20, 21, 22, 23, 56, 57,
2017 38, 39, 136, 138, 70, 70, 58, 26, 27, 28,
2018 181, 29, 70, 59, 60, 61, 72, 73, 70, 74,
2019 134, 82, 84, 131, 119, 132, 86, 121, 67, 133,
2020 146, 147, 156, 148, 149, 150, 151, 152, 184, 203,
2021 153, 154, 155, 161, 162, 163, 164, 165, 166, 167,
2022 189, 190, 191, 196, 197, 198, 205, 199, 200, 126,
2023 210, 211, 212, 213, 214, 215, 216, 128, 217, 179,
2024 218, 219, 220, 221, 222
2028 EvalParser::yycheck_[] =
2030 2, 73, 4, 4, 4, 4, 154, 8, 4, 4,
2031 4, 4, 4, 5, 4, 53, 164, 4, 6, 7,
2032 9, 59, 35, 65, 3, 59, 4, 61, 4, 20,
2033 4, 20, 34, 75, 76, 6, 7, 38, 38, 38,
2034 56, 57, 38, 38, 38, 38, 59, 8, 38, 51,
2035 52, 38, 54, 55, 56, 57, 58, 59, 60, 61,
2036 38, 53, 38, 54, 38, 36, 0, 69, 70, 217,
2037 218, 219, 220, 221, 222, 67, 68, 38, 27, 28,
2038 29, 30, 31, 32, 33, 9, 9, 15, 9, 17,
2039 13, 14, 49, 50, 18, 19, 20, 18, 19, 9,
2040 49, 50, 15, 13, 14, 36, 3, 38, 5, 18,
2041 19, 20, 9, 10, 11, 12, 15, 15, 190, 191,
2042 22, 23, 24, 25, 21, 197, 198, 199, 200, 26,
2043 4, 17, 6, 7, 136, 137, 138, 34, 17, 15,
2044 37, 17, 39, 40, 41, 42, 43, 44, 45, 46,
2045 47, 48, 3, 3, 51, 52, 18, 19, 9, 10,
2046 11, 58, 59, 60, 3, 62, 18, 19, 20, 17,
2047 21, 18, 19, 20, 3, 26, 18, 19, 20, 181,
2048 15, 3, 17, 34, 3, 15, 37, 17, 39, 40,
2049 41, 42, 43, 44, 45, 46, 47, 48, 3, 3,
2050 51, 52, 36, 36, 38, 38, 3, 58, 59, 60,
2051 36, 62, 38, 3, 3, 3, 15, 15, 38, 15,
2052 4, 59, 59, 16, 55, 16, 58, 55, 6, 16,
2053 16, 16, 59, 16, 16, 16, 16, 16, 54, 4,
2054 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
2055 9, 15, 15, 15, 15, 15, 59, 15, 15, 72,
2056 16, 16, 16, 16, 16, 16, 16, 74, 17, 36,
2061 EvalParser::yystos_[] =
2063 0, 56, 57, 64, 3, 5, 9, 10, 11, 12,
2064 21, 26, 34, 37, 39, 40, 41, 42, 43, 44,
2065 45, 46, 47, 48, 51, 52, 58, 59, 60, 62,
2066 65, 66, 67, 68, 3, 9, 10, 11, 51, 52,
2067 67, 0, 66, 67, 66, 15, 15, 15, 3, 17,
2068 17, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2069 3, 3, 17, 15, 17, 15, 17, 6, 7, 8,
2070 38, 67, 15, 15, 15, 15, 15, 4, 4, 59,
2071 61, 69, 59, 70, 59, 72, 58, 22, 23, 24,
2072 25, 73, 27, 28, 29, 30, 31, 32, 33, 49,
2073 50, 75, 67, 67, 66, 67, 67, 67, 67, 67,
2074 67, 67, 67, 49, 50, 76, 53, 59, 74, 55,
2075 74, 55, 66, 66, 67, 67, 69, 70, 72, 74,
2076 74, 16, 16, 16, 4, 36, 36, 36, 36, 4,
2077 4, 4, 4, 4, 4, 4, 16, 16, 16, 16,
2078 16, 16, 16, 17, 17, 17, 59, 78, 67, 67,
2079 67, 17, 17, 17, 17, 17, 17, 17, 9, 18,
2080 19, 20, 71, 20, 71, 9, 13, 14, 77, 36,
2081 4, 36, 4, 20, 54, 9, 20, 9, 9, 9,
2082 15, 15, 35, 59, 79, 67, 15, 15, 15, 15,
2083 15, 70, 70, 4, 4, 59, 70, 70, 70, 70,
2084 16, 16, 16, 16, 16, 16, 16, 17, 17, 17,
2085 17, 17, 17, 20, 71, 20, 71, 20, 71
2089 EvalParser::yyr1_[] =
2091 0, 63, 64, 64, 65, 66, 66, 66, 66, 66,
2092 66, 66, 66, 66, 66, 66, 66, 66, 67, 67,
2093 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
2094 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
2095 67, 67, 67, 67, 67, 67, 67, 67, 68, 69,
2096 69, 70, 71, 71, 72, 73, 73, 73, 73, 74,
2097 74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
2098 76, 76, 77, 77, 78, 79, 79
2102 EvalParser::yyr2_[] =
2104 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
2105 6, 11, 6, 11, 6, 6, 11, 4, 1, 1,
2106 1, 6, 11, 6, 11, 3, 3, 3, 6, 8,
2107 6, 3, 8, 6, 4, 4, 4, 4, 4, 4,
2108 4, 3, 3, 11, 6, 9, 1, 3, 1, 1,
2109 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2110 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2119 const EvalParser::yytname_[] =
2121 "\"end of file\"",
"error",
"\"invalid token\"",
"\"(\"",
"\")\"",
2122 "\"not\"",
"\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
2123 "\"relay6\"",
"\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
2124 "\"]\"",
"\".\"",
"\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
2125 "\"iface\"",
"\"src\"",
"\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
2126 "\"hlen\"",
"\"htype\"",
"\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
2127 "\"siaddr\"",
"\"substring\"",
"\"all\"",
"\",\"",
"\"concat\"",
"\"+\"",
2128 "\"ifelse\"",
"\"hexstring\"",
"\"addrtotext\"",
"\"int8totext\"",
2129 "\"int16totext\"",
"\"int32totext\"",
"\"uint8totext\"",
2130 "\"uint16totext\"",
"\"uint32totext\"",
"\"pkt6\"",
"\"msgtype\"",
2131 "\"transid\"",
"\"vendor-class\"",
"\"vendor\"",
"\"*\"",
"\"data\"",
2132 "\"enterprise\"",
"\"top-level bool\"",
"\"top-level string\"",
2133 "\"constant string\"",
"\"integer\"",
"\"constant hexstring\"",
2134 "\"option name\"",
"\"ip address\"",
"$accept",
"start",
"expression",
2135 "bool_expr",
"string_expr",
"integer_expr",
"option_code",
2136 "sub_option_code",
"option_repr_type",
"nest_level",
"pkt_metadata",
2137 "enterprise_id",
"pkt4_field",
"pkt6_field",
"relay6_field",
2138 "start_expr",
"length_expr", YY_NULLPTR
2145 EvalParser::yyrline_[] =
2147 0, 130, 130, 131, 136, 139, 140, 145, 150, 155,
2148 160, 165, 170, 190, 204, 213, 222, 232, 249, 254,
2149 259, 264, 269, 274, 295, 310, 315, 329, 343, 358,
2150 363, 368, 373, 378, 383, 388, 393, 398, 403, 408,
2151 413, 418, 427, 437, 446, 459, 472, 477, 480, 486,
2152 490, 496, 502, 506, 512, 521, 525, 529, 533, 539,
2153 543, 549, 553, 557, 561, 565, 569, 573, 577, 581,
2154 587, 591, 597, 601, 607, 614, 619
2158 EvalParser::yy_stack_print_ ()
const
2160 *yycdebug_ <<
"Stack now";
2161 for (stack_type::const_iterator
2162 i = yystack_.begin (),
2163 i_end = yystack_.end ();
2165 *yycdebug_ <<
' ' <<
int (i->state);
2170 EvalParser::yy_reduce_print_ (
int yyrule)
const
2172 int yylno = yyrline_[yyrule];
2173 int yynrhs = yyr2_[yyrule];
2175 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2176 <<
" (line " << yylno <<
"):\n";
2178 for (
int yyi = 0; yyi < yynrhs; yyi++)
2180 yystack_[(yynrhs) - (yyi + 1)]);
2185 #line 14 "parser.yy"
2187 #line 2188 "parser.cc"
2189 #line 626 "parser.yy"
2193 const std::string& what)
2195 ctx.error(loc, what);
Token representing a 16 bit unsigned integer as a string.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Token that represents fields of DHCPv6 packet.
void set_debug_level(debug_level_type l)
Set the current debugging level.
int debug_level_type
Type for debugging levels.
Syntax errors thrown from user actions.
static uint32_t convertUint32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 32bit integer.
The order where Token subtypes are declared should be:
Option::Universe getUniverse()
Returns the universe (v4 or v6)
#define YYLLOC_DEFAULT(Current, Rhs, N)
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
#define YY_CAST(Type, Val)
Token representing a 32 bit integer as a string.
Token that represents meta data of a DHCP packet.
#define YY_REDUCE_PRINT(Rule)
location_type location
The location.
Token that represents concat operator (concatenates two other tokens)
symbol_kind_type token() const YY_NOEXCEPT
FieldType
enum value that determines the field.
isc::dhcp::Expression expression
Parsed expression (output tokens are stored here)
#define YY_MOVE_REF(Type)
Token that converts to hexadecimal string.
FieldType
enum value that determines the field.
"External" symbols: returned by the scanner.
Token that represents logical negation operator.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Token representing an 8 bit unsigned integer as a string.
Token that represents an alternative.
Token representing a constant string in hexadecimal format.
Define the isc::eval::parser class.
MetadataType
enum value that determines the field.
Token that represents logical or operator.
location location_type
Symbol locations.
Token that represents a value of a field within a DHCPv6 relay encapsulation.
Token that represents sub-options in DHCPv4 and DHCPv6.
boost::shared_ptr< Token > TokenPtr
Pointer to a single Token.
context(const EvalParser &yyparser, const symbol_type &yyla)
Token that represents logical and operator.
EvalParser(EvalContext &ctx_yyarg)
Build a parser object.
Evaluation context, an interface to the expression evaluation.
static uint8_t convertUint8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 8bit integer.
Represents a sub-option inserted by the DHCPv4 relay.
uint16_t convertOptionName(const std::string &option_name, const isc::eval::location &loc)
Option name conversion.
Token that represents a value of an option.
Token representing an IP address as a constant string.
uint16_t convertOptionCode(const std::string &option_code, const isc::eval::location &loc)
Option code conversion.
Token representing an IP address as a string.
virtual int parse()
Parse.
Token that represents vendor class options in DHCPv4 and DHCPv6.
Token that represents fields of a DHCPv4 packet.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
Defines the logger used by the top-level component of kea-dhcp-ddns.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
#define YY_SYMBOL_PRINT(Title, Symbol)
~syntax_error() YY_NOEXCEPT YY_NOTHROW
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
Token that represents equality operator (compares two other tokens)
RepresentationType
Token representation type.
Token that represents the substring operator (returns a portion of the supplied string) ...
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
symbol_kind_type kind_
The symbol kind.
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...
Token representing a 32 bit unsigned integer as a string.
FieldType
enum value that determines the field.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
const symbol_type & lookahead() const YY_NOEXCEPT
bool empty() const YY_NOEXCEPT
Whether empty.
int8_t convertNestLevelNumber(const std::string &nest_level, const isc::eval::location &loc)
Nest level conversion.
Token representing a 16 bit integer as a string.
static const symbol_kind_type YYNTOKENS
The number of tokens.
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
Token representing an 8 bit integer as a string.
bool isClientClassDefined(const ClientClass &client_class)
Check if a client class is already defined.
Token that represents a value of an option within a DHCPv6 relay encapsulation.
Token that represents client class membership.
Token that represents vendor options in DHCPv4 and DHCPv6.
Token representing an unsigned 32 bit integer.