54# if defined YYENABLE_NLS && YYENABLE_NLS
57# define YY_(msgid) dgettext ("bison-runtime", msgid)
61# define YY_(msgid) msgid
67# if defined __GNUC__ && !defined __EXCEPTIONS
68# define YY_EXCEPTIONS 0
70# define YY_EXCEPTIONS 1
74#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
79# ifndef YYLLOC_DEFAULT
80# define YYLLOC_DEFAULT(Current, Rhs, N) \
84 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
85 (Current).end = YYRHSLOC (Rhs, N).end; \
89 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
96#define YYUSE(E) ((void) (E))
102# define YYCDEBUG if (yydebug_) (*yycdebug_)
104# define YY_SYMBOL_PRINT(Title, Symbol) \
108 *yycdebug_ << Title << ' '; \
109 yy_print_ (*yycdebug_, Symbol); \
110 *yycdebug_ << '\n'; \
114# define YY_REDUCE_PRINT(Rule) \
117 yy_reduce_print_ (Rule); \
120# define YY_STACK_PRINT() \
128# define YYCDEBUG if (false) std::cerr
129# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
130# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
131# define YY_STACK_PRINT() static_cast<void> (0)
135#define yyerrok (yyerrstatus_ = 0)
136#define yyclearin (yyla.clear ())
138#define YYACCEPT goto yyacceptlab
139#define YYABORT goto yyabortlab
140#define YYERROR goto yyerrorlab
141#define YYRECOVERING() (!!yyerrstatus_)
144namespace isc {
namespace eval {
153 EvalParser::yytnamerr_ (
const char *yystr)
157 std::string yyr =
"";
158 char const *yyp = yystr;
165 goto do_not_strip_quotes;
169 goto do_not_strip_quotes;
178 do_not_strip_quotes: ;
190 yycdebug_ (&std::cerr),
206 EvalParser::by_state::by_state ()
207 : state (empty_state)
210 EvalParser::by_state::by_state (
const by_state& other)
211 : state (other.state)
215 EvalParser::by_state::clear ()
221 EvalParser::by_state::move (by_state& that)
227 EvalParser::by_state::by_state (state_type s)
232 EvalParser::by_state::type_get ()
const
234 if (state == empty_state)
237 return yystos_[state];
240 EvalParser::stack_symbol_type::stack_symbol_type ()
243 EvalParser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
246 switch (that.type_get ())
269 value.YY_MOVE_OR_COPY< int8_t > (
YY_MOVE (that.value));
277 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (that.value));
281 value.YY_MOVE_OR_COPY< uint16_t > (
YY_MOVE (that.value));
286 value.YY_MOVE_OR_COPY< uint32_t > (
YY_MOVE (that.value));
293#if 201103L <= YY_CPLUSPLUS
295 that.state = empty_state;
299 EvalParser::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
300 : super_type (s,
YY_MOVE (that.location))
302 switch (that.type_get ())
325 value.move< int8_t > (
YY_MOVE (that.value));
333 value.move< std::string > (
YY_MOVE (that.value));
337 value.move< uint16_t > (
YY_MOVE (that.value));
342 value.move< uint32_t > (
YY_MOVE (that.value));
353#if YY_CPLUSPLUS < 201103L
354 EvalParser::stack_symbol_type&
355 EvalParser::stack_symbol_type::operator= (stack_symbol_type& that)
358 switch (that.type_get ())
381 value.move< int8_t > (that.value);
389 value.move< std::string > (that.value);
393 value.move< uint16_t > (that.value);
398 value.move< uint32_t > (that.value);
405 location = that.location;
407 that.state = empty_state;
412 template <
typename Base>
414 EvalParser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
421 template <
typename Base>
423 EvalParser::yy_print_ (std::ostream& yyo,
424 const basic_symbol<Base>& yysym)
const
426 std::ostream& yyoutput = yyo;
433 yyo << (yytype < yyntokens_ ?
"token" :
"nterm")
434 <<
' ' << yytname_[yytype] <<
" ("
435 << yysym.location <<
": ";
441 { yyoutput << yysym.value.template as< std::string > (); }
448 { yyoutput << yysym.value.template as< std::string > (); }
455 { yyoutput << yysym.value.template as< std::string > (); }
462 { yyoutput << yysym.value.template as< std::string > (); }
469 { yyoutput << yysym.value.template as< std::string > (); }
476 { yyoutput << yysym.value.template as< uint32_t > (); }
483 { yyoutput << yysym.value.template as< uint16_t > (); }
490 { yyoutput << yysym.value.template as< TokenOption::RepresentationType > (); }
497 { yyoutput << yysym.value.template as< int8_t > (); }
504 { yyoutput << yysym.value.template as< TokenPkt::MetadataType > (); }
511 { yyoutput << yysym.value.template as< uint32_t > (); }
518 { yyoutput << yysym.value.template as< TokenPkt4::FieldType > (); }
525 { yyoutput << yysym.value.template as< TokenPkt6::FieldType > (); }
532 { yyoutput << yysym.value.template as< TokenRelay6Field::FieldType > (); }
545 EvalParser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
553 EvalParser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym)
555#if 201103L <= YY_CPLUSPLUS
556 yypush_ (m, stack_symbol_type (s, std::move (sym)));
558 stack_symbol_type ss (s, sym);
564 EvalParser::yypop_ (
int n)
571 EvalParser::debug_stream ()
const
577 EvalParser::set_debug_stream (std::ostream& o)
583 EvalParser::debug_level_type
584 EvalParser::debug_level ()
const
590 EvalParser::set_debug_level (debug_level_type l)
596 EvalParser::state_type
597 EvalParser::yy_lr_goto_state_ (state_type yystate,
int yysym)
599 int yyr = yypgoto_[yysym - yyntokens_] + yystate;
600 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
601 return yytable_[yyr];
603 return yydefgoto_[yysym - yyntokens_];
607 EvalParser::yy_pact_value_is_default_ (
int yyvalue)
609 return yyvalue == yypact_ninf_;
613 EvalParser::yy_table_value_is_error_ (
int yyvalue)
615 return yyvalue == yytable_ninf_;
634 int yyerrstatus_ = 0;
640 stack_symbol_type yyerror_range[3];
657 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
661 YYCDEBUG <<
"Entering state " << yystack_[0].state <<
'\n';
664 if (yystack_[0].state == yyfinal_)
672 yyn = yypact_[yystack_[0].state];
673 if (yy_pact_value_is_default_ (yyn))
685 yyla.
move (yylookahead);
699 yyn += yyla.type_get ();
700 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ())
707 if (yy_table_value_is_error_ (yyn))
718 yypush_ (
"Shifting", yyn,
YY_MOVE (yyla));
725 yyn = yydefact_[yystack_[0].state];
736 stack_symbol_type yylhs;
737 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
764 yylhs.value.emplace< int8_t > ();
772 yylhs.value.emplace< std::string > ();
776 yylhs.value.emplace< uint16_t > ();
781 yylhs.value.emplace< uint32_t > ();
793 yyerror_range[1].location = yylhs.location;
867 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
885 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
940 std::string cc = yystack_[1].value.as< std::string > ();
942 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
1004 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1007#line 1008 "parser.cc"
1011#line 276 "parser.yy"
1022 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1025#line 1026 "parser.cc"
1029#line 291 "parser.yy"
1034#line 1035 "parser.cc"
1038#line 296 "parser.yy"
1049 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1052#line 1053 "parser.cc"
1056#line 310 "parser.yy"
1067 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1070#line 1071 "parser.cc"
1074#line 324 "parser.yy"
1085 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1088#line 1089 "parser.cc"
1092#line 339 "parser.yy"
1097#line 1098 "parser.cc"
1101#line 344 "parser.yy"
1106#line 1107 "parser.cc"
1110#line 349 "parser.yy"
1115#line 1116 "parser.cc"
1119#line 354 "parser.yy"
1124#line 1125 "parser.cc"
1128#line 359 "parser.yy"
1137#line 1138 "parser.cc"
1141#line 368 "parser.yy"
1151#line 1152 "parser.cc"
1155#line 378 "parser.yy"
1164#line 1165 "parser.cc"
1168#line 387 "parser.yy"
1181#line 1182 "parser.cc"
1185#line 400 "parser.yy"
1193 uint8_t index = ctx.
convertUint8(yystack_[1].value.as< std::string > (), yystack_[1].location);
1198#line 1199 "parser.cc"
1202#line 413 "parser.yy"
1207#line 1208 "parser.cc"
1211#line 420 "parser.yy"
1213 yylhs.value.as< uint32_t > () = ctx.
convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
1215#line 1216 "parser.cc"
1219#line 426 "parser.yy"
1221 yylhs.value.as< uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location);
1223#line 1224 "parser.cc"
1227#line 430 "parser.yy"
1229 yylhs.value.as< uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location);
1231#line 1232 "parser.cc"
1235#line 436 "parser.yy"
1239#line 1240 "parser.cc"
1243#line 440 "parser.yy"
1247#line 1248 "parser.cc"
1251#line 446 "parser.yy"
1253 yylhs.value.as< int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as< std::string > (), yystack_[0].location);
1255#line 1256 "parser.cc"
1259#line 455 "parser.yy"
1263#line 1264 "parser.cc"
1267#line 459 "parser.yy"
1271#line 1272 "parser.cc"
1275#line 463 "parser.yy"
1279#line 1280 "parser.cc"
1283#line 467 "parser.yy"
1287#line 1288 "parser.cc"
1291#line 473 "parser.yy"
1293 yylhs.value.as< uint32_t > () = ctx.
convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
1295#line 1296 "parser.cc"
1299#line 477 "parser.yy"
1301 yylhs.value.as< uint32_t > () = 0;
1303#line 1304 "parser.cc"
1307#line 483 "parser.yy"
1311#line 1312 "parser.cc"
1315#line 487 "parser.yy"
1319#line 1320 "parser.cc"
1323#line 491 "parser.yy"
1327#line 1328 "parser.cc"
1331#line 495 "parser.yy"
1335#line 1336 "parser.cc"
1339#line 499 "parser.yy"
1343#line 1344 "parser.cc"
1347#line 503 "parser.yy"
1351#line 1352 "parser.cc"
1355#line 507 "parser.yy"
1359#line 1360 "parser.cc"
1363#line 511 "parser.yy"
1367#line 1368 "parser.cc"
1371#line 515 "parser.yy"
1375#line 1376 "parser.cc"
1379#line 521 "parser.yy"
1383#line 1384 "parser.cc"
1387#line 525 "parser.yy"
1391#line 1392 "parser.cc"
1395#line 531 "parser.yy"
1399#line 1400 "parser.cc"
1403#line 535 "parser.yy"
1407#line 1408 "parser.cc"
1411#line 541 "parser.yy"
1416#line 1417 "parser.cc"
1420#line 548 "parser.yy"
1425#line 1426 "parser.cc"
1429#line 553 "parser.yy"
1434#line 1435 "parser.cc"
1438#line 1439 "parser.cc"
1456 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1468 error (yyla.
location, yysyntax_error_ (yystack_[0].state, yyla));
1472 yyerror_range[1].location = yyla.
location;
1473 if (yyerrstatus_ == 3)
1479 if (yyla.type_get () == yyeof_)
1481 else if (!yyla.
empty ())
1483 yy_destroy_ (
"Error: discarding", yyla);
1514 stack_symbol_type error_token;
1517 yyn = yypact_[yystack_[0].state];
1518 if (!yy_pact_value_is_default_ (yyn))
1521 if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
1523 yyn = yytable_[yyn];
1530 if (yystack_.size () == 1)
1533 yyerror_range[1].location = yystack_[0].location;
1534 yy_destroy_ (
"Error: popping", yystack_[0]);
1539 yyerror_range[2].location = yyla.
location;
1543 error_token.state = yyn;
1544 yypush_ (
"Shifting",
YY_MOVE (error_token));
1560 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1565 while (1 < yystack_.size ())
1567 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1576 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1580 yy_destroy_ (YY_NULLPTR, yyla);
1582 while (1 < yystack_.
size ())
1584 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1600 EvalParser::yysyntax_error_ (state_type yystate,
const symbol_type& yyla)
const
1606 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1608 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1637 int yytoken = yyla.type_get ();
1638 yyarg[yycount++] = yytname_[yytoken];
1639 int yyn = yypact_[yystate];
1640 if (!yy_pact_value_is_default_ (yyn))
1645 int yyxbegin = yyn < 0 ? -yyn : 0;
1647 int yychecklim = yylast_ - yyn + 1;
1648 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
1649 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1650 if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
1651 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1653 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1659 yyarg[yycount++] = yytname_[yyx];
1664 char const* yyformat = YY_NULLPTR;
1667#define YYCASE_(N, S) \
1673 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1674 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1675 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1676 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1677 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1684 for (
char const* yyp = yyformat; *yyp; ++yyp)
1685 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1687 yyres += yytnamerr_ (yyarg[yyi++]);
1696 const signed char EvalParser::yypact_ninf_ = -118;
1698 const signed char EvalParser::yytable_ninf_ = -1;
1701 EvalParser::yypact_[] =
1703 -14, 27, 76, 17, 27, 27, 37, 41, 53, 39,
1704 52, 59, 77, 85, 93, 98, 88, 29, 94, -118,
1705 -118, -118, -118, -118, 56, 104, -118, 114, 124, 129,
1706 119, 120, -118, -118, 7, -118, 87, 87, 67, 95,
1707 50, 62, 76, 76, 27, 76, 100, -35, 99, -35,
1708 101, 27, 27, 76, 87, 87, 67, -35, -35, -118,
1709 -118, -118, 131, 133, -118, 134, 147, -118, -118, -118,
1710 -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
1711 -118, -118, 116, 117, -3, 118, -118, -118, -118, -118,
1712 -118, 139, -118, 140, -118, -118, 151, -118, 142, 143,
1713 144, 145, 146, 148, 149, 150, -118, 112, 76, 76,
1714 76, 152, 153, 154, 155, 156, 157, 158, 9, 64,
1715 12, -118, 128, 164, 141, 172, -15, 0, 103, 103,
1716 36, 132, 170, -118, -118, -118, -118, -118, -118, 165,
1717 -118, -118, -118, -29, -118, 76, -118, -118, 166, 167,
1718 -118, 168, 169, 87, -118, -118, 181, 182, 136, 87,
1719 87, 87, 173, -118, -118, 174, 175, 176, 177, 171,
1720 -118, 178, 179, 180, 80, 113, 103, 103, -118, -118,
1725 EvalParser::yydefact_[] =
1727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1728 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,
1729 37, 18, 19, 2, 4, 0, 36, 0, 0, 0,
1730 0, 0, 3, 1, 0, 6, 0, 0, 0, 0,
1731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1732 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
1733 38, 39, 0, 0, 42, 0, 0, 43, 44, 45,
1734 46, 23, 49, 50, 51, 52, 53, 54, 55, 56,
1735 57, 24, 0, 0, 0, 0, 58, 59, 25, 48,
1736 47, 0, 32, 0, 31, 7, 8, 9, 0, 0,
1737 0, 0, 0, 0, 0, 0, 16, 0, 0, 0,
1738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1739 0, 62, 0, 0, 0, 0, 0, 0, 0, 0,
1740 0, 0, 0, 40, 41, 10, 20, 11, 21, 0,
1741 60, 61, 26, 0, 28, 0, 30, 13, 34, 0,
1742 14, 0, 0, 0, 64, 63, 0, 0, 0, 0,
1743 0, 0, 0, 27, 29, 0, 0, 0, 0, 0,
1744 35, 0, 0, 0, 0, 0, 0, 0, 12, 22,
1749 EvalParser::yypgoto_[] =
1751 -118, -118, -118, 3, -2, -118, -36, -117, 138, -118,
1752 -34, -118, -118, -118, -118, -118
1756 EvalParser::yydefgoto_[] =
1758 -1, 3, 23, 24, 25, 26, 62, 136, 65, 71,
1759 91, 81, 88, 142, 122, 156
1763 EvalParser::yytable_[] =
1765 32, 63, 138, 51, 52, 147, 154, 34, 35, 149,
1766 89, 59, 138, 51, 52, 93, 90, 33, 98, 99,
1767 150, 139, 155, 101, 102, 140, 141, 133, 134, 135,
1768 4, 148, 5, 109, 1, 2, 6, 7, 8, 9,
1769 82, 83, 39, 85, 47, 151, 48, 84, 10, 140,
1770 141, 97, 36, 11, 95, 96, 37, 179, 181, 179,
1771 181, 12, 51, 52, 13, 14, 15, 16, 38, 40,
1772 17, 18, 67, 68, 69, 70, 41, 19, 20, 21,
1773 42, 22, 133, 134, 137, 27, 28, 29, 43, 72,
1774 73, 74, 75, 76, 77, 78, 44, 10, 133, 134,
1775 178, 45, 11, 79, 80, 46, 123, 124, 125, 49,
1776 12, 50, 53, 13, 14, 15, 16, 162, 64, 30,
1777 31, 133, 134, 166, 167, 168, 19, 20, 21, 54,
1778 22, 133, 134, 180, 57, 58, 48, 50, 60, 55,
1779 61, 86, 87, 157, 56, 66, 92, 103, 94, 104,
1780 105, 106, 107, 108, 110, 111, 112, 51, 113, 114,
1781 115, 116, 117, 121, 143, 118, 119, 120, 144, 126,
1782 127, 128, 129, 130, 131, 132, 146, 145, 148, 152,
1783 153, 158, 159, 160, 161, 163, 164, 165, 174, 169,
1784 170, 171, 172, 173, 100, 175, 176, 177
1788 EvalParser::yycheck_[] =
1790 2, 37, 119, 6, 7, 20, 35, 4, 5, 9,
1791 45, 4, 129, 6, 7, 49, 51, 0, 54, 55,
1792 20, 9, 51, 57, 58, 13, 14, 18, 19, 20,
1793 3, 46, 5, 36, 48, 49, 9, 10, 11, 12,
1794 42, 43, 3, 45, 15, 9, 17, 44, 21, 13,
1795 14, 53, 15, 26, 51, 52, 15, 174, 175, 176,
1796 177, 34, 6, 7, 37, 38, 39, 40, 15, 17,
1797 43, 44, 22, 23, 24, 25, 17, 50, 51, 52,
1798 3, 54, 18, 19, 20, 9, 10, 11, 3, 27,
1799 28, 29, 30, 31, 32, 33, 3, 21, 18, 19,
1800 20, 3, 26, 41, 42, 17, 108, 109, 110, 15,
1801 34, 17, 8, 37, 38, 39, 40, 153, 51, 43,
1802 44, 18, 19, 159, 160, 161, 50, 51, 52, 15,
1803 54, 18, 19, 20, 15, 15, 17, 17, 51, 15,
1804 53, 41, 42, 145, 15, 50, 47, 16, 47, 16,
1805 16, 4, 36, 36, 36, 16, 16, 6, 16, 16,
1806 16, 16, 16, 51, 36, 17, 17, 17, 4, 17,
1807 17, 17, 17, 17, 17, 17, 4, 36, 46, 9,
1808 15, 15, 15, 15, 15, 4, 4, 51, 17, 16,
1809 16, 16, 16, 16, 56, 17, 17, 17
1813 EvalParser::yystos_[] =
1815 0, 48, 49, 56, 3, 5, 9, 10, 11, 12,
1816 21, 26, 34, 37, 38, 39, 40, 43, 44, 50,
1817 51, 52, 54, 57, 58, 59, 60, 9, 10, 11,
1818 43, 44, 59, 0, 58, 58, 15, 15, 15, 3,
1819 17, 17, 3, 3, 3, 3, 17, 15, 17, 15,
1820 17, 6, 7, 8, 15, 15, 15, 15, 15, 4,
1821 51, 53, 61, 61, 51, 63, 50, 22, 23, 24,
1822 25, 64, 27, 28, 29, 30, 31, 32, 33, 41,
1823 42, 66, 59, 59, 58, 59, 41, 42, 67, 45,
1824 51, 65, 47, 65, 47, 58, 58, 59, 61, 61,
1825 63, 65, 65, 16, 16, 16, 4, 36, 36, 36,
1826 36, 16, 16, 16, 16, 16, 16, 16, 17, 17,
1827 17, 51, 69, 59, 59, 59, 17, 17, 17, 17,
1828 17, 17, 17, 18, 19, 20, 62, 20, 62, 9,
1829 13, 14, 68, 36, 4, 36, 4, 20, 46, 9,
1830 20, 9, 9, 15, 35, 51, 70, 59, 15, 15,
1831 15, 15, 61, 4, 4, 51, 61, 61, 61, 16,
1832 16, 16, 16, 16, 17, 17, 17, 17, 20, 62,
1837 EvalParser::yyr1_[] =
1839 0, 55, 56, 56, 57, 58, 58, 58, 58, 58,
1840 58, 58, 58, 58, 58, 58, 58, 59, 59, 59,
1841 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
1842 59, 59, 59, 59, 59, 59, 59, 60, 61, 61,
1843 62, 62, 63, 64, 64, 64, 64, 65, 65, 66,
1844 66, 66, 66, 66, 66, 66, 66, 66, 67, 67,
1849 EvalParser::yyr2_[] =
1851 0, 2, 2, 2, 1, 3, 2, 3, 3, 3,
1852 6, 6, 11, 6, 6, 11, 4, 1, 1, 1,
1853 6, 6, 11, 3, 3, 3, 6, 8, 6, 8,
1854 6, 3, 3, 11, 6, 9, 1, 1, 1, 1,
1855 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1856 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1865 const EvalParser::yytname_[] =
1867 "\"end of file\"",
"error",
"$undefined",
"\"(\"",
"\")\"",
"\"not\"",
1868 "\"and\"",
"\"or\"",
"\"==\"",
"\"option\"",
"\"relay4\"",
"\"relay6\"",
1869 "\"member\"",
"\"peeraddr\"",
"\"linkaddr\"",
"\"[\"",
"\"]\"",
"\".\"",
1870 "\"text\"",
"\"hex\"",
"\"exists\"",
"\"pkt\"",
"\"iface\"",
"\"src\"",
1871 "\"dst\"",
"\"len\"",
"\"pkt4\"",
"\"mac\"",
"\"hlen\"",
"\"htype\"",
1872 "\"ciaddr\"",
"\"giaddr\"",
"\"yiaddr\"",
"\"siaddr\"",
"\"substring\"",
1873 "\"all\"",
"\",\"",
"\"concat\"",
"\"ifelse\"",
"\"hexstring\"",
1874 "\"pkt6\"",
"\"msgtype\"",
"\"transid\"",
"\"vendor-class\"",
1875 "\"vendor\"",
"\"*\"",
"\"data\"",
"\"enterprise\"",
1876 "\"top-level bool\"",
"\"top-level string\"",
"\"constant string\"",
1877 "\"integer\"",
"\"constant hexstring\"",
"\"option name\"",
1878 "\"ip address\"",
"$accept",
"start",
"expression",
"bool_expr",
1879 "string_expr",
"integer_expr",
"option_code",
"option_repr_type",
1880 "nest_level",
"pkt_metadata",
"enterprise_id",
"pkt4_field",
1881 "pkt6_field",
"relay6_field",
"start_expr",
"length_expr", YY_NULLPTR
1885 const unsigned short
1886 EvalParser::yyrline_[] =
1888 0, 120, 120, 121, 126, 129, 130, 135, 140, 145,
1889 150, 155, 175, 189, 198, 207, 217, 234, 239, 244,
1890 249, 254, 275, 290, 295, 309, 323, 338, 343, 348,
1891 353, 358, 367, 377, 386, 399, 412, 419, 425, 429,
1892 435, 439, 445, 454, 458, 462, 466, 472, 476, 482,
1893 486, 490, 494, 498, 502, 506, 510, 514, 520, 524,
1894 530, 534, 540, 547, 552
1899 EvalParser::yystack_print_ ()
1901 *yycdebug_ <<
"Stack now";
1903 i = yystack_.
begin (),
1904 i_end = yystack_.
end ();
1906 *yycdebug_ <<
' ' << i->state;
1912 EvalParser::yy_reduce_print_ (
int yyrule)
1914 unsigned yylno = yyrline_[yyrule];
1915 int yynrhs = yyr2_[yyrule];
1917 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1918 <<
" (line " << yylno <<
"):\n";
1920 for (
int yyi = 0; yyi < yynrhs; yyi++)
1922 yystack_[(yynrhs) - (yyi + 1)]);
1929#line 1930 "parser.cc"
1930#line 559 "parser.yy"
1934 const std::string& what)
1936 ctx.
error(loc, what);
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Symbol)
#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 an unsigned 32 bit integer.
Token representing an IP address as a constant string.
Token that represents client class membership.
Token that represents logical negation operator.
Token that represents a value of an option.
RepresentationType
Token representation type.
Token that represents logical or operator.
Token that represents fields of a DHCPv4 packet.
FieldType
enum value that determines the field.
@ 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 the substring operator (returns a portion of the supplied string)
Token that converts to hexadecimal 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.
static void error(const isc::eval::location &loc, const std::string &what)
Error handler.
virtual int parse()
Parse.
int symbol_number_type
Symbol type: an internal symbol number.
location location_type
Symbol locations.
EvalParser(EvalContext &ctx_yyarg)
Build a parser object.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
Present a slice of the top of a stack.
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
const_iterator end() const
const_iterator begin() const
S::const_reverse_iterator const_iterator
boost::shared_ptr< Token > TokenPtr
Pointer to a single Token.
Defines the logger used by the top-level component of kea-dhcp-ddns.
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
Whether empty.
void clear()
Destroy contents, and record that is empty.
Syntax errors thrown from user actions.