39 #define yylex d2_parser_lex 47 #line 34 "d2_parser.yy" 51 #line 52 "d2_parser.cc" 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_ (); \ 125 #else // !D2_PARSER_DEBUG 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) 132 #endif // !D2_PARSER_DEBUG 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_) 142 #line 14 "d2_parser.yy" 143 namespace isc {
namespace d2 {
144 #line 145 "d2_parser.cc" 150 yycdebug_ (&std::cerr),
171 : state (empty_state)
174 D2Parser::by_state::by_state (
const by_state& that)
YY_NOEXCEPT 185 D2Parser::by_state::move (by_state& that)
191 D2Parser::by_state::by_state (state_type s)
YY_NOEXCEPT 198 if (state == empty_state)
204 D2Parser::stack_symbol_type::stack_symbol_type ()
207 D2Parser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
210 switch (that.kind ())
219 value.YY_MOVE_OR_COPY<
bool > (
YY_MOVE (that.value));
223 value.YY_MOVE_OR_COPY<
double > (
YY_MOVE (that.value));
227 value.YY_MOVE_OR_COPY< int64_t > (
YY_MOVE (that.value));
231 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (that.value));
238 #if 201103L <= YY_CPLUSPLUS 240 that.state = empty_state;
247 switch (that.
kind ())
279 #if YY_CPLUSPLUS < 201103L 280 D2Parser::stack_symbol_type&
281 D2Parser::stack_symbol_type::operator= (
const stack_symbol_type& that)
284 switch (that.kind ())
293 value.copy<
bool > (that.value);
297 value.copy<
double > (that.value);
301 value.copy< int64_t > (that.value);
305 value.copy< std::string > (that.value);
312 location = that.location;
316 D2Parser::stack_symbol_type&
317 D2Parser::stack_symbol_type::operator= (stack_symbol_type& that)
320 switch (that.kind ())
329 value.move<
bool > (that.value);
333 value.move<
double > (that.value);
337 value.move< int64_t > (that.value);
341 value.move< std::string > (that.value);
348 location = that.location;
350 that.state = empty_state;
355 template <
typename Base>
364 template <
typename Base>
368 std::ostream& yyoutput = yyo;
371 yyo <<
"empty symbol";
375 yyo << (yykind <
YYNTOKENS ?
"token" :
"nterm")
376 <<
' ' << yysym.
name () <<
" (" 381 #line 116 "d2_parser.yy" 382 { yyoutput << yysym.
value.template as < std::string > (); }
383 #line 384 "d2_parser.cc" 387 #line 116 "d2_parser.yy" 388 { yyoutput << yysym.
value.template as < int64_t > (); }
389 #line 390 "d2_parser.cc" 393 #line 116 "d2_parser.yy" 394 { yyoutput << yysym.
value.template as < double > (); }
395 #line 396 "d2_parser.cc" 399 #line 116 "d2_parser.yy" 400 { yyoutput << yysym.
value.template as < bool > (); }
401 #line 402 "d2_parser.cc" 405 #line 116 "d2_parser.yy" 406 { yyoutput << yysym.
value.template as < ElementPtr > (); }
407 #line 408 "d2_parser.cc" 411 #line 116 "d2_parser.yy" 412 { yyoutput << yysym.
value.template as < ElementPtr > (); }
413 #line 414 "d2_parser.cc" 417 #line 116 "d2_parser.yy" 418 { yyoutput << yysym.
value.template as < ElementPtr > (); }
419 #line 420 "d2_parser.cc" 431 D2Parser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
441 #if 201103L <= YY_CPLUSPLUS 442 yypush_ (m, stack_symbol_type (s, std::move (sym)));
444 stack_symbol_type ss (s, sym);
480 #endif // D2_PARSER_DEBUG 483 D2Parser::yy_lr_goto_state_ (state_type yystate,
int yysym)
485 int yyr = yypgoto_[yysym -
YYNTOKENS] + yystate;
486 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
487 return yytable_[yyr];
493 D2Parser::yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT 495 return yyvalue == yypact_ninf_;
499 D2Parser::yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT 501 return yyvalue == yytable_ninf_;
519 int yyerrstatus_ = 0;
525 stack_symbol_type yyerror_range[3];
532 #endif // YY_EXCEPTIONS 542 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
548 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
552 if (yystack_[0].state == yyfinal_)
563 yyn = yypact_[+yystack_[0].state];
564 if (yy_pact_value_is_default_ (yyn))
573 #endif // YY_EXCEPTIONS 576 yyla.
move (yylookahead);
581 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
585 #endif // YY_EXCEPTIONS 602 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.
kind ())
611 if (yy_table_value_is_error_ (yyn))
622 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
630 yyn = yydefact_[+yystack_[0].state];
642 stack_symbol_type yylhs;
643 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
656 yylhs.value.emplace<
bool > ();
660 yylhs.value.emplace<
double > ();
664 yylhs.value.emplace< int64_t > ();
668 yylhs.value.emplace< std::string > ();
678 stack_type::slice range (yystack_, yylen);
680 yyerror_range[1].location = yylhs.location;
687 #endif // YY_EXCEPTIONS 692 #line 125 "d2_parser.yy" 694 #line 695 "d2_parser.cc" 698 #line 126 "d2_parser.yy" 700 #line 701 "d2_parser.cc" 704 #line 127 "d2_parser.yy" 706 #line 707 "d2_parser.cc" 710 #line 128 "d2_parser.yy" 712 #line 713 "d2_parser.cc" 716 #line 129 "d2_parser.yy" 718 #line 719 "d2_parser.cc" 722 #line 130 "d2_parser.yy" 724 #line 725 "d2_parser.cc" 728 #line 131 "d2_parser.yy" 730 #line 731 "d2_parser.cc" 734 #line 132 "d2_parser.yy" 736 #line 737 "d2_parser.cc" 740 #line 133 "d2_parser.yy" 742 #line 743 "d2_parser.cc" 746 #line 134 "d2_parser.yy" 748 #line 749 "d2_parser.cc" 752 #line 142 "d2_parser.yy" 754 #line 755 "d2_parser.cc" 758 #line 143 "d2_parser.yy" 760 #line 761 "d2_parser.cc" 764 #line 144 "d2_parser.yy" 766 #line 767 "d2_parser.cc" 770 #line 145 "d2_parser.yy" 772 #line 773 "d2_parser.cc" 776 #line 146 "d2_parser.yy" 778 #line 779 "d2_parser.cc" 782 #line 147 "d2_parser.yy" 784 #line 785 "d2_parser.cc" 788 #line 148 "d2_parser.yy" 790 #line 791 "d2_parser.cc" 794 #line 151 "d2_parser.yy" 799 #line 800 "d2_parser.cc" 803 #line 156 "d2_parser.yy" 810 #line 811 "d2_parser.cc" 814 #line 161 "d2_parser.yy" 820 #line 821 "d2_parser.cc" 824 #line 167 "d2_parser.yy" 826 #line 827 "d2_parser.cc" 830 #line 174 "d2_parser.yy" 833 ctx.
unique(yystack_[2].value.as < std::string > (), ctx.
loc2pos(yystack_[2].location));
834 ctx.
stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
836 #line 837 "d2_parser.cc" 840 #line 179 "d2_parser.yy" 844 ctx.
unique(yystack_[2].value.as < std::string > (), ctx.
loc2pos(yystack_[2].location));
845 ctx.
stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
847 #line 848 "d2_parser.cc" 851 #line 185 "d2_parser.yy" 855 #line 856 "d2_parser.cc" 859 #line 190 "d2_parser.yy" 864 #line 865 "d2_parser.cc" 868 #line 193 "d2_parser.yy" 872 #line 873 "d2_parser.cc" 876 #line 201 "d2_parser.yy" 881 #line 882 "d2_parser.cc" 885 #line 205 "d2_parser.yy" 890 #line 891 "d2_parser.cc" 894 #line 209 "d2_parser.yy" 898 #line 899 "d2_parser.cc" 902 #line 219 "d2_parser.yy" 905 const std::string& keyword = yystack_[1].value.as < std::string > ();
906 error(yystack_[1].location,
907 "got unexpected keyword \"" + keyword +
"\" in " + where +
" map.");
909 #line 910 "d2_parser.cc" 913 #line 228 "d2_parser.yy" 920 #line 921 "d2_parser.cc" 924 #line 233 "d2_parser.yy" 930 #line 931 "d2_parser.cc" 934 #line 241 "d2_parser.yy" 938 ctx.
stack_.back()->set(
"DhcpDdns", m);
942 #line 943 "d2_parser.cc" 946 #line 247 "d2_parser.yy" 951 #line 952 "d2_parser.cc" 955 #line 254 "d2_parser.yy" 959 #line 960 "d2_parser.cc" 963 #line 258 "d2_parser.yy" 969 #line 970 "d2_parser.cc" 973 #line 262 "d2_parser.yy" 977 #line 978 "d2_parser.cc" 981 #line 268 "d2_parser.yy" 985 #line 986 "d2_parser.cc" 989 #line 290 "d2_parser.yy" 994 #line 995 "d2_parser.cc" 998 #line 293 "d2_parser.yy" 1001 ctx.
stack_.back()->set(
"ip-address", s);
1004 #line 1005 "d2_parser.cc" 1008 #line 299 "d2_parser.yy" 1011 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
1012 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
1015 ctx.
stack_.back()->set(
"port", i);
1017 #line 1018 "d2_parser.cc" 1021 #line 308 "d2_parser.yy" 1023 ctx.
unique(
"dns-server-timeout", ctx.
loc2pos(yystack_[2].location));
1024 if (yystack_[0].value.as < int64_t > () <= 0) {
1025 error(yystack_[0].location,
"dns-server-timeout must be greater than zero");
1028 ctx.
stack_.back()->set(
"dns-server-timeout", i);
1031 #line 1032 "d2_parser.cc" 1035 #line 318 "d2_parser.yy" 1037 ctx.
unique(
"ncr-protocol", ctx.
loc2pos(yystack_[0].location));
1040 #line 1041 "d2_parser.cc" 1044 #line 321 "d2_parser.yy" 1046 ctx.
stack_.back()->set(
"ncr-protocol", yystack_[0].value.as <
ElementPtr > ());
1049 #line 1050 "d2_parser.cc" 1053 #line 327 "d2_parser.yy" 1055 #line 1056 "d2_parser.cc" 1059 #line 328 "d2_parser.yy" 1061 #line 1062 "d2_parser.cc" 1065 #line 331 "d2_parser.yy" 1067 ctx.
unique(
"ncr-format", ctx.
loc2pos(yystack_[0].location));
1070 #line 1071 "d2_parser.cc" 1074 #line 334 "d2_parser.yy" 1077 ctx.
stack_.back()->set(
"ncr-format", json);
1080 #line 1081 "d2_parser.cc" 1084 #line 340 "d2_parser.yy" 1088 #line 1089 "d2_parser.cc" 1092 #line 342 "d2_parser.yy" 1101 if ((old->size() != 1) || !old->contains(
"comment")) {
1102 std::stringstream msg;
1103 msg <<
"duplicate user-context entries (previous at " 1104 << old->getPosition().str() <<
")";
1105 error(yystack_[3].location, msg.str());
1108 user_context->set(
"comment", old->get(
"comment"));
1112 parent->set(
"user-context", user_context);
1115 #line 1116 "d2_parser.cc" 1119 #line 365 "d2_parser.yy" 1123 #line 1124 "d2_parser.cc" 1127 #line 367 "d2_parser.yy" 1132 user_context->set(
"comment", comment);
1138 if (old->contains(
"comment")) {
1139 std::stringstream msg;
1140 msg <<
"duplicate user-context/comment entries (previous at " 1141 << old->getPosition().str() <<
")";
1142 error(yystack_[3].location, msg.str());
1145 merge(user_context, old);
1149 parent->set(
"user-context", user_context);
1152 #line 1153 "d2_parser.cc" 1156 #line 392 "d2_parser.yy" 1158 ctx.
unique(
"forward-ddns", ctx.
loc2pos(yystack_[0].location));
1160 ctx.
stack_.back()->set(
"forward-ddns", m);
1164 #line 1165 "d2_parser.cc" 1168 #line 398 "d2_parser.yy" 1173 #line 1174 "d2_parser.cc" 1177 #line 403 "d2_parser.yy" 1179 ctx.
unique(
"reverse-ddns", ctx.
loc2pos(yystack_[0].location));
1181 ctx.
stack_.back()->set(
"reverse-ddns", m);
1185 #line 1186 "d2_parser.cc" 1189 #line 409 "d2_parser.yy" 1194 #line 1195 "d2_parser.cc" 1198 #line 420 "d2_parser.yy" 1202 #line 1203 "d2_parser.cc" 1206 #line 431 "d2_parser.yy" 1208 ctx.
unique(
"ddns-domains", ctx.
loc2pos(yystack_[0].location));
1210 ctx.
stack_.back()->set(
"ddns-domains", l);
1214 #line 1215 "d2_parser.cc" 1218 #line 437 "d2_parser.yy" 1223 #line 1224 "d2_parser.cc" 1227 #line 442 "d2_parser.yy" 1232 #line 1233 "d2_parser.cc" 1236 #line 445 "d2_parser.yy" 1240 #line 1241 "d2_parser.cc" 1244 #line 455 "d2_parser.yy" 1248 #line 1249 "d2_parser.cc" 1252 #line 460 "d2_parser.yy" 1255 ctx.
stack_.back()->add(m);
1258 #line 1259 "d2_parser.cc" 1262 #line 464 "d2_parser.yy" 1266 #line 1267 "d2_parser.cc" 1270 #line 468 "d2_parser.yy" 1275 #line 1276 "d2_parser.cc" 1279 #line 471 "d2_parser.yy" 1283 #line 1284 "d2_parser.cc" 1287 #line 477 "d2_parser.yy" 1291 #line 1292 "d2_parser.cc" 1295 #line 491 "d2_parser.yy" 1300 #line 1301 "d2_parser.cc" 1304 #line 494 "d2_parser.yy" 1306 if (yystack_[0].value.as < std::string > () ==
"") {
1307 error(yystack_[1].location,
"Ddns domain name cannot be blank");
1311 ctx.
stack_.back()->set(
"name", name);
1314 #line 1315 "d2_parser.cc" 1318 #line 504 "d2_parser.yy" 1323 #line 1324 "d2_parser.cc" 1327 #line 507 "d2_parser.yy" 1331 ctx.
stack_.back()->set(
"key-name", name);
1334 #line 1335 "d2_parser.cc" 1338 #line 517 "d2_parser.yy" 1340 ctx.
unique(
"dns-servers", ctx.
loc2pos(yystack_[0].location));
1342 ctx.
stack_.back()->set(
"dns-servers", l);
1346 #line 1347 "d2_parser.cc" 1350 #line 523 "d2_parser.yy" 1355 #line 1356 "d2_parser.cc" 1359 #line 528 "d2_parser.yy" 1364 #line 1365 "d2_parser.cc" 1368 #line 531 "d2_parser.yy" 1372 #line 1373 "d2_parser.cc" 1376 #line 537 "d2_parser.yy" 1380 #line 1381 "d2_parser.cc" 1384 #line 542 "d2_parser.yy" 1387 ctx.
stack_.back()->add(m);
1390 #line 1391 "d2_parser.cc" 1394 #line 546 "d2_parser.yy" 1398 #line 1399 "d2_parser.cc" 1402 #line 550 "d2_parser.yy" 1407 #line 1408 "d2_parser.cc" 1411 #line 553 "d2_parser.yy" 1415 #line 1416 "d2_parser.cc" 1419 #line 559 "d2_parser.yy" 1423 #line 1424 "d2_parser.cc" 1427 #line 573 "d2_parser.yy" 1432 #line 1433 "d2_parser.cc" 1436 #line 576 "d2_parser.yy" 1438 if (yystack_[0].value.as < std::string > () !=
"") {
1439 error(yystack_[1].location,
"hostname is not yet supported");
1443 ctx.
stack_.back()->set(
"hostname", name);
1446 #line 1447 "d2_parser.cc" 1450 #line 586 "d2_parser.yy" 1452 ctx.
unique(
"ip-address", ctx.
loc2pos(yystack_[0].location));
1455 #line 1456 "d2_parser.cc" 1459 #line 589 "d2_parser.yy" 1462 ctx.
stack_.back()->set(
"ip-address", s);
1465 #line 1466 "d2_parser.cc" 1469 #line 595 "d2_parser.yy" 1472 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
1473 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
1476 ctx.
stack_.back()->set(
"port", i);
1478 #line 1479 "d2_parser.cc" 1482 #line 610 "d2_parser.yy" 1486 ctx.
stack_.back()->set(
"tsig-keys", l);
1490 #line 1491 "d2_parser.cc" 1494 #line 616 "d2_parser.yy" 1499 #line 1500 "d2_parser.cc" 1503 #line 621 "d2_parser.yy" 1508 #line 1509 "d2_parser.cc" 1512 #line 624 "d2_parser.yy" 1516 #line 1517 "d2_parser.cc" 1520 #line 634 "d2_parser.yy" 1524 #line 1525 "d2_parser.cc" 1528 #line 639 "d2_parser.yy" 1531 ctx.
stack_.back()->add(m);
1534 #line 1535 "d2_parser.cc" 1538 #line 643 "d2_parser.yy" 1542 #line 1543 "d2_parser.cc" 1546 #line 647 "d2_parser.yy" 1552 #line 1553 "d2_parser.cc" 1556 #line 651 "d2_parser.yy" 1560 #line 1561 "d2_parser.cc" 1564 #line 658 "d2_parser.yy" 1568 #line 1569 "d2_parser.cc" 1572 #line 672 "d2_parser.yy" 1577 #line 1578 "d2_parser.cc" 1581 #line 675 "d2_parser.yy" 1583 if (yystack_[0].value.as < std::string > () ==
"") {
1584 error(yystack_[1].location,
"TSIG key name cannot be blank");
1588 ctx.
stack_.back()->set(
"name", name);
1591 #line 1592 "d2_parser.cc" 1595 #line 685 "d2_parser.yy" 1600 #line 1601 "d2_parser.cc" 1604 #line 688 "d2_parser.yy" 1606 if (yystack_[0].value.as < std::string > () ==
"") {
1607 error(yystack_[1].location,
"TSIG key algorithm cannot be blank");
1610 ctx.
stack_.back()->set(
"algorithm", elem);
1613 #line 1614 "d2_parser.cc" 1617 #line 697 "d2_parser.yy" 1619 ctx.
unique(
"digest-bits", ctx.
loc2pos(yystack_[2].location));
1620 if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0 && (yystack_[0].value.as < int64_t > () % 8 != 0))) {
1621 error(yystack_[0].location,
"TSIG key digest-bits must either be zero or a positive, multiple of eight");
1624 ctx.
stack_.back()->set(
"digest-bits", elem);
1626 #line 1627 "d2_parser.cc" 1630 #line 706 "d2_parser.yy" 1635 #line 1636 "d2_parser.cc" 1639 #line 709 "d2_parser.yy" 1641 if (yystack_[0].value.as < std::string > () ==
"") {
1642 error(yystack_[1].location,
"TSIG key secret cannot be blank");
1645 ctx.
stack_.back()->set(
"secret", elem);
1648 #line 1649 "d2_parser.cc" 1652 #line 723 "d2_parser.yy" 1654 ctx.
unique(
"control-socket", ctx.
loc2pos(yystack_[0].location));
1656 ctx.
stack_.back()->set(
"control-socket", m);
1660 #line 1661 "d2_parser.cc" 1664 #line 729 "d2_parser.yy" 1669 #line 1670 "d2_parser.cc" 1673 #line 736 "d2_parser.yy" 1677 #line 1678 "d2_parser.cc" 1681 #line 748 "d2_parser.yy" 1683 ctx.
unique(
"socket-type", ctx.
loc2pos(yystack_[0].location));
1686 #line 1687 "d2_parser.cc" 1690 #line 751 "d2_parser.yy" 1693 ctx.
stack_.back()->set(
"socket-type", stype);
1696 #line 1697 "d2_parser.cc" 1700 #line 757 "d2_parser.yy" 1702 ctx.
unique(
"socket-name", ctx.
loc2pos(yystack_[0].location));
1705 #line 1706 "d2_parser.cc" 1709 #line 760 "d2_parser.yy" 1712 ctx.
stack_.back()->set(
"socket-name", name);
1715 #line 1716 "d2_parser.cc" 1719 #line 768 "d2_parser.yy" 1721 ctx.
unique(
"hooks-libraries", ctx.
loc2pos(yystack_[0].location));
1723 ctx.
stack_.back()->set(
"hooks-libraries", l);
1727 #line 1728 "d2_parser.cc" 1731 #line 774 "d2_parser.yy" 1736 #line 1737 "d2_parser.cc" 1740 #line 785 "d2_parser.yy" 1744 #line 1745 "d2_parser.cc" 1748 #line 790 "d2_parser.yy" 1751 ctx.
stack_.back()->add(m);
1754 #line 1755 "d2_parser.cc" 1758 #line 794 "d2_parser.yy" 1764 #line 1765 "d2_parser.cc" 1768 #line 800 "d2_parser.yy" 1774 #line 1775 "d2_parser.cc" 1778 #line 804 "d2_parser.yy" 1784 #line 1785 "d2_parser.cc" 1788 #line 812 "d2_parser.yy" 1792 #line 1793 "d2_parser.cc" 1796 #line 822 "d2_parser.yy" 1801 #line 1802 "d2_parser.cc" 1805 #line 825 "d2_parser.yy" 1808 ctx.
stack_.back()->set(
"library", lib);
1811 #line 1812 "d2_parser.cc" 1815 #line 831 "d2_parser.yy" 1817 ctx.
unique(
"parameters", ctx.
loc2pos(yystack_[0].location));
1820 #line 1821 "d2_parser.cc" 1824 #line 834 "d2_parser.yy" 1826 ctx.
stack_.back()->set(
"parameters", yystack_[0].value.as <
ElementPtr > ());
1829 #line 1830 "d2_parser.cc" 1833 #line 841 "d2_parser.yy" 1837 ctx.
stack_.back()->set(
"loggers", l);
1841 #line 1842 "d2_parser.cc" 1845 #line 847 "d2_parser.yy" 1850 #line 1851 "d2_parser.cc" 1854 #line 856 "d2_parser.yy" 1858 #line 1859 "d2_parser.cc" 1862 #line 862 "d2_parser.yy" 1865 ctx.
stack_.back()->add(l);
1868 #line 1869 "d2_parser.cc" 1872 #line 866 "d2_parser.yy" 1876 #line 1877 "d2_parser.cc" 1880 #line 872 "d2_parser.yy" 1884 #line 1885 "d2_parser.cc" 1888 #line 886 "d2_parser.yy" 1893 #line 1894 "d2_parser.cc" 1897 #line 889 "d2_parser.yy" 1900 ctx.
stack_.back()->set(
"name", name);
1903 #line 1904 "d2_parser.cc" 1907 #line 895 "d2_parser.yy" 1909 ctx.
unique(
"debuglevel", ctx.
loc2pos(yystack_[2].location));
1911 ctx.
stack_.back()->set(
"debuglevel", dl);
1913 #line 1914 "d2_parser.cc" 1917 #line 901 "d2_parser.yy" 1922 #line 1923 "d2_parser.cc" 1926 #line 904 "d2_parser.yy" 1929 ctx.
stack_.back()->set(
"severity", sev);
1932 #line 1933 "d2_parser.cc" 1936 #line 910 "d2_parser.yy" 1938 ctx.
unique(
"output_options", ctx.
loc2pos(yystack_[0].location));
1940 ctx.
stack_.back()->set(
"output_options", l);
1944 #line 1945 "d2_parser.cc" 1948 #line 916 "d2_parser.yy" 1953 #line 1954 "d2_parser.cc" 1957 #line 923 "d2_parser.yy" 1961 #line 1962 "d2_parser.cc" 1965 #line 928 "d2_parser.yy" 1968 ctx.
stack_.back()->add(m);
1971 #line 1972 "d2_parser.cc" 1975 #line 932 "d2_parser.yy" 1979 #line 1980 "d2_parser.cc" 1983 #line 938 "d2_parser.yy" 1987 #line 1988 "d2_parser.cc" 1991 #line 950 "d2_parser.yy" 1996 #line 1997 "d2_parser.cc" 2000 #line 953 "d2_parser.yy" 2003 ctx.
stack_.back()->set(
"output", sev);
2006 #line 2007 "d2_parser.cc" 2010 #line 959 "d2_parser.yy" 2014 ctx.
stack_.back()->set(
"flush", flush);
2016 #line 2017 "d2_parser.cc" 2020 #line 965 "d2_parser.yy" 2024 ctx.
stack_.back()->set(
"maxsize", maxsize);
2026 #line 2027 "d2_parser.cc" 2030 #line 971 "d2_parser.yy" 2034 ctx.
stack_.back()->set(
"maxver", maxver);
2036 #line 2037 "d2_parser.cc" 2040 #line 977 "d2_parser.yy" 2045 #line 2046 "d2_parser.cc" 2049 #line 980 "d2_parser.yy" 2052 ctx.
stack_.back()->set(
"pattern", sev);
2055 #line 2056 "d2_parser.cc" 2059 #line 2060 "d2_parser.cc" 2068 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
2072 #endif // YY_EXCEPTIONS 2078 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
2092 std::string msg = yysyntax_error_ (yyctx);
2097 yyerror_range[1].location = yyla.
location;
2098 if (yyerrstatus_ == 3)
2106 else if (!yyla.
empty ())
2108 yy_destroy_ (
"Error: discarding", yyla);
2142 yyn = yypact_[+yystack_[0].state];
2143 if (!yy_pact_value_is_default_ (yyn))
2146 if (0 <= yyn && yyn <= yylast_
2149 yyn = yytable_[yyn];
2156 if (yystack_.size () == 1)
2159 yyerror_range[1].location = yystack_[0].location;
2160 yy_destroy_ (
"Error: popping", yystack_[0]);
2165 stack_symbol_type error_token;
2167 yyerror_range[2].location = yyla.
location;
2171 error_token.state = state_type (yyn);
2172 yypush_ (
"Shifting",
YY_MOVE (error_token));
2198 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
2204 while (1 < yystack_.size ())
2206 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
2215 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
2219 yy_destroy_ (YY_NULLPTR, yyla);
2221 while (1 < yystack_.size ())
2223 yy_destroy_ (YY_NULLPTR, yystack_[0]);
2228 #endif // YY_EXCEPTIONS 2243 D2Parser::yytnamerr_ (
const char *yystr)
2248 char const *yyp = yystr;
2255 goto do_not_strip_quotes;
2259 goto do_not_strip_quotes;
2271 do_not_strip_quotes: ;
2280 return yytnamerr_ (yytname_[yysymbol]);
2287 : yyparser_ (yyparser)
2297 const int yyn = yypact_[+yyparser_.yystack_[0].state];
2298 if (!yy_pact_value_is_default_ (yyn))
2303 const int yyxbegin = yyn < 0 ? -yyn : 0;
2305 const int yychecklim = yylast_ - yyn + 1;
2307 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
2309 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
2313 else if (yycount == yyargn)
2320 if (yyarg && yycount == 0 && 0 < yyargn)
2331 D2Parser::yy_syntax_error_arguments_ (
const context& yyctx,
2362 yyarg[0] = yyctx.
token ();
2363 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2371 D2Parser::yysyntax_error_ (
const context& yyctx)
const 2374 enum { YYARGS_MAX = 5 };
2377 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
2379 char const* yyformat = YY_NULLPTR;
2382 #define YYCASE_(N, S) \ 2388 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
2389 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2390 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2391 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2392 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2398 std::ptrdiff_t yyi = 0;
2399 for (
char const* yyp = yyformat; *yyp; ++yyp)
2400 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
2411 const short D2Parser::yypact_ninf_ = -212;
2413 const signed char D2Parser::yytable_ninf_ = -1;
2416 D2Parser::yypact_[] =
2418 49, -212, -212, -212, -212, -212, -212, -212, -212, -212,
2419 -212, 10, 8, 24, 30, 42, 48, 64, 128, 74,
2420 136, 127, -212, -212, -212, -212, -212, -212, -212, -212,
2421 -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
2422 -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
2423 -212, -212, 8, -22, 33, 7, 31, 146, 38, 156,
2424 28, 160, 37, -212, 137, 163, 166, 164, 168, -212,
2425 22, -212, -212, 169, 170, -212, -212, -212, -212, -212,
2426 -212, -212, -212, -212, -212, 171, -212, 76, -212, -212,
2427 -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
2428 -212, -212, -212, 172, -212, -212, -212, -212, -212, 79,
2429 -212, -212, -212, -212, -212, -212, 173, 174, -212, -212,
2430 -212, -212, -212, -212, -212, 103, -212, -212, -212, -212,
2431 -212, 175, 177, -212, -212, 178, -212, -212, -212, -212,
2432 -212, 104, -212, -212, -212, -212, -212, 77, -212, -212,
2433 -212, -212, 105, -212, -212, -212, -212, 8, 8, -212,
2434 121, 179, -212, -212, 180, 130, 131, 181, 182, 183,
2435 186, 187, 188, 189, 190, 191, 192, -212, 7, -212,
2436 193, 140, 195, 196, 31, -212, 31, -212, 146, 197,
2437 198, 201, 38, -212, 38, -212, 156, 205, 154, 206,
2438 28, -212, 28, 160, -212, 207, 209, -13, -212, -212,
2439 -212, 210, 208, 162, -212, -212, 153, 199, 213, 165,
2440 214, 216, 211, 217, 220, 221, -212, 176, -212, 184,
2441 185, -212, 106, -212, 203, 222, 204, -212, 107, -212,
2442 215, -212, 218, -212, 115, -212, 219, 213, -212, 8,
2443 7, -212, -212, -212, -212, -212, -212, -212, -212, -15,
2444 -15, 146, 13, 223, 224, -212, -212, -212, -212, -212,
2445 160, -212, -212, -212, -212, -212, -212, -212, -212, 116,
2446 -212, -212, 117, -212, -212, -212, 118, 226, -212, -212,
2447 -212, -212, -212, 119, -212, -212, -212, -212, 228, 225,
2448 -212, -212, 129, -212, 158, -212, 231, -15, -212, -212,
2449 -212, 232, 233, 13, -212, 37, -212, 223, 36, 224,
2450 -212, -212, 234, -212, 227, 229, -212, 149, -212, -212,
2451 -212, 236, -212, -212, -212, -212, 151, -212, -212, -212,
2452 -212, -212, -212, 156, -212, -212, -212, 239, 240, 194,
2453 241, 36, -212, 242, 230, 244, -212, 235, -212, -212,
2454 -212, 243, -212, -212, 159, -212, 46, 243, -212, -212,
2455 249, 250, 251, -212, 152, -212, -212, -212, -212, -212,
2456 -212, -212, 252, 237, 212, 245, 260, 46, -212, 247,
2457 -212, -212, -212, 248, -212, -212, -212
2461 D2Parser::yydefact_[] =
2463 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
2464 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2465 0, 0, 1, 38, 30, 26, 25, 22, 23, 24,
2466 29, 3, 27, 28, 46, 5, 52, 7, 159, 9,
2467 150, 11, 107, 13, 98, 15, 131, 17, 124, 19,
2468 201, 21, 40, 33, 0, 0, 0, 152, 0, 100,
2469 0, 0, 0, 42, 0, 41, 0, 0, 34, 48,
2470 0, 50, 71, 0, 0, 75, 79, 81, 83, 85,
2471 87, 148, 178, 192, 213, 0, 70, 0, 54, 57,
2472 58, 59, 60, 61, 68, 69, 62, 63, 64, 65,
2473 66, 67, 173, 0, 176, 171, 170, 168, 169, 0,
2474 161, 164, 165, 166, 167, 157, 0, 153, 154, 120,
2475 122, 118, 117, 115, 116, 0, 109, 112, 113, 114,
2476 105, 0, 101, 102, 145, 0, 143, 142, 140, 141,
2477 139, 0, 133, 136, 137, 138, 129, 0, 126, 209,
2478 211, 206, 0, 203, 207, 208, 39, 44, 0, 31,
2479 37, 0, 51, 47, 0, 0, 0, 0, 0, 0,
2480 0, 0, 0, 0, 0, 0, 0, 45, 56, 53,
2481 0, 0, 0, 0, 163, 160, 0, 151, 156, 0,
2482 0, 0, 111, 108, 0, 99, 104, 0, 0, 0,
2483 135, 132, 0, 128, 125, 0, 0, 205, 202, 43,
2484 35, 0, 0, 0, 73, 74, 0, 0, 0, 0,
2485 0, 0, 0, 0, 0, 0, 55, 0, 175, 0,
2486 0, 162, 0, 155, 0, 0, 0, 110, 0, 103,
2487 0, 147, 0, 134, 0, 127, 0, 0, 204, 0,
2488 0, 72, 77, 78, 76, 80, 32, 82, 84, 89,
2489 89, 152, 0, 194, 0, 174, 177, 172, 158, 121,
2490 0, 119, 106, 146, 144, 130, 210, 212, 36, 0,
2491 96, 95, 0, 90, 91, 94, 0, 0, 188, 190,
2492 187, 185, 186, 0, 180, 183, 184, 199, 0, 195,
2493 196, 218, 0, 215, 0, 49, 0, 93, 86, 88,
2494 149, 0, 0, 182, 179, 0, 193, 198, 0, 217,
2495 214, 123, 0, 92, 0, 0, 181, 0, 197, 230,
2496 235, 0, 233, 229, 227, 228, 0, 220, 223, 225,
2497 226, 224, 216, 100, 189, 191, 200, 0, 0, 0,
2498 0, 222, 219, 0, 0, 0, 232, 0, 221, 97,
2499 231, 0, 234, 240, 0, 237, 0, 239, 236, 250,
2500 0, 0, 0, 255, 0, 242, 245, 246, 247, 248,
2501 249, 238, 0, 0, 0, 0, 0, 244, 241, 0,
2502 252, 253, 254, 0, 243, 251, 256
2506 D2Parser::yypgoto_[] =
2508 -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
2509 -212, -212, -41, -212, -211, -212, -18, -212, -212, -212,
2510 -212, -212, -212, -56, -212, -212, -212, -212, -212, -212,
2511 -212, -12, 68, -212, -212, -212, -212, -212, -212, -212,
2512 -212, -212, -55, -212, -44, -212, -212, -212, -212, -212,
2513 5, -212, -60, -212, -212, -212, -212, -77, -212, 71,
2514 -212, -212, -212, 83, 81, -212, -212, -51, -212, -212,
2515 -212, -212, -212, -2, 75, -212, -212, -212, 69, 80,
2516 -212, -212, -212, -212, -212, -212, -212, -212, -212, 18,
2517 -212, 93, -212, -212, -212, 96, 99, -212, -212, -212,
2518 -212, -212, -212, -212, -212, -212, -212, -28, -212, -212,
2519 -212, -212, -212, -212, -212, -212, -29, -212, -212, -212,
2520 -26, 84, -212, -212, -212, -212, -212, -212, -212, -25,
2521 -212, -212, -61, -212, -212, -212, -212, -212, -212, -212,
2522 -212, -74, -212, -212, -89, -212, -212, -212, -212, -212,
2527 D2Parser::yydefgoto_[] =
2529 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2530 20, 21, 30, 31, 32, 53, 257, 67, 68, 33,
2531 52, 64, 65, 86, 35, 54, 70, 161, 71, 37,
2532 55, 87, 88, 89, 164, 90, 91, 92, 167, 254,
2533 93, 168, 94, 169, 95, 170, 96, 171, 97, 172,
2534 282, 283, 284, 285, 306, 45, 59, 131, 132, 133,
2535 194, 43, 58, 125, 126, 127, 191, 128, 189, 129,
2536 190, 49, 61, 147, 148, 202, 47, 60, 141, 142,
2537 143, 199, 144, 197, 145, 98, 173, 41, 57, 116,
2538 117, 118, 186, 39, 56, 109, 110, 111, 183, 112,
2539 180, 113, 114, 182, 99, 174, 293, 294, 295, 311,
2540 296, 312, 100, 175, 298, 299, 300, 315, 51, 62,
2541 152, 153, 154, 205, 155, 206, 101, 176, 302, 303,
2542 318, 336, 337, 338, 347, 339, 340, 350, 341, 348,
2543 364, 365, 366, 374, 375, 376, 382, 377, 378, 379,
2548 D2Parser::yytable_[] =
2550 106, 107, 122, 123, 137, 138, 151, 256, 280, 140,
2551 22, 63, 108, 23, 124, 24, 139, 25, 72, 73,
2552 74, 75, 149, 150, 76, 162, 77, 78, 79, 80,
2553 163, 34, 77, 78, 81, 66, 256, 36, 82, 134,
2554 135, 83, 85, 69, 84, 288, 289, 77, 78, 38,
2555 77, 78, 119, 40, 136, 77, 78, 77, 78, 102,
2556 103, 104, 119, 120, 85, 26, 27, 28, 29, 105,
2557 85, 42, 149, 150, 329, 330, 121, 331, 332, 178,
2558 203, 46, 184, 204, 179, 85, 369, 185, 85, 370,
2559 371, 372, 373, 85, 85, 85, 1, 2, 3, 4,
2560 5, 6, 7, 8, 9, 10, 192, 200, 207, 184,
2561 192, 193, 201, 208, 268, 272, 209, 210, 200, 178,
2562 307, 307, 313, 275, 305, 308, 309, 314, 106, 107,
2563 106, 107, 319, 44, 50, 320, 122, 123, 122, 123,
2564 108, 48, 108, 156, 137, 138, 137, 138, 124, 140,
2565 124, 140, 207, 115, 351, 387, 139, 346, 139, 352,
2566 388, 203, 367, 130, 321, 368, 157, 146, 252, 253,
2567 158, 160, 159, 165, 166, 177, 181, 188, 211, 187,
2568 196, 195, 198, 212, 213, 216, 217, 218, 214, 215,
2569 219, 220, 221, 222, 223, 224, 225, 227, 228, 229,
2570 230, 234, 235, 281, 281, 236, 290, 291, 278, 240,
2571 242, 246, 241, 247, 249, 250, 261, 255, 292, 251,
2572 24, 259, 258, 260, 262, 263, 264, 270, 317, 277,
2573 297, 301, 310, 265, 316, 322, 324, 325, 279, 343,
2574 349, 266, 267, 354, 355, 357, 226, 323, 359, 361,
2575 363, 281, 356, 383, 384, 385, 389, 290, 291, 151,
2576 269, 271, 333, 334, 393, 286, 353, 239, 304, 292,
2577 391, 244, 273, 237, 335, 274, 276, 238, 245, 287,
2578 243, 233, 232, 231, 344, 326, 345, 360, 328, 327,
2579 358, 248, 362, 381, 342, 333, 334, 390, 394, 0,
2580 0, 0, 0, 392, 395, 396, 0, 335
2584 D2Parser::yycheck_[] =
2586 56, 56, 58, 58, 60, 60, 62, 218, 23, 60,
2587 0, 52, 56, 5, 58, 7, 60, 9, 11, 12,
2588 13, 14, 35, 36, 17, 3, 19, 20, 21, 22,
2589 8, 7, 19, 20, 27, 57, 247, 7, 31, 11,
2590 12, 34, 57, 10, 37, 32, 33, 19, 20, 7,
2591 19, 20, 24, 5, 26, 19, 20, 19, 20, 28,
2592 29, 30, 24, 25, 57, 57, 58, 59, 60, 38,
2593 57, 7, 35, 36, 38, 39, 38, 41, 42, 3,
2594 3, 7, 3, 6, 8, 57, 40, 8, 57, 43,
2595 44, 45, 46, 57, 57, 57, 47, 48, 49, 50,
2596 51, 52, 53, 54, 55, 56, 3, 3, 3, 3,
2597 3, 8, 8, 8, 8, 8, 157, 158, 3, 3,
2598 3, 3, 3, 8, 8, 8, 8, 8, 184, 184,
2599 186, 186, 3, 5, 7, 6, 192, 192, 194, 194,
2600 184, 5, 186, 6, 200, 200, 202, 202, 192, 200,
2601 194, 202, 3, 7, 3, 3, 200, 8, 202, 8,
2602 8, 3, 3, 7, 6, 6, 3, 7, 15, 16,
2603 4, 3, 8, 4, 4, 4, 4, 3, 57, 6,
2604 3, 6, 4, 4, 4, 4, 4, 4, 58, 58,
2605 4, 4, 4, 4, 4, 4, 4, 4, 58, 4,
2606 4, 4, 4, 259, 260, 4, 262, 262, 249, 4,
2607 4, 4, 58, 4, 4, 7, 5, 18, 262, 57,
2608 7, 7, 57, 7, 7, 5, 5, 5, 3, 247,
2609 7, 7, 6, 57, 6, 4, 4, 4, 250, 5,
2610 4, 57, 57, 4, 4, 4, 178, 307, 6, 5,
2611 7, 307, 58, 4, 4, 4, 4, 313, 313, 315,
2612 57, 57, 318, 318, 4, 260, 343, 196, 270, 313,
2613 58, 202, 57, 192, 318, 57, 57, 194, 203, 261,
2614 200, 188, 186, 184, 57, 313, 57, 57, 317, 315,
2615 351, 207, 57, 367, 319, 351, 351, 60, 387, -1,
2616 -1, -1, -1, 58, 57, 57, -1, 351
2620 D2Parser::yystos_[] =
2622 0, 47, 48, 49, 50, 51, 52, 53, 54, 55,
2623 56, 62, 63, 64, 65, 66, 67, 68, 69, 70,
2624 71, 72, 0, 5, 7, 9, 57, 58, 59, 60,
2625 73, 74, 75, 80, 7, 85, 7, 90, 7, 154,
2626 5, 148, 7, 122, 5, 116, 7, 137, 5, 132,
2627 7, 179, 81, 76, 86, 91, 155, 149, 123, 117,
2628 138, 133, 180, 73, 82, 83, 57, 78, 79, 10,
2629 87, 89, 11, 12, 13, 14, 17, 19, 20, 21,
2630 22, 27, 31, 34, 37, 57, 84, 92, 93, 94,
2631 96, 97, 98, 101, 103, 105, 107, 109, 146, 165,
2632 173, 187, 28, 29, 30, 38, 84, 103, 105, 156,
2633 157, 158, 160, 162, 163, 7, 150, 151, 152, 24,
2634 25, 38, 84, 103, 105, 124, 125, 126, 128, 130,
2635 7, 118, 119, 120, 11, 12, 26, 84, 103, 105,
2636 128, 139, 140, 141, 143, 145, 7, 134, 135, 35,
2637 36, 84, 181, 182, 183, 185, 6, 3, 4, 8,
2638 3, 88, 3, 8, 95, 4, 4, 99, 102, 104,
2639 106, 108, 110, 147, 166, 174, 188, 4, 3, 8,
2640 161, 4, 164, 159, 3, 8, 153, 6, 3, 129,
2641 131, 127, 3, 8, 121, 6, 3, 144, 4, 142,
2642 3, 8, 136, 3, 6, 184, 186, 3, 8, 73,
2643 73, 57, 4, 4, 58, 58, 4, 4, 4, 4,
2644 4, 4, 4, 4, 4, 4, 93, 4, 58, 4,
2645 4, 157, 156, 152, 4, 4, 4, 125, 124, 120,
2646 4, 58, 4, 140, 139, 135, 4, 4, 182, 4,
2647 7, 57, 15, 16, 100, 18, 75, 77, 57, 7,
2648 7, 5, 7, 5, 5, 57, 57, 57, 8, 57,
2649 5, 57, 8, 57, 57, 8, 57, 77, 73, 92,
2650 23, 84, 111, 112, 113, 114, 111, 150, 32, 33,
2651 84, 103, 105, 167, 168, 169, 171, 7, 175, 176,
2652 177, 7, 189, 190, 134, 8, 115, 3, 8, 8,
2653 6, 170, 172, 3, 8, 178, 6, 3, 191, 3,
2654 6, 6, 4, 113, 4, 4, 168, 181, 177, 38,
2655 39, 41, 42, 84, 103, 105, 192, 193, 194, 196,
2656 197, 199, 190, 5, 57, 57, 8, 195, 200, 4,
2657 198, 3, 8, 118, 4, 4, 58, 4, 193, 6,
2658 57, 5, 57, 7, 201, 202, 203, 3, 6, 40,
2659 43, 44, 45, 46, 204, 205, 206, 208, 209, 210,
2660 211, 202, 207, 4, 4, 4, 212, 3, 8, 4,
2661 60, 58, 58, 4, 205, 57, 57
2667 0, 61, 63, 62, 64, 62, 65, 62, 66, 62,
2668 67, 62, 68, 62, 69, 62, 70, 62, 71, 62,
2669 72, 62, 73, 73, 73, 73, 73, 73, 73, 74,
2670 76, 75, 77, 78, 78, 79, 79, 79, 81, 80,
2671 82, 82, 83, 83, 83, 84, 86, 85, 88, 87,
2672 87, 89, 91, 90, 92, 92, 92, 93, 93, 93,
2673 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
2674 93, 95, 94, 96, 97, 99, 98, 100, 100, 102,
2675 101, 104, 103, 106, 105, 108, 107, 110, 109, 111,
2676 111, 112, 112, 112, 113, 113, 115, 114, 117, 116,
2677 118, 118, 119, 119, 119, 121, 120, 123, 122, 124,
2678 124, 124, 125, 125, 125, 125, 125, 125, 127, 126,
2679 129, 128, 131, 130, 133, 132, 134, 134, 134, 136,
2680 135, 138, 137, 139, 139, 139, 140, 140, 140, 140,
2681 140, 140, 140, 142, 141, 144, 143, 145, 147, 146,
2682 149, 148, 150, 150, 151, 151, 151, 153, 152, 155,
2683 154, 156, 156, 156, 157, 157, 157, 157, 157, 157,
2684 157, 159, 158, 161, 160, 162, 164, 163, 166, 165,
2685 167, 167, 167, 168, 168, 168, 168, 168, 170, 169,
2686 172, 171, 174, 173, 175, 175, 176, 176, 176, 178,
2687 177, 180, 179, 181, 181, 181, 181, 182, 182, 184,
2688 183, 186, 185, 188, 187, 189, 189, 189, 191, 190,
2689 192, 192, 192, 193, 193, 193, 193, 193, 193, 193,
2690 195, 194, 196, 198, 197, 200, 199, 201, 201, 201,
2691 203, 202, 204, 204, 204, 205, 205, 205, 205, 205,
2692 207, 206, 208, 209, 210, 212, 211
2698 0, 2, 0, 3, 0, 3, 0, 3, 0, 3,
2699 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2700 0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2701 0, 4, 1, 0, 1, 3, 5, 2, 0, 4,
2702 0, 1, 1, 3, 2, 2, 0, 4, 0, 6,
2703 1, 2, 0, 4, 1, 3, 2, 1, 1, 1,
2704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2705 1, 0, 4, 3, 3, 0, 4, 1, 1, 0,
2706 4, 0, 4, 0, 4, 0, 6, 0, 6, 0,
2707 1, 1, 3, 2, 1, 1, 0, 6, 0, 4,
2708 0, 1, 1, 3, 2, 0, 4, 0, 4, 1,
2709 3, 2, 1, 1, 1, 1, 1, 1, 0, 4,
2710 0, 4, 0, 6, 0, 4, 1, 3, 2, 0,
2711 4, 0, 4, 1, 3, 2, 1, 1, 1, 1,
2712 1, 1, 1, 0, 4, 0, 4, 3, 0, 6,
2713 0, 4, 0, 1, 1, 3, 2, 0, 4, 0,
2714 4, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2715 1, 0, 4, 0, 4, 3, 0, 4, 0, 6,
2716 1, 3, 2, 1, 1, 1, 1, 1, 0, 4,
2717 0, 4, 0, 6, 0, 1, 1, 3, 2, 0,
2718 4, 0, 4, 1, 3, 2, 1, 1, 1, 0,
2719 4, 0, 4, 0, 6, 1, 3, 2, 0, 4,
2720 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
2721 0, 4, 3, 0, 4, 0, 6, 1, 3, 2,
2722 0, 4, 1, 3, 2, 1, 1, 1, 1, 1,
2727 #if D2_PARSER_DEBUG || 1 2731 const D2Parser::yytname_[] =
2733 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
2734 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"DhcpDdns\"",
2735 "\"ip-address\"",
"\"port\"",
"\"dns-server-timeout\"",
2736 "\"ncr-protocol\"",
"\"UDP\"",
"\"TCP\"",
"\"ncr-format\"",
"\"JSON\"",
2737 "\"user-context\"",
"\"comment\"",
"\"forward-ddns\"",
2738 "\"reverse-ddns\"",
"\"ddns-domains\"",
"\"key-name\"",
2739 "\"dns-servers\"",
"\"hostname\"",
"\"tsig-keys\"",
"\"algorithm\"",
2740 "\"digest-bits\"",
"\"secret\"",
"\"control-socket\"",
"\"socket-type\"",
2741 "\"socket-name\"",
"\"hooks-libraries\"",
"\"library\"",
2742 "\"parameters\"",
"\"loggers\"",
"\"name\"",
"\"output_options\"",
2743 "\"output\"",
"\"debuglevel\"",
"\"severity\"",
"\"flush\"",
2744 "\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"TOPLEVEL_JSON",
2745 "TOPLEVEL_DHCPDDNS",
"SUB_DHCPDDNS",
"SUB_TSIG_KEY",
"SUB_TSIG_KEYS",
2746 "SUB_DDNS_DOMAIN",
"SUB_DDNS_DOMAINS",
"SUB_DNS_SERVER",
2747 "SUB_DNS_SERVERS",
"SUB_HOOKS_LIBRARY",
"\"constant string\"",
2748 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
2749 "$@1",
"$@2",
"$@3",
"$@4",
"$@5",
"$@6",
"$@7",
"$@8",
"$@9",
"$@10",
2750 "value",
"sub_json",
"map2",
"$@11",
"map_value",
"map_content",
2751 "not_empty_map",
"list_generic",
"$@12",
"list_content",
2752 "not_empty_list",
"unknown_map_entry",
"syntax_map",
"$@13",
2753 "global_object",
"$@14",
"global_object_comma",
"sub_dhcpddns",
"$@15",
2754 "dhcpddns_params",
"dhcpddns_param",
"ip_address",
"$@16",
"port",
2755 "dns_server_timeout",
"ncr_protocol",
"$@17",
"ncr_protocol_value",
2756 "ncr_format",
"$@18",
"user_context",
"$@19",
"comment",
"$@20",
2757 "forward_ddns",
"$@21",
"reverse_ddns",
"$@22",
"ddns_mgr_params",
2758 "not_empty_ddns_mgr_params",
"ddns_mgr_param",
"ddns_domains",
"$@23",
2759 "sub_ddns_domains",
"$@24",
"ddns_domain_list",
2760 "not_empty_ddns_domain_list",
"ddns_domain",
"$@25",
"sub_ddns_domain",
2761 "$@26",
"ddns_domain_params",
"ddns_domain_param",
"ddns_domain_name",
2762 "$@27",
"ddns_key_name",
"$@28",
"dns_servers",
"$@29",
2763 "sub_dns_servers",
"$@30",
"dns_server_list",
"dns_server",
"$@31",
2764 "sub_dns_server",
"$@32",
"dns_server_params",
"dns_server_param",
2765 "dns_server_hostname",
"$@33",
"dns_server_ip_address",
"$@34",
2766 "dns_server_port",
"tsig_keys",
"$@35",
"sub_tsig_keys",
"$@36",
2767 "tsig_keys_list",
"not_empty_tsig_keys_list",
"tsig_key",
"$@37",
2768 "sub_tsig_key",
"$@38",
"tsig_key_params",
"tsig_key_param",
2769 "tsig_key_name",
"$@39",
"tsig_key_algorithm",
"$@40",
2770 "tsig_key_digest_bits",
"tsig_key_secret",
"$@41",
"control_socket",
2771 "$@42",
"control_socket_params",
"control_socket_param",
2772 "control_socket_type",
"$@43",
"control_socket_name",
"$@44",
2773 "hooks_libraries",
"$@45",
"hooks_libraries_list",
2774 "not_empty_hooks_libraries_list",
"hooks_library",
"$@46",
2775 "sub_hooks_library",
"$@47",
"hooks_params",
"hooks_param",
"library",
2776 "$@48",
"parameters",
"$@49",
"loggers",
"$@50",
"loggers_entries",
2777 "logger_entry",
"$@51",
"logger_params",
"logger_param",
"name",
"$@52",
2778 "debuglevel",
"severity",
"$@53",
"output_options_list",
"$@54",
2779 "output_options_list_content",
"output_entry",
"$@55",
2780 "output_params_list",
"output_params",
"output",
"$@56",
"flush",
2781 "maxsize",
"maxver",
"pattern",
"$@57", YY_NULLPTR
2788 D2Parser::yyrline_[] =
2790 0, 125, 125, 125, 126, 126, 127, 127, 128, 128,
2791 129, 129, 130, 130, 131, 131, 132, 132, 133, 133,
2792 134, 134, 142, 143, 144, 145, 146, 147, 148, 151,
2793 156, 156, 167, 170, 171, 174, 179, 185, 190, 190,
2794 197, 198, 201, 205, 209, 219, 228, 228, 241, 241,
2795 251, 254, 258, 258, 266, 267, 268, 274, 275, 276,
2796 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
2797 287, 290, 290, 299, 308, 318, 318, 327, 328, 331,
2798 331, 340, 340, 365, 365, 392, 392, 403, 403, 414,
2799 415, 418, 419, 420, 425, 426, 431, 431, 442, 442,
2800 449, 450, 453, 454, 455, 460, 460, 468, 468, 475,
2801 476, 477, 482, 483, 484, 485, 486, 487, 491, 491,
2802 504, 504, 517, 517, 528, 528, 535, 536, 537, 542,
2803 542, 550, 550, 557, 558, 559, 564, 565, 566, 567,
2804 568, 569, 570, 573, 573, 586, 586, 595, 610, 610,
2805 621, 621, 628, 629, 632, 633, 634, 639, 639, 647,
2806 647, 656, 657, 658, 663, 664, 665, 666, 667, 668,
2807 669, 672, 672, 685, 685, 697, 706, 706, 723, 723,
2808 734, 735, 736, 741, 742, 743, 744, 745, 748, 748,
2809 757, 757, 768, 768, 779, 780, 783, 784, 785, 790,
2810 790, 800, 800, 810, 811, 812, 815, 818, 819, 822,
2811 822, 831, 831, 841, 841, 854, 855, 856, 862, 862,
2812 870, 871, 872, 877, 878, 879, 880, 881, 882, 883,
2813 886, 886, 895, 901, 901, 910, 910, 921, 922, 923,
2814 928, 928, 936, 937, 938, 943, 944, 945, 946, 947,
2815 950, 950, 959, 965, 971, 977, 977
2819 D2Parser::yy_stack_print_ ()
const 2821 *yycdebug_ <<
"Stack now";
2822 for (stack_type::const_iterator
2823 i = yystack_.begin (),
2824 i_end = yystack_.end ();
2826 *yycdebug_ <<
' ' <<
int (i->state);
2831 D2Parser::yy_reduce_print_ (
int yyrule)
const 2833 int yylno = yyrline_[yyrule];
2834 int yynrhs = yyr2_[yyrule];
2836 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2837 <<
" (line " << yylno <<
"):\n";
2839 for (
int yyi = 0; yyi < yynrhs; yyi++)
2841 yystack_[(yynrhs) - (yyi + 1)]);
2843 #endif // D2_PARSER_DEBUG 2846 #line 14 "d2_parser.yy" 2848 #line 2849 "d2_parser.cc" 2850 #line 986 "d2_parser.yy" 2855 const std::string& what)
2857 ctx.error(loc, what);
Used while parsing a list of tsig-keys.
Define the isc::d2::parser class.
Used while parsing DhcpDdns/loggers/output_options structures.
Syntax errors thrown from user actions.
Used while parsing content of a dns-server.
virtual int parse()
Parse.
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
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...
void set_debug_level(debug_level_type l)
Set the current debugging level.
Evaluation context, an interface to the expression evaluation.
value_type value
The semantic value.
#define YY_CAST(Type, Val)
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
This one is used in pure JSON mode.
D2Parser(isc::d2::D2ParserContext &ctx_yyarg)
Build a parser object.
void require(const std::string &name, isc::data::Element::Position open_loc, isc::data::Element::Position close_loc)
Check if a required parameter is present.
int debug_level_type
Type for debugging levels.
#define YY_MOVE_REF(Type)
boost::shared_ptr< Element > ElementPtr
Used while parsing content of a tsig-key.
~syntax_error() YY_NOEXCEPT YY_NOTHROW
void warnAboutExtraCommas(const isc::d2::location &loc)
Warning for extra commas.
"External" symbols: returned by the scanner.
Used while parsing DhcpDdns/loggers structures.
void unique(const std::string &name, isc::data::Element::Position loc)
Check if a parameter is already present.
#define YY_REDUCE_PRINT(Rule)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
Used while parsing content of a ddns-domain.
Used while parsing DhcpDdns/hooks-libraries.
Used while parsing content of DhcpDdns/reverse-ddns.
void leave()
Leave a syntactic context.
Used while parsing content of a control-socket.
Used while parsing DhcpDdns/ncr-protocol.
#define YY_SYMBOL_PRINT(Title, Symbol)
Notes: IntElement type is changed to int64_t.
#define YYLLOC_DEFAULT(Current, Rhs, N)
boost::shared_ptr< const Element > ConstElementPtr
bool empty() const YY_NOEXCEPT
Whether empty.
Used while parsing DhcpDdns/ncr-format.
Defines the logger used by the top-level component of kea-lfc.
void enter(const ParserContext &ctx)
Enter a new syntactic context.
const symbol_type & lookahead() const YY_NOEXCEPT
Used while parsing content of DhcpDdns.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.
symbol_kind_type kind_
The symbol kind.
static const symbol_kind_type YYNTOKENS
The number of tokens.
Used while parsing a list of ddns-domains.
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
symbol_kind_type token() const YY_NOEXCEPT
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
context(const D2Parser &yyparser, const symbol_type &yyla)
ParserContext ctx_
Current syntactic context.
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
location_type location
The location.
isc::data::Element::Position loc2pos(isc::d2::location &loc)
Converts bison's position to one understood by isc::data::Element.
location location_type
Symbol locations.
const std::string contextName()
Get the syntax context name.