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_ (); \
127# define YYCDEBUG if (false) std::cerr
128# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
129# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
130# define YY_STACK_PRINT() static_cast<void> (0)
134#define yyerrok (yyerrstatus_ = 0)
135#define yyclearin (yyla.clear ())
137#define YYACCEPT goto yyacceptlab
138#define YYABORT goto yyabortlab
139#define YYERROR goto yyerrorlab
140#define YYRECOVERING() (!!yyerrstatus_)
142#line 14 "d2_parser.yy"
143namespace 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)
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];
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))
576 yyla.
move (yylookahead);
581 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
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 > ();
680 yyerror_range[1].location = yylhs.location;
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 543 "d2_parser.yy"
1360#line 1361 "d2_parser.cc"
1364#line 546 "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 556 "d2_parser.yy"
1380 ctx.
unique(
"ip-address", ctx.
loc2pos(yystack_[0].location));
1383#line 1384 "d2_parser.cc"
1387#line 559 "d2_parser.yy"
1390 ctx.
stack_.back()->set(
"ip-address", s);
1393#line 1394 "d2_parser.cc"
1397#line 565 "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 580 "d2_parser.yy"
1414 ctx.
stack_.back()->set(
"tsig-keys", l);
1418#line 1419 "d2_parser.cc"
1422#line 586 "d2_parser.yy"
1427#line 1428 "d2_parser.cc"
1431#line 591 "d2_parser.yy"
1436#line 1437 "d2_parser.cc"
1440#line 594 "d2_parser.yy"
1444#line 1445 "d2_parser.cc"
1448#line 606 "d2_parser.yy"
1451 ctx.
stack_.back()->add(m);
1454#line 1455 "d2_parser.cc"
1458#line 610 "d2_parser.yy"
1462#line 1463 "d2_parser.cc"
1466#line 614 "d2_parser.yy"
1472#line 1473 "d2_parser.cc"
1476#line 618 "d2_parser.yy"
1480#line 1481 "d2_parser.cc"
1484#line 636 "d2_parser.yy"
1489#line 1490 "d2_parser.cc"
1493#line 639 "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 649 "d2_parser.yy"
1512#line 1513 "d2_parser.cc"
1516#line 652 "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 661 "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 670 "d2_parser.yy"
1547#line 1548 "d2_parser.cc"
1551#line 673 "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 687 "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 693 "d2_parser.yy"
1581#line 1582 "d2_parser.cc"
1585#line 709 "d2_parser.yy"
1587 ctx.
unique(
"socket-type", ctx.
loc2pos(yystack_[0].location));
1590#line 1591 "d2_parser.cc"
1594#line 712 "d2_parser.yy"
1597 ctx.
stack_.back()->set(
"socket-type", stype);
1600#line 1601 "d2_parser.cc"
1604#line 718 "d2_parser.yy"
1606 ctx.
unique(
"socket-name", ctx.
loc2pos(yystack_[0].location));
1609#line 1610 "d2_parser.cc"
1613#line 721 "d2_parser.yy"
1616 ctx.
stack_.back()->set(
"socket-name", name);
1619#line 1620 "d2_parser.cc"
1623#line 729 "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 735 "d2_parser.yy"
1640#line 1641 "d2_parser.cc"
1644#line 748 "d2_parser.yy"
1647 ctx.
stack_.back()->add(m);
1650#line 1651 "d2_parser.cc"
1654#line 752 "d2_parser.yy"
1660#line 1661 "d2_parser.cc"
1664#line 758 "d2_parser.yy"
1670#line 1671 "d2_parser.cc"
1674#line 762 "d2_parser.yy"
1680#line 1681 "d2_parser.cc"
1684#line 777 "d2_parser.yy"
1689#line 1690 "d2_parser.cc"
1693#line 780 "d2_parser.yy"
1696 ctx.
stack_.back()->set(
"library", lib);
1699#line 1700 "d2_parser.cc"
1703#line 786 "d2_parser.yy"
1705 ctx.
unique(
"parameters", ctx.
loc2pos(yystack_[0].location));
1708#line 1709 "d2_parser.cc"
1712#line 789 "d2_parser.yy"
1714 ctx.
stack_.back()->set(
"parameters", yystack_[0].value.as <
ElementPtr > ());
1717#line 1718 "d2_parser.cc"
1721#line 796 "d2_parser.yy"
1725 ctx.
stack_.back()->set(
"loggers", l);
1729#line 1730 "d2_parser.cc"
1733#line 802 "d2_parser.yy"
1738#line 1739 "d2_parser.cc"
1742#line 814 "d2_parser.yy"
1745 ctx.
stack_.back()->add(l);
1748#line 1749 "d2_parser.cc"
1752#line 818 "d2_parser.yy"
1756#line 1757 "d2_parser.cc"
1760#line 835 "d2_parser.yy"
1765#line 1766 "d2_parser.cc"
1769#line 838 "d2_parser.yy"
1772 ctx.
stack_.back()->set(
"name", name);
1775#line 1776 "d2_parser.cc"
1779#line 844 "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 850 "d2_parser.yy"
1794#line 1795 "d2_parser.cc"
1798#line 853 "d2_parser.yy"
1801 ctx.
stack_.back()->set(
"severity", sev);
1804#line 1805 "d2_parser.cc"
1808#line 859 "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 865 "d2_parser.yy"
1825#line 1826 "d2_parser.cc"
1829#line 874 "d2_parser.yy"
1832 ctx.
stack_.back()->add(m);
1835#line 1836 "d2_parser.cc"
1839#line 878 "d2_parser.yy"
1843#line 1844 "d2_parser.cc"
1847#line 893 "d2_parser.yy"
1852#line 1853 "d2_parser.cc"
1856#line 896 "d2_parser.yy"
1859 ctx.
stack_.back()->set(
"output", sev);
1862#line 1863 "d2_parser.cc"
1866#line 902 "d2_parser.yy"
1870 ctx.
stack_.back()->set(
"flush", flush);
1872#line 1873 "d2_parser.cc"
1876#line 908 "d2_parser.yy"
1880 ctx.
stack_.back()->set(
"maxsize", maxsize);
1882#line 1883 "d2_parser.cc"
1886#line 914 "d2_parser.yy"
1890 ctx.
stack_.back()->set(
"maxver", maxver);
1892#line 1893 "d2_parser.cc"
1896#line 920 "d2_parser.yy"
1901#line 1902 "d2_parser.cc"
1905#line 923 "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';
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]);
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_ = -210;
2266 const signed char D2Parser::yytable_ninf_ = -1;
2269 D2Parser::yypact_[] =
2271 49, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2272 -210, 10, 8, 24, 30, 42, 48, 64, 126, 74,
2273 134, 125, -210, -210, -210, -210, -210, -210, -210, -210,
2274 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2275 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2276 -210, -210, 8, -22, 33, 7, 31, 144, 38, 154,
2277 28, 161, 37, -210, 135, 107, 165, 113, 167, -210,
2278 163, -210, 168, 169, -210, -210, -210, -210, -210, -210,
2279 -210, -210, -210, -210, 170, -210, 22, -210, -210, -210,
2280 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2281 -210, -210, 171, -210, -210, -210, -210, -210, 76, -210,
2282 -210, -210, -210, -210, -210, 172, 173, -210, -210, -210,
2283 -210, -210, -210, -210, 79, -210, -210, -210, -210, -210,
2284 174, 176, -210, -210, 177, -210, -210, -210, -210, -210,
2285 103, -210, -210, -210, -210, -210, 77, -210, -210, -210,
2286 -210, 104, -210, -210, -210, -210, 8, 8, -210, 120,
2287 178, -210, 179, 128, 129, 180, 181, 184, 185, 186,
2288 187, 188, 189, 190, 191, -210, 7, -210, 192, 139,
2289 194, 195, 31, -210, 31, -210, 144, 196, 199, 203,
2290 38, -210, 38, -210, 154, 204, 152, 205, 28, -210,
2291 28, 161, -210, 207, 208, -13, -210, -210, -210, 209,
2292 210, 158, -210, -210, 151, 200, 212, 164, 213, 215,
2293 218, 217, 220, 221, -210, 175, -210, 182, 183, -210,
2294 105, -210, 193, 222, 197, -210, 106, -210, 201, -210,
2295 202, -210, 114, -210, 206, 212, -210, 8, 7, -210,
2296 -210, -210, -210, -210, -210, -210, -210, -15, -15, 144,
2297 13, 223, 224, -210, -210, -210, -210, -210, 161, -210,
2298 -210, -210, -210, -210, -210, -210, -210, 115, -210, -210,
2299 116, -210, -210, -210, 117, 227, -210, -210, -210, -210,
2300 -210, 147, -210, -210, -210, -210, 228, 211, -210, -210,
2301 127, -210, 157, -210, 225, -15, -210, -210, -210, 231,
2302 232, 13, -210, 37, -210, 223, 36, 224, -210, -210,
2303 233, -210, 214, 216, -210, 149, -210, -210, -210, 237,
2304 -210, -210, -210, -210, 150, -210, -210, -210, -210, -210,
2305 -210, 154, -210, -210, -210, 238, 239, 219, 240, 36,
2306 -210, 241, 226, 243, -210, 229, -210, -210, -210, 230,
2307 -210, -210, 159, -210, 46, 230, -210, -210, 242, 247,
2308 248, -210, 156, -210, -210, -210, -210, -210, -210, -210,
2309 249, 235, 234, 244, 258, 46, -210, 246, -210, -210,
2310 -210, 250, -210, -210, -210
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, 148, 9,
2320 140, 11, 100, 13, 92, 15, 122, 17, 116, 19,
2321 187, 21, 39, 33, 0, 0, 0, 142, 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 138, 166, 179, 198, 0, 65, 0, 50, 52, 53,
2325 54, 55, 56, 63, 64, 57, 58, 59, 60, 61,
2326 62, 161, 0, 164, 159, 158, 156, 157, 0, 150,
2327 152, 153, 154, 155, 146, 0, 143, 144, 112, 114,
2328 110, 109, 107, 108, 0, 102, 104, 105, 106, 98,
2329 0, 95, 96, 135, 0, 133, 132, 130, 131, 129,
2330 0, 124, 126, 127, 128, 120, 0, 118, 194, 196,
2331 191, 0, 189, 192, 193, 38, 0, 0, 31, 0,
2332 0, 45, 0, 0, 0, 0, 0, 0, 0, 0,
2333 0, 0, 0, 0, 0, 43, 0, 49, 0, 0,
2334 0, 0, 0, 149, 0, 141, 0, 0, 0, 0,
2335 0, 101, 0, 93, 0, 0, 0, 0, 0, 123,
2336 0, 0, 117, 0, 0, 0, 188, 42, 35, 0,
2337 0, 0, 68, 69, 0, 0, 0, 0, 0, 0,
2338 0, 0, 0, 0, 51, 0, 163, 0, 0, 151,
2339 0, 145, 0, 0, 0, 103, 0, 97, 0, 137,
2340 0, 125, 0, 119, 0, 0, 190, 0, 0, 67,
2341 72, 73, 71, 75, 32, 77, 79, 84, 84, 142,
2342 0, 181, 0, 162, 165, 160, 147, 113, 0, 111,
2343 99, 136, 134, 121, 195, 197, 36, 0, 90, 89,
2344 0, 85, 86, 88, 0, 0, 175, 177, 174, 172,
2345 173, 0, 168, 170, 171, 185, 0, 182, 183, 202,
2346 0, 200, 0, 47, 0, 0, 81, 83, 139, 0,
2347 0, 0, 167, 0, 180, 0, 0, 0, 199, 115,
2348 0, 87, 0, 0, 169, 0, 184, 213, 218, 0,
2349 216, 212, 210, 211, 0, 204, 206, 208, 209, 207,
2350 201, 94, 176, 178, 186, 0, 0, 0, 0, 0,
2351 203, 0, 0, 0, 215, 0, 205, 91, 214, 0,
2352 217, 222, 0, 220, 0, 0, 219, 231, 0, 0,
2353 0, 236, 0, 224, 226, 227, 228, 229, 230, 221,
2354 0, 0, 0, 0, 0, 0, 223, 0, 233, 234,
2355 235, 0, 225, 232, 237
2359 D2Parser::yypgoto_[] =
2361 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2362 -210, -210, -41, -210, -209, -210, -17, -210, -210, -210,
2363 -210, -210, -210, -56, -210, -210, -210, -210, -210, -210,
2364 -3, 88, -210, -210, -210, -210, -210, -210, -210, -210,
2365 -210, -55, -210, -44, -210, -210, -210, -210, -210, 11,
2366 -210, -40, -210, -210, -210, -210, -75, -210, 80, -210,
2367 -210, -210, 78, 85, -210, -210, -51, -210, -210, -210,
2368 -210, -210, 0, 75, -210, -210, -210, 81, 82, -210,
2369 -210, -210, -210, -210, -210, -210, -210, -210, 19, -210,
2370 93, -210, -210, -210, 98, 102, -210, -210, -210, -210,
2371 -210, -210, -210, -210, -210, -210, -26, -210, -210, -210,
2372 -210, -210, -210, -210, -210, -28, -210, -210, -210, -25,
2373 84, -210, -210, -210, -210, -210, -210, -210, -27, -210,
2374 -210, -58, -210, -210, -210, -210, -210, -210, -210, -210,
2375 -69, -210, -210, -88, -210, -210, -210, -210, -210, -210,
2380 D2Parser::yydefgoto_[] =
2382 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2383 20, 21, 30, 31, 32, 53, 255, 67, 68, 33,
2384 52, 64, 65, 85, 35, 54, 70, 160, 37, 55,
2385 86, 87, 88, 162, 89, 90, 91, 165, 252, 92,
2386 166, 93, 167, 94, 168, 95, 169, 96, 170, 280,
2387 281, 282, 283, 304, 45, 59, 130, 131, 132, 192,
2388 43, 58, 124, 125, 126, 189, 127, 187, 128, 188,
2389 49, 61, 146, 147, 200, 47, 60, 140, 141, 142,
2390 197, 143, 195, 144, 97, 171, 41, 57, 115, 116,
2391 117, 184, 39, 56, 108, 109, 110, 181, 111, 178,
2392 112, 113, 180, 98, 172, 291, 292, 293, 309, 294,
2393 310, 99, 173, 296, 297, 298, 313, 51, 62, 151,
2394 152, 153, 203, 154, 204, 100, 174, 300, 301, 316,
2395 334, 335, 336, 345, 337, 338, 348, 339, 346, 362,
2396 363, 364, 372, 373, 374, 380, 375, 376, 377, 378,
2401 D2Parser::yytable_[] =
2403 105, 106, 121, 122, 136, 137, 150, 254, 278, 139,
2404 22, 63, 107, 23, 123, 24, 138, 25, 71, 72,
2405 73, 74, 148, 149, 75, 176, 76, 77, 78, 79,
2406 177, 34, 76, 77, 80, 66, 254, 36, 81, 133,
2407 134, 82, 84, 69, 83, 286, 287, 76, 77, 38,
2408 76, 77, 118, 40, 135, 76, 77, 76, 77, 101,
2409 102, 103, 118, 119, 84, 26, 27, 28, 29, 104,
2410 84, 42, 148, 149, 327, 328, 120, 329, 330, 182,
2411 201, 46, 190, 202, 183, 84, 367, 191, 84, 368,
2412 369, 370, 371, 84, 84, 84, 1, 2, 3, 4,
2413 5, 6, 7, 8, 9, 10, 198, 205, 182, 190,
2414 156, 199, 206, 266, 270, 207, 208, 198, 176, 305,
2415 305, 158, 273, 303, 306, 307, 105, 106, 105, 106,
2416 317, 44, 50, 318, 121, 122, 121, 122, 107, 48,
2417 107, 155, 136, 137, 136, 137, 123, 139, 123, 139,
2418 311, 114, 205, 349, 138, 312, 138, 344, 350, 385,
2419 201, 129, 365, 319, 386, 366, 250, 251, 145, 157,
2420 159, 161, 163, 164, 175, 179, 186, 209, 185, 194,
2421 193, 196, 210, 211, 214, 215, 212, 213, 216, 217,
2422 218, 219, 220, 221, 222, 223, 225, 226, 227, 228,
2423 232, 279, 279, 233, 288, 289, 276, 234, 238, 240,
2424 239, 244, 245, 247, 315, 249, 290, 248, 253, 24,
2425 257, 256, 258, 259, 260, 261, 262, 268, 275, 320,
2426 295, 299, 263, 308, 314, 322, 323, 361, 341, 264,
2427 265, 347, 352, 353, 355, 277, 381, 357, 359, 279,
2428 267, 382, 383, 387, 269, 288, 289, 150, 271, 272,
2429 331, 332, 391, 274, 224, 321, 351, 290, 302, 284,
2430 236, 342, 333, 343, 237, 235, 243, 354, 285, 231,
2431 241, 242, 230, 358, 229, 324, 360, 326, 325, 246,
2432 340, 356, 389, 331, 332, 388, 379, 392, 0, 0,
2433 0, 0, 390, 393, 0, 333, 0, 394
2437 D2Parser::yycheck_[] =
2439 56, 56, 58, 58, 60, 60, 62, 216, 23, 60,
2440 0, 52, 56, 5, 58, 7, 60, 9, 11, 12,
2441 13, 14, 35, 36, 17, 3, 19, 20, 21, 22,
2442 8, 7, 19, 20, 27, 57, 245, 7, 31, 11,
2443 12, 34, 57, 10, 37, 32, 33, 19, 20, 7,
2444 19, 20, 24, 5, 26, 19, 20, 19, 20, 28,
2445 29, 30, 24, 25, 57, 57, 58, 59, 60, 38,
2446 57, 7, 35, 36, 38, 39, 38, 41, 42, 3,
2447 3, 7, 3, 6, 8, 57, 40, 8, 57, 43,
2448 44, 45, 46, 57, 57, 57, 47, 48, 49, 50,
2449 51, 52, 53, 54, 55, 56, 3, 3, 3, 3,
2450 3, 8, 8, 8, 8, 156, 157, 3, 3, 3,
2451 3, 8, 8, 8, 8, 8, 182, 182, 184, 184,
2452 3, 5, 7, 6, 190, 190, 192, 192, 182, 5,
2453 184, 6, 198, 198, 200, 200, 190, 198, 192, 200,
2454 3, 7, 3, 3, 198, 8, 200, 8, 8, 3,
2455 3, 7, 3, 6, 8, 6, 15, 16, 7, 4,
2456 3, 8, 4, 4, 4, 4, 3, 57, 6, 3,
2457 6, 4, 4, 4, 4, 4, 58, 58, 4, 4,
2458 4, 4, 4, 4, 4, 4, 4, 58, 4, 4,
2459 4, 257, 258, 4, 260, 260, 247, 4, 4, 4,
2460 58, 4, 4, 4, 3, 57, 260, 7, 18, 7,
2461 7, 57, 7, 5, 7, 5, 5, 5, 245, 4,
2462 7, 7, 57, 6, 6, 4, 4, 7, 5, 57,
2463 57, 4, 4, 4, 4, 248, 4, 6, 5, 305,
2464 57, 4, 4, 4, 57, 311, 311, 313, 57, 57,
2465 316, 316, 4, 57, 176, 305, 341, 311, 268, 258,
2466 192, 57, 316, 57, 194, 190, 201, 58, 259, 186,
2467 198, 200, 184, 57, 182, 311, 57, 315, 313, 205,
2468 317, 349, 58, 349, 349, 60, 365, 385, -1, -1,
2469 -1, -1, 58, 57, -1, 349, -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, 127,
2489 138, 139, 140, 142, 144, 7, 133, 134, 35, 36,
2490 84, 180, 181, 182, 184, 6, 3, 4, 8, 3,
2491 88, 8, 94, 4, 4, 98, 101, 103, 105, 107,
2492 109, 146, 165, 173, 187, 4, 3, 8, 160, 4,
2493 163, 158, 3, 8, 152, 6, 3, 128, 130, 126,
2494 3, 8, 120, 6, 3, 143, 4, 141, 3, 8,
2495 135, 3, 6, 183, 185, 3, 8, 73, 73, 57,
2496 4, 4, 58, 58, 4, 4, 4, 4, 4, 4,
2497 4, 4, 4, 4, 92, 4, 58, 4, 4, 156,
2498 155, 151, 4, 4, 4, 124, 123, 119, 4, 58,
2499 4, 139, 138, 134, 4, 4, 181, 4, 7, 57,
2500 15, 16, 99, 18, 75, 77, 57, 7, 7, 5,
2501 7, 5, 5, 57, 57, 57, 8, 57, 5, 57,
2502 8, 57, 57, 8, 57, 77, 73, 91, 23, 84,
2503 110, 111, 112, 113, 110, 149, 32, 33, 84, 102,
2504 104, 166, 167, 168, 170, 7, 174, 175, 176, 7,
2505 188, 189, 133, 8, 114, 3, 8, 8, 6, 169,
2506 171, 3, 8, 177, 6, 3, 190, 3, 6, 6,
2507 4, 112, 4, 4, 167, 180, 176, 38, 39, 41,
2508 42, 84, 102, 104, 191, 192, 193, 195, 196, 198,
2509 189, 5, 57, 57, 8, 194, 199, 4, 197, 3,
2510 8, 117, 4, 4, 58, 4, 192, 6, 57, 5,
2511 57, 7, 200, 201, 202, 3, 6, 40, 43, 44,
2512 45, 46, 203, 204, 205, 207, 208, 209, 210, 201,
2513 206, 4, 4, 4, 211, 3, 8, 4, 60, 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, 139, 141, 140, 143, 142, 144, 146, 145,
2534 148, 147, 149, 149, 150, 150, 152, 151, 154, 153,
2535 155, 155, 156, 156, 156, 156, 156, 156, 156, 158,
2536 157, 160, 159, 161, 163, 162, 165, 164, 166, 166,
2537 167, 167, 167, 167, 167, 169, 168, 171, 170, 173,
2538 172, 174, 174, 175, 175, 177, 176, 179, 178, 180,
2539 180, 180, 181, 181, 183, 182, 185, 184, 187, 186,
2540 188, 188, 190, 189, 191, 191, 192, 192, 192, 192,
2541 192, 192, 192, 194, 193, 195, 197, 196, 199, 198,
2542 200, 200, 202, 201, 203, 203, 204, 204, 204, 204,
2543 204, 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, 1, 0, 4, 0, 4, 3, 0, 6,
2563 0, 4, 0, 1, 1, 3, 0, 4, 0, 4,
2564 1, 3, 1, 1, 1, 1, 1, 1, 1, 0,
2565 4, 0, 4, 3, 0, 4, 0, 6, 1, 3,
2566 1, 1, 1, 1, 1, 0, 4, 0, 4, 0,
2567 6, 0, 1, 1, 3, 0, 4, 0, 4, 1,
2568 3, 1, 1, 1, 0, 4, 0, 4, 0, 6,
2569 1, 3, 0, 4, 1, 3, 1, 1, 1, 1,
2570 1, 1, 1, 0, 4, 3, 0, 4, 0, 6,
2571 1, 3, 0, 4, 1, 3, 1, 1, 1, 1,
2572 1, 0, 4, 3, 3, 3, 0, 4
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_key_name",
"$@28",
"dns_servers",
2611 "$@29",
"sub_dns_servers",
"$@30",
"dns_server_list",
"dns_server",
2612 "$@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, 540, 543, 543, 556, 556, 565, 580, 580,
2652 591, 591, 598, 599, 602, 603, 606, 606, 614, 614,
2653 623, 624, 627, 628, 629, 630, 631, 632, 633, 636,
2654 636, 649, 649, 661, 670, 670, 687, 687, 698, 699,
2655 702, 703, 704, 705, 706, 709, 709, 718, 718, 729,
2656 729, 740, 741, 744, 745, 748, 748, 758, 758, 768,
2657 769, 770, 773, 774, 777, 777, 786, 786, 796, 796,
2658 809, 810, 814, 814, 822, 823, 826, 827, 828, 829,
2659 830, 831, 832, 835, 835, 844, 850, 850, 859, 859,
2660 870, 871, 874, 874, 882, 883, 886, 887, 888, 889,
2661 890, 893, 893, 902, 908, 914, 920, 920
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)]);
2692#line 14 "d2_parser.yy"
2694#line 2695 "d2_parser.cc"
2696#line 929 "d2_parser.yy"
2701 const std::string& what)
2703 ctx.error(loc, what);
#define YY_CAST(Type, Val)
#define YY_MOVE_REF(Type)
Evaluation context, an interface to the expression evaluation.
@ DDNS_DOMAIN
Used while parsing a list of ddns-domains.
@ DNS_SERVERS
Used while parsing content of a control-socket.
@ DDNS_DOMAINS
Used while parsing content of a dns-server.
@ NCR_FORMAT
Used while parsing DhcpDdns/ncr-format.
@ NCR_PROTOCOL
Used while parsing DhcpDdns/ncr-protocol.
@ NO_KEYWORD
This one is used in pure JSON mode.
@ DHCPDDNS
Used while parsing content of a tsig-key.
@ OUTPUT_OPTIONS
Used while parsing DhcpDdns/loggers/output_options structures.
@ FORWARD_DDNS
Used while parsing content of DhcpDdns/reverse-ddns.
@ TSIG_KEY
Used while parsing a list of tsig-keys.
@ REVERSE_DDNS
Used while parsing content of a ddns-domain.
@ LOGGERS
Used while parsing DhcpDdns/loggers structures.
@ HOOKS_LIBRARIES
Used while parsing DhcpDdns/hooks-libraries.
@ TSIG_KEYS
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
@ CONFIG
Used while parsing content of DhcpDdns.
const std::string contextName()
Get the syntax context name.
void leave()
Leave a syntactic context.
void unique(const std::string &name, isc::data::Element::Position loc)
Check if a parameter is already present.
ParserContext ctx_
Current syntactic context.
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.
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
void enter(const ParserContext &ctx)
Enter a new syntactic context.
isc::data::Element::Position loc2pos(isc::d2::location &loc)
Converts bison's position to one understood by isc::data::Element.
context(const D2Parser &yyparser, const symbol_type &yyla)
const symbol_type & lookahead() const YY_NOEXCEPT
symbol_kind_type token() const YY_NOEXCEPT
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.
Present a slice of the top of a stack.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
void set_debug_level(debug_level_type l)
Set the current debugging level.
D2Parser(isc::d2::D2ParserContext &ctx_yyarg)
Build a parser object.
location location_type
Symbol locations.
int debug_level_type
Type for debugging levels.
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static const symbol_kind_type YYNTOKENS
The number of tokens.
virtual int parse()
Parse.
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
Notes: IntElement type is changed to int64_t.
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Symbol)
Define the isc::d2::parser class.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.
bool empty() const YY_NOEXCEPT
Whether empty.
location_type location
The location.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW