46 #line 33 "parser.yy" // lalr1.cc:438 50 #line 51 "parser.cc" // lalr1.cc:438 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_) 143 #line 14 "parser.yy" // lalr1.cc:513 144 namespace isc {
namespace eval {
145 #line 146 "parser.cc" // lalr1.cc:513 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 <<
": ";
440 #line 111 "parser.yy" // lalr1.cc:672 441 { yyoutput << yysym.value.template as< std::string > (); }
442 #line 443 "parser.cc" // lalr1.cc:672 447 #line 111 "parser.yy" // lalr1.cc:672 448 { yyoutput << yysym.value.template as< std::string > (); }
449 #line 450 "parser.cc" // lalr1.cc:672 454 #line 111 "parser.yy" // lalr1.cc:672 455 { yyoutput << yysym.value.template as< std::string > (); }
456 #line 457 "parser.cc" // lalr1.cc:672 461 #line 111 "parser.yy" // lalr1.cc:672 462 { yyoutput << yysym.value.template as< std::string > (); }
463 #line 464 "parser.cc" // lalr1.cc:672 468 #line 111 "parser.yy" // lalr1.cc:672 469 { yyoutput << yysym.value.template as< std::string > (); }
470 #line 471 "parser.cc" // lalr1.cc:672 475 #line 111 "parser.yy" // lalr1.cc:672 476 { yyoutput << yysym.value.template as< uint32_t > (); }
477 #line 478 "parser.cc" // lalr1.cc:672 482 #line 111 "parser.yy" // lalr1.cc:672 483 { yyoutput << yysym.value.template as< uint16_t > (); }
484 #line 485 "parser.cc" // lalr1.cc:672 489 #line 111 "parser.yy" // lalr1.cc:672 490 { yyoutput << yysym.value.template as< TokenOption::RepresentationType > (); }
491 #line 492 "parser.cc" // lalr1.cc:672 496 #line 111 "parser.yy" // lalr1.cc:672 497 { yyoutput << yysym.value.template as< int8_t > (); }
498 #line 499 "parser.cc" // lalr1.cc:672 503 #line 111 "parser.yy" // lalr1.cc:672 504 { yyoutput << yysym.value.template as< TokenPkt::MetadataType > (); }
505 #line 506 "parser.cc" // lalr1.cc:672 510 #line 111 "parser.yy" // lalr1.cc:672 511 { yyoutput << yysym.value.template as< uint32_t > (); }
512 #line 513 "parser.cc" // lalr1.cc:672 517 #line 111 "parser.yy" // lalr1.cc:672 518 { yyoutput << yysym.value.template as< TokenPkt4::FieldType > (); }
519 #line 520 "parser.cc" // lalr1.cc:672 524 #line 111 "parser.yy" // lalr1.cc:672 525 { yyoutput << yysym.value.template as< TokenPkt6::FieldType > (); }
526 #line 527 "parser.cc" // lalr1.cc:672 531 #line 111 "parser.yy" // lalr1.cc:672 532 { yyoutput << yysym.value.template as< TokenRelay6Field::FieldType > (); }
533 #line 534 "parser.cc" // lalr1.cc:672 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)
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];
647 #endif // YY_EXCEPTIONS 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))
682 #endif // YY_EXCEPTIONS 685 yyla.
move (yylookahead);
693 #endif // YY_EXCEPTIONS 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;
800 #endif // YY_EXCEPTIONS 805 #line 131 "parser.yy" // lalr1.cc:907 810 #line 811 "parser.cc" // lalr1.cc:907 814 #line 136 "parser.yy" // lalr1.cc:907 819 #line 820 "parser.cc" // lalr1.cc:907 823 #line 141 "parser.yy" // lalr1.cc:907 828 #line 829 "parser.cc" // lalr1.cc:907 832 #line 146 "parser.yy" // lalr1.cc:907 837 #line 838 "parser.cc" // lalr1.cc:907 841 #line 151 "parser.yy" // lalr1.cc:907 846 #line 847 "parser.cc" // lalr1.cc:907 850 #line 156 "parser.yy" // lalr1.cc:907 867 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
870 #line 871 "parser.cc" // lalr1.cc:907 874 #line 176 "parser.yy" // lalr1.cc:907 879 TokenPtr opt(
new TokenRelay6Option(yystack_[8].value.as< int8_t > (), yystack_[3].value.as< uint16_t > (), TokenOption::EXISTS));
885 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
888 #line 889 "parser.cc" // lalr1.cc:907 892 #line 190 "parser.yy" // lalr1.cc:907 901 #line 902 "parser.cc" // lalr1.cc:907 905 #line 199 "parser.yy" // lalr1.cc:907 914 #line 915 "parser.cc" // lalr1.cc:907 918 #line 208 "parser.yy" // lalr1.cc:907 925 TokenPtr exist(
new TokenVendor(ctx.
getUniverse(), yystack_[8].value.as< uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as< uint16_t > ()));
928 #line 929 "parser.cc" // lalr1.cc:907 932 #line 218 "parser.yy" // lalr1.cc:907 940 std::string cc = yystack_[1].value.as< std::string > ();
942 error(yystack_[1].location,
"Not defined client class '" + cc +
"'");
947 #line 948 "parser.cc" // lalr1.cc:907 951 #line 235 "parser.yy" // lalr1.cc:907 956 #line 957 "parser.cc" // lalr1.cc:907 960 #line 240 "parser.yy" // lalr1.cc:907 965 #line 966 "parser.cc" // lalr1.cc:907 969 #line 245 "parser.yy" // lalr1.cc:907 974 #line 975 "parser.cc" // lalr1.cc:907 978 #line 250 "parser.yy" // lalr1.cc:907 983 #line 984 "parser.cc" // lalr1.cc:907 987 #line 255 "parser.yy" // lalr1.cc:907 1004 error(yystack_[5].location,
"relay4 can only be used in DHCPv4.");
1007 #line 1008 "parser.cc" // lalr1.cc:907 1011 #line 276 "parser.yy" // lalr1.cc:907 1022 error(yystack_[10].location,
"relay6 can only be used in DHCPv6.");
1025 #line 1026 "parser.cc" // lalr1.cc:907 1029 #line 291 "parser.yy" // lalr1.cc:907 1034 #line 1035 "parser.cc" // lalr1.cc:907 1038 #line 296 "parser.yy" // lalr1.cc:907 1049 error(yystack_[2].location,
"pkt4 can only be used in DHCPv4.");
1052 #line 1053 "parser.cc" // lalr1.cc:907 1056 #line 310 "parser.yy" // lalr1.cc:907 1067 error(yystack_[2].location,
"pkt6 can only be used in DHCPv6.");
1070 #line 1071 "parser.cc" // lalr1.cc:907 1074 #line 324 "parser.yy" // lalr1.cc:907 1085 error(yystack_[5].location,
"relay6 can only be used in DHCPv6.");
1088 #line 1089 "parser.cc" // lalr1.cc:907 1092 #line 339 "parser.yy" // lalr1.cc:907 1097 #line 1098 "parser.cc" // lalr1.cc:907 1101 #line 344 "parser.yy" // lalr1.cc:907 1106 #line 1107 "parser.cc" // lalr1.cc:907 1110 #line 349 "parser.yy" // lalr1.cc:907 1115 #line 1116 "parser.cc" // lalr1.cc:907 1119 #line 354 "parser.yy" // lalr1.cc:907 1124 #line 1125 "parser.cc" // lalr1.cc:907 1128 #line 359 "parser.yy" // lalr1.cc:907 1137 #line 1138 "parser.cc" // lalr1.cc:907 1141 #line 368 "parser.yy" // lalr1.cc:907 1148 TokenVendor::ENTERPRISE_ID));
1151 #line 1152 "parser.cc" // lalr1.cc:907 1155 #line 378 "parser.yy" // lalr1.cc:907 1164 #line 1165 "parser.cc" // lalr1.cc:907 1168 #line 387 "parser.yy" // lalr1.cc:907 1178 TokenVendor::DATA, 0));
1181 #line 1182 "parser.cc" // lalr1.cc:907 1185 #line 400 "parser.yy" // lalr1.cc:907 1193 uint8_t index = ctx.
convertUint8(yystack_[1].value.as< std::string > (), yystack_[1].location);
1195 TokenVendor::DATA, index));
1198 #line 1199 "parser.cc" // lalr1.cc:907 1202 #line 413 "parser.yy" // lalr1.cc:907 1207 #line 1208 "parser.cc" // lalr1.cc:907 1211 #line 420 "parser.yy" // lalr1.cc:907 1213 yylhs.value.as< uint32_t > () = ctx.
convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
1215 #line 1216 "parser.cc" // lalr1.cc:907 1219 #line 426 "parser.yy" // lalr1.cc:907 1221 yylhs.value.as< uint16_t > () = ctx.
convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location);
1223 #line 1224 "parser.cc" // lalr1.cc:907 1227 #line 430 "parser.yy" // lalr1.cc:907 1229 yylhs.value.as< uint16_t > () = ctx.
convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location);
1231 #line 1232 "parser.cc" // lalr1.cc:907 1235 #line 436 "parser.yy" // lalr1.cc:907 1239 #line 1240 "parser.cc" // lalr1.cc:907 1243 #line 440 "parser.yy" // lalr1.cc:907 1247 #line 1248 "parser.cc" // lalr1.cc:907 1251 #line 446 "parser.yy" // lalr1.cc:907 1253 yylhs.value.as< int8_t > () = ctx.
convertNestLevelNumber(yystack_[0].value.as< std::string > (), yystack_[0].location);
1255 #line 1256 "parser.cc" // lalr1.cc:907 1259 #line 455 "parser.yy" // lalr1.cc:907 1263 #line 1264 "parser.cc" // lalr1.cc:907 1267 #line 459 "parser.yy" // lalr1.cc:907 1271 #line 1272 "parser.cc" // lalr1.cc:907 1275 #line 463 "parser.yy" // lalr1.cc:907 1279 #line 1280 "parser.cc" // lalr1.cc:907 1283 #line 467 "parser.yy" // lalr1.cc:907 1287 #line 1288 "parser.cc" // lalr1.cc:907 1291 #line 473 "parser.yy" // lalr1.cc:907 1293 yylhs.value.as< uint32_t > () = ctx.
convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
1295 #line 1296 "parser.cc" // lalr1.cc:907 1299 #line 477 "parser.yy" // lalr1.cc:907 1301 yylhs.value.as< uint32_t > () = 0;
1303 #line 1304 "parser.cc" // lalr1.cc:907 1307 #line 483 "parser.yy" // lalr1.cc:907 1311 #line 1312 "parser.cc" // lalr1.cc:907 1315 #line 487 "parser.yy" // lalr1.cc:907 1319 #line 1320 "parser.cc" // lalr1.cc:907 1323 #line 491 "parser.yy" // lalr1.cc:907 1327 #line 1328 "parser.cc" // lalr1.cc:907 1331 #line 495 "parser.yy" // lalr1.cc:907 1335 #line 1336 "parser.cc" // lalr1.cc:907 1339 #line 499 "parser.yy" // lalr1.cc:907 1343 #line 1344 "parser.cc" // lalr1.cc:907 1347 #line 503 "parser.yy" // lalr1.cc:907 1351 #line 1352 "parser.cc" // lalr1.cc:907 1355 #line 507 "parser.yy" // lalr1.cc:907 1359 #line 1360 "parser.cc" // lalr1.cc:907 1363 #line 511 "parser.yy" // lalr1.cc:907 1367 #line 1368 "parser.cc" // lalr1.cc:907 1371 #line 515 "parser.yy" // lalr1.cc:907 1375 #line 1376 "parser.cc" // lalr1.cc:907 1379 #line 521 "parser.yy" // lalr1.cc:907 1383 #line 1384 "parser.cc" // lalr1.cc:907 1387 #line 525 "parser.yy" // lalr1.cc:907 1391 #line 1392 "parser.cc" // lalr1.cc:907 1395 #line 531 "parser.yy" // lalr1.cc:907 1399 #line 1400 "parser.cc" // lalr1.cc:907 1403 #line 535 "parser.yy" // lalr1.cc:907 1407 #line 1408 "parser.cc" // lalr1.cc:907 1411 #line 541 "parser.yy" // lalr1.cc:907 1416 #line 1417 "parser.cc" // lalr1.cc:907 1420 #line 548 "parser.yy" // lalr1.cc:907 1425 #line 1426 "parser.cc" // lalr1.cc:907 1429 #line 553 "parser.yy" // lalr1.cc:907 1434 #line 1435 "parser.cc" // lalr1.cc:907 1438 #line 1439 "parser.cc" // lalr1.cc:907 1449 #endif // YY_EXCEPTIONS 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]);
1589 #endif // YY_EXCEPTIONS 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)]);
1927 #line 14 "parser.yy" // lalr1.cc:1218 1929 #line 1930 "parser.cc" // lalr1.cc:1218 1930 #line 559 "parser.yy" // lalr1.cc:1219 1934 const std::string& what)
1936 ctx.
error(loc, what);
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.
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
The order where Token subtypes are declared should be:
Option::Universe getUniverse()
Returns the universe (v4 or v6)
#define YYLLOC_DEFAULT(Current, Rhs, N)
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)
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.
static void error(const isc::eval::location &loc, const std::string &what)
Error handler.
Token that represents logical negation operator.
Token that represents an alternative.
Present a slice of the top of a stack.
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.
bool empty() const
Whether empty.
location location_type
Symbol locations.
Token that represents a value of a field within a DHCPv6 relay encapsulation.
const_iterator end() const
boost::shared_ptr< Token > TokenPtr
Pointer to a single Token.
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.
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.
const_iterator begin() const
Defines the logger used by the top-level component of kea-dhcp-ddns.
#define YY_SYMBOL_PRINT(Title, Symbol)
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)
FieldType
enum value that determines the field.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
int symbol_number_type
Symbol type: an internal symbol number.
int8_t convertNestLevelNumber(const std::string &nest_level, const isc::eval::location &loc)
Nest level conversion.
void clear()
Destroy contents, and record that is empty.
std::vector< stack_symbol_type > ::const_reverse_iterator const_iterator
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
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.