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);
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];
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 const int yyn = yypact_[+yyparser_.yystack_[0].state];
2154 if (!yy_pact_value_is_default_ (yyn))
2159 const int yyxbegin = yyn < 0 ? -yyn : 0;
2161 const 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)
2187 D2Parser::yy_syntax_error_arguments_ (
const context& yyctx,
2218 yyarg[0] = yyctx.
token ();
2219 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2227 D2Parser::yysyntax_error_ (
const context& yyctx)
const
2230 enum { YYARGS_MAX = 5 };
2233 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
2235 char const* yyformat = YY_NULLPTR;
2238#define YYCASE_(N, S) \
2244 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
2245 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2246 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2247 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2248 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2254 std::ptrdiff_t yyi = 0;
2255 for (
char const* yyp = yyformat; *yyp; ++yyp)
2256 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
2267 const short D2Parser::yypact_ninf_ = -210;
2269 const signed char D2Parser::yytable_ninf_ = -1;
2272 D2Parser::yypact_[] =
2274 49, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2275 -210, 10, 8, 24, 30, 42, 48, 64, 126, 74,
2276 134, 125, -210, -210, -210, -210, -210, -210, -210, -210,
2277 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2278 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2279 -210, -210, 8, -22, 33, 7, 31, 144, 38, 154,
2280 28, 161, 37, -210, 135, 107, 165, 113, 167, -210,
2281 163, -210, 168, 169, -210, -210, -210, -210, -210, -210,
2282 -210, -210, -210, -210, 170, -210, 22, -210, -210, -210,
2283 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2284 -210, -210, 171, -210, -210, -210, -210, -210, 76, -210,
2285 -210, -210, -210, -210, -210, 172, 173, -210, -210, -210,
2286 -210, -210, -210, -210, 79, -210, -210, -210, -210, -210,
2287 174, 176, -210, -210, 177, -210, -210, -210, -210, -210,
2288 103, -210, -210, -210, -210, -210, 77, -210, -210, -210,
2289 -210, 104, -210, -210, -210, -210, 8, 8, -210, 120,
2290 178, -210, 179, 128, 129, 180, 181, 184, 185, 186,
2291 187, 188, 189, 190, 191, -210, 7, -210, 192, 139,
2292 194, 195, 31, -210, 31, -210, 144, 196, 199, 203,
2293 38, -210, 38, -210, 154, 204, 152, 205, 28, -210,
2294 28, 161, -210, 207, 208, -13, -210, -210, -210, 209,
2295 210, 158, -210, -210, 151, 200, 212, 164, 213, 215,
2296 218, 217, 220, 221, -210, 175, -210, 182, 183, -210,
2297 105, -210, 193, 222, 197, -210, 106, -210, 201, -210,
2298 202, -210, 114, -210, 206, 212, -210, 8, 7, -210,
2299 -210, -210, -210, -210, -210, -210, -210, -15, -15, 144,
2300 13, 223, 224, -210, -210, -210, -210, -210, 161, -210,
2301 -210, -210, -210, -210, -210, -210, -210, 115, -210, -210,
2302 116, -210, -210, -210, 117, 227, -210, -210, -210, -210,
2303 -210, 147, -210, -210, -210, -210, 228, 211, -210, -210,
2304 127, -210, 157, -210, 225, -15, -210, -210, -210, 231,
2305 232, 13, -210, 37, -210, 223, 36, 224, -210, -210,
2306 233, -210, 214, 216, -210, 149, -210, -210, -210, 237,
2307 -210, -210, -210, -210, 150, -210, -210, -210, -210, -210,
2308 -210, 154, -210, -210, -210, 238, 239, 219, 240, 36,
2309 -210, 241, 226, 243, -210, 229, -210, -210, -210, 230,
2310 -210, -210, 159, -210, 46, 230, -210, -210, 242, 247,
2311 248, -210, 156, -210, -210, -210, -210, -210, -210, -210,
2312 249, 235, 234, 244, 258, 46, -210, 246, -210, -210,
2313 -210, 250, -210, -210, -210
2317 D2Parser::yydefact_[] =
2319 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
2320 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2321 0, 0, 1, 37, 30, 26, 25, 22, 23, 24,
2322 29, 3, 27, 28, 44, 5, 48, 7, 148, 9,
2323 140, 11, 100, 13, 92, 15, 122, 17, 116, 19,
2324 187, 21, 39, 33, 0, 0, 0, 142, 0, 94,
2325 0, 0, 0, 41, 0, 40, 0, 0, 34, 46,
2326 0, 66, 0, 0, 70, 74, 76, 78, 80, 82,
2327 138, 166, 179, 198, 0, 65, 0, 50, 52, 53,
2328 54, 55, 56, 63, 64, 57, 58, 59, 60, 61,
2329 62, 161, 0, 164, 159, 158, 156, 157, 0, 150,
2330 152, 153, 154, 155, 146, 0, 143, 144, 112, 114,
2331 110, 109, 107, 108, 0, 102, 104, 105, 106, 98,
2332 0, 95, 96, 135, 0, 133, 132, 130, 131, 129,
2333 0, 124, 126, 127, 128, 120, 0, 118, 194, 196,
2334 191, 0, 189, 192, 193, 38, 0, 0, 31, 0,
2335 0, 45, 0, 0, 0, 0, 0, 0, 0, 0,
2336 0, 0, 0, 0, 0, 43, 0, 49, 0, 0,
2337 0, 0, 0, 149, 0, 141, 0, 0, 0, 0,
2338 0, 101, 0, 93, 0, 0, 0, 0, 0, 123,
2339 0, 0, 117, 0, 0, 0, 188, 42, 35, 0,
2340 0, 0, 68, 69, 0, 0, 0, 0, 0, 0,
2341 0, 0, 0, 0, 51, 0, 163, 0, 0, 151,
2342 0, 145, 0, 0, 0, 103, 0, 97, 0, 137,
2343 0, 125, 0, 119, 0, 0, 190, 0, 0, 67,
2344 72, 73, 71, 75, 32, 77, 79, 84, 84, 142,
2345 0, 181, 0, 162, 165, 160, 147, 113, 0, 111,
2346 99, 136, 134, 121, 195, 197, 36, 0, 90, 89,
2347 0, 85, 86, 88, 0, 0, 175, 177, 174, 172,
2348 173, 0, 168, 170, 171, 185, 0, 182, 183, 202,
2349 0, 200, 0, 47, 0, 0, 81, 83, 139, 0,
2350 0, 0, 167, 0, 180, 0, 0, 0, 199, 115,
2351 0, 87, 0, 0, 169, 0, 184, 213, 218, 0,
2352 216, 212, 210, 211, 0, 204, 206, 208, 209, 207,
2353 201, 94, 176, 178, 186, 0, 0, 0, 0, 0,
2354 203, 0, 0, 0, 215, 0, 205, 91, 214, 0,
2355 217, 222, 0, 220, 0, 0, 219, 231, 0, 0,
2356 0, 236, 0, 224, 226, 227, 228, 229, 230, 221,
2357 0, 0, 0, 0, 0, 0, 223, 0, 233, 234,
2358 235, 0, 225, 232, 237
2362 D2Parser::yypgoto_[] =
2364 -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
2365 -210, -210, -41, -210, -209, -210, -17, -210, -210, -210,
2366 -210, -210, -210, -56, -210, -210, -210, -210, -210, -210,
2367 -3, 88, -210, -210, -210, -210, -210, -210, -210, -210,
2368 -210, -55, -210, -44, -210, -210, -210, -210, -210, 11,
2369 -210, -40, -210, -210, -210, -210, -75, -210, 80, -210,
2370 -210, -210, 78, 85, -210, -210, -51, -210, -210, -210,
2371 -210, -210, 0, 75, -210, -210, -210, 81, 82, -210,
2372 -210, -210, -210, -210, -210, -210, -210, -210, 19, -210,
2373 93, -210, -210, -210, 98, 102, -210, -210, -210, -210,
2374 -210, -210, -210, -210, -210, -210, -26, -210, -210, -210,
2375 -210, -210, -210, -210, -210, -28, -210, -210, -210, -25,
2376 84, -210, -210, -210, -210, -210, -210, -210, -27, -210,
2377 -210, -58, -210, -210, -210, -210, -210, -210, -210, -210,
2378 -69, -210, -210, -88, -210, -210, -210, -210, -210, -210,
2383 D2Parser::yydefgoto_[] =
2385 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2386 20, 21, 30, 31, 32, 53, 255, 67, 68, 33,
2387 52, 64, 65, 85, 35, 54, 70, 160, 37, 55,
2388 86, 87, 88, 162, 89, 90, 91, 165, 252, 92,
2389 166, 93, 167, 94, 168, 95, 169, 96, 170, 280,
2390 281, 282, 283, 304, 45, 59, 130, 131, 132, 192,
2391 43, 58, 124, 125, 126, 189, 127, 187, 128, 188,
2392 49, 61, 146, 147, 200, 47, 60, 140, 141, 142,
2393 197, 143, 195, 144, 97, 171, 41, 57, 115, 116,
2394 117, 184, 39, 56, 108, 109, 110, 181, 111, 178,
2395 112, 113, 180, 98, 172, 291, 292, 293, 309, 294,
2396 310, 99, 173, 296, 297, 298, 313, 51, 62, 151,
2397 152, 153, 203, 154, 204, 100, 174, 300, 301, 316,
2398 334, 335, 336, 345, 337, 338, 348, 339, 346, 362,
2399 363, 364, 372, 373, 374, 380, 375, 376, 377, 378,
2404 D2Parser::yytable_[] =
2406 105, 106, 121, 122, 136, 137, 150, 254, 278, 139,
2407 22, 63, 107, 23, 123, 24, 138, 25, 71, 72,
2408 73, 74, 148, 149, 75, 176, 76, 77, 78, 79,
2409 177, 34, 76, 77, 80, 66, 254, 36, 81, 133,
2410 134, 82, 84, 69, 83, 286, 287, 76, 77, 38,
2411 76, 77, 118, 40, 135, 76, 77, 76, 77, 101,
2412 102, 103, 118, 119, 84, 26, 27, 28, 29, 104,
2413 84, 42, 148, 149, 327, 328, 120, 329, 330, 182,
2414 201, 46, 190, 202, 183, 84, 367, 191, 84, 368,
2415 369, 370, 371, 84, 84, 84, 1, 2, 3, 4,
2416 5, 6, 7, 8, 9, 10, 198, 205, 182, 190,
2417 156, 199, 206, 266, 270, 207, 208, 198, 176, 305,
2418 305, 158, 273, 303, 306, 307, 105, 106, 105, 106,
2419 317, 44, 50, 318, 121, 122, 121, 122, 107, 48,
2420 107, 155, 136, 137, 136, 137, 123, 139, 123, 139,
2421 311, 114, 205, 349, 138, 312, 138, 344, 350, 385,
2422 201, 129, 365, 319, 386, 366, 250, 251, 145, 157,
2423 159, 161, 163, 164, 175, 179, 186, 209, 185, 194,
2424 193, 196, 210, 211, 214, 215, 212, 213, 216, 217,
2425 218, 219, 220, 221, 222, 223, 225, 226, 227, 228,
2426 232, 279, 279, 233, 288, 289, 276, 234, 238, 240,
2427 239, 244, 245, 247, 315, 249, 290, 248, 253, 24,
2428 257, 256, 258, 259, 260, 261, 262, 268, 275, 320,
2429 295, 299, 263, 308, 314, 322, 323, 361, 341, 264,
2430 265, 347, 352, 353, 355, 277, 381, 357, 359, 279,
2431 267, 382, 383, 387, 269, 288, 289, 150, 271, 272,
2432 331, 332, 391, 274, 224, 321, 351, 290, 302, 284,
2433 236, 342, 333, 343, 237, 235, 243, 354, 285, 231,
2434 241, 242, 230, 358, 229, 324, 360, 326, 325, 246,
2435 340, 356, 389, 331, 332, 388, 379, 392, 0, 0,
2436 0, 0, 390, 393, 0, 333, 0, 394
2440 D2Parser::yycheck_[] =
2442 56, 56, 58, 58, 60, 60, 62, 216, 23, 60,
2443 0, 52, 56, 5, 58, 7, 60, 9, 11, 12,
2444 13, 14, 35, 36, 17, 3, 19, 20, 21, 22,
2445 8, 7, 19, 20, 27, 57, 245, 7, 31, 11,
2446 12, 34, 57, 10, 37, 32, 33, 19, 20, 7,
2447 19, 20, 24, 5, 26, 19, 20, 19, 20, 28,
2448 29, 30, 24, 25, 57, 57, 58, 59, 60, 38,
2449 57, 7, 35, 36, 38, 39, 38, 41, 42, 3,
2450 3, 7, 3, 6, 8, 57, 40, 8, 57, 43,
2451 44, 45, 46, 57, 57, 57, 47, 48, 49, 50,
2452 51, 52, 53, 54, 55, 56, 3, 3, 3, 3,
2453 3, 8, 8, 8, 8, 156, 157, 3, 3, 3,
2454 3, 8, 8, 8, 8, 8, 182, 182, 184, 184,
2455 3, 5, 7, 6, 190, 190, 192, 192, 182, 5,
2456 184, 6, 198, 198, 200, 200, 190, 198, 192, 200,
2457 3, 7, 3, 3, 198, 8, 200, 8, 8, 3,
2458 3, 7, 3, 6, 8, 6, 15, 16, 7, 4,
2459 3, 8, 4, 4, 4, 4, 3, 57, 6, 3,
2460 6, 4, 4, 4, 4, 4, 58, 58, 4, 4,
2461 4, 4, 4, 4, 4, 4, 4, 58, 4, 4,
2462 4, 257, 258, 4, 260, 260, 247, 4, 4, 4,
2463 58, 4, 4, 4, 3, 57, 260, 7, 18, 7,
2464 7, 57, 7, 5, 7, 5, 5, 5, 245, 4,
2465 7, 7, 57, 6, 6, 4, 4, 7, 5, 57,
2466 57, 4, 4, 4, 4, 248, 4, 6, 5, 305,
2467 57, 4, 4, 4, 57, 311, 311, 313, 57, 57,
2468 316, 316, 4, 57, 176, 305, 341, 311, 268, 258,
2469 192, 57, 316, 57, 194, 190, 201, 58, 259, 186,
2470 198, 200, 184, 57, 182, 311, 57, 315, 313, 205,
2471 317, 349, 58, 349, 349, 60, 365, 385, -1, -1,
2472 -1, -1, 58, 57, -1, 349, -1, 57
2476 D2Parser::yystos_[] =
2478 0, 47, 48, 49, 50, 51, 52, 53, 54, 55,
2479 56, 62, 63, 64, 65, 66, 67, 68, 69, 70,
2480 71, 72, 0, 5, 7, 9, 57, 58, 59, 60,
2481 73, 74, 75, 80, 7, 85, 7, 89, 7, 153,
2482 5, 147, 7, 121, 5, 115, 7, 136, 5, 131,
2483 7, 178, 81, 76, 86, 90, 154, 148, 122, 116,
2484 137, 132, 179, 73, 82, 83, 57, 78, 79, 10,
2485 87, 11, 12, 13, 14, 17, 19, 20, 21, 22,
2486 27, 31, 34, 37, 57, 84, 91, 92, 93, 95,
2487 96, 97, 100, 102, 104, 106, 108, 145, 164, 172,
2488 186, 28, 29, 30, 38, 84, 102, 104, 155, 156,
2489 157, 159, 161, 162, 7, 149, 150, 151, 24, 25,
2490 38, 84, 102, 104, 123, 124, 125, 127, 129, 7,
2491 117, 118, 119, 11, 12, 26, 84, 102, 104, 127,
2492 138, 139, 140, 142, 144, 7, 133, 134, 35, 36,
2493 84, 180, 181, 182, 184, 6, 3, 4, 8, 3,
2494 88, 8, 94, 4, 4, 98, 101, 103, 105, 107,
2495 109, 146, 165, 173, 187, 4, 3, 8, 160, 4,
2496 163, 158, 3, 8, 152, 6, 3, 128, 130, 126,
2497 3, 8, 120, 6, 3, 143, 4, 141, 3, 8,
2498 135, 3, 6, 183, 185, 3, 8, 73, 73, 57,
2499 4, 4, 58, 58, 4, 4, 4, 4, 4, 4,
2500 4, 4, 4, 4, 92, 4, 58, 4, 4, 156,
2501 155, 151, 4, 4, 4, 124, 123, 119, 4, 58,
2502 4, 139, 138, 134, 4, 4, 181, 4, 7, 57,
2503 15, 16, 99, 18, 75, 77, 57, 7, 7, 5,
2504 7, 5, 5, 57, 57, 57, 8, 57, 5, 57,
2505 8, 57, 57, 8, 57, 77, 73, 91, 23, 84,
2506 110, 111, 112, 113, 110, 149, 32, 33, 84, 102,
2507 104, 166, 167, 168, 170, 7, 174, 175, 176, 7,
2508 188, 189, 133, 8, 114, 3, 8, 8, 6, 169,
2509 171, 3, 8, 177, 6, 3, 190, 3, 6, 6,
2510 4, 112, 4, 4, 167, 180, 176, 38, 39, 41,
2511 42, 84, 102, 104, 191, 192, 193, 195, 196, 198,
2512 189, 5, 57, 57, 8, 194, 199, 4, 197, 3,
2513 8, 117, 4, 4, 58, 4, 192, 6, 57, 5,
2514 57, 7, 200, 201, 202, 3, 6, 40, 43, 44,
2515 45, 46, 203, 204, 205, 207, 208, 209, 210, 201,
2516 206, 4, 4, 4, 211, 3, 8, 4, 60, 58,
2523 0, 61, 63, 62, 64, 62, 65, 62, 66, 62,
2524 67, 62, 68, 62, 69, 62, 70, 62, 71, 62,
2525 72, 62, 73, 73, 73, 73, 73, 73, 73, 74,
2526 76, 75, 77, 78, 78, 79, 79, 81, 80, 82,
2527 82, 83, 83, 84, 86, 85, 88, 87, 90, 89,
2528 91, 91, 92, 92, 92, 92, 92, 92, 92, 92,
2529 92, 92, 92, 92, 92, 92, 94, 93, 95, 96,
2530 98, 97, 99, 99, 101, 100, 103, 102, 105, 104,
2531 107, 106, 109, 108, 110, 110, 111, 111, 112, 112,
2532 114, 113, 116, 115, 117, 117, 118, 118, 120, 119,
2533 122, 121, 123, 123, 124, 124, 124, 124, 124, 124,
2534 126, 125, 128, 127, 130, 129, 132, 131, 133, 133,
2535 135, 134, 137, 136, 138, 138, 139, 139, 139, 139,
2536 139, 139, 139, 141, 140, 143, 142, 144, 146, 145,
2537 148, 147, 149, 149, 150, 150, 152, 151, 154, 153,
2538 155, 155, 156, 156, 156, 156, 156, 156, 156, 158,
2539 157, 160, 159, 161, 163, 162, 165, 164, 166, 166,
2540 167, 167, 167, 167, 167, 169, 168, 171, 170, 173,
2541 172, 174, 174, 175, 175, 177, 176, 179, 178, 180,
2542 180, 180, 181, 181, 183, 182, 185, 184, 187, 186,
2543 188, 188, 190, 189, 191, 191, 192, 192, 192, 192,
2544 192, 192, 192, 194, 193, 195, 197, 196, 199, 198,
2545 200, 200, 202, 201, 203, 203, 204, 204, 204, 204,
2546 204, 206, 205, 207, 208, 209, 211, 210
2552 0, 2, 0, 3, 0, 3, 0, 3, 0, 3,
2553 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2554 0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2555 0, 4, 1, 0, 1, 3, 5, 0, 4, 0,
2556 1, 1, 3, 2, 0, 4, 0, 6, 0, 4,
2557 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2558 1, 1, 1, 1, 1, 1, 0, 4, 3, 3,
2559 0, 4, 1, 1, 0, 4, 0, 4, 0, 4,
2560 0, 6, 0, 6, 0, 1, 1, 3, 1, 1,
2561 0, 6, 0, 4, 0, 1, 1, 3, 0, 4,
2562 0, 4, 1, 3, 1, 1, 1, 1, 1, 1,
2563 0, 4, 0, 4, 0, 6, 0, 4, 1, 3,
2564 0, 4, 0, 4, 1, 3, 1, 1, 1, 1,
2565 1, 1, 1, 0, 4, 0, 4, 3, 0, 6,
2566 0, 4, 0, 1, 1, 3, 0, 4, 0, 4,
2567 1, 3, 1, 1, 1, 1, 1, 1, 1, 0,
2568 4, 0, 4, 3, 0, 4, 0, 6, 1, 3,
2569 1, 1, 1, 1, 1, 0, 4, 0, 4, 0,
2570 6, 0, 1, 1, 3, 0, 4, 0, 4, 1,
2571 3, 1, 1, 1, 0, 4, 0, 4, 0, 6,
2572 1, 3, 0, 4, 1, 3, 1, 1, 1, 1,
2573 1, 1, 1, 0, 4, 3, 0, 4, 0, 6,
2574 1, 3, 0, 4, 1, 3, 1, 1, 1, 1,
2575 1, 0, 4, 3, 3, 3, 0, 4
2579#if D2_PARSER_DEBUG || 1
2583 const D2Parser::yytname_[] =
2585 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
2586 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"DhcpDdns\"",
2587 "\"ip-address\"",
"\"port\"",
"\"dns-server-timeout\"",
2588 "\"ncr-protocol\"",
"\"UDP\"",
"\"TCP\"",
"\"ncr-format\"",
"\"JSON\"",
2589 "\"user-context\"",
"\"comment\"",
"\"forward-ddns\"",
2590 "\"reverse-ddns\"",
"\"ddns-domains\"",
"\"key-name\"",
2591 "\"dns-servers\"",
"\"hostname\"",
"\"tsig-keys\"",
"\"algorithm\"",
2592 "\"digest-bits\"",
"\"secret\"",
"\"control-socket\"",
"\"socket-type\"",
2593 "\"socket-name\"",
"\"hooks-libraries\"",
"\"library\"",
2594 "\"parameters\"",
"\"loggers\"",
"\"name\"",
"\"output_options\"",
2595 "\"output\"",
"\"debuglevel\"",
"\"severity\"",
"\"flush\"",
2596 "\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"TOPLEVEL_JSON",
2597 "TOPLEVEL_DHCPDDNS",
"SUB_DHCPDDNS",
"SUB_TSIG_KEY",
"SUB_TSIG_KEYS",
2598 "SUB_DDNS_DOMAIN",
"SUB_DDNS_DOMAINS",
"SUB_DNS_SERVER",
2599 "SUB_DNS_SERVERS",
"SUB_HOOKS_LIBRARY",
"\"constant string\"",
2600 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
2601 "$@1",
"$@2",
"$@3",
"$@4",
"$@5",
"$@6",
"$@7",
"$@8",
"$@9",
"$@10",
2602 "value",
"sub_json",
"map2",
"$@11",
"map_value",
"map_content",
2603 "not_empty_map",
"list_generic",
"$@12",
"list_content",
2604 "not_empty_list",
"unknown_map_entry",
"syntax_map",
"$@13",
2605 "global_object",
"$@14",
"sub_dhcpddns",
"$@15",
"dhcpddns_params",
2606 "dhcpddns_param",
"ip_address",
"$@16",
"port",
"dns_server_timeout",
2607 "ncr_protocol",
"$@17",
"ncr_protocol_value",
"ncr_format",
"$@18",
2608 "user_context",
"$@19",
"comment",
"$@20",
"forward_ddns",
"$@21",
2609 "reverse_ddns",
"$@22",
"ddns_mgr_params",
"not_empty_ddns_mgr_params",
2610 "ddns_mgr_param",
"ddns_domains",
"$@23",
"sub_ddns_domains",
"$@24",
2611 "ddns_domain_list",
"not_empty_ddns_domain_list",
"ddns_domain",
"$@25",
2612 "sub_ddns_domain",
"$@26",
"ddns_domain_params",
"ddns_domain_param",
2613 "ddns_domain_name",
"$@27",
"ddns_key_name",
"$@28",
"dns_servers",
2614 "$@29",
"sub_dns_servers",
"$@30",
"dns_server_list",
"dns_server",
2615 "$@31",
"sub_dns_server",
"$@32",
"dns_server_params",
2616 "dns_server_param",
"dns_server_hostname",
"$@33",
2617 "dns_server_ip_address",
"$@34",
"dns_server_port",
"tsig_keys",
"$@35",
2618 "sub_tsig_keys",
"$@36",
"tsig_keys_list",
"not_empty_tsig_keys_list",
2619 "tsig_key",
"$@37",
"sub_tsig_key",
"$@38",
"tsig_key_params",
2620 "tsig_key_param",
"tsig_key_name",
"$@39",
"tsig_key_algorithm",
"$@40",
2621 "tsig_key_digest_bits",
"tsig_key_secret",
"$@41",
"control_socket",
2622 "$@42",
"control_socket_params",
"control_socket_param",
2623 "control_socket_type",
"$@43",
"control_socket_name",
"$@44",
2624 "hooks_libraries",
"$@45",
"hooks_libraries_list",
2625 "not_empty_hooks_libraries_list",
"hooks_library",
"$@46",
2626 "sub_hooks_library",
"$@47",
"hooks_params",
"hooks_param",
"library",
2627 "$@48",
"parameters",
"$@49",
"loggers",
"$@50",
"loggers_entries",
2628 "logger_entry",
"$@51",
"logger_params",
"logger_param",
"name",
"$@52",
2629 "debuglevel",
"severity",
"$@53",
"output_options_list",
"$@54",
2630 "output_options_list_content",
"output_entry",
"$@55",
2631 "output_params_list",
"output_params",
"output",
"$@56",
"flush",
2632 "maxsize",
"maxver",
"pattern",
"$@57", YY_NULLPTR
2639 D2Parser::yyrline_[] =
2641 0, 125, 125, 125, 126, 126, 127, 127, 128, 128,
2642 129, 129, 130, 130, 131, 131, 132, 132, 133, 133,
2643 134, 134, 142, 143, 144, 145, 146, 147, 148, 151,
2644 156, 156, 167, 170, 171, 174, 179, 187, 187, 194,
2645 195, 198, 202, 213, 222, 222, 235, 235, 246, 246,
2646 254, 255, 259, 260, 261, 262, 263, 264, 265, 266,
2647 267, 268, 269, 270, 271, 272, 275, 275, 284, 293,
2648 303, 303, 312, 313, 316, 316, 325, 325, 350, 350,
2649 377, 377, 388, 388, 399, 400, 403, 404, 407, 408,
2650 413, 413, 424, 424, 431, 432, 435, 436, 439, 439,
2651 447, 447, 454, 455, 458, 459, 460, 461, 462, 463,
2652 467, 467, 480, 480, 493, 493, 504, 504, 511, 512,
2653 515, 515, 523, 523, 530, 531, 534, 535, 536, 537,
2654 538, 539, 540, 543, 543, 556, 556, 565, 580, 580,
2655 591, 591, 598, 599, 602, 603, 606, 606, 614, 614,
2656 623, 624, 627, 628, 629, 630, 631, 632, 633, 636,
2657 636, 649, 649, 661, 670, 670, 687, 687, 698, 699,
2658 702, 703, 704, 705, 706, 709, 709, 718, 718, 729,
2659 729, 740, 741, 744, 745, 748, 748, 758, 758, 768,
2660 769, 770, 773, 774, 777, 777, 786, 786, 796, 796,
2661 809, 810, 814, 814, 822, 823, 826, 827, 828, 829,
2662 830, 831, 832, 835, 835, 844, 850, 850, 859, 859,
2663 870, 871, 874, 874, 882, 883, 886, 887, 888, 889,
2664 890, 893, 893, 902, 908, 914, 920, 920
2668 D2Parser::yy_stack_print_ ()
const
2670 *yycdebug_ <<
"Stack now";
2671 for (stack_type::const_iterator
2672 i = yystack_.begin (),
2673 i_end = yystack_.end ();
2675 *yycdebug_ <<
' ' << int (i->state);
2680 D2Parser::yy_reduce_print_ (
int yyrule)
const
2682 int yylno = yyrline_[yyrule];
2683 int yynrhs = yyr2_[yyrule];
2685 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2686 <<
" (line " << yylno <<
"):\n";
2688 for (
int yyi = 0; yyi < yynrhs; yyi++)
2690 yystack_[(yynrhs) - (yyi + 1)]);
2695#line 14 "d2_parser.yy"
2697#line 2698 "d2_parser.cc"
2699#line 929 "d2_parser.yy"
2704 const std::string& what)
2706 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