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;
244 D2Parser::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
245 : super_type (s,
YY_MOVE (that.location))
247 switch (that.kind ())
256 value.move<
bool > (
YY_MOVE (that.value));
260 value.move<
double > (
YY_MOVE (that.value));
264 value.move< int64_t > (
YY_MOVE (that.value));
268 value.move< std::string > (
YY_MOVE (that.value));
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>
357 D2Parser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
364 template <
typename Base>
366 D2Parser::yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const
368 std::ostream& yyoutput = yyo;
371 yyo <<
"empty symbol";
375 yyo << (yykind <
YYNTOKENS ?
"token" :
"nterm")
376 <<
' ' << yysym.name () <<
" ("
377 << yysym.location <<
": ";
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)
439 D2Parser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (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);
450 D2Parser::yypop_ (
int n)
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)
495 return yyvalue == yypact_ninf_;
499 D2Parser::yy_table_value_is_error_ (
int yyvalue)
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 187 "d2_parser.yy"
856 #line 857 "d2_parser.cc"
860 #line 190 "d2_parser.yy"
864 #line 865 "d2_parser.cc"
868 #line 198 "d2_parser.yy"
873 #line 874 "d2_parser.cc"
877 #line 202 "d2_parser.yy"
882 #line 883 "d2_parser.cc"
886 #line 213 "d2_parser.yy"
889 const std::string& keyword = yystack_[1].value.as < std::string > ();
890 error(yystack_[1].location,
891 "got unexpected keyword \"" + keyword +
"\" in " + where +
" map.");
893 #line 894 "d2_parser.cc"
897 #line 222 "d2_parser.yy"
904 #line 905 "d2_parser.cc"
908 #line 227 "d2_parser.yy"
914 #line 915 "d2_parser.cc"
918 #line 235 "d2_parser.yy"
922 ctx.
stack_.back()->set(
"DhcpDdns", m);
926 #line 927 "d2_parser.cc"
930 #line 241 "d2_parser.yy"
935 #line 936 "d2_parser.cc"
939 #line 246 "d2_parser.yy"
945 #line 946 "d2_parser.cc"
949 #line 250 "d2_parser.yy"
953 #line 954 "d2_parser.cc"
957 #line 275 "d2_parser.yy"
962 #line 963 "d2_parser.cc"
966 #line 278 "d2_parser.yy"
969 ctx.
stack_.back()->set(
"ip-address", s);
972 #line 973 "d2_parser.cc"
976 #line 284 "d2_parser.yy"
979 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
980 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
983 ctx.
stack_.back()->set(
"port", i);
985 #line 986 "d2_parser.cc"
989 #line 293 "d2_parser.yy"
991 ctx.
unique(
"dns-server-timeout", ctx.
loc2pos(yystack_[2].location));
992 if (yystack_[0].value.as < int64_t > () <= 0) {
993 error(yystack_[0].location,
"dns-server-timeout must be greater than zero");
996 ctx.
stack_.back()->set(
"dns-server-timeout", i);
999 #line 1000 "d2_parser.cc"
1003 #line 303 "d2_parser.yy"
1005 ctx.
unique(
"ncr-protocol", ctx.
loc2pos(yystack_[0].location));
1008 #line 1009 "d2_parser.cc"
1012 #line 306 "d2_parser.yy"
1014 ctx.
stack_.back()->set(
"ncr-protocol", yystack_[0].value.as <
ElementPtr > ());
1017 #line 1018 "d2_parser.cc"
1021 #line 312 "d2_parser.yy"
1023 #line 1024 "d2_parser.cc"
1027 #line 313 "d2_parser.yy"
1029 #line 1030 "d2_parser.cc"
1033 #line 316 "d2_parser.yy"
1035 ctx.
unique(
"ncr-format", ctx.
loc2pos(yystack_[0].location));
1038 #line 1039 "d2_parser.cc"
1042 #line 319 "d2_parser.yy"
1045 ctx.
stack_.back()->set(
"ncr-format", json);
1048 #line 1049 "d2_parser.cc"
1052 #line 325 "d2_parser.yy"
1056 #line 1057 "d2_parser.cc"
1060 #line 327 "d2_parser.yy"
1069 if ((old->size() != 1) || !old->contains(
"comment")) {
1070 std::stringstream msg;
1071 msg <<
"duplicate user-context entries (previous at "
1072 << old->getPosition().str() <<
")";
1073 error(yystack_[3].location, msg.str());
1076 user_context->set(
"comment", old->get(
"comment"));
1080 parent->set(
"user-context", user_context);
1083 #line 1084 "d2_parser.cc"
1087 #line 350 "d2_parser.yy"
1091 #line 1092 "d2_parser.cc"
1095 #line 352 "d2_parser.yy"
1100 user_context->set(
"comment", comment);
1106 if (old->contains(
"comment")) {
1107 std::stringstream msg;
1108 msg <<
"duplicate user-context/comment entries (previous at "
1109 << old->getPosition().str() <<
")";
1110 error(yystack_[3].location, msg.str());
1113 merge(user_context, old);
1117 parent->set(
"user-context", user_context);
1120 #line 1121 "d2_parser.cc"
1124 #line 377 "d2_parser.yy"
1126 ctx.
unique(
"forward-ddns", ctx.
loc2pos(yystack_[0].location));
1128 ctx.
stack_.back()->set(
"forward-ddns", m);
1132 #line 1133 "d2_parser.cc"
1136 #line 383 "d2_parser.yy"
1141 #line 1142 "d2_parser.cc"
1145 #line 388 "d2_parser.yy"
1147 ctx.
unique(
"reverse-ddns", ctx.
loc2pos(yystack_[0].location));
1149 ctx.
stack_.back()->set(
"reverse-ddns", m);
1153 #line 1154 "d2_parser.cc"
1157 #line 394 "d2_parser.yy"
1162 #line 1163 "d2_parser.cc"
1166 #line 413 "d2_parser.yy"
1168 ctx.
unique(
"ddns-domains", ctx.
loc2pos(yystack_[0].location));
1170 ctx.
stack_.back()->set(
"ddns-domains", l);
1174 #line 1175 "d2_parser.cc"
1178 #line 419 "d2_parser.yy"
1183 #line 1184 "d2_parser.cc"
1187 #line 424 "d2_parser.yy"
1192 #line 1193 "d2_parser.cc"
1196 #line 427 "d2_parser.yy"
1200 #line 1201 "d2_parser.cc"
1204 #line 439 "d2_parser.yy"
1207 ctx.
stack_.back()->add(m);
1210 #line 1211 "d2_parser.cc"
1214 #line 443 "d2_parser.yy"
1218 #line 1219 "d2_parser.cc"
1222 #line 447 "d2_parser.yy"
1227 #line 1228 "d2_parser.cc"
1231 #line 450 "d2_parser.yy"
1235 #line 1236 "d2_parser.cc"
1239 #line 467 "d2_parser.yy"
1244 #line 1245 "d2_parser.cc"
1248 #line 470 "d2_parser.yy"
1250 if (yystack_[0].value.as < std::string > () ==
"") {
1251 error(yystack_[1].location,
"Ddns domain name cannot be blank");
1255 ctx.
stack_.back()->set(
"name", name);
1258 #line 1259 "d2_parser.cc"
1262 #line 480 "d2_parser.yy"
1267 #line 1268 "d2_parser.cc"
1271 #line 483 "d2_parser.yy"
1275 ctx.
stack_.back()->set(
"key-name", name);
1278 #line 1279 "d2_parser.cc"
1282 #line 493 "d2_parser.yy"
1284 ctx.
unique(
"dns-servers", ctx.
loc2pos(yystack_[0].location));
1286 ctx.
stack_.back()->set(
"dns-servers", l);
1290 #line 1291 "d2_parser.cc"
1294 #line 499 "d2_parser.yy"
1299 #line 1300 "d2_parser.cc"
1303 #line 504 "d2_parser.yy"
1308 #line 1309 "d2_parser.cc"
1312 #line 507 "d2_parser.yy"
1316 #line 1317 "d2_parser.cc"
1320 #line 515 "d2_parser.yy"
1323 ctx.
stack_.back()->add(m);
1326 #line 1327 "d2_parser.cc"
1330 #line 519 "d2_parser.yy"
1334 #line 1335 "d2_parser.cc"
1338 #line 523 "d2_parser.yy"
1343 #line 1344 "d2_parser.cc"
1347 #line 526 "d2_parser.yy"
1351 #line 1352 "d2_parser.cc"
1355 #line 542 "d2_parser.yy"
1360 #line 1361 "d2_parser.cc"
1364 #line 545 "d2_parser.yy"
1366 if (yystack_[0].value.as < std::string > () !=
"") {
1367 error(yystack_[1].location,
"hostname is not yet supported");
1371 ctx.
stack_.back()->set(
"hostname", name);
1374 #line 1375 "d2_parser.cc"
1378 #line 555 "d2_parser.yy"
1380 ctx.
unique(
"ip-address", ctx.
loc2pos(yystack_[0].location));
1383 #line 1384 "d2_parser.cc"
1387 #line 558 "d2_parser.yy"
1390 ctx.
stack_.back()->set(
"ip-address", s);
1393 #line 1394 "d2_parser.cc"
1397 #line 564 "d2_parser.yy"
1400 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
1401 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
1404 ctx.
stack_.back()->set(
"port", i);
1406 #line 1407 "d2_parser.cc"
1410 #line 579 "d2_parser.yy"
1414 ctx.
stack_.back()->set(
"tsig-keys", l);
1418 #line 1419 "d2_parser.cc"
1422 #line 585 "d2_parser.yy"
1427 #line 1428 "d2_parser.cc"
1431 #line 590 "d2_parser.yy"
1436 #line 1437 "d2_parser.cc"
1440 #line 593 "d2_parser.yy"
1444 #line 1445 "d2_parser.cc"
1448 #line 605 "d2_parser.yy"
1451 ctx.
stack_.back()->add(m);
1454 #line 1455 "d2_parser.cc"
1458 #line 609 "d2_parser.yy"
1462 #line 1463 "d2_parser.cc"
1466 #line 613 "d2_parser.yy"
1472 #line 1473 "d2_parser.cc"
1476 #line 617 "d2_parser.yy"
1480 #line 1481 "d2_parser.cc"
1484 #line 635 "d2_parser.yy"
1489 #line 1490 "d2_parser.cc"
1493 #line 638 "d2_parser.yy"
1495 if (yystack_[0].value.as < std::string > () ==
"") {
1496 error(yystack_[1].location,
"TSIG key name cannot be blank");
1500 ctx.
stack_.back()->set(
"name", name);
1503 #line 1504 "d2_parser.cc"
1507 #line 648 "d2_parser.yy"
1512 #line 1513 "d2_parser.cc"
1516 #line 651 "d2_parser.yy"
1518 if (yystack_[0].value.as < std::string > () ==
"") {
1519 error(yystack_[1].location,
"TSIG key algorithm cannot be blank");
1522 ctx.
stack_.back()->set(
"algorithm", elem);
1525 #line 1526 "d2_parser.cc"
1529 #line 660 "d2_parser.yy"
1531 ctx.
unique(
"digest-bits", ctx.
loc2pos(yystack_[2].location));
1532 if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0 && (yystack_[0].value.as < int64_t > () % 8 != 0))) {
1533 error(yystack_[0].location,
"TSIG key digest-bits must either be zero or a positive, multiple of eight");
1536 ctx.
stack_.back()->set(
"digest-bits", elem);
1538 #line 1539 "d2_parser.cc"
1542 #line 669 "d2_parser.yy"
1547 #line 1548 "d2_parser.cc"
1551 #line 672 "d2_parser.yy"
1553 if (yystack_[0].value.as < std::string > () ==
"") {
1554 error(yystack_[1].location,
"TSIG key secret cannot be blank");
1557 ctx.
stack_.back()->set(
"secret", elem);
1560 #line 1561 "d2_parser.cc"
1564 #line 686 "d2_parser.yy"
1566 ctx.
unique(
"control-socket", ctx.
loc2pos(yystack_[0].location));
1568 ctx.
stack_.back()->set(
"control-socket", m);
1572 #line 1573 "d2_parser.cc"
1576 #line 692 "d2_parser.yy"
1581 #line 1582 "d2_parser.cc"
1585 #line 708 "d2_parser.yy"
1587 ctx.
unique(
"socket-type", ctx.
loc2pos(yystack_[0].location));
1590 #line 1591 "d2_parser.cc"
1594 #line 711 "d2_parser.yy"
1597 ctx.
stack_.back()->set(
"socket-type", stype);
1600 #line 1601 "d2_parser.cc"
1604 #line 717 "d2_parser.yy"
1606 ctx.
unique(
"socket-name", ctx.
loc2pos(yystack_[0].location));
1609 #line 1610 "d2_parser.cc"
1613 #line 720 "d2_parser.yy"
1616 ctx.
stack_.back()->set(
"socket-name", name);
1619 #line 1620 "d2_parser.cc"
1623 #line 728 "d2_parser.yy"
1625 ctx.
unique(
"hooks-libraries", ctx.
loc2pos(yystack_[0].location));
1627 ctx.
stack_.back()->set(
"hooks-libraries", l);
1631 #line 1632 "d2_parser.cc"
1635 #line 734 "d2_parser.yy"
1640 #line 1641 "d2_parser.cc"
1644 #line 747 "d2_parser.yy"
1647 ctx.
stack_.back()->add(m);
1650 #line 1651 "d2_parser.cc"
1654 #line 751 "d2_parser.yy"
1660 #line 1661 "d2_parser.cc"
1664 #line 757 "d2_parser.yy"
1670 #line 1671 "d2_parser.cc"
1674 #line 761 "d2_parser.yy"
1680 #line 1681 "d2_parser.cc"
1684 #line 776 "d2_parser.yy"
1689 #line 1690 "d2_parser.cc"
1693 #line 779 "d2_parser.yy"
1696 ctx.
stack_.back()->set(
"library", lib);
1699 #line 1700 "d2_parser.cc"
1703 #line 785 "d2_parser.yy"
1705 ctx.
unique(
"parameters", ctx.
loc2pos(yystack_[0].location));
1708 #line 1709 "d2_parser.cc"
1712 #line 788 "d2_parser.yy"
1714 ctx.
stack_.back()->set(
"parameters", yystack_[0].value.as <
ElementPtr > ());
1717 #line 1718 "d2_parser.cc"
1721 #line 795 "d2_parser.yy"
1725 ctx.
stack_.back()->set(
"loggers", l);
1729 #line 1730 "d2_parser.cc"
1733 #line 801 "d2_parser.yy"
1738 #line 1739 "d2_parser.cc"
1742 #line 813 "d2_parser.yy"
1745 ctx.
stack_.back()->add(l);
1748 #line 1749 "d2_parser.cc"
1752 #line 817 "d2_parser.yy"
1756 #line 1757 "d2_parser.cc"
1760 #line 834 "d2_parser.yy"
1765 #line 1766 "d2_parser.cc"
1769 #line 837 "d2_parser.yy"
1772 ctx.
stack_.back()->set(
"name", name);
1775 #line 1776 "d2_parser.cc"
1779 #line 843 "d2_parser.yy"
1781 ctx.
unique(
"debuglevel", ctx.
loc2pos(yystack_[2].location));
1783 ctx.
stack_.back()->set(
"debuglevel", dl);
1785 #line 1786 "d2_parser.cc"
1789 #line 849 "d2_parser.yy"
1794 #line 1795 "d2_parser.cc"
1798 #line 852 "d2_parser.yy"
1801 ctx.
stack_.back()->set(
"severity", sev);
1804 #line 1805 "d2_parser.cc"
1808 #line 858 "d2_parser.yy"
1810 ctx.
unique(
"output_options", ctx.
loc2pos(yystack_[0].location));
1812 ctx.
stack_.back()->set(
"output_options", l);
1816 #line 1817 "d2_parser.cc"
1820 #line 864 "d2_parser.yy"
1825 #line 1826 "d2_parser.cc"
1829 #line 873 "d2_parser.yy"
1832 ctx.
stack_.back()->add(m);
1835 #line 1836 "d2_parser.cc"
1839 #line 877 "d2_parser.yy"
1843 #line 1844 "d2_parser.cc"
1847 #line 892 "d2_parser.yy"
1852 #line 1853 "d2_parser.cc"
1856 #line 895 "d2_parser.yy"
1859 ctx.
stack_.back()->set(
"output", sev);
1862 #line 1863 "d2_parser.cc"
1866 #line 901 "d2_parser.yy"
1870 ctx.
stack_.back()->set(
"flush", flush);
1872 #line 1873 "d2_parser.cc"
1876 #line 907 "d2_parser.yy"
1880 ctx.
stack_.back()->set(
"maxsize", maxsize);
1882 #line 1883 "d2_parser.cc"
1886 #line 913 "d2_parser.yy"
1890 ctx.
stack_.back()->set(
"maxver", maxver);
1892 #line 1893 "d2_parser.cc"
1896 #line 919 "d2_parser.yy"
1901 #line 1902 "d2_parser.cc"
1905 #line 922 "d2_parser.yy"
1908 ctx.
stack_.back()->set(
"pattern", sev);
1911 #line 1912 "d2_parser.cc"
1915 #line 1916 "d2_parser.cc"
1924 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1928 #endif // YY_EXCEPTIONS
1934 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1948 std::string msg = yysyntax_error_ (yyctx);
1953 yyerror_range[1].location = yyla.
location;
1954 if (yyerrstatus_ == 3)
1962 else if (!yyla.
empty ())
1964 yy_destroy_ (
"Error: discarding", yyla);
1998 yyn = yypact_[+yystack_[0].state];
1999 if (!yy_pact_value_is_default_ (yyn))
2002 if (0 <= yyn && yyn <= yylast_
2005 yyn = yytable_[yyn];
2012 if (yystack_.size () == 1)
2015 yyerror_range[1].location = yystack_[0].location;
2016 yy_destroy_ (
"Error: popping", yystack_[0]);
2021 stack_symbol_type error_token;
2023 yyerror_range[2].location = yyla.
location;
2027 error_token.state = state_type (yyn);
2028 yypush_ (
"Shifting",
YY_MOVE (error_token));
2054 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
2060 while (1 < yystack_.size ())
2062 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
2071 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
2075 yy_destroy_ (YY_NULLPTR, yyla);
2077 while (1 < yystack_.size ())
2079 yy_destroy_ (YY_NULLPTR, yystack_[0]);
2084 #endif // YY_EXCEPTIONS
2099 D2Parser::yytnamerr_ (
const char *yystr)
2104 char const *yyp = yystr;
2111 goto do_not_strip_quotes;
2115 goto do_not_strip_quotes;
2127 do_not_strip_quotes: ;
2136 return yytnamerr_ (yytname_[yysymbol]);
2143 : yyparser_ (yyparser)
2153 int yyn = yypact_[+yyparser_.yystack_[0].state];
2154 if (!yy_pact_value_is_default_ (yyn))
2159 int yyxbegin = yyn < 0 ? -yyn : 0;
2161 int yychecklim = yylast_ - yyn + 1;
2163 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
2165 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
2169 else if (yycount == yyargn)
2176 if (yyarg && yycount == 0 && 0 < yyargn)
2184 D2Parser::yy_syntax_error_arguments_ (
const context& yyctx,
2215 yyarg[0] = yyctx.
token ();
2216 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2224 D2Parser::yysyntax_error_ (
const context& yyctx)
const
2227 enum { YYARGS_MAX = 5 };
2230 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
2232 char const* yyformat = YY_NULLPTR;
2235 #define YYCASE_(N, S) \
2241 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
2242 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2243 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2244 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2245 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2251 std::ptrdiff_t yyi = 0;
2252 for (
char const* yyp = yyformat; *yyp; ++yyp)
2253 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
2264 const short D2Parser::yypact_ninf_ = -208;
2266 const signed char D2Parser::yytable_ninf_ = -1;
2269 D2Parser::yypact_[] =
2271 42, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2272 -208, 45, 8, 0, 41, 49, 67, 55, 80, 95,
2273 124, 114, -208, -208, -208, -208, -208, -208, -208, -208,
2274 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2275 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2276 -208, -208, 8, 65, 120, 7, 23, 125, 50, 131,
2277 20, 133, 14, -208, 142, 128, 158, 159, 147, -208,
2278 160, -208, 162, 165, -208, -208, -208, -208, -208, -208,
2279 -208, -208, -208, -208, 166, -208, 96, -208, -208, -208,
2280 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2281 -208, -208, 167, -208, -208, -208, -208, -208, 97, -208,
2282 -208, -208, -208, -208, -208, 168, 169, -208, -208, -208,
2283 -208, -208, -208, -208, 98, -208, -208, -208, -208, -208,
2284 170, 172, -208, -208, 173, -208, -208, -208, -208, 100,
2285 -208, -208, -208, -208, -208, 27, -208, -208, -208, -208,
2286 108, -208, -208, -208, -208, 8, 8, -208, 121, 175,
2287 -208, 176, 115, 123, 178, 179, 180, 181, 182, 183,
2288 184, 185, 186, 187, -208, 7, -208, 188, 135, 190,
2289 191, 23, -208, 23, -208, 125, 192, 193, 194, 50,
2290 -208, 50, -208, 131, 195, 144, 202, 20, -208, 20,
2291 133, -208, 203, 204, 51, -208, -208, -208, 205, 206,
2292 154, -208, -208, 94, 196, 209, 161, 210, 212, 207,
2293 213, 216, 217, -208, 171, -208, 174, 177, -208, 109,
2294 -208, 189, 218, 200, -208, 110, -208, 201, -208, 208,
2295 -208, 116, -208, 211, 209, -208, 8, 7, -208, -208,
2296 -208, -208, -208, -208, -208, -208, 2, 2, 125, -10,
2297 219, 220, -208, -208, -208, -208, -208, 133, -208, -208,
2298 -208, -208, -208, -208, -208, -208, 143, -208, -208, 146,
2299 -208, -208, -208, 149, 223, -208, -208, -208, -208, -208,
2300 153, -208, -208, -208, -208, 224, 221, -208, -208, 57,
2301 -208, 73, -208, 228, 2, -208, -208, -208, 229, 231,
2302 -10, -208, 14, -208, 219, 16, 220, -208, -208, 232,
2303 -208, 215, 222, -208, 155, -208, -208, -208, 234, -208,
2304 -208, -208, -208, 156, -208, -208, -208, -208, -208, -208,
2305 131, -208, -208, -208, 235, 236, 152, 237, 16, -208,
2306 230, 225, 238, -208, 226, -208, -208, -208, 240, -208,
2307 -208, 117, -208, 38, 240, -208, -208, 241, 245, 246,
2308 -208, 157, -208, -208, -208, -208, -208, -208, -208, 247,
2309 214, 227, 233, 248, 38, -208, 239, -208, -208, -208,
2310 242, -208, -208, -208
2314 D2Parser::yydefact_[] =
2316 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
2317 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2318 0, 0, 1, 37, 30, 26, 25, 22, 23, 24,
2319 29, 3, 27, 28, 44, 5, 48, 7, 147, 9,
2320 139, 11, 100, 13, 92, 15, 122, 17, 116, 19,
2321 186, 21, 39, 33, 0, 0, 0, 141, 0, 94,
2322 0, 0, 0, 41, 0, 40, 0, 0, 34, 46,
2323 0, 66, 0, 0, 70, 74, 76, 78, 80, 82,
2324 137, 165, 178, 197, 0, 65, 0, 50, 52, 53,
2325 54, 55, 56, 63, 64, 57, 58, 59, 60, 61,
2326 62, 160, 0, 163, 158, 157, 155, 156, 0, 149,
2327 151, 152, 153, 154, 145, 0, 142, 143, 112, 114,
2328 110, 109, 107, 108, 0, 102, 104, 105, 106, 98,
2329 0, 95, 96, 134, 0, 132, 131, 129, 130, 0,
2330 124, 126, 127, 128, 120, 0, 118, 193, 195, 190,
2331 0, 188, 191, 192, 38, 0, 0, 31, 0, 0,
2332 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2333 0, 0, 0, 0, 43, 0, 49, 0, 0, 0,
2334 0, 0, 148, 0, 140, 0, 0, 0, 0, 0,
2335 101, 0, 93, 0, 0, 0, 0, 0, 123, 0,
2336 0, 117, 0, 0, 0, 187, 42, 35, 0, 0,
2337 0, 68, 69, 0, 0, 0, 0, 0, 0, 0,
2338 0, 0, 0, 51, 0, 162, 0, 0, 150, 0,
2339 144, 0, 0, 0, 103, 0, 97, 0, 136, 0,
2340 125, 0, 119, 0, 0, 189, 0, 0, 67, 72,
2341 73, 71, 75, 32, 77, 79, 84, 84, 141, 0,
2342 180, 0, 161, 164, 159, 146, 113, 0, 111, 99,
2343 135, 133, 121, 194, 196, 36, 0, 90, 89, 0,
2344 85, 86, 88, 0, 0, 174, 176, 173, 171, 172,
2345 0, 167, 169, 170, 184, 0, 181, 182, 201, 0,
2346 199, 0, 47, 0, 0, 81, 83, 138, 0, 0,
2347 0, 166, 0, 179, 0, 0, 0, 198, 115, 0,
2348 87, 0, 0, 168, 0, 183, 212, 217, 0, 215,
2349 211, 209, 210, 0, 203, 205, 207, 208, 206, 200,
2350 94, 175, 177, 185, 0, 0, 0, 0, 0, 202,
2351 0, 0, 0, 214, 0, 204, 91, 213, 0, 216,
2352 221, 0, 219, 0, 0, 218, 230, 0, 0, 0,
2353 235, 0, 223, 225, 226, 227, 228, 229, 220, 0,
2354 0, 0, 0, 0, 0, 222, 0, 232, 233, 234,
2359 D2Parser::yypgoto_[] =
2361 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
2362 -208, -208, -41, -208, -207, -208, -19, -208, -208, -208,
2363 -208, -208, -208, -56, -208, -208, -208, -208, -208, -208,
2364 -5, 69, -208, -208, -208, -208, -208, -208, -208, -208,
2365 -208, -55, -208, -44, -208, -208, -208, -208, -208, -4,
2366 -208, -43, -208, -208, -208, -208, -78, -208, 70, -208,
2367 -208, -208, 76, 75, -208, -208, -208, -208, -208, -208,
2368 -208, -208, 3, 77, -208, -208, -208, 74, 72, -208,
2369 -208, -208, -208, -208, -208, -208, -208, -208, 17, -208,
2370 91, -208, -208, -208, 101, 99, -208, -208, -208, -208,
2371 -208, -208, -208, -208, -208, -208, -32, -208, -208, -208,
2372 -208, -208, -208, -208, -208, -33, -208, -208, -208, -26,
2373 83, -208, -208, -208, -208, -208, -208, -208, -28, -208,
2374 -208, -59, -208, -208, -208, -208, -208, -208, -208, -208,
2375 -74, -208, -208, -90, -208, -208, -208, -208, -208, -208,
2380 D2Parser::yydefgoto_[] =
2382 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2383 20, 21, 30, 31, 32, 53, 254, 67, 68, 33,
2384 52, 64, 65, 85, 35, 54, 70, 159, 37, 55,
2385 86, 87, 88, 161, 89, 90, 91, 164, 251, 92,
2386 165, 93, 166, 94, 167, 95, 168, 96, 169, 279,
2387 280, 281, 282, 303, 45, 59, 130, 131, 132, 191,
2388 43, 58, 124, 125, 126, 188, 127, 186, 128, 187,
2389 49, 61, 145, 146, 199, 47, 60, 139, 140, 141,
2390 196, 142, 194, 143, 97, 170, 41, 57, 115, 116,
2391 117, 183, 39, 56, 108, 109, 110, 180, 111, 177,
2392 112, 113, 179, 98, 171, 290, 291, 292, 308, 293,
2393 309, 99, 172, 295, 296, 297, 312, 51, 62, 150,
2394 151, 152, 202, 153, 203, 100, 173, 299, 300, 315,
2395 333, 334, 335, 344, 336, 337, 347, 338, 345, 361,
2396 362, 363, 371, 372, 373, 379, 374, 375, 376, 377,
2401 D2Parser::yytable_[] =
2403 105, 106, 121, 122, 136, 137, 149, 34, 253, 76,
2404 77, 63, 107, 23, 123, 24, 138, 25, 71, 72,
2405 73, 74, 285, 286, 75, 277, 76, 77, 78, 79,
2406 200, 133, 134, 201, 80, 76, 77, 253, 81, 76,
2407 77, 82, 76, 77, 83, 22, 135, 84, 36, 147,
2408 148, 101, 102, 103, 326, 327, 38, 328, 329, 84,
2409 316, 104, 42, 317, 84, 26, 27, 28, 29, 76,
2410 77, 84, 40, 84, 118, 119, 200, 84, 366, 318,
2411 84, 367, 368, 369, 370, 44, 147, 148, 120, 1,
2412 2, 3, 4, 5, 6, 7, 8, 9, 10, 175,
2413 181, 189, 46, 197, 176, 182, 190, 84, 198, 249,
2414 250, 204, 181, 189, 206, 207, 205, 265, 269, 197,
2415 364, 50, 66, 365, 272, 105, 106, 105, 106, 48,
2416 69, 155, 114, 121, 122, 121, 122, 107, 129, 107,
2417 144, 136, 137, 136, 137, 123, 175, 123, 154, 304,
2418 158, 302, 304, 138, 305, 138, 310, 306, 204, 348,
2419 384, 311, 156, 343, 349, 385, 162, 157, 160, 163,
2420 174, 178, 185, 211, 184, 193, 192, 195, 208, 209,
2421 210, 212, 213, 214, 215, 216, 217, 218, 219, 220,
2422 221, 222, 224, 225, 226, 227, 231, 232, 233, 237,
2423 278, 278, 238, 287, 288, 275, 239, 243, 244, 246,
2424 353, 248, 258, 247, 252, 289, 24, 256, 255, 257,
2425 259, 260, 261, 267, 314, 274, 294, 298, 262, 307,
2426 313, 263, 319, 321, 264, 322, 356, 340, 346, 351,
2427 352, 354, 276, 358, 223, 380, 266, 360, 278, 381,
2428 382, 386, 390, 283, 287, 288, 149, 268, 270, 330,
2429 331, 320, 350, 236, 234, 271, 289, 235, 273, 240,
2430 301, 332, 341, 241, 387, 284, 230, 242, 323, 342,
2431 228, 325, 357, 359, 229, 388, 324, 245, 339, 355,
2432 378, 389, 330, 331, 391, 0, 392, 0, 0, 393,
2437 D2Parser::yycheck_[] =
2439 56, 56, 58, 58, 60, 60, 62, 7, 215, 19,
2440 20, 52, 56, 5, 58, 7, 60, 9, 11, 12,
2441 13, 14, 32, 33, 17, 23, 19, 20, 21, 22,
2442 3, 11, 12, 6, 27, 19, 20, 244, 31, 19,
2443 20, 34, 19, 20, 37, 0, 26, 57, 7, 35,
2444 36, 28, 29, 30, 38, 39, 7, 41, 42, 57,
2445 3, 38, 7, 6, 57, 57, 58, 59, 60, 19,
2446 20, 57, 5, 57, 24, 25, 3, 57, 40, 6,
2447 57, 43, 44, 45, 46, 5, 35, 36, 38, 47,
2448 48, 49, 50, 51, 52, 53, 54, 55, 56, 3,
2449 3, 3, 7, 3, 8, 8, 8, 57, 8, 15,
2450 16, 3, 3, 3, 155, 156, 8, 8, 8, 3,
2451 3, 7, 57, 6, 8, 181, 181, 183, 183, 5,
2452 10, 3, 7, 189, 189, 191, 191, 181, 7, 183,
2453 7, 197, 197, 199, 199, 189, 3, 191, 6, 3,
2454 3, 8, 3, 197, 8, 199, 3, 8, 3, 3,
2455 3, 8, 4, 8, 8, 8, 4, 8, 8, 4,
2456 4, 4, 3, 58, 6, 3, 6, 4, 57, 4,
2457 4, 58, 4, 4, 4, 4, 4, 4, 4, 4,
2458 4, 4, 4, 58, 4, 4, 4, 4, 4, 4,
2459 256, 257, 58, 259, 259, 246, 4, 4, 4, 4,
2460 58, 57, 5, 7, 18, 259, 7, 7, 57, 7,
2461 7, 5, 5, 5, 3, 244, 7, 7, 57, 6,
2462 6, 57, 4, 4, 57, 4, 6, 5, 4, 4,
2463 4, 4, 247, 5, 175, 4, 57, 7, 304, 4,
2464 4, 4, 4, 257, 310, 310, 312, 57, 57, 315,
2465 315, 304, 340, 193, 189, 57, 310, 191, 57, 197,
2466 267, 315, 57, 199, 60, 258, 185, 200, 310, 57,
2467 181, 314, 57, 57, 183, 58, 312, 204, 316, 348,
2468 364, 58, 348, 348, 384, -1, 57, -1, -1, 57,
2473 D2Parser::yystos_[] =
2475 0, 47, 48, 49, 50, 51, 52, 53, 54, 55,
2476 56, 62, 63, 64, 65, 66, 67, 68, 69, 70,
2477 71, 72, 0, 5, 7, 9, 57, 58, 59, 60,
2478 73, 74, 75, 80, 7, 85, 7, 89, 7, 153,
2479 5, 147, 7, 121, 5, 115, 7, 136, 5, 131,
2480 7, 178, 81, 76, 86, 90, 154, 148, 122, 116,
2481 137, 132, 179, 73, 82, 83, 57, 78, 79, 10,
2482 87, 11, 12, 13, 14, 17, 19, 20, 21, 22,
2483 27, 31, 34, 37, 57, 84, 91, 92, 93, 95,
2484 96, 97, 100, 102, 104, 106, 108, 145, 164, 172,
2485 186, 28, 29, 30, 38, 84, 102, 104, 155, 156,
2486 157, 159, 161, 162, 7, 149, 150, 151, 24, 25,
2487 38, 84, 102, 104, 123, 124, 125, 127, 129, 7,
2488 117, 118, 119, 11, 12, 26, 84, 102, 104, 138,
2489 139, 140, 142, 144, 7, 133, 134, 35, 36, 84,
2490 180, 181, 182, 184, 6, 3, 4, 8, 3, 88,
2491 8, 94, 4, 4, 98, 101, 103, 105, 107, 109,
2492 146, 165, 173, 187, 4, 3, 8, 160, 4, 163,
2493 158, 3, 8, 152, 6, 3, 128, 130, 126, 3,
2494 8, 120, 6, 3, 143, 4, 141, 3, 8, 135,
2495 3, 6, 183, 185, 3, 8, 73, 73, 57, 4,
2496 4, 58, 58, 4, 4, 4, 4, 4, 4, 4,
2497 4, 4, 4, 92, 4, 58, 4, 4, 156, 155,
2498 151, 4, 4, 4, 124, 123, 119, 4, 58, 4,
2499 139, 138, 134, 4, 4, 181, 4, 7, 57, 15,
2500 16, 99, 18, 75, 77, 57, 7, 7, 5, 7,
2501 5, 5, 57, 57, 57, 8, 57, 5, 57, 8,
2502 57, 57, 8, 57, 77, 73, 91, 23, 84, 110,
2503 111, 112, 113, 110, 149, 32, 33, 84, 102, 104,
2504 166, 167, 168, 170, 7, 174, 175, 176, 7, 188,
2505 189, 133, 8, 114, 3, 8, 8, 6, 169, 171,
2506 3, 8, 177, 6, 3, 190, 3, 6, 6, 4,
2507 112, 4, 4, 167, 180, 176, 38, 39, 41, 42,
2508 84, 102, 104, 191, 192, 193, 195, 196, 198, 189,
2509 5, 57, 57, 8, 194, 199, 4, 197, 3, 8,
2510 117, 4, 4, 58, 4, 192, 6, 57, 5, 57,
2511 7, 200, 201, 202, 3, 6, 40, 43, 44, 45,
2512 46, 203, 204, 205, 207, 208, 209, 210, 201, 206,
2513 4, 4, 4, 211, 3, 8, 4, 60, 58, 58,
2520 0, 61, 63, 62, 64, 62, 65, 62, 66, 62,
2521 67, 62, 68, 62, 69, 62, 70, 62, 71, 62,
2522 72, 62, 73, 73, 73, 73, 73, 73, 73, 74,
2523 76, 75, 77, 78, 78, 79, 79, 81, 80, 82,
2524 82, 83, 83, 84, 86, 85, 88, 87, 90, 89,
2525 91, 91, 92, 92, 92, 92, 92, 92, 92, 92,
2526 92, 92, 92, 92, 92, 92, 94, 93, 95, 96,
2527 98, 97, 99, 99, 101, 100, 103, 102, 105, 104,
2528 107, 106, 109, 108, 110, 110, 111, 111, 112, 112,
2529 114, 113, 116, 115, 117, 117, 118, 118, 120, 119,
2530 122, 121, 123, 123, 124, 124, 124, 124, 124, 124,
2531 126, 125, 128, 127, 130, 129, 132, 131, 133, 133,
2532 135, 134, 137, 136, 138, 138, 139, 139, 139, 139,
2533 139, 139, 141, 140, 143, 142, 144, 146, 145, 148,
2534 147, 149, 149, 150, 150, 152, 151, 154, 153, 155,
2535 155, 156, 156, 156, 156, 156, 156, 156, 158, 157,
2536 160, 159, 161, 163, 162, 165, 164, 166, 166, 167,
2537 167, 167, 167, 167, 169, 168, 171, 170, 173, 172,
2538 174, 174, 175, 175, 177, 176, 179, 178, 180, 180,
2539 180, 181, 181, 183, 182, 185, 184, 187, 186, 188,
2540 188, 190, 189, 191, 191, 192, 192, 192, 192, 192,
2541 192, 192, 194, 193, 195, 197, 196, 199, 198, 200,
2542 200, 202, 201, 203, 203, 204, 204, 204, 204, 204,
2543 206, 205, 207, 208, 209, 211, 210
2549 0, 2, 0, 3, 0, 3, 0, 3, 0, 3,
2550 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2551 0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2552 0, 4, 1, 0, 1, 3, 5, 0, 4, 0,
2553 1, 1, 3, 2, 0, 4, 0, 6, 0, 4,
2554 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2555 1, 1, 1, 1, 1, 1, 0, 4, 3, 3,
2556 0, 4, 1, 1, 0, 4, 0, 4, 0, 4,
2557 0, 6, 0, 6, 0, 1, 1, 3, 1, 1,
2558 0, 6, 0, 4, 0, 1, 1, 3, 0, 4,
2559 0, 4, 1, 3, 1, 1, 1, 1, 1, 1,
2560 0, 4, 0, 4, 0, 6, 0, 4, 1, 3,
2561 0, 4, 0, 4, 1, 3, 1, 1, 1, 1,
2562 1, 1, 0, 4, 0, 4, 3, 0, 6, 0,
2563 4, 0, 1, 1, 3, 0, 4, 0, 4, 1,
2564 3, 1, 1, 1, 1, 1, 1, 1, 0, 4,
2565 0, 4, 3, 0, 4, 0, 6, 1, 3, 1,
2566 1, 1, 1, 1, 0, 4, 0, 4, 0, 6,
2567 0, 1, 1, 3, 0, 4, 0, 4, 1, 3,
2568 1, 1, 1, 0, 4, 0, 4, 0, 6, 1,
2569 3, 0, 4, 1, 3, 1, 1, 1, 1, 1,
2570 1, 1, 0, 4, 3, 0, 4, 0, 6, 1,
2571 3, 0, 4, 1, 3, 1, 1, 1, 1, 1,
2576 #if D2_PARSER_DEBUG || 1
2580 const D2Parser::yytname_[] =
2582 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
2583 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"DhcpDdns\"",
2584 "\"ip-address\"",
"\"port\"",
"\"dns-server-timeout\"",
2585 "\"ncr-protocol\"",
"\"UDP\"",
"\"TCP\"",
"\"ncr-format\"",
"\"JSON\"",
2586 "\"user-context\"",
"\"comment\"",
"\"forward-ddns\"",
2587 "\"reverse-ddns\"",
"\"ddns-domains\"",
"\"key-name\"",
2588 "\"dns-servers\"",
"\"hostname\"",
"\"tsig-keys\"",
"\"algorithm\"",
2589 "\"digest-bits\"",
"\"secret\"",
"\"control-socket\"",
"\"socket-type\"",
2590 "\"socket-name\"",
"\"hooks-libraries\"",
"\"library\"",
2591 "\"parameters\"",
"\"loggers\"",
"\"name\"",
"\"output_options\"",
2592 "\"output\"",
"\"debuglevel\"",
"\"severity\"",
"\"flush\"",
2593 "\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"TOPLEVEL_JSON",
2594 "TOPLEVEL_DHCPDDNS",
"SUB_DHCPDDNS",
"SUB_TSIG_KEY",
"SUB_TSIG_KEYS",
2595 "SUB_DDNS_DOMAIN",
"SUB_DDNS_DOMAINS",
"SUB_DNS_SERVER",
2596 "SUB_DNS_SERVERS",
"SUB_HOOKS_LIBRARY",
"\"constant string\"",
2597 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
2598 "$@1",
"$@2",
"$@3",
"$@4",
"$@5",
"$@6",
"$@7",
"$@8",
"$@9",
"$@10",
2599 "value",
"sub_json",
"map2",
"$@11",
"map_value",
"map_content",
2600 "not_empty_map",
"list_generic",
"$@12",
"list_content",
2601 "not_empty_list",
"unknown_map_entry",
"syntax_map",
"$@13",
2602 "global_object",
"$@14",
"sub_dhcpddns",
"$@15",
"dhcpddns_params",
2603 "dhcpddns_param",
"ip_address",
"$@16",
"port",
"dns_server_timeout",
2604 "ncr_protocol",
"$@17",
"ncr_protocol_value",
"ncr_format",
"$@18",
2605 "user_context",
"$@19",
"comment",
"$@20",
"forward_ddns",
"$@21",
2606 "reverse_ddns",
"$@22",
"ddns_mgr_params",
"not_empty_ddns_mgr_params",
2607 "ddns_mgr_param",
"ddns_domains",
"$@23",
"sub_ddns_domains",
"$@24",
2608 "ddns_domain_list",
"not_empty_ddns_domain_list",
"ddns_domain",
"$@25",
2609 "sub_ddns_domain",
"$@26",
"ddns_domain_params",
"ddns_domain_param",
2610 "ddns_domain_name",
"$@27",
"ddns_domain_key_name",
"$@28",
2611 "dns_servers",
"$@29",
"sub_dns_servers",
"$@30",
"dns_server_list",
2612 "dns_server",
"$@31",
"sub_dns_server",
"$@32",
"dns_server_params",
2613 "dns_server_param",
"dns_server_hostname",
"$@33",
2614 "dns_server_ip_address",
"$@34",
"dns_server_port",
"tsig_keys",
"$@35",
2615 "sub_tsig_keys",
"$@36",
"tsig_keys_list",
"not_empty_tsig_keys_list",
2616 "tsig_key",
"$@37",
"sub_tsig_key",
"$@38",
"tsig_key_params",
2617 "tsig_key_param",
"tsig_key_name",
"$@39",
"tsig_key_algorithm",
"$@40",
2618 "tsig_key_digest_bits",
"tsig_key_secret",
"$@41",
"control_socket",
2619 "$@42",
"control_socket_params",
"control_socket_param",
2620 "control_socket_type",
"$@43",
"control_socket_name",
"$@44",
2621 "hooks_libraries",
"$@45",
"hooks_libraries_list",
2622 "not_empty_hooks_libraries_list",
"hooks_library",
"$@46",
2623 "sub_hooks_library",
"$@47",
"hooks_params",
"hooks_param",
"library",
2624 "$@48",
"parameters",
"$@49",
"loggers",
"$@50",
"loggers_entries",
2625 "logger_entry",
"$@51",
"logger_params",
"logger_param",
"name",
"$@52",
2626 "debuglevel",
"severity",
"$@53",
"output_options_list",
"$@54",
2627 "output_options_list_content",
"output_entry",
"$@55",
2628 "output_params_list",
"output_params",
"output",
"$@56",
"flush",
2629 "maxsize",
"maxver",
"pattern",
"$@57", YY_NULLPTR
2636 D2Parser::yyrline_[] =
2638 0, 125, 125, 125, 126, 126, 127, 127, 128, 128,
2639 129, 129, 130, 130, 131, 131, 132, 132, 133, 133,
2640 134, 134, 142, 143, 144, 145, 146, 147, 148, 151,
2641 156, 156, 167, 170, 171, 174, 179, 187, 187, 194,
2642 195, 198, 202, 213, 222, 222, 235, 235, 246, 246,
2643 254, 255, 259, 260, 261, 262, 263, 264, 265, 266,
2644 267, 268, 269, 270, 271, 272, 275, 275, 284, 293,
2645 303, 303, 312, 313, 316, 316, 325, 325, 350, 350,
2646 377, 377, 388, 388, 399, 400, 403, 404, 407, 408,
2647 413, 413, 424, 424, 431, 432, 435, 436, 439, 439,
2648 447, 447, 454, 455, 458, 459, 460, 461, 462, 463,
2649 467, 467, 480, 480, 493, 493, 504, 504, 511, 512,
2650 515, 515, 523, 523, 530, 531, 534, 535, 536, 537,
2651 538, 539, 542, 542, 555, 555, 564, 579, 579, 590,
2652 590, 597, 598, 601, 602, 605, 605, 613, 613, 622,
2653 623, 626, 627, 628, 629, 630, 631, 632, 635, 635,
2654 648, 648, 660, 669, 669, 686, 686, 697, 698, 701,
2655 702, 703, 704, 705, 708, 708, 717, 717, 728, 728,
2656 739, 740, 743, 744, 747, 747, 757, 757, 767, 768,
2657 769, 772, 773, 776, 776, 785, 785, 795, 795, 808,
2658 809, 813, 813, 821, 822, 825, 826, 827, 828, 829,
2659 830, 831, 834, 834, 843, 849, 849, 858, 858, 869,
2660 870, 873, 873, 881, 882, 885, 886, 887, 888, 889,
2661 892, 892, 901, 907, 913, 919, 919
2665 D2Parser::yy_stack_print_ ()
const
2667 *yycdebug_ <<
"Stack now";
2668 for (stack_type::const_iterator
2669 i = yystack_.begin (),
2670 i_end = yystack_.end ();
2672 *yycdebug_ <<
' ' <<
int (i->state);
2677 D2Parser::yy_reduce_print_ (
int yyrule)
const
2679 int yylno = yyrline_[yyrule];
2680 int yynrhs = yyr2_[yyrule];
2682 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2683 <<
" (line " << yylno <<
"):\n";
2685 for (
int yyi = 0; yyi < yynrhs; yyi++)
2687 yystack_[(yynrhs) - (yyi + 1)]);
2689 #endif // D2_PARSER_DEBUG
2692 #line 14 "d2_parser.yy"
2694 #line 2695 "d2_parser.cc"
2696 #line 928 "d2_parser.yy"
2701 const std::string& what)
2703 ctx.error(loc, what);
Used while parsing a list of tsig-keys.
Define the isc::d2::parser class.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Put in YYARG at most YYARGN of the expected tokens, and return the number of tokens stored in YYARG...
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.
void set_debug_level(debug_level_type l)
Set the current debugging level.
Evaluation context, an interface to the expression evaluation.
#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
"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.
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-dhcp-ddns.
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.