39#define yylex d2_parser_lex
47#line 35 "d2_parser.yy"
52#if defined(__GNUC__) || defined(__clang__)
53#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
56#line 57 "d2_parser.cc"
60# if defined YYENABLE_NLS && YYENABLE_NLS
63# define YY_(msgid) dgettext ("bison-runtime", msgid)
67# define YY_(msgid) msgid
74# if defined __GNUC__ && !defined __EXCEPTIONS
75# define YY_EXCEPTIONS 0
77# define YY_EXCEPTIONS 1
81#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
86# ifndef YYLLOC_DEFAULT
87# define YYLLOC_DEFAULT(Current, Rhs, N) \
91 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
92 (Current).end = YYRHSLOC (Rhs, N).end; \
96 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
106# define YYCDEBUG if (yydebug_) (*yycdebug_)
108# define YY_SYMBOL_PRINT(Title, Symbol) \
112 *yycdebug_ << Title << ' '; \
113 yy_print_ (*yycdebug_, Symbol); \
114 *yycdebug_ << '\n'; \
118# define YY_REDUCE_PRINT(Rule) \
121 yy_reduce_print_ (Rule); \
124# define YY_STACK_PRINT() \
127 yy_stack_print_ (); \
132# define YYCDEBUG if (false) std::cerr
133# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
134# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
135# define YY_STACK_PRINT() static_cast<void> (0)
139#define yyerrok (yyerrstatus_ = 0)
140#define yyclearin (yyla.clear ())
142#define YYACCEPT goto yyacceptlab
143#define YYABORT goto yyabortlab
144#define YYERROR goto yyerrorlab
145#define YYRECOVERING() (!!yyerrstatus_)
147#line 14 "d2_parser.yy"
148namespace isc {
namespace d2 {
149#line 150 "d2_parser.cc"
155 yycdebug_ (&std::cerr),
176 : state (empty_state)
179 D2Parser::by_state::by_state (
const by_state& that)
YY_NOEXCEPT
190 D2Parser::by_state::move (by_state& that)
196 D2Parser::by_state::by_state (state_type s)
YY_NOEXCEPT
203 if (state == empty_state)
209 D2Parser::stack_symbol_type::stack_symbol_type ()
212 D2Parser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
215 switch (that.kind ())
217 case symbol_kind::S_value:
218 case symbol_kind::S_map_value:
219 case symbol_kind::S_ncr_protocol_value:
220 case symbol_kind::S_control_socket_type_value:
221 case symbol_kind::S_auth_type_value:
222 value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value));
225 case symbol_kind::S_BOOLEAN:
226 value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value));
229 case symbol_kind::S_FLOAT:
230 value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value));
233 case symbol_kind::S_INTEGER:
234 value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value));
237 case symbol_kind::S_STRING:
238 value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
247 that.state = empty_state;
252 : super_type (s,
YY_MOVE (that.location))
254 switch (that.kind ())
256 case symbol_kind::S_value:
257 case symbol_kind::S_map_value:
258 case symbol_kind::S_ncr_protocol_value:
259 case symbol_kind::S_control_socket_type_value:
260 case symbol_kind::S_auth_type_value:
261 value.move< ElementPtr > (YY_MOVE (that.value));
264 case symbol_kind::S_BOOLEAN:
265 value.move< bool > (YY_MOVE (that.value));
268 case symbol_kind::S_FLOAT:
269 value.move< double > (YY_MOVE (that.value));
272 case symbol_kind::S_INTEGER:
273 value.move< int64_t > (YY_MOVE (that.value));
276 case symbol_kind::S_STRING:
277 value.move< std::string > (YY_MOVE (that.value));
288#if YY_CPLUSPLUS < 201103L
289 D2Parser::stack_symbol_type&
290 D2Parser::stack_symbol_type::operator= (
const stack_symbol_type& that)
293 switch (that.kind ())
304 value.copy<
bool > (that.value);
308 value.copy<
double > (that.value);
312 value.copy< int64_t > (that.value);
316 value.copy< std::string > (that.value);
323 location = that.location;
327 D2Parser::stack_symbol_type&
328 D2Parser::stack_symbol_type::operator= (stack_symbol_type& that)
331 switch (that.kind ())
342 value.move<
bool > (that.value);
346 value.move<
double > (that.value);
350 value.move< int64_t > (that.value);
354 value.move< std::string > (that.value);
361 location = that.location;
363 that.state = empty_state;
368 template <
typename Base>
377 template <
typename Base>
381 std::ostream& yyoutput = yyo;
384 yyo <<
"empty symbol";
388 yyo << (yykind <
YYNTOKENS ?
"token" :
"nterm")
389 <<
' ' << yysym.name () <<
" ("
390 << yysym.location <<
": ";
394#line 144 "d2_parser.yy"
395 { yyoutput << yysym.value.template as < std::string > (); }
396#line 397 "d2_parser.cc"
400#line 144 "d2_parser.yy"
401 { yyoutput << yysym.value.template as < int64_t > (); }
402#line 403 "d2_parser.cc"
406#line 144 "d2_parser.yy"
407 { yyoutput << yysym.value.template as < double > (); }
408#line 409 "d2_parser.cc"
412#line 144 "d2_parser.yy"
413 { yyoutput << yysym.value.template as < bool > (); }
414#line 415 "d2_parser.cc"
418#line 144 "d2_parser.yy"
419 { yyoutput << yysym.value.template as < ElementPtr > (); }
420#line 421 "d2_parser.cc"
424#line 144 "d2_parser.yy"
425 { yyoutput << yysym.value.template as < ElementPtr > (); }
426#line 427 "d2_parser.cc"
430#line 144 "d2_parser.yy"
431 { yyoutput << yysym.value.template as < ElementPtr > (); }
432#line 433 "d2_parser.cc"
436#line 144 "d2_parser.yy"
437 { yyoutput << yysym.value.template as < ElementPtr > (); }
438#line 439 "d2_parser.cc"
442#line 144 "d2_parser.yy"
443 { yyoutput << yysym.value.template as < ElementPtr > (); }
444#line 445 "d2_parser.cc"
456 D2Parser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
466#if 201103L <= YY_CPLUSPLUS
467 yypush_ (m, stack_symbol_type (s, std::move (sym)));
469 stack_symbol_type ss (s, sym);
482 D2Parser::debug_stream ()
const
488 D2Parser::set_debug_stream (std::ostream& o)
494 D2Parser::debug_level_type
495 D2Parser::debug_level ()
const
501 D2Parser::set_debug_level (debug_level_type l)
508 D2Parser::yy_lr_goto_state_ (state_type yystate,
int yysym)
510 int yyr = yypgoto_[yysym -
YYNTOKENS] + yystate;
511 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
512 return yytable_[yyr];
518 D2Parser::yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT
520 return yyvalue == yypact_ninf_;
524 D2Parser::yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT
526 return yyvalue == yytable_ninf_;
544 int yyerrstatus_ = 0;
550 stack_symbol_type yyerror_range[3];
567 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
573 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
577 if (yystack_[0].state == yyfinal_)
588 yyn = yypact_[+yystack_[0].state];
589 if (yy_pact_value_is_default_ (yyn))
601 yyla.
move (yylookahead);
606 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
627 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.
kind ())
636 if (yy_table_value_is_error_ (yyn))
647 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
655 yyn = yydefact_[+yystack_[0].state];
667 stack_symbol_type yylhs;
668 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
705 stack_type::slice range (yystack_, yylen);
719#line 153 "d2_parser.yy"
720 { ctx.ctx_ = ctx.NO_KEYWORD; }
721#line 722 "d2_parser.cc"
725#line 154 "d2_parser.yy"
726 { ctx.ctx_ = ctx.CONFIG; }
727#line 728 "d2_parser.cc"
731#line 155 "d2_parser.yy"
732 { ctx.ctx_ = ctx.DHCPDDNS; }
733#line 734 "d2_parser.cc"
737#line 156 "d2_parser.yy"
738 { ctx.ctx_ = ctx.TSIG_KEY; }
739#line 740 "d2_parser.cc"
743#line 157 "d2_parser.yy"
744 { ctx.ctx_ = ctx.TSIG_KEYS; }
745#line 746 "d2_parser.cc"
749#line 158 "d2_parser.yy"
750 { ctx.ctx_ = ctx.DDNS_DOMAIN; }
751#line 752 "d2_parser.cc"
755#line 159 "d2_parser.yy"
756 { ctx.ctx_ = ctx.DDNS_DOMAINS; }
757#line 758 "d2_parser.cc"
761#line 160 "d2_parser.yy"
762 { ctx.ctx_ = ctx.DNS_SERVERS; }
763#line 764 "d2_parser.cc"
767#line 161 "d2_parser.yy"
768 { ctx.ctx_ = ctx.DNS_SERVERS; }
769#line 770 "d2_parser.cc"
773#line 162 "d2_parser.yy"
774 { ctx.ctx_ = ctx.HOOKS_LIBRARIES; }
775#line 776 "d2_parser.cc"
779#line 170 "d2_parser.yy"
781#line 782 "d2_parser.cc"
785#line 171 "d2_parser.yy"
787#line 788 "d2_parser.cc"
791#line 172 "d2_parser.yy"
793#line 794 "d2_parser.cc"
797#line 173 "d2_parser.yy"
799#line 800 "d2_parser.cc"
803#line 174 "d2_parser.yy"
805#line 806 "d2_parser.cc"
809#line 175 "d2_parser.yy"
811#line 812 "d2_parser.cc"
815#line 176 "d2_parser.yy"
817#line 818 "d2_parser.cc"
821#line 179 "d2_parser.yy"
824 ctx.stack_.push_back(yystack_[0].value.as <
ElementPtr > ());
826#line 827 "d2_parser.cc"
830#line 184 "d2_parser.yy"
835 ctx.stack_.push_back(m);
837#line 838 "d2_parser.cc"
841#line 189 "d2_parser.yy"
847#line 848 "d2_parser.cc"
851#line 195 "d2_parser.yy"
853#line 854 "d2_parser.cc"
857#line 202 "d2_parser.yy"
860 ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
861 ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
863#line 864 "d2_parser.cc"
867#line 207 "d2_parser.yy"
871 ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
872 ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
874#line 875 "d2_parser.cc"
878#line 213 "d2_parser.yy"
880 ctx.warnAboutExtraCommas(yystack_[0].location);
882#line 883 "d2_parser.cc"
886#line 218 "d2_parser.yy"
889 ctx.stack_.push_back(l);
891#line 892 "d2_parser.cc"
895#line 221 "d2_parser.yy"
899#line 900 "d2_parser.cc"
903#line 229 "d2_parser.yy"
906 ctx.stack_.back()->add(yystack_[0].value.as <
ElementPtr > ());
908#line 909 "d2_parser.cc"
912#line 233 "d2_parser.yy"
915 ctx.stack_.back()->add(yystack_[0].value.as <
ElementPtr > ());
917#line 918 "d2_parser.cc"
921#line 237 "d2_parser.yy"
923 ctx.warnAboutExtraCommas(yystack_[0].location);
925#line 926 "d2_parser.cc"
929#line 247 "d2_parser.yy"
931 const std::string& where = ctx.contextName();
932 const std::string& keyword = yystack_[1].value.as < std::string > ();
933 error(yystack_[1].location,
934 "got unexpected keyword \"" + keyword +
"\" in " + where +
" map.");
936#line 937 "d2_parser.cc"
940#line 256 "d2_parser.yy"
945 ctx.stack_.push_back(m);
947#line 948 "d2_parser.cc"
951#line 261 "d2_parser.yy"
957#line 958 "d2_parser.cc"
961#line 269 "d2_parser.yy"
963 ctx.unique(
"DhcpDdns", ctx.loc2pos(yystack_[0].location));
965 ctx.stack_.back()->set(
"DhcpDdns", m);
966 ctx.stack_.push_back(m);
967 ctx.enter(ctx.DHCPDDNS);
969#line 970 "d2_parser.cc"
973#line 275 "d2_parser.yy"
975 ctx.stack_.pop_back();
978#line 979 "d2_parser.cc"
982#line 282 "d2_parser.yy"
984 ctx.warnAboutExtraCommas(yystack_[0].location);
986#line 987 "d2_parser.cc"
990#line 286 "d2_parser.yy"
994 ctx.stack_.push_back(m);
996#line 997 "d2_parser.cc"
1000#line 290 "d2_parser.yy"
1004#line 1005 "d2_parser.cc"
1008#line 296 "d2_parser.yy"
1010 ctx.warnAboutExtraCommas(yystack_[0].location);
1012#line 1013 "d2_parser.cc"
1016#line 318 "d2_parser.yy"
1018 ctx.unique(
"ip-address", ctx.loc2pos(yystack_[0].location));
1019 ctx.enter(ctx.NO_KEYWORD);
1021#line 1022 "d2_parser.cc"
1025#line 321 "d2_parser.yy"
1028 ctx.stack_.back()->set(
"ip-address", s);
1031#line 1032 "d2_parser.cc"
1035#line 327 "d2_parser.yy"
1037 ctx.unique(
"port", ctx.loc2pos(yystack_[2].location));
1038 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
1039 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
1041 ElementPtr i(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1042 ctx.stack_.back()->set(
"port", i);
1044#line 1045 "d2_parser.cc"
1048#line 336 "d2_parser.yy"
1050 ctx.unique(
"dns-server-timeout", ctx.loc2pos(yystack_[2].location));
1051 if (yystack_[0].value.as < int64_t > () <= 0) {
1052 error(yystack_[0].location,
"dns-server-timeout must be greater than zero");
1054 ElementPtr i(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1055 ctx.stack_.back()->set(
"dns-server-timeout", i);
1058#line 1059 "d2_parser.cc"
1062#line 346 "d2_parser.yy"
1064 ctx.unique(
"ncr-protocol", ctx.loc2pos(yystack_[0].location));
1065 ctx.enter(ctx.NCR_PROTOCOL);
1067#line 1068 "d2_parser.cc"
1071#line 349 "d2_parser.yy"
1073 ctx.stack_.back()->set(
"ncr-protocol", yystack_[0].value.as <
ElementPtr > ());
1076#line 1077 "d2_parser.cc"
1080#line 355 "d2_parser.yy"
1082#line 1083 "d2_parser.cc"
1086#line 356 "d2_parser.yy"
1088#line 1089 "d2_parser.cc"
1092#line 359 "d2_parser.yy"
1094 ctx.unique(
"ncr-format", ctx.loc2pos(yystack_[0].location));
1095 ctx.enter(ctx.NCR_FORMAT);
1097#line 1098 "d2_parser.cc"
1101#line 362 "d2_parser.yy"
1104 ctx.stack_.back()->set(
"ncr-format", json);
1107#line 1108 "d2_parser.cc"
1111#line 368 "d2_parser.yy"
1113 ctx.enter(ctx.NO_KEYWORD);
1115#line 1116 "d2_parser.cc"
1119#line 370 "d2_parser.yy"
1128 if ((old->size() != 1) || !old->contains(
"comment")) {
1129 std::stringstream msg;
1130 msg <<
"duplicate user-context entries (previous at "
1131 << old->getPosition().str() <<
")";
1132 error(yystack_[3].location, msg.str());
1135 user_context->set(
"comment", old->get(
"comment"));
1139 parent->set(
"user-context", user_context);
1142#line 1143 "d2_parser.cc"
1146#line 393 "d2_parser.yy"
1148 ctx.enter(ctx.NO_KEYWORD);
1150#line 1151 "d2_parser.cc"
1154#line 395 "d2_parser.yy"
1158 ElementPtr comment(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1159 user_context->set(
"comment", comment);
1165 if (old->contains(
"comment")) {
1166 std::stringstream msg;
1167 msg <<
"duplicate user-context/comment entries (previous at "
1168 << old->getPosition().str() <<
")";
1169 error(yystack_[3].location, msg.str());
1172 merge(user_context, old);
1176 parent->set(
"user-context", user_context);
1179#line 1180 "d2_parser.cc"
1183#line 420 "d2_parser.yy"
1185 ctx.unique(
"forward-ddns", ctx.loc2pos(yystack_[0].location));
1187 ctx.stack_.back()->set(
"forward-ddns", m);
1188 ctx.stack_.push_back(m);
1189 ctx.enter(ctx.FORWARD_DDNS);
1191#line 1192 "d2_parser.cc"
1195#line 426 "d2_parser.yy"
1197 ctx.stack_.pop_back();
1200#line 1201 "d2_parser.cc"
1204#line 431 "d2_parser.yy"
1206 ctx.unique(
"reverse-ddns", ctx.loc2pos(yystack_[0].location));
1208 ctx.stack_.back()->set(
"reverse-ddns", m);
1209 ctx.stack_.push_back(m);
1210 ctx.enter(ctx.REVERSE_DDNS);
1212#line 1213 "d2_parser.cc"
1216#line 437 "d2_parser.yy"
1218 ctx.stack_.pop_back();
1221#line 1222 "d2_parser.cc"
1225#line 448 "d2_parser.yy"
1227 ctx.warnAboutExtraCommas(yystack_[0].location);
1229#line 1230 "d2_parser.cc"
1233#line 459 "d2_parser.yy"
1235 ctx.unique(
"ddns-domains", ctx.loc2pos(yystack_[0].location));
1237 ctx.stack_.back()->set(
"ddns-domains", l);
1238 ctx.stack_.push_back(l);
1239 ctx.enter(ctx.DDNS_DOMAINS);
1241#line 1242 "d2_parser.cc"
1245#line 465 "d2_parser.yy"
1247 ctx.stack_.pop_back();
1250#line 1251 "d2_parser.cc"
1254#line 470 "d2_parser.yy"
1257 ctx.stack_.push_back(l);
1259#line 1260 "d2_parser.cc"
1263#line 473 "d2_parser.yy"
1267#line 1268 "d2_parser.cc"
1271#line 483 "d2_parser.yy"
1273 ctx.warnAboutExtraCommas(yystack_[0].location);
1275#line 1276 "d2_parser.cc"
1279#line 488 "d2_parser.yy"
1282 ctx.stack_.back()->add(m);
1283 ctx.stack_.push_back(m);
1285#line 1286 "d2_parser.cc"
1289#line 492 "d2_parser.yy"
1291 ctx.stack_.pop_back();
1293#line 1294 "d2_parser.cc"
1297#line 496 "d2_parser.yy"
1300 ctx.stack_.push_back(m);
1302#line 1303 "d2_parser.cc"
1306#line 499 "d2_parser.yy"
1310#line 1311 "d2_parser.cc"
1314#line 505 "d2_parser.yy"
1316 ctx.warnAboutExtraCommas(yystack_[0].location);
1318#line 1319 "d2_parser.cc"
1322#line 519 "d2_parser.yy"
1324 ctx.unique(
"name", ctx.loc2pos(yystack_[0].location));
1325 ctx.enter(ctx.NO_KEYWORD);
1327#line 1328 "d2_parser.cc"
1331#line 522 "d2_parser.yy"
1333 if (yystack_[0].value.as < std::string > () ==
"") {
1334 error(yystack_[1].location,
"Ddns domain name cannot be blank");
1336 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1338 ctx.stack_.back()->set(
"name",
name);
1341#line 1342 "d2_parser.cc"
1345#line 532 "d2_parser.yy"
1347 ctx.unique(
"key-name", ctx.loc2pos(yystack_[0].location));
1348 ctx.enter(ctx.NO_KEYWORD);
1350#line 1351 "d2_parser.cc"
1354#line 535 "d2_parser.yy"
1356 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1358 ctx.stack_.back()->set(
"key-name",
name);
1361#line 1362 "d2_parser.cc"
1365#line 545 "d2_parser.yy"
1367 ctx.unique(
"dns-servers", ctx.loc2pos(yystack_[0].location));
1369 ctx.stack_.back()->set(
"dns-servers", l);
1370 ctx.stack_.push_back(l);
1371 ctx.enter(ctx.DNS_SERVERS);
1373#line 1374 "d2_parser.cc"
1377#line 551 "d2_parser.yy"
1379 ctx.stack_.pop_back();
1382#line 1383 "d2_parser.cc"
1386#line 556 "d2_parser.yy"
1389 ctx.stack_.push_back(l);
1391#line 1392 "d2_parser.cc"
1395#line 559 "d2_parser.yy"
1399#line 1400 "d2_parser.cc"
1403#line 565 "d2_parser.yy"
1405 ctx.warnAboutExtraCommas(yystack_[0].location);
1407#line 1408 "d2_parser.cc"
1411#line 570 "d2_parser.yy"
1414 ctx.stack_.back()->add(m);
1415 ctx.stack_.push_back(m);
1417#line 1418 "d2_parser.cc"
1421#line 574 "d2_parser.yy"
1423 ctx.stack_.pop_back();
1425#line 1426 "d2_parser.cc"
1429#line 578 "d2_parser.yy"
1432 ctx.stack_.push_back(m);
1434#line 1435 "d2_parser.cc"
1438#line 581 "d2_parser.yy"
1442#line 1443 "d2_parser.cc"
1446#line 587 "d2_parser.yy"
1448 ctx.warnAboutExtraCommas(yystack_[0].location);
1450#line 1451 "d2_parser.cc"
1454#line 601 "d2_parser.yy"
1456 ctx.unique(
"hostname", ctx.loc2pos(yystack_[0].location));
1457 ctx.enter(ctx.NO_KEYWORD);
1459#line 1460 "d2_parser.cc"
1463#line 604 "d2_parser.yy"
1465 if (yystack_[0].value.as < std::string > () !=
"") {
1466 error(yystack_[1].location,
"hostname is not yet supported");
1468 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1470 ctx.stack_.back()->set(
"hostname",
name);
1473#line 1474 "d2_parser.cc"
1477#line 614 "d2_parser.yy"
1479 ctx.unique(
"ip-address", ctx.loc2pos(yystack_[0].location));
1480 ctx.enter(ctx.NO_KEYWORD);
1482#line 1483 "d2_parser.cc"
1486#line 617 "d2_parser.yy"
1489 ctx.stack_.back()->set(
"ip-address", s);
1492#line 1493 "d2_parser.cc"
1496#line 623 "d2_parser.yy"
1498 ctx.unique(
"port", ctx.loc2pos(yystack_[2].location));
1499 if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
1500 error(yystack_[0].location,
"port must be greater than zero but less than 65536");
1502 ElementPtr i(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1503 ctx.stack_.back()->set(
"port", i);
1505#line 1506 "d2_parser.cc"
1509#line 638 "d2_parser.yy"
1511 ctx.unique(
"tsig-keys", ctx.loc2pos(yystack_[0].location));
1513 ctx.stack_.back()->set(
"tsig-keys", l);
1514 ctx.stack_.push_back(l);
1515 ctx.enter(ctx.TSIG_KEYS);
1517#line 1518 "d2_parser.cc"
1521#line 644 "d2_parser.yy"
1523 ctx.stack_.pop_back();
1526#line 1527 "d2_parser.cc"
1530#line 649 "d2_parser.yy"
1533 ctx.stack_.push_back(l);
1535#line 1536 "d2_parser.cc"
1539#line 652 "d2_parser.yy"
1543#line 1544 "d2_parser.cc"
1547#line 662 "d2_parser.yy"
1549 ctx.warnAboutExtraCommas(yystack_[0].location);
1551#line 1552 "d2_parser.cc"
1555#line 667 "d2_parser.yy"
1558 ctx.stack_.back()->add(m);
1559 ctx.stack_.push_back(m);
1561#line 1562 "d2_parser.cc"
1565#line 671 "d2_parser.yy"
1567 ctx.stack_.pop_back();
1569#line 1570 "d2_parser.cc"
1573#line 675 "d2_parser.yy"
1577 ctx.stack_.push_back(m);
1579#line 1580 "d2_parser.cc"
1583#line 679 "d2_parser.yy"
1587#line 1588 "d2_parser.cc"
1591#line 686 "d2_parser.yy"
1593 ctx.warnAboutExtraCommas(yystack_[0].location);
1595#line 1596 "d2_parser.cc"
1599#line 701 "d2_parser.yy"
1601 ctx.unique(
"name", ctx.loc2pos(yystack_[0].location));
1602 ctx.enter(ctx.NO_KEYWORD);
1604#line 1605 "d2_parser.cc"
1608#line 704 "d2_parser.yy"
1610 if (yystack_[0].value.as < std::string > () ==
"") {
1611 error(yystack_[1].location,
"TSIG key name cannot be blank");
1613 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1615 ctx.stack_.back()->set(
"name",
name);
1618#line 1619 "d2_parser.cc"
1622#line 714 "d2_parser.yy"
1624 ctx.unique(
"algorithm", ctx.loc2pos(yystack_[0].location));
1625 ctx.enter(ctx.NO_KEYWORD);
1627#line 1628 "d2_parser.cc"
1631#line 717 "d2_parser.yy"
1633 if (yystack_[0].value.as < std::string > () ==
"") {
1634 error(yystack_[1].location,
"TSIG key algorithm cannot be blank");
1636 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1637 ctx.stack_.back()->set(
"algorithm", elem);
1640#line 1641 "d2_parser.cc"
1644#line 726 "d2_parser.yy"
1646 ctx.unique(
"digest-bits", ctx.loc2pos(yystack_[2].location));
1647 if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0 && (yystack_[0].value.as < int64_t > () % 8 != 0))) {
1648 error(yystack_[0].location,
"TSIG key digest-bits must either be zero or a positive, multiple of eight");
1650 ElementPtr elem(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1651 ctx.stack_.back()->set(
"digest-bits", elem);
1653#line 1654 "d2_parser.cc"
1657#line 735 "d2_parser.yy"
1659 ctx.unique(
"secret", ctx.loc2pos(yystack_[0].location));
1660 ctx.unique(
"secret-file", ctx.loc2pos(yystack_[0].location));
1661 ctx.enter(ctx.NO_KEYWORD);
1663#line 1664 "d2_parser.cc"
1667#line 739 "d2_parser.yy"
1669 if (yystack_[0].value.as < std::string > () ==
"") {
1670 error(yystack_[1].location,
"TSIG key secret cannot be blank");
1672 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1673 ctx.stack_.back()->set(
"secret", elem);
1676#line 1677 "d2_parser.cc"
1680#line 748 "d2_parser.yy"
1682 ctx.unique(
"secret", ctx.loc2pos(yystack_[0].location));
1683 ctx.unique(
"secret-file", ctx.loc2pos(yystack_[0].location));
1684 ctx.enter(ctx.NO_KEYWORD);
1686#line 1687 "d2_parser.cc"
1690#line 752 "d2_parser.yy"
1692 if (yystack_[0].value.as < std::string > () ==
"") {
1693 error(yystack_[1].location,
"TSIG key secret file name cannot be blank");
1695 ElementPtr elem(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1696 ctx.stack_.back()->set(
"secret-file", elem);
1699#line 1700 "d2_parser.cc"
1703#line 766 "d2_parser.yy"
1705 ctx.unique(
"control-sockets", ctx.loc2pos(yystack_[0].location));
1707 ctx.stack_.back()->set(
"control-sockets", l);
1708 ctx.stack_.push_back(l);
1709 ctx.enter(ctx.CONTROL_SOCKETS);
1711#line 1712 "d2_parser.cc"
1715#line 772 "d2_parser.yy"
1717 ctx.stack_.pop_back();
1720#line 1721 "d2_parser.cc"
1724#line 783 "d2_parser.yy"
1726 ctx.warnAboutExtraCommas(yystack_[0].location);
1728#line 1729 "d2_parser.cc"
1732#line 788 "d2_parser.yy"
1735 ctx.stack_.back()->add(m);
1736 ctx.stack_.push_back(m);
1738#line 1739 "d2_parser.cc"
1742#line 792 "d2_parser.yy"
1744 ctx.stack_.pop_back();
1746#line 1747 "d2_parser.cc"
1750#line 798 "d2_parser.yy"
1752 ctx.warnAboutExtraCommas(yystack_[0].location);
1754#line 1755 "d2_parser.cc"
1758#line 817 "d2_parser.yy"
1760 ctx.unique(
"socket-type", ctx.loc2pos(yystack_[0].location));
1761 ctx.enter(ctx.CONTROL_SOCKET_TYPE);
1763#line 1764 "d2_parser.cc"
1767#line 820 "d2_parser.yy"
1769 ctx.stack_.back()->set(
"socket-type", yystack_[0].value.as <
ElementPtr > ());
1772#line 1773 "d2_parser.cc"
1776#line 826 "d2_parser.yy"
1778#line 1779 "d2_parser.cc"
1782#line 827 "d2_parser.yy"
1784#line 1785 "d2_parser.cc"
1788#line 828 "d2_parser.yy"
1790#line 1791 "d2_parser.cc"
1794#line 831 "d2_parser.yy"
1796 ctx.unique(
"socket-name", ctx.loc2pos(yystack_[0].location));
1797 ctx.unique(
"socket-address", ctx.loc2pos(yystack_[0].location));
1798 ctx.enter(ctx.NO_KEYWORD);
1800#line 1801 "d2_parser.cc"
1804#line 835 "d2_parser.yy"
1807 ctx.stack_.back()->set(
"socket-name",
name);
1810#line 1811 "d2_parser.cc"
1814#line 841 "d2_parser.yy"
1816 ctx.unique(
"socket-address", ctx.loc2pos(yystack_[0].location));
1817 ctx.unique(
"socket-name", ctx.loc2pos(yystack_[0].location));
1818 ctx.enter(ctx.NO_KEYWORD);
1820#line 1821 "d2_parser.cc"
1824#line 845 "d2_parser.yy"
1826 ElementPtr address(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1827 ctx.stack_.back()->set(
"socket-address", address);
1830#line 1831 "d2_parser.cc"
1834#line 851 "d2_parser.yy"
1836 ctx.unique(
"socket-port", ctx.loc2pos(yystack_[2].location));
1837 ElementPtr port(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1838 ctx.stack_.back()->set(
"socket-port", port);
1840#line 1841 "d2_parser.cc"
1844#line 857 "d2_parser.yy"
1846 ctx.unique(
"trust-anchor", ctx.loc2pos(yystack_[0].location));
1847 ctx.enter(ctx.NO_KEYWORD);
1849#line 1850 "d2_parser.cc"
1853#line 860 "d2_parser.yy"
1856 ctx.stack_.back()->set(
"trust-anchor", ca);
1859#line 1860 "d2_parser.cc"
1863#line 866 "d2_parser.yy"
1865 ctx.unique(
"cert-file", ctx.loc2pos(yystack_[0].location));
1866 ctx.enter(ctx.NO_KEYWORD);
1868#line 1869 "d2_parser.cc"
1872#line 869 "d2_parser.yy"
1874 ElementPtr cert(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1875 ctx.stack_.back()->set(
"cert-file", cert);
1878#line 1879 "d2_parser.cc"
1882#line 875 "d2_parser.yy"
1884 ctx.unique(
"key-file", ctx.loc2pos(yystack_[0].location));
1885 ctx.enter(ctx.NO_KEYWORD);
1887#line 1888 "d2_parser.cc"
1891#line 878 "d2_parser.yy"
1893 ElementPtr key(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1894 ctx.stack_.back()->set(
"key-file", key);
1897#line 1898 "d2_parser.cc"
1901#line 884 "d2_parser.yy"
1903 ctx.unique(
"cert-required", ctx.loc2pos(yystack_[2].location));
1904 ElementPtr req(
new BoolElement(yystack_[0].value.as <
bool > (), ctx.loc2pos(yystack_[0].location)));
1905 ctx.stack_.back()->set(
"cert-required", req);
1907#line 1908 "d2_parser.cc"
1911#line 892 "d2_parser.yy"
1913 ctx.unique(
"authentication", ctx.loc2pos(yystack_[0].location));
1915 ctx.stack_.back()->set(
"authentication", m);
1916 ctx.stack_.push_back(m);
1917 ctx.enter(ctx.AUTHENTICATION);
1919#line 1920 "d2_parser.cc"
1923#line 898 "d2_parser.yy"
1926 ctx.require(
"type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
1927 ctx.stack_.pop_back();
1930#line 1931 "d2_parser.cc"
1934#line 907 "d2_parser.yy"
1936 ctx.warnAboutExtraCommas(yystack_[0].location);
1938#line 1939 "d2_parser.cc"
1942#line 921 "d2_parser.yy"
1944 ctx.unique(
"type", ctx.loc2pos(yystack_[0].location));
1945 ctx.enter(ctx.AUTH_TYPE);
1947#line 1948 "d2_parser.cc"
1951#line 924 "d2_parser.yy"
1953 ctx.stack_.back()->set(
"type", yystack_[0].value.as <
ElementPtr > ());
1956#line 1957 "d2_parser.cc"
1960#line 929 "d2_parser.yy"
1962#line 1963 "d2_parser.cc"
1966#line 932 "d2_parser.yy"
1968 ctx.unique(
"realm", ctx.loc2pos(yystack_[0].location));
1969 ctx.enter(ctx.NO_KEYWORD);
1971#line 1972 "d2_parser.cc"
1975#line 935 "d2_parser.yy"
1977 ElementPtr realm(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1978 ctx.stack_.back()->set(
"realm", realm);
1981#line 1982 "d2_parser.cc"
1985#line 941 "d2_parser.yy"
1987 ctx.unique(
"directory", ctx.loc2pos(yystack_[0].location));
1988 ctx.enter(ctx.NO_KEYWORD);
1990#line 1991 "d2_parser.cc"
1994#line 944 "d2_parser.yy"
1996 ElementPtr directory(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1997 ctx.stack_.back()->set(
"directory", directory);
2000#line 2001 "d2_parser.cc"
2004#line 950 "d2_parser.yy"
2006 ctx.unique(
"clients", ctx.loc2pos(yystack_[0].location));
2008 ctx.stack_.back()->set(
"clients", l);
2009 ctx.stack_.push_back(l);
2010 ctx.enter(ctx.CLIENTS);
2012#line 2013 "d2_parser.cc"
2016#line 956 "d2_parser.yy"
2018 ctx.stack_.pop_back();
2021#line 2022 "d2_parser.cc"
2025#line 967 "d2_parser.yy"
2027 ctx.warnAboutExtraCommas(yystack_[0].location);
2029#line 2030 "d2_parser.cc"
2033#line 972 "d2_parser.yy"
2036 ctx.stack_.back()->add(m);
2037 ctx.stack_.push_back(m);
2039#line 2040 "d2_parser.cc"
2043#line 976 "d2_parser.yy"
2045 ctx.stack_.pop_back();
2047#line 2048 "d2_parser.cc"
2051#line 982 "d2_parser.yy"
2053 ctx.warnAboutExtraCommas(yystack_[0].location);
2055#line 2056 "d2_parser.cc"
2059#line 996 "d2_parser.yy"
2061 ctx.unique(
"user", ctx.loc2pos(yystack_[0].location));
2062 ctx.enter(ctx.NO_KEYWORD);
2064#line 2065 "d2_parser.cc"
2068#line 999 "d2_parser.yy"
2070 ElementPtr user(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2071 ctx.stack_.back()->set(
"user", user);
2074#line 2075 "d2_parser.cc"
2078#line 1005 "d2_parser.yy"
2080 ctx.unique(
"user-file", ctx.loc2pos(yystack_[0].location));
2081 ctx.enter(ctx.NO_KEYWORD);
2083#line 2084 "d2_parser.cc"
2087#line 1008 "d2_parser.yy"
2089 ElementPtr user(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2090 ctx.stack_.back()->set(
"user-file", user);
2093#line 2094 "d2_parser.cc"
2097#line 1014 "d2_parser.yy"
2099 ctx.unique(
"password", ctx.loc2pos(yystack_[0].location));
2100 ctx.enter(ctx.NO_KEYWORD);
2102#line 2103 "d2_parser.cc"
2106#line 1017 "d2_parser.yy"
2108 ElementPtr pwd(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2109 ctx.stack_.back()->set(
"password", pwd);
2112#line 2113 "d2_parser.cc"
2116#line 1023 "d2_parser.yy"
2118 ctx.unique(
"password-file", ctx.loc2pos(yystack_[0].location));
2119 ctx.enter(ctx.NO_KEYWORD);
2121#line 2122 "d2_parser.cc"
2125#line 1026 "d2_parser.yy"
2127 ElementPtr password(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2128 ctx.stack_.back()->set(
"password-file", password);
2131#line 2132 "d2_parser.cc"
2135#line 1034 "d2_parser.yy"
2137 ctx.unique(
"hooks-libraries", ctx.loc2pos(yystack_[0].location));
2139 ctx.stack_.back()->set(
"hooks-libraries", l);
2140 ctx.stack_.push_back(l);
2141 ctx.enter(ctx.HOOKS_LIBRARIES);
2143#line 2144 "d2_parser.cc"
2147#line 1040 "d2_parser.yy"
2149 ctx.stack_.pop_back();
2152#line 2153 "d2_parser.cc"
2156#line 1051 "d2_parser.yy"
2158 ctx.warnAboutExtraCommas(yystack_[0].location);
2160#line 2161 "d2_parser.cc"
2164#line 1056 "d2_parser.yy"
2167 ctx.stack_.back()->add(m);
2168 ctx.stack_.push_back(m);
2170#line 2171 "d2_parser.cc"
2174#line 1060 "d2_parser.yy"
2177 ctx.require(
"library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2178 ctx.stack_.pop_back();
2180#line 2181 "d2_parser.cc"
2184#line 1066 "d2_parser.yy"
2188 ctx.stack_.push_back(m);
2190#line 2191 "d2_parser.cc"
2194#line 1070 "d2_parser.yy"
2197 ctx.require(
"library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2200#line 2201 "d2_parser.cc"
2204#line 1078 "d2_parser.yy"
2206 ctx.warnAboutExtraCommas(yystack_[0].location);
2208#line 2209 "d2_parser.cc"
2212#line 1088 "d2_parser.yy"
2214 ctx.unique(
"library", ctx.loc2pos(yystack_[0].location));
2215 ctx.enter(ctx.NO_KEYWORD);
2217#line 2218 "d2_parser.cc"
2221#line 1091 "d2_parser.yy"
2223 ElementPtr lib(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2224 ctx.stack_.back()->set(
"library", lib);
2227#line 2228 "d2_parser.cc"
2231#line 1097 "d2_parser.yy"
2233 ctx.unique(
"parameters", ctx.loc2pos(yystack_[0].location));
2234 ctx.enter(ctx.NO_KEYWORD);
2236#line 2237 "d2_parser.cc"
2240#line 1100 "d2_parser.yy"
2242 ctx.stack_.back()->set(
"parameters", yystack_[0].value.as <
ElementPtr > ());
2245#line 2246 "d2_parser.cc"
2249#line 1107 "d2_parser.yy"
2251 ctx.unique(
"loggers", ctx.loc2pos(yystack_[0].location));
2253 ctx.stack_.back()->set(
"loggers", l);
2254 ctx.stack_.push_back(l);
2255 ctx.enter(ctx.LOGGERS);
2257#line 2258 "d2_parser.cc"
2261#line 1113 "d2_parser.yy"
2263 ctx.stack_.pop_back();
2266#line 2267 "d2_parser.cc"
2270#line 1122 "d2_parser.yy"
2272 ctx.warnAboutExtraCommas(yystack_[0].location);
2274#line 2275 "d2_parser.cc"
2278#line 1128 "d2_parser.yy"
2281 ctx.stack_.back()->add(l);
2282 ctx.stack_.push_back(l);
2284#line 2285 "d2_parser.cc"
2288#line 1132 "d2_parser.yy"
2290 ctx.stack_.pop_back();
2292#line 2293 "d2_parser.cc"
2296#line 1138 "d2_parser.yy"
2298 ctx.warnAboutExtraCommas(yystack_[0].location);
2300#line 2301 "d2_parser.cc"
2304#line 1152 "d2_parser.yy"
2306 ctx.unique(
"name", ctx.loc2pos(yystack_[0].location));
2307 ctx.enter(ctx.NO_KEYWORD);
2309#line 2310 "d2_parser.cc"
2313#line 1155 "d2_parser.yy"
2316 ctx.stack_.back()->set(
"name",
name);
2319#line 2320 "d2_parser.cc"
2323#line 1161 "d2_parser.yy"
2325 ctx.unique(
"debuglevel", ctx.loc2pos(yystack_[2].location));
2326 ElementPtr dl(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2327 ctx.stack_.back()->set(
"debuglevel", dl);
2329#line 2330 "d2_parser.cc"
2333#line 1167 "d2_parser.yy"
2335 ctx.unique(
"severity", ctx.loc2pos(yystack_[0].location));
2336 ctx.enter(ctx.NO_KEYWORD);
2338#line 2339 "d2_parser.cc"
2342#line 1170 "d2_parser.yy"
2344 ElementPtr sev(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2345 ctx.stack_.back()->set(
"severity", sev);
2348#line 2349 "d2_parser.cc"
2352#line 1176 "d2_parser.yy"
2354 ctx.unique(
"output-options", ctx.loc2pos(yystack_[0].location));
2356 ctx.stack_.back()->set(
"output-options", l);
2357 ctx.stack_.push_back(l);
2358 ctx.enter(ctx.OUTPUT_OPTIONS);
2360#line 2361 "d2_parser.cc"
2364#line 1182 "d2_parser.yy"
2366 ctx.stack_.pop_back();
2369#line 2370 "d2_parser.cc"
2373#line 1189 "d2_parser.yy"
2375 ctx.warnAboutExtraCommas(yystack_[0].location);
2377#line 2378 "d2_parser.cc"
2381#line 1194 "d2_parser.yy"
2384 ctx.stack_.back()->add(m);
2385 ctx.stack_.push_back(m);
2387#line 2388 "d2_parser.cc"
2391#line 1198 "d2_parser.yy"
2393 ctx.stack_.pop_back();
2395#line 2396 "d2_parser.cc"
2399#line 1204 "d2_parser.yy"
2401 ctx.warnAboutExtraCommas(yystack_[0].location);
2403#line 2404 "d2_parser.cc"
2407#line 1216 "d2_parser.yy"
2409 ctx.unique(
"output", ctx.loc2pos(yystack_[0].location));
2410 ctx.enter(ctx.NO_KEYWORD);
2412#line 2413 "d2_parser.cc"
2416#line 1219 "d2_parser.yy"
2418 ElementPtr sev(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2419 ctx.stack_.back()->set(
"output", sev);
2422#line 2423 "d2_parser.cc"
2426#line 1225 "d2_parser.yy"
2428 ctx.unique(
"flush", ctx.loc2pos(yystack_[2].location));
2429 ElementPtr flush(
new BoolElement(yystack_[0].value.as <
bool > (), ctx.loc2pos(yystack_[0].location)));
2430 ctx.stack_.back()->set(
"flush", flush);
2432#line 2433 "d2_parser.cc"
2436#line 1231 "d2_parser.yy"
2438 ctx.unique(
"maxsize", ctx.loc2pos(yystack_[2].location));
2439 ElementPtr maxsize(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2440 ctx.stack_.back()->set(
"maxsize", maxsize);
2442#line 2443 "d2_parser.cc"
2446#line 1237 "d2_parser.yy"
2448 ctx.unique(
"maxver", ctx.loc2pos(yystack_[2].location));
2449 ElementPtr maxver(
new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2450 ctx.stack_.back()->set(
"maxver", maxver);
2452#line 2453 "d2_parser.cc"
2456#line 1243 "d2_parser.yy"
2458 ctx.unique(
"pattern", ctx.loc2pos(yystack_[0].location));
2459 ctx.enter(ctx.NO_KEYWORD);
2461#line 2462 "d2_parser.cc"
2465#line 1246 "d2_parser.yy"
2467 ElementPtr sev(
new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2468 ctx.stack_.back()->set(
"pattern", sev);
2471#line 2472 "d2_parser.cc"
2475#line 2476 "d2_parser.cc"
2484 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
2494 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
2508 std::string msg = yysyntax_error_ (yyctx);
2514 if (yyerrstatus_ == 3)
2522 else if (!yyla.
empty ())
2524 yy_destroy_ (
"Error: discarding", yyla);
2558 yyn = yypact_[+yystack_[0].state];
2559 if (!yy_pact_value_is_default_ (yyn))
2562 if (0 <= yyn && yyn <= yylast_
2565 yyn = yytable_[yyn];
2572 if (yystack_.size () == 1)
2575 yyerror_range[1].
location = yystack_[0].location;
2576 yy_destroy_ (
"Error: popping", yystack_[0]);
2581 stack_symbol_type error_token;
2587 error_token.state = state_type (yyn);
2588 yypush_ (
"Shifting",
YY_MOVE (error_token));
2614 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
2620 while (1 < yystack_.size ())
2622 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
2631 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
2635 yy_destroy_ (YY_NULLPTR, yyla);
2637 while (1 < yystack_.size ())
2639 yy_destroy_ (YY_NULLPTR, yystack_[0]);
2659 D2Parser::yytnamerr_ (
const char *yystr)
2664 char const *yyp = yystr;
2671 goto do_not_strip_quotes;
2675 goto do_not_strip_quotes;
2687 do_not_strip_quotes: ;
2696 return yytnamerr_ (yytname_[yysymbol]);
2703 : yyparser_ (yyparser)
2713 const int yyn = yypact_[+yyparser_.yystack_[0].state];
2714 if (!yy_pact_value_is_default_ (yyn))
2719 const int yyxbegin = yyn < 0 ? -yyn : 0;
2721 const int yychecklim = yylast_ - yyn + 1;
2723 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
2725 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
2729 else if (yycount == yyargn)
2736 if (yyarg && yycount == 0 && 0 < yyargn)
2747 D2Parser::yy_syntax_error_arguments_ (
const context& yyctx,
2778 yyarg[0] = yyctx.
token ();
2779 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
2787 D2Parser::yysyntax_error_ (
const context& yyctx)
const
2790 enum { YYARGS_MAX = 5 };
2793 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
2795 char const* yyformat = YY_NULLPTR;
2798#define YYCASE_(N, S) \
2804 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
2805 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
2806 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
2807 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
2808 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2814 std::ptrdiff_t yyi = 0;
2815 for (
char const* yyp = yyformat; *yyp; ++yyp)
2816 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
2827 const short D2Parser::yypact_ninf_ = -200;
2829 const signed char D2Parser::yytable_ninf_ = -1;
2832 D2Parser::yypact_[] =
2834 100, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2835 -200, 23, 8, 1, 24, 39, 84, 83, 87, 96,
2836 99, 108, -200, -200, -200, -200, -200, -200, -200, -200,
2837 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2838 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2839 -200, -200, 8, -27, 116, 7, 43, 121, 86, 122,
2840 21, 123, -12, -200, 140, 149, 154, 156, 159, -200,
2841 22, -200, -200, 161, 174, -200, -200, -200, -200, -200,
2842 -200, -200, -200, -200, -200, 195, -200, 67, -200, -200,
2843 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2844 -200, -200, -200, 202, -200, -200, -200, -200, -200, -200,
2845 75, -200, -200, -200, -200, -200, -200, -200, 203, 208,
2846 -200, -200, -200, -200, -200, -200, -200, 94, -200, -200,
2847 -200, -200, -200, 206, 210, -200, -200, 211, -200, -200,
2848 -200, -200, -200, 104, -200, -200, -200, -200, -200, 4,
2849 -200, -200, -200, -200, 110, -200, -200, -200, -200, 8,
2850 8, -200, 137, 212, -200, -200, 213, 120, 141, 214,
2851 216, 217, 218, 219, 220, 221, 222, 223, 224, -200,
2852 7, -200, 225, 153, 226, 228, 229, 43, -200, 43,
2853 -200, 121, 230, 231, 232, 86, -200, 86, -200, 122,
2854 233, 160, 235, 21, -200, 21, 123, -200, 236, 237,
2855 3, -200, -200, -200, 238, 239, 166, -200, -200, 66,
2856 227, 240, 167, 241, 242, 245, 247, 248, 249, -200,
2857 180, -200, 187, 188, 189, -200, 111, -200, 191, 254,
2858 197, -200, 119, -200, 198, -200, 199, -200, 152, -200,
2859 200, 240, -200, 8, 7, -200, -200, -200, -200, -200,
2860 -200, -200, -200, 19, 19, 121, 253, 256, 262, -200,
2861 -200, -200, -200, -200, -200, 123, -200, -200, -200, -200,
2862 -200, -200, -200, -200, 176, -200, -200, 182, -200, -200,
2863 -200, 183, 264, -200, 265, 269, -200, -200, 272, 276,
2864 -200, -200, 45, -200, 54, -200, 277, 19, -200, -200,
2865 -200, 16, -200, 253, -12, -200, 256, 18, 262, -200,
2866 -200, 275, -200, -200, -200, -200, 278, -200, -200, -200,
2867 -200, 279, -200, -200, -200, 184, -200, -200, -200, -200,
2868 -200, -200, -200, -200, -200, -200, -200, 185, -200, -200,
2869 -200, 280, -200, -200, -200, -200, 186, -200, -200, -200,
2870 -200, -200, -200, 122, 281, 282, 283, 215, 284, 285,
2871 286, 287, 234, 16, -200, -200, 288, 290, 243, 291,
2872 18, -200, 292, 169, 246, 250, -200, 289, 251, 255,
2873 257, -200, -200, 258, 294, -200, 260, -200, -200, -200,
2874 -200, -200, -200, -200, -200, 80, -200, -200, -200, -200,
2875 293, -200, -200, -200, -200, -200, -200, -200, -200, 192,
2876 -200, -200, -200, -200, -200, -200, 88, -200, 297, 298,
2877 299, 300, 80, -200, 117, 293, -200, 263, 261, 266,
2878 301, -200, -200, 303, 304, 305, -200, 193, -200, -200,
2879 -200, -200, -200, -200, -200, -200, -200, -200, -200, 306,
2880 307, 259, 244, 252, 308, 117, -200, -200, 309, 313,
2881 -200, 267, -200, -200, -200, 268, -200, 89, -200, 306,
2882 -200, -200, -200, -200, -200, -200, -200, -200, -200, 194,
2883 -200, -200, -200, -200, -200, -200, 315, 316, 322, 327,
2884 89, -200, 270, 271, 274, 295, -200, -200, -200, -200,
2889 D2Parser::yydefact_[] =
2891 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
2892 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2893 0, 0, 1, 38, 30, 26, 25, 22, 23, 24,
2894 29, 3, 27, 28, 46, 5, 52, 7, 159, 9,
2895 150, 11, 107, 13, 98, 15, 131, 17, 124, 19,
2896 277, 21, 40, 33, 0, 0, 0, 152, 0, 100,
2897 0, 0, 0, 42, 0, 41, 0, 0, 34, 48,
2898 0, 50, 71, 0, 0, 75, 79, 81, 83, 85,
2899 87, 148, 181, 268, 289, 0, 70, 0, 54, 57,
2900 58, 59, 60, 61, 68, 69, 62, 63, 64, 65,
2901 66, 67, 174, 0, 177, 179, 172, 171, 169, 170,
2902 0, 161, 164, 165, 166, 167, 168, 157, 0, 153,
2903 154, 120, 122, 118, 117, 115, 116, 0, 109, 112,
2904 113, 114, 105, 0, 101, 102, 145, 0, 143, 142,
2905 140, 141, 139, 0, 133, 136, 137, 138, 129, 0,
2906 126, 285, 287, 282, 0, 279, 283, 284, 39, 44,
2907 0, 31, 37, 0, 51, 47, 0, 0, 0, 0,
2908 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
2909 56, 53, 0, 0, 0, 0, 0, 163, 160, 0,
2910 151, 156, 0, 0, 0, 111, 108, 0, 99, 104,
2911 0, 0, 0, 135, 132, 0, 128, 125, 0, 0,
2912 281, 278, 43, 35, 0, 0, 0, 73, 74, 0,
2913 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
2914 0, 176, 0, 0, 0, 162, 0, 155, 0, 0,
2915 0, 110, 0, 103, 0, 147, 0, 134, 0, 127,
2916 0, 0, 280, 0, 0, 72, 77, 78, 76, 80,
2917 32, 82, 84, 89, 89, 152, 183, 270, 0, 175,
2918 178, 180, 173, 158, 121, 0, 119, 106, 146, 144,
2919 130, 286, 288, 36, 0, 96, 95, 0, 90, 91,
2920 94, 0, 0, 188, 0, 184, 185, 275, 0, 271,
2921 272, 294, 0, 291, 0, 49, 0, 93, 86, 88,
2922 149, 0, 182, 187, 0, 269, 274, 0, 293, 290,
2923 123, 0, 92, 205, 210, 212, 0, 222, 215, 217,
2924 219, 0, 204, 202, 203, 0, 190, 193, 194, 195,
2925 196, 198, 199, 200, 201, 197, 186, 0, 273, 306,
2926 311, 0, 309, 305, 303, 304, 0, 296, 299, 301,
2927 302, 300, 292, 100, 0, 0, 0, 0, 0, 0,
2928 0, 0, 0, 192, 189, 276, 0, 0, 0, 0,
2929 298, 295, 0, 0, 0, 0, 214, 0, 0, 0,
2930 0, 221, 191, 0, 0, 308, 0, 297, 97, 207,
2931 208, 209, 206, 211, 213, 0, 216, 218, 220, 307,
2932 0, 310, 234, 237, 239, 241, 233, 232, 231, 0,
2933 224, 227, 228, 229, 230, 316, 0, 313, 0, 0,
2934 0, 0, 226, 223, 0, 315, 312, 0, 0, 0,
2935 0, 225, 326, 0, 0, 0, 331, 0, 318, 321,
2936 322, 323, 324, 325, 314, 236, 235, 238, 240, 243,
2937 0, 0, 0, 0, 0, 320, 317, 248, 0, 244,
2938 245, 0, 328, 329, 330, 0, 319, 0, 242, 247,
2939 327, 332, 260, 262, 264, 266, 259, 257, 258, 0,
2940 250, 253, 254, 255, 256, 246, 0, 0, 0, 0,
2941 252, 249, 0, 0, 0, 0, 251, 261, 263, 265,
2946 D2Parser::yypgoto_[] =
2948 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2949 -200, -200, -43, -200, -199, -200, 46, -200, -200, -200,
2950 -200, -200, -200, -56, -200, -200, -200, -200, -200, -200,
2951 -200, 56, 162, -200, -200, -200, -200, -200, -200, -200,
2952 -200, -200, -55, -200, -44, -200, -200, -200, -200, -200,
2953 69, -200, 33, -200, -200, -200, -200, -22, -200, 147,
2954 -200, -200, -200, 155, 158, -200, -200, -49, -200, -200,
2955 -200, -200, -200, 79, 150, -200, -200, -200, 157, 163,
2956 -200, -200, -200, -200, -200, -200, -200, -200, -200, 90,
2957 -200, 168, -200, -200, -200, 171, 170, -200, -200, -200,
2958 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2959 50, -200, -200, -15, -200, -200, -200, -200, -200, -200,
2960 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2961 -200, -200, -68, -200, -200, -200, -200, -200, -200, -200,
2962 -200, -200, -200, -200, -114, -200, -200, -133, -200, -200,
2963 -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
2964 52, -200, -200, -200, 55, 164, -200, -200, -200, -200,
2965 -200, -200, -200, 53, -200, -200, -10, -200, -200, -200,
2966 -200, -200, -200, -200, -200, -62, -200, -200, -90, -200,
2967 -200, -200, -200, -200, -200, -200
2971 D2Parser::yydefgoto_[] =
2973 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2974 20, 21, 30, 31, 32, 53, 261, 67, 68, 33,
2975 52, 64, 65, 86, 35, 54, 70, 163, 71, 37,
2976 55, 87, 88, 89, 166, 90, 91, 92, 169, 258,
2977 93, 170, 94, 171, 95, 172, 96, 173, 97, 174,
2978 287, 288, 289, 290, 306, 45, 59, 133, 134, 135,
2979 197, 43, 58, 127, 128, 129, 194, 130, 192, 131,
2980 193, 49, 61, 149, 150, 205, 47, 60, 143, 144,
2981 145, 202, 146, 200, 147, 98, 175, 41, 57, 118,
2982 119, 120, 189, 39, 56, 110, 111, 112, 186, 113,
2983 182, 114, 115, 184, 116, 185, 99, 176, 294, 295,
2984 296, 311, 335, 336, 337, 364, 402, 338, 365, 339,
2985 366, 340, 341, 369, 342, 370, 343, 371, 344, 345,
2986 368, 419, 420, 421, 428, 456, 422, 429, 423, 430,
2987 424, 431, 468, 469, 470, 477, 489, 490, 491, 496,
2988 492, 497, 493, 498, 494, 499, 100, 177, 298, 299,
2989 300, 314, 51, 62, 154, 155, 156, 208, 157, 209,
2990 101, 178, 302, 303, 317, 356, 357, 358, 376, 359,
2991 360, 379, 361, 377, 426, 427, 434, 447, 448, 449,
2992 460, 450, 451, 452, 453, 464
2996 D2Parser::yytable_[] =
2998 107, 108, 124, 125, 139, 140, 153, 206, 34, 63,
2999 207, 142, 109, 23, 126, 24, 141, 25, 72, 73,
3000 74, 75, 260, 22, 76, 164, 77, 78, 79, 80,
3001 165, 36, 136, 137, 81, 77, 78, 77, 78, 82,
3002 77, 78, 285, 151, 152, 121, 38, 138, 318, 323,
3003 66, 319, 260, 324, 325, 326, 327, 206, 151, 152,
3004 320, 83, 77, 78, 84, 85, 328, 329, 330, 331,
3005 180, 102, 103, 104, 105, 181, 349, 350, 187, 351,
3006 352, 256, 257, 188, 85, 26, 27, 28, 29, 40,
3007 42, 435, 44, 85, 436, 85, 85, 195, 85, 77,
3008 78, 106, 196, 46, 48, 77, 78, 203, 77, 78,
3009 121, 122, 204, 210, 187, 50, 212, 213, 211, 273,
3010 85, 412, 195, 413, 414, 415, 69, 277, 117, 132,
3011 148, 107, 108, 107, 108, 482, 483, 484, 485, 124,
3012 125, 124, 125, 109, 123, 109, 158, 139, 140, 139,
3013 140, 126, 159, 126, 142, 203, 142, 85, 160, 141,
3014 280, 141, 162, 85, 161, 167, 85, 1, 2, 3,
3015 4, 5, 6, 7, 8, 9, 10, 442, 168, 180,
3016 443, 444, 445, 446, 305, 307, 307, 373, 210, 380,
3017 308, 309, 374, 375, 381, 432, 465, 500, 217, 179,
3018 433, 466, 501, 399, 400, 401, 183, 286, 286, 190,
3019 283, 191, 198, 199, 214, 201, 215, 216, 219, 218,
3020 220, 221, 222, 223, 224, 225, 226, 227, 228, 230,
3021 232, 231, 233, 234, 238, 239, 240, 244, 245, 246,
3022 250, 251, 253, 255, 262, 259, 254, 24, 263, 264,
3023 265, 286, 266, 267, 268, 332, 333, 269, 153, 275,
3024 293, 353, 354, 297, 270, 271, 272, 334, 274, 301,
3025 310, 312, 313, 355, 276, 278, 279, 281, 315, 316,
3026 363, 321, 367, 372, 378, 383, 384, 385, 387, 388,
3027 389, 390, 393, 386, 394, 396, 405, 282, 398, 410,
3028 425, 437, 438, 439, 440, 455, 459, 461, 462, 463,
3029 284, 471, 475, 467, 391, 478, 479, 332, 333, 502,
3030 503, 395, 473, 403, 353, 354, 504, 404, 406, 334,
3031 474, 505, 407, 291, 408, 409, 355, 411, 457, 472,
3032 322, 382, 229, 458, 480, 481, 243, 507, 508, 416,
3033 417, 509, 242, 241, 304, 292, 249, 235, 392, 237,
3034 236, 418, 248, 346, 441, 495, 247, 506, 348, 347,
3035 397, 362, 510, 454, 252, 476, 416, 417, 0, 0,
3036 0, 0, 0, 0, 0, 0, 0, 0, 418, 0,
3037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3040 0, 486, 487, 0, 0, 0, 0, 0, 0, 0,
3041 0, 0, 0, 488, 0, 0, 0, 0, 0, 0,
3042 0, 0, 0, 0, 486, 487, 0, 0, 0, 0,
3043 0, 0, 0, 0, 0, 0, 488
3047 D2Parser::yycheck_[] =
3049 56, 56, 58, 58, 60, 60, 62, 3, 7, 52,
3050 6, 60, 56, 5, 58, 7, 60, 9, 11, 12,
3051 13, 14, 221, 0, 17, 3, 19, 20, 21, 22,
3052 8, 7, 11, 12, 27, 19, 20, 19, 20, 32,
3053 19, 20, 23, 55, 56, 24, 7, 26, 3, 33,
3054 77, 6, 251, 37, 38, 39, 40, 3, 55, 56,
3055 6, 54, 19, 20, 57, 77, 50, 51, 52, 53,
3056 3, 28, 29, 30, 31, 8, 58, 59, 3, 61,
3057 62, 15, 16, 8, 77, 77, 78, 79, 80, 5,
3058 7, 3, 5, 77, 6, 77, 77, 3, 77, 19,
3059 20, 58, 8, 7, 5, 19, 20, 3, 19, 20,
3060 24, 25, 8, 3, 3, 7, 159, 160, 8, 8,
3061 77, 41, 3, 43, 44, 45, 10, 8, 7, 7,
3062 7, 187, 187, 189, 189, 46, 47, 48, 49, 195,
3063 195, 197, 197, 187, 58, 189, 6, 203, 203, 205,
3064 205, 195, 3, 197, 203, 3, 205, 77, 4, 203,
3065 8, 205, 3, 77, 8, 4, 77, 67, 68, 69,
3066 70, 71, 72, 73, 74, 75, 76, 60, 4, 3,
3067 63, 64, 65, 66, 8, 3, 3, 3, 3, 3,
3068 8, 8, 8, 8, 8, 3, 3, 3, 78, 4,
3069 8, 8, 8, 34, 35, 36, 4, 263, 264, 6,
3070 253, 3, 6, 3, 77, 4, 4, 4, 4, 78,
3071 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
3072 4, 78, 4, 4, 4, 4, 4, 4, 78, 4,
3073 4, 4, 4, 77, 77, 18, 7, 7, 7, 7,
3074 5, 307, 5, 5, 5, 311, 311, 77, 314, 5,
3075 7, 317, 317, 7, 77, 77, 77, 311, 77, 7,
3076 6, 6, 3, 317, 77, 77, 77, 77, 6, 3,
3077 5, 4, 4, 4, 4, 4, 4, 4, 4, 4,
3078 4, 4, 4, 78, 4, 4, 7, 251, 6, 5,
3079 7, 4, 4, 4, 4, 42, 5, 4, 4, 4,
3080 254, 4, 4, 7, 80, 6, 3, 373, 373, 4,
3081 4, 78, 78, 77, 380, 380, 4, 77, 77, 373,
3082 78, 4, 77, 264, 77, 77, 380, 77, 77, 80,
3083 307, 363, 180, 77, 77, 77, 199, 77, 77, 405,
3084 405, 77, 197, 195, 275, 265, 206, 187, 373, 191,
3085 189, 405, 205, 313, 432, 479, 203, 500, 316, 314,
3086 380, 318, 77, 435, 210, 465, 432, 432, -1, -1,
3087 -1, -1, -1, -1, -1, -1, -1, -1, 432, -1,
3088 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3089 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3090 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3091 -1, 477, 477, -1, -1, -1, -1, -1, -1, -1,
3092 -1, -1, -1, 477, -1, -1, -1, -1, -1, -1,
3093 -1, -1, -1, -1, 500, 500, -1, -1, -1, -1,
3094 -1, -1, -1, -1, -1, -1, 500
3098 D2Parser::yystos_[] =
3100 0, 67, 68, 69, 70, 71, 72, 73, 74, 75,
3101 76, 82, 83, 84, 85, 86, 87, 88, 89, 90,
3102 91, 92, 0, 5, 7, 9, 77, 78, 79, 80,
3103 93, 94, 95, 100, 7, 105, 7, 110, 7, 174,
3104 5, 168, 7, 142, 5, 136, 7, 157, 5, 152,
3105 7, 243, 101, 96, 106, 111, 175, 169, 143, 137,
3106 158, 153, 244, 93, 102, 103, 77, 98, 99, 10,
3107 107, 109, 11, 12, 13, 14, 17, 19, 20, 21,
3108 22, 27, 32, 54, 57, 77, 104, 112, 113, 114,
3109 116, 117, 118, 121, 123, 125, 127, 129, 166, 187,
3110 237, 251, 28, 29, 30, 31, 58, 104, 123, 125,
3111 176, 177, 178, 180, 182, 183, 185, 7, 170, 171,
3112 172, 24, 25, 58, 104, 123, 125, 144, 145, 146,
3113 148, 150, 7, 138, 139, 140, 11, 12, 26, 104,
3114 123, 125, 148, 159, 160, 161, 163, 165, 7, 154,
3115 155, 55, 56, 104, 245, 246, 247, 249, 6, 3,
3116 4, 8, 3, 108, 3, 8, 115, 4, 4, 119,
3117 122, 124, 126, 128, 130, 167, 188, 238, 252, 4,
3118 3, 8, 181, 4, 184, 186, 179, 3, 8, 173,
3119 6, 3, 149, 151, 147, 3, 8, 141, 6, 3,
3120 164, 4, 162, 3, 8, 156, 3, 6, 248, 250,
3121 3, 8, 93, 93, 77, 4, 4, 78, 78, 4,
3122 4, 4, 4, 4, 4, 4, 4, 4, 4, 113,
3123 4, 78, 4, 4, 4, 177, 176, 172, 4, 4,
3124 4, 145, 144, 140, 4, 78, 4, 160, 159, 155,
3125 4, 4, 246, 4, 7, 77, 15, 16, 120, 18,
3126 95, 97, 77, 7, 7, 5, 5, 5, 5, 77,
3127 77, 77, 77, 8, 77, 5, 77, 8, 77, 77,
3128 8, 77, 97, 93, 112, 23, 104, 131, 132, 133,
3129 134, 131, 170, 7, 189, 190, 191, 7, 239, 240,
3130 241, 7, 253, 254, 154, 8, 135, 3, 8, 8,
3131 6, 192, 6, 3, 242, 6, 3, 255, 3, 6,
3132 6, 4, 133, 33, 37, 38, 39, 40, 50, 51,
3133 52, 53, 104, 123, 125, 193, 194, 195, 198, 200,
3134 202, 203, 205, 207, 209, 210, 191, 245, 241, 58,
3135 59, 61, 62, 104, 123, 125, 256, 257, 258, 260,
3136 261, 263, 254, 5, 196, 199, 201, 4, 211, 204,
3137 206, 208, 4, 3, 8, 8, 259, 264, 4, 262,
3138 3, 8, 138, 4, 4, 4, 78, 4, 4, 4,
3139 4, 80, 194, 4, 4, 78, 4, 257, 6, 34,
3140 35, 36, 197, 77, 77, 7, 77, 77, 77, 77,
3141 5, 77, 41, 43, 44, 45, 104, 123, 125, 212,
3142 213, 214, 217, 219, 221, 7, 265, 266, 215, 218,
3143 220, 222, 3, 8, 267, 3, 6, 4, 4, 4,
3144 4, 213, 60, 63, 64, 65, 66, 268, 269, 270,
3145 272, 273, 274, 275, 266, 42, 216, 77, 77, 5,
3146 271, 4, 4, 4, 276, 3, 8, 7, 223, 224,
3147 225, 4, 80, 78, 78, 4, 269, 226, 6, 3,
3148 77, 77, 46, 47, 48, 49, 104, 123, 125, 227,
3149 228, 229, 231, 233, 235, 225, 230, 232, 234, 236,
3150 3, 8, 4, 4, 4, 4, 228, 77, 77, 77,
3157 0, 81, 83, 82, 84, 82, 85, 82, 86, 82,
3158 87, 82, 88, 82, 89, 82, 90, 82, 91, 82,
3159 92, 82, 93, 93, 93, 93, 93, 93, 93, 94,
3160 96, 95, 97, 98, 98, 99, 99, 99, 101, 100,
3161 102, 102, 103, 103, 103, 104, 106, 105, 108, 107,
3162 107, 109, 111, 110, 112, 112, 112, 113, 113, 113,
3163 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
3164 113, 115, 114, 116, 117, 119, 118, 120, 120, 122,
3165 121, 124, 123, 126, 125, 128, 127, 130, 129, 131,
3166 131, 132, 132, 132, 133, 133, 135, 134, 137, 136,
3167 138, 138, 139, 139, 139, 141, 140, 143, 142, 144,
3168 144, 144, 145, 145, 145, 145, 145, 145, 147, 146,
3169 149, 148, 151, 150, 153, 152, 154, 154, 154, 156,
3170 155, 158, 157, 159, 159, 159, 160, 160, 160, 160,
3171 160, 160, 160, 162, 161, 164, 163, 165, 167, 166,
3172 169, 168, 170, 170, 171, 171, 171, 173, 172, 175,
3173 174, 176, 176, 176, 177, 177, 177, 177, 177, 177,
3174 177, 177, 179, 178, 181, 180, 182, 184, 183, 186,
3175 185, 188, 187, 189, 189, 190, 190, 190, 192, 191,
3176 193, 193, 193, 194, 194, 194, 194, 194, 194, 194,
3177 194, 194, 194, 194, 194, 196, 195, 197, 197, 197,
3178 199, 198, 201, 200, 202, 204, 203, 206, 205, 208,
3179 207, 209, 211, 210, 212, 212, 212, 213, 213, 213,
3180 213, 213, 213, 213, 215, 214, 216, 218, 217, 220,
3181 219, 222, 221, 223, 223, 224, 224, 224, 226, 225,
3182 227, 227, 227, 228, 228, 228, 228, 228, 228, 228,
3183 230, 229, 232, 231, 234, 233, 236, 235, 238, 237,
3184 239, 239, 240, 240, 240, 242, 241, 244, 243, 245,
3185 245, 245, 245, 246, 246, 248, 247, 250, 249, 252,
3186 251, 253, 253, 253, 255, 254, 256, 256, 256, 257,
3187 257, 257, 257, 257, 257, 257, 259, 258, 260, 262,
3188 261, 264, 263, 265, 265, 265, 267, 266, 268, 268,
3189 268, 269, 269, 269, 269, 269, 271, 270, 272, 273,
3196 0, 2, 0, 3, 0, 3, 0, 3, 0, 3,
3197 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
3198 0, 3, 1, 1, 1, 1, 1, 1, 1, 1,
3199 0, 4, 1, 0, 1, 3, 5, 2, 0, 4,
3200 0, 1, 1, 3, 2, 2, 0, 4, 0, 6,
3201 1, 2, 0, 4, 1, 3, 2, 1, 1, 1,
3202 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3203 1, 0, 4, 3, 3, 0, 4, 1, 1, 0,
3204 4, 0, 4, 0, 4, 0, 6, 0, 6, 0,
3205 1, 1, 3, 2, 1, 1, 0, 6, 0, 4,
3206 0, 1, 1, 3, 2, 0, 4, 0, 4, 1,
3207 3, 2, 1, 1, 1, 1, 1, 1, 0, 4,
3208 0, 4, 0, 6, 0, 4, 1, 3, 2, 0,
3209 4, 0, 4, 1, 3, 2, 1, 1, 1, 1,
3210 1, 1, 1, 0, 4, 0, 4, 3, 0, 6,
3211 0, 4, 0, 1, 1, 3, 2, 0, 4, 0,
3212 4, 1, 3, 2, 1, 1, 1, 1, 1, 1,
3213 1, 1, 0, 4, 0, 4, 3, 0, 4, 0,
3214 4, 0, 6, 0, 1, 1, 3, 2, 0, 4,
3215 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
3216 1, 1, 1, 1, 1, 0, 4, 1, 1, 1,
3217 0, 4, 0, 4, 3, 0, 4, 0, 4, 0,
3218 4, 3, 0, 6, 1, 3, 2, 1, 1, 1,
3219 1, 1, 1, 1, 0, 4, 1, 0, 4, 0,
3220 4, 0, 6, 0, 1, 1, 3, 2, 0, 4,
3221 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
3222 0, 4, 0, 4, 0, 4, 0, 4, 0, 6,
3223 0, 1, 1, 3, 2, 0, 4, 0, 4, 1,
3224 3, 2, 1, 1, 1, 0, 4, 0, 4, 0,
3225 6, 1, 3, 2, 0, 4, 1, 3, 2, 1,
3226 1, 1, 1, 1, 1, 1, 0, 4, 3, 0,
3227 4, 0, 6, 1, 3, 2, 0, 4, 1, 3,
3228 2, 1, 1, 1, 1, 1, 0, 4, 3, 3,
3233#if D2_PARSER_DEBUG || 1
3237 const D2Parser::yytname_[] =
3239 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
3240 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"DhcpDdns\"",
3241 "\"ip-address\"",
"\"port\"",
"\"dns-server-timeout\"",
3242 "\"ncr-protocol\"",
"\"UDP\"",
"\"TCP\"",
"\"ncr-format\"",
"\"JSON\"",
3243 "\"user-context\"",
"\"comment\"",
"\"forward-ddns\"",
3244 "\"reverse-ddns\"",
"\"ddns-domains\"",
"\"key-name\"",
3245 "\"dns-servers\"",
"\"hostname\"",
"\"tsig-keys\"",
"\"algorithm\"",
3246 "\"digest-bits\"",
"\"secret\"",
"\"secret-file\"",
3247 "\"control-sockets\"",
"\"socket-type\"",
"\"unix\"",
"\"http\"",
3248 "\"https\"",
"\"socket-name\"",
"\"socket-address\"",
"\"socket-port\"",
3249 "\"authentication\"",
"\"type\"",
"\"basic\"",
"\"realm\"",
3250 "\"directory\"",
"\"clients\"",
"\"user\"",
"\"user-file\"",
3251 "\"password\"",
"\"password-file\"",
"\"trust-anchor\"",
"\"cert-file\"",
3252 "\"key-file\"",
"\"cert-required\"",
"\"hooks-libraries\"",
3253 "\"library\"",
"\"parameters\"",
"\"loggers\"",
"\"name\"",
3254 "\"output-options\"",
"\"output\"",
"\"debuglevel\"",
"\"severity\"",
3255 "\"flush\"",
"\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"TOPLEVEL_JSON",
3256 "TOPLEVEL_DHCPDDNS",
"SUB_DHCPDDNS",
"SUB_TSIG_KEY",
"SUB_TSIG_KEYS",
3257 "SUB_DDNS_DOMAIN",
"SUB_DDNS_DOMAINS",
"SUB_DNS_SERVER",
3258 "SUB_DNS_SERVERS",
"SUB_HOOKS_LIBRARY",
"\"constant string\"",
3259 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
3260 "$@1",
"$@2",
"$@3",
"$@4",
"$@5",
"$@6",
"$@7",
"$@8",
"$@9",
"$@10",
3261 "value",
"sub_json",
"map2",
"$@11",
"map_value",
"map_content",
3262 "not_empty_map",
"list_generic",
"$@12",
"list_content",
3263 "not_empty_list",
"unknown_map_entry",
"syntax_map",
"$@13",
3264 "global_object",
"$@14",
"global_object_comma",
"sub_dhcpddns",
"$@15",
3265 "dhcpddns_params",
"dhcpddns_param",
"ip_address",
"$@16",
"port",
3266 "dns_server_timeout",
"ncr_protocol",
"$@17",
"ncr_protocol_value",
3267 "ncr_format",
"$@18",
"user_context",
"$@19",
"comment",
"$@20",
3268 "forward_ddns",
"$@21",
"reverse_ddns",
"$@22",
"ddns_mgr_params",
3269 "not_empty_ddns_mgr_params",
"ddns_mgr_param",
"ddns_domains",
"$@23",
3270 "sub_ddns_domains",
"$@24",
"ddns_domain_list",
3271 "not_empty_ddns_domain_list",
"ddns_domain",
"$@25",
"sub_ddns_domain",
3272 "$@26",
"ddns_domain_params",
"ddns_domain_param",
"ddns_domain_name",
3273 "$@27",
"ddns_key_name",
"$@28",
"dns_servers",
"$@29",
3274 "sub_dns_servers",
"$@30",
"dns_server_list",
"dns_server",
"$@31",
3275 "sub_dns_server",
"$@32",
"dns_server_params",
"dns_server_param",
3276 "dns_server_hostname",
"$@33",
"dns_server_ip_address",
"$@34",
3277 "dns_server_port",
"tsig_keys",
"$@35",
"sub_tsig_keys",
"$@36",
3278 "tsig_keys_list",
"not_empty_tsig_keys_list",
"tsig_key",
"$@37",
3279 "sub_tsig_key",
"$@38",
"tsig_key_params",
"tsig_key_param",
3280 "tsig_key_name",
"$@39",
"tsig_key_algorithm",
"$@40",
3281 "tsig_key_digest_bits",
"tsig_key_secret",
"$@41",
3282 "tsig_key_secret_file",
"$@42",
"control_sockets",
"$@43",
3283 "control_socket_list",
"not_empty_control_socket_list",
3284 "control_socket_entry",
"$@44",
"control_socket_params",
3285 "control_socket_param",
"control_socket_type",
"$@45",
3286 "control_socket_type_value",
"control_socket_name",
"$@46",
3287 "control_socket_address",
"$@47",
"control_socket_port",
"trust_anchor",
3288 "$@48",
"cert_file",
"$@49",
"key_file",
"$@50",
"cert_required",
3289 "authentication",
"$@51",
"auth_params",
"auth_param",
"auth_type",
3290 "$@52",
"auth_type_value",
"realm",
"$@53",
"directory",
"$@54",
3291 "clients",
"$@55",
"clients_list",
"not_empty_clients_list",
3292 "basic_auth",
"$@56",
"clients_params",
"clients_param",
"user",
"$@57",
3293 "user_file",
"$@58",
"password",
"$@59",
"password_file",
"$@60",
3294 "hooks_libraries",
"$@61",
"hooks_libraries_list",
3295 "not_empty_hooks_libraries_list",
"hooks_library",
"$@62",
3296 "sub_hooks_library",
"$@63",
"hooks_params",
"hooks_param",
"library",
3297 "$@64",
"parameters",
"$@65",
"loggers",
"$@66",
"loggers_entries",
3298 "logger_entry",
"$@67",
"logger_params",
"logger_param",
"name",
"$@68",
3299 "debuglevel",
"severity",
"$@69",
"output_options_list",
"$@70",
3300 "output_options_list_content",
"output_entry",
"$@71",
3301 "output_params_list",
"output_params",
"output",
"$@72",
"flush",
3302 "maxsize",
"maxver",
"pattern",
"$@73", YY_NULLPTR
3309 D2Parser::yyrline_[] =
3311 0, 153, 153, 153, 154, 154, 155, 155, 156, 156,
3312 157, 157, 158, 158, 159, 159, 160, 160, 161, 161,
3313 162, 162, 170, 171, 172, 173, 174, 175, 176, 179,
3314 184, 184, 195, 198, 199, 202, 207, 213, 218, 218,
3315 225, 226, 229, 233, 237, 247, 256, 256, 269, 269,
3316 279, 282, 286, 286, 294, 295, 296, 302, 303, 304,
3317 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
3318 315, 318, 318, 327, 336, 346, 346, 355, 356, 359,
3319 359, 368, 368, 393, 393, 420, 420, 431, 431, 442,
3320 443, 446, 447, 448, 453, 454, 459, 459, 470, 470,
3321 477, 478, 481, 482, 483, 488, 488, 496, 496, 503,
3322 504, 505, 510, 511, 512, 513, 514, 515, 519, 519,
3323 532, 532, 545, 545, 556, 556, 563, 564, 565, 570,
3324 570, 578, 578, 585, 586, 587, 592, 593, 594, 595,
3325 596, 597, 598, 601, 601, 614, 614, 623, 638, 638,
3326 649, 649, 656, 657, 660, 661, 662, 667, 667, 675,
3327 675, 684, 685, 686, 691, 692, 693, 694, 695, 696,
3328 697, 698, 701, 701, 714, 714, 726, 735, 735, 748,
3329 748, 766, 766, 777, 778, 781, 782, 783, 788, 788,
3330 796, 797, 798, 803, 804, 805, 806, 807, 808, 809,
3331 810, 811, 812, 813, 814, 817, 817, 826, 827, 828,
3332 831, 831, 841, 841, 851, 857, 857, 866, 866, 875,
3333 875, 884, 892, 892, 905, 906, 907, 912, 913, 914,
3334 915, 916, 917, 918, 921, 921, 929, 932, 932, 941,
3335 941, 950, 950, 961, 962, 965, 966, 967, 972, 972,
3336 980, 981, 982, 987, 988, 989, 990, 991, 992, 993,
3337 996, 996, 1005, 1005, 1014, 1014, 1023, 1023, 1034, 1034,
3338 1045, 1046, 1049, 1050, 1051, 1056, 1056, 1066, 1066, 1076,
3339 1077, 1078, 1081, 1084, 1085, 1088, 1088, 1097, 1097, 1107,
3340 1107, 1120, 1121, 1122, 1128, 1128, 1136, 1137, 1138, 1143,
3341 1144, 1145, 1146, 1147, 1148, 1149, 1152, 1152, 1161, 1167,
3342 1167, 1176, 1176, 1187, 1188, 1189, 1194, 1194, 1202, 1203,
3343 1204, 1209, 1210, 1211, 1212, 1213, 1216, 1216, 1225, 1231,
3348 D2Parser::yy_stack_print_ ()
const
3350 *yycdebug_ <<
"Stack now";
3351 for (stack_type::const_iterator
3352 i = yystack_.begin (),
3353 i_end = yystack_.end ();
3355 *yycdebug_ <<
' ' << int (i->state);
3360 D2Parser::yy_reduce_print_ (
int yyrule)
const
3362 int yylno = yyrline_[yyrule];
3363 int yynrhs = yyr2_[yyrule];
3365 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
3366 <<
" (line " << yylno <<
"):\n";
3368 for (
int yyi = 0; yyi < yynrhs; yyi++)
3370 yystack_[(yynrhs) - (yyi + 1)]);
3375#line 14 "d2_parser.yy"
3377#line 3378 "d2_parser.cc"
3379#line 1252 "d2_parser.yy"
3384 const std::string& what)
3386 ctx.error(loc, what);
Evaluation context, an interface to the expression evaluation.
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.
T & emplace()
Instantiate an empty T in here.
T & as() YY_NOEXCEPT
Accessor to a built T.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
D2Parser(isc::d2::D2ParserContext &ctx_yyarg)
Build a parser object.
location location_type
Symbol locations.
static const symbol_kind_type YYNTOKENS
The number of tokens.
virtual int parse()
Parse.
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.
#define YY_CAST(Type, Val)
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_UNUSED
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element. (on the first level).
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.
value_type value
The semantic value.
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.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
symbol_kind_type kind_
The symbol kind.
@ S_control_socket_type_value
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW