39 #define yylex netconf_lex
47 #line 33 "netconf_parser.yy"
51 #line 52 "netconf_parser.cc"
55 # if defined YYENABLE_NLS && YYENABLE_NLS
58 # define YY_(msgid) dgettext ("bison-runtime", msgid)
62 # define YY_(msgid) msgid
69 # if defined __GNUC__ && !defined __EXCEPTIONS
70 # define YY_EXCEPTIONS 0
72 # define YY_EXCEPTIONS 1
76 #define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
81 # ifndef YYLLOC_DEFAULT
82 # define YYLLOC_DEFAULT(Current, Rhs, N) \
86 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
87 (Current).end = YYRHSLOC (Rhs, N).end; \
91 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
101 # define YYCDEBUG if (yydebug_) (*yycdebug_)
103 # define YY_SYMBOL_PRINT(Title, Symbol) \
107 *yycdebug_ << Title << ' '; \
108 yy_print_ (*yycdebug_, Symbol); \
109 *yycdebug_ << '\n'; \
113 # define YY_REDUCE_PRINT(Rule) \
116 yy_reduce_print_ (Rule); \
119 # define YY_STACK_PRINT() \
122 yy_stack_print_ (); \
125 #else // !NETCONF_DEBUG
127 # define YYCDEBUG if (false) std::cerr
128 # define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
129 # define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
130 # define YY_STACK_PRINT() static_cast<void> (0)
132 #endif // !NETCONF_DEBUG
134 #define yyerrok (yyerrstatus_ = 0)
135 #define yyclearin (yyla.clear ())
137 #define YYACCEPT goto yyacceptlab
138 #define YYABORT goto yyabortlab
139 #define YYERROR goto yyerrorlab
140 #define YYRECOVERING() (!!yyerrstatus_)
142 #line 14 "netconf_parser.yy"
143 namespace isc {
namespace netconf {
144 #line 145 "netconf_parser.cc"
150 yycdebug_ (&std::cerr),
171 : state (empty_state)
174 NetconfParser::by_state::by_state (
const by_state& that)
YY_NOEXCEPT
185 NetconfParser::by_state::move (by_state& that)
191 NetconfParser::by_state::by_state (state_type s)
YY_NOEXCEPT
198 if (state == empty_state)
204 NetconfParser::stack_symbol_type::stack_symbol_type ()
207 NetconfParser::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 NetconfParser::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 NetconfParser::stack_symbol_type&
281 NetconfParser::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 NetconfParser::stack_symbol_type&
317 NetconfParser::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 NetconfParser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
364 template <
typename Base>
366 NetconfParser::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 107 "netconf_parser.yy"
382 { yyoutput << yysym.value.template as < std::string > (); }
383 #line 384 "netconf_parser.cc"
387 #line 107 "netconf_parser.yy"
388 { yyoutput << yysym.value.template as < int64_t > (); }
389 #line 390 "netconf_parser.cc"
393 #line 107 "netconf_parser.yy"
394 { yyoutput << yysym.value.template as < double > (); }
395 #line 396 "netconf_parser.cc"
399 #line 107 "netconf_parser.yy"
400 { yyoutput << yysym.value.template as < bool > (); }
401 #line 402 "netconf_parser.cc"
405 #line 107 "netconf_parser.yy"
406 { yyoutput << yysym.value.template as < ElementPtr > (); }
407 #line 408 "netconf_parser.cc"
411 #line 107 "netconf_parser.yy"
412 { yyoutput << yysym.value.template as < ElementPtr > (); }
413 #line 414 "netconf_parser.cc"
417 #line 107 "netconf_parser.yy"
418 { yyoutput << yysym.value.template as < ElementPtr > (); }
419 #line 420 "netconf_parser.cc"
431 NetconfParser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
439 NetconfParser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym)
441 #if 201103L <= YY_CPLUSPLUS
442 yypush_ (m, stack_symbol_type (s, std::move (sym)));
444 stack_symbol_type ss (s, sym);
450 NetconfParser::yypop_ (
int n)
480 #endif // NETCONF_DEBUG
482 NetconfParser::state_type
483 NetconfParser::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 NetconfParser::yy_pact_value_is_default_ (
int yyvalue)
495 return yyvalue == yypact_ninf_;
499 NetconfParser::yy_table_value_is_error_ (
int yyvalue)
501 return yyvalue == yytable_ninf_;
519 int yyerrstatus_ = 0;
525 stack_symbol_type yyerror_range[3];
532 #endif // YY_EXCEPTIONS
542 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
548 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
552 if (yystack_[0].state == yyfinal_)
563 yyn = yypact_[+yystack_[0].state];
564 if (yy_pact_value_is_default_ (yyn))
573 #endif // YY_EXCEPTIONS
576 yyla.
move (yylookahead);
581 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
585 #endif // YY_EXCEPTIONS
602 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.
kind ())
611 if (yy_table_value_is_error_ (yyn))
622 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
630 yyn = yydefact_[+yystack_[0].state];
642 stack_symbol_type yylhs;
643 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
656 yylhs.value.emplace<
bool > ();
660 yylhs.value.emplace<
double > ();
664 yylhs.value.emplace< int64_t > ();
668 yylhs.value.emplace< std::string > ();
678 stack_type::slice range (yystack_, yylen);
680 yyerror_range[1].location = yylhs.location;
687 #endif // YY_EXCEPTIONS
692 #line 118 "netconf_parser.yy"
694 #line 695 "netconf_parser.cc"
698 #line 119 "netconf_parser.yy"
700 #line 701 "netconf_parser.cc"
704 #line 120 "netconf_parser.yy"
706 #line 707 "netconf_parser.cc"
710 #line 128 "netconf_parser.yy"
716 #line 717 "netconf_parser.cc"
720 #line 132 "netconf_parser.yy"
724 #line 725 "netconf_parser.cc"
728 #line 139 "netconf_parser.yy"
733 #line 734 "netconf_parser.cc"
737 #line 145 "netconf_parser.yy"
739 #line 740 "netconf_parser.cc"
743 #line 146 "netconf_parser.yy"
745 #line 746 "netconf_parser.cc"
749 #line 147 "netconf_parser.yy"
751 #line 752 "netconf_parser.cc"
755 #line 148 "netconf_parser.yy"
757 #line 758 "netconf_parser.cc"
761 #line 149 "netconf_parser.yy"
763 #line 764 "netconf_parser.cc"
767 #line 150 "netconf_parser.yy"
769 #line 770 "netconf_parser.cc"
773 #line 151 "netconf_parser.yy"
775 #line 776 "netconf_parser.cc"
779 #line 155 "netconf_parser.yy"
786 #line 787 "netconf_parser.cc"
790 #line 160 "netconf_parser.yy"
796 #line 797 "netconf_parser.cc"
800 #line 166 "netconf_parser.yy"
802 #line 803 "netconf_parser.cc"
806 #line 180 "netconf_parser.yy"
809 ctx.
unique(yystack_[2].value.as < std::string > (), ctx.
loc2pos(yystack_[2].location));
810 ctx.
stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
812 #line 813 "netconf_parser.cc"
816 #line 185 "netconf_parser.yy"
820 ctx.
unique(yystack_[2].value.as < std::string > (), ctx.
loc2pos(yystack_[2].location));
821 ctx.
stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as <
ElementPtr > ());
823 #line 824 "netconf_parser.cc"
827 #line 193 "netconf_parser.yy"
832 #line 833 "netconf_parser.cc"
836 #line 196 "netconf_parser.yy"
839 #line 840 "netconf_parser.cc"
843 #line 203 "netconf_parser.yy"
848 #line 849 "netconf_parser.cc"
852 #line 207 "netconf_parser.yy"
857 #line 858 "netconf_parser.cc"
861 #line 220 "netconf_parser.yy"
864 const std::string& keyword = yystack_[1].value.as < std::string > ();
865 error(yystack_[1].location,
866 "got unexpected keyword \"" + keyword +
"\" in " + where +
" map.");
868 #line 869 "netconf_parser.cc"
872 #line 228 "netconf_parser.yy"
879 #line 880 "netconf_parser.cc"
883 #line 233 "netconf_parser.yy"
889 #line 890 "netconf_parser.cc"
893 #line 240 "netconf_parser.yy"
904 ctx.
stack_.back()->set(
"Netconf", m);
908 #line 909 "netconf_parser.cc"
912 #line 253 "netconf_parser.yy"
919 #line 920 "netconf_parser.cc"
923 #line 281 "netconf_parser.yy"
925 ctx.
unique(
"boot-update", ctx.
loc2pos(yystack_[2].location));
927 ctx.
stack_.back()->set(
"boot-update", flag);
929 #line 930 "netconf_parser.cc"
933 #line 287 "netconf_parser.yy"
935 ctx.
unique(
"subscribe-changes", ctx.
loc2pos(yystack_[2].location));
937 ctx.
stack_.back()->set(
"subscribe-changes", flag);
939 #line 940 "netconf_parser.cc"
943 #line 293 "netconf_parser.yy"
945 ctx.
unique(
"validate-changes", ctx.
loc2pos(yystack_[2].location));
947 ctx.
stack_.back()->set(
"validate-changes", flag);
949 #line 950 "netconf_parser.cc"
953 #line 299 "netconf_parser.yy"
957 #line 958 "netconf_parser.cc"
961 #line 301 "netconf_parser.yy"
970 if ((old->size() != 1) || !old->contains(
"comment")) {
971 std::stringstream msg;
972 msg <<
"duplicate user-context entries (previous at "
973 << old->getPosition().str() <<
")";
974 error(yystack_[3].location, msg.str());
977 user_context->set(
"comment", old->get(
"comment"));
981 parent->set(
"user-context", user_context);
984 #line 985 "netconf_parser.cc"
988 #line 324 "netconf_parser.yy"
992 #line 993 "netconf_parser.cc"
996 #line 326 "netconf_parser.yy"
1001 user_context->set(
"comment", comment);
1007 if (old->contains(
"comment")) {
1008 std::stringstream msg;
1009 msg <<
"duplicate user-context/comment entries (previous at "
1010 << old->getPosition().str() <<
")";
1011 error(yystack_[3].location, msg.str());
1014 merge(user_context, old);
1018 parent->set(
"user-context", user_context);
1021 #line 1022 "netconf_parser.cc"
1025 #line 352 "netconf_parser.yy"
1027 ctx.
unique(
"hooks-libraries", ctx.
loc2pos(yystack_[0].location));
1029 ctx.
stack_.back()->set(
"hooks-libraries", l);
1033 #line 1034 "netconf_parser.cc"
1037 #line 358 "netconf_parser.yy"
1042 #line 1043 "netconf_parser.cc"
1046 #line 371 "netconf_parser.yy"
1049 ctx.
stack_.back()->add(m);
1052 #line 1053 "netconf_parser.cc"
1056 #line 375 "netconf_parser.yy"
1060 #line 1061 "netconf_parser.cc"
1064 #line 388 "netconf_parser.yy"
1069 #line 1070 "netconf_parser.cc"
1073 #line 391 "netconf_parser.yy"
1076 ctx.
stack_.back()->set(
"library", lib);
1079 #line 1080 "netconf_parser.cc"
1083 #line 397 "netconf_parser.yy"
1085 ctx.
unique(
"parameters", ctx.
loc2pos(yystack_[0].location));
1088 #line 1089 "netconf_parser.cc"
1092 #line 400 "netconf_parser.yy"
1094 ctx.
stack_.back()->set(
"parameters", yystack_[0].value.as <
ElementPtr > ());
1097 #line 1098 "netconf_parser.cc"
1101 #line 408 "netconf_parser.yy"
1103 ctx.
unique(
"managed-servers", ctx.
loc2pos(yystack_[2].location));
1105 ctx.
stack_.back()->set(
"managed-servers", m);
1109 #line 1110 "netconf_parser.cc"
1113 #line 414 "netconf_parser.yy"
1118 #line 1119 "netconf_parser.cc"
1122 #line 438 "netconf_parser.yy"
1126 ctx.
stack_.back()->set(
"dhcp4", m);
1130 #line 1131 "netconf_parser.cc"
1134 #line 444 "netconf_parser.yy"
1139 #line 1140 "netconf_parser.cc"
1143 #line 450 "netconf_parser.yy"
1147 ctx.
stack_.back()->set(
"dhcp6", m);
1151 #line 1152 "netconf_parser.cc"
1155 #line 456 "netconf_parser.yy"
1160 #line 1161 "netconf_parser.cc"
1164 #line 462 "netconf_parser.yy"
1168 ctx.
stack_.back()->set(
"d2", m);
1172 #line 1173 "netconf_parser.cc"
1176 #line 468 "netconf_parser.yy"
1181 #line 1182 "netconf_parser.cc"
1185 #line 474 "netconf_parser.yy"
1189 ctx.
stack_.back()->set(
"ca", m);
1193 #line 1194 "netconf_parser.cc"
1197 #line 480 "netconf_parser.yy"
1202 #line 1203 "netconf_parser.cc"
1206 #line 502 "netconf_parser.yy"
1211 #line 1212 "netconf_parser.cc"
1215 #line 505 "netconf_parser.yy"
1218 ctx.
stack_.back()->set(
"model", model);
1221 #line 1222 "netconf_parser.cc"
1225 #line 512 "netconf_parser.yy"
1227 ctx.
unique(
"control-socket", ctx.
loc2pos(yystack_[0].location));
1229 ctx.
stack_.back()->set(
"control-socket", m);
1233 #line 1234 "netconf_parser.cc"
1237 #line 518 "netconf_parser.yy"
1242 #line 1243 "netconf_parser.cc"
1246 #line 536 "netconf_parser.yy"
1248 ctx.
unique(
"socket-type", ctx.
loc2pos(yystack_[0].location));
1251 #line 1252 "netconf_parser.cc"
1255 #line 539 "netconf_parser.yy"
1257 ctx.
stack_.back()->set(
"socket-type", yystack_[0].value.as <
ElementPtr > ());
1260 #line 1261 "netconf_parser.cc"
1264 #line 545 "netconf_parser.yy"
1266 #line 1267 "netconf_parser.cc"
1270 #line 546 "netconf_parser.yy"
1272 #line 1273 "netconf_parser.cc"
1276 #line 547 "netconf_parser.yy"
1278 #line 1279 "netconf_parser.cc"
1282 #line 550 "netconf_parser.yy"
1284 ctx.
unique(
"socket-name", ctx.
loc2pos(yystack_[0].location));
1287 #line 1288 "netconf_parser.cc"
1291 #line 553 "netconf_parser.yy"
1294 ctx.
stack_.back()->set(
"socket-name", name);
1297 #line 1298 "netconf_parser.cc"
1301 #line 560 "netconf_parser.yy"
1303 ctx.
unique(
"socket-url", ctx.
loc2pos(yystack_[0].location));
1306 #line 1307 "netconf_parser.cc"
1310 #line 563 "netconf_parser.yy"
1313 ctx.
stack_.back()->set(
"socket-url", url);
1316 #line 1317 "netconf_parser.cc"
1320 #line 573 "netconf_parser.yy"
1324 ctx.
stack_.back()->set(
"loggers", l);
1328 #line 1329 "netconf_parser.cc"
1332 #line 579 "netconf_parser.yy"
1337 #line 1338 "netconf_parser.cc"
1341 #line 591 "netconf_parser.yy"
1344 ctx.
stack_.back()->add(l);
1347 #line 1348 "netconf_parser.cc"
1351 #line 595 "netconf_parser.yy"
1355 #line 1356 "netconf_parser.cc"
1359 #line 612 "netconf_parser.yy"
1364 #line 1365 "netconf_parser.cc"
1368 #line 615 "netconf_parser.yy"
1371 ctx.
stack_.back()->set(
"name", name);
1374 #line 1375 "netconf_parser.cc"
1378 #line 621 "netconf_parser.yy"
1380 ctx.
unique(
"debuglevel", ctx.
loc2pos(yystack_[2].location));
1382 ctx.
stack_.back()->set(
"debuglevel", dl);
1384 #line 1385 "netconf_parser.cc"
1388 #line 627 "netconf_parser.yy"
1393 #line 1394 "netconf_parser.cc"
1397 #line 630 "netconf_parser.yy"
1400 ctx.
stack_.back()->set(
"severity", sev);
1403 #line 1404 "netconf_parser.cc"
1407 #line 636 "netconf_parser.yy"
1409 ctx.
unique(
"output_options", ctx.
loc2pos(yystack_[0].location));
1411 ctx.
stack_.back()->set(
"output_options", l);
1415 #line 1416 "netconf_parser.cc"
1419 #line 642 "netconf_parser.yy"
1424 #line 1425 "netconf_parser.cc"
1428 #line 651 "netconf_parser.yy"
1431 ctx.
stack_.back()->add(m);
1434 #line 1435 "netconf_parser.cc"
1438 #line 655 "netconf_parser.yy"
1442 #line 1443 "netconf_parser.cc"
1446 #line 670 "netconf_parser.yy"
1451 #line 1452 "netconf_parser.cc"
1455 #line 673 "netconf_parser.yy"
1458 ctx.
stack_.back()->set(
"output", sev);
1461 #line 1462 "netconf_parser.cc"
1465 #line 679 "netconf_parser.yy"
1469 ctx.
stack_.back()->set(
"flush", flush);
1471 #line 1472 "netconf_parser.cc"
1475 #line 685 "netconf_parser.yy"
1479 ctx.
stack_.back()->set(
"maxsize", maxsize);
1481 #line 1482 "netconf_parser.cc"
1485 #line 691 "netconf_parser.yy"
1489 ctx.
stack_.back()->set(
"maxver", maxver);
1491 #line 1492 "netconf_parser.cc"
1495 #line 697 "netconf_parser.yy"
1500 #line 1501 "netconf_parser.cc"
1504 #line 700 "netconf_parser.yy"
1507 ctx.
stack_.back()->set(
"pattern", sev);
1510 #line 1511 "netconf_parser.cc"
1514 #line 1515 "netconf_parser.cc"
1523 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
1527 #endif // YY_EXCEPTIONS
1533 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1547 std::string msg = yysyntax_error_ (yyctx);
1552 yyerror_range[1].location = yyla.
location;
1553 if (yyerrstatus_ == 3)
1561 else if (!yyla.
empty ())
1563 yy_destroy_ (
"Error: discarding", yyla);
1597 yyn = yypact_[+yystack_[0].state];
1598 if (!yy_pact_value_is_default_ (yyn))
1601 if (0 <= yyn && yyn <= yylast_
1604 yyn = yytable_[yyn];
1611 if (yystack_.size () == 1)
1614 yyerror_range[1].location = yystack_[0].location;
1615 yy_destroy_ (
"Error: popping", yystack_[0]);
1620 stack_symbol_type error_token;
1622 yyerror_range[2].location = yyla.
location;
1626 error_token.state = state_type (yyn);
1627 yypush_ (
"Shifting",
YY_MOVE (error_token));
1653 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1659 while (1 < yystack_.size ())
1661 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1670 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1674 yy_destroy_ (YY_NULLPTR, yyla);
1676 while (1 < yystack_.size ())
1678 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1683 #endif // YY_EXCEPTIONS
1698 NetconfParser::yytnamerr_ (
const char *yystr)
1703 char const *yyp = yystr;
1710 goto do_not_strip_quotes;
1714 goto do_not_strip_quotes;
1726 do_not_strip_quotes: ;
1735 return yytnamerr_ (yytname_[yysymbol]);
1742 : yyparser_ (yyparser)
1752 int yyn = yypact_[+yyparser_.yystack_[0].state];
1753 if (!yy_pact_value_is_default_ (yyn))
1758 int yyxbegin = yyn < 0 ? -yyn : 0;
1760 int yychecklim = yylast_ - yyn + 1;
1762 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1764 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1768 else if (yycount == yyargn)
1775 if (yyarg && yycount == 0 && 0 < yyargn)
1783 NetconfParser::yy_syntax_error_arguments_ (
const context& yyctx,
1814 yyarg[0] = yyctx.
token ();
1815 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1823 NetconfParser::yysyntax_error_ (
const context& yyctx)
const
1826 enum { YYARGS_MAX = 5 };
1829 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1831 char const* yyformat = YY_NULLPTR;
1834 #define YYCASE_(N, S) \
1840 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1841 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1842 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1843 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1844 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1850 std::ptrdiff_t yyi = 0;
1851 for (
char const* yyp = yyformat; *yyp; ++yyp)
1852 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1863 const signed char NetconfParser::yypact_ninf_ = -77;
1865 const signed char NetconfParser::yytable_ninf_ = -1;
1868 NetconfParser::yypact_[] =
1870 72, -77, -77, -77, 30, 12, 9, 35, -77, -77,
1871 -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
1872 -77, -77, -77, -77, 12, -2, 55, -1, -77, 63,
1873 74, 80, 71, 92, -77, 95, -77, -77, 104, 116,
1874 121, 122, -77, -77, 123, -77, 97, 125, -77, -77,
1875 -77, -77, -77, -77, -77, -77, -77, -77, 12, 12,
1876 -77, 84, 126, -77, 127, 128, 85, 86, 87, 129,
1877 133, 134, -77, -77, -1, -77, -77, 135, 138, 139,
1878 96, -77, -77, -77, -77, 142, 143, -77, 12, -1,
1879 -77, -77, -77, 16, 144, 145, -77, 132, -77, -77,
1880 -77, -77, -77, 141, 147, -77, -77, -77, -77, -77,
1881 -77, 148, 150, -77, -77, 75, -77, -77, 151, 152,
1882 153, 154, -77, 16, -4, -77, 144, 76, 145, -77,
1883 155, 156, 157, 158, -77, -77, -77, -77, 17, -77,
1884 -77, -77, -77, -77, -77, 162, -77, -77, -77, -77,
1885 21, -77, -77, -77, -77, -77, -77, 61, 61, 61,
1886 61, 163, 164, 23, -77, 165, 166, 113, 167, 76,
1887 -77, -77, -77, -77, -77, -77, -77, -77, -77, 29,
1888 -77, -77, -77, 42, 43, 77, 115, 139, -77, 130,
1889 168, -77, 131, -77, 170, 173, 61, -77, -77, -77,
1890 -77, -77, -77, -77, 171, -77, 136, 172, -77, -77,
1891 101, -77, -77, -5, 51, 171, -77, -77, -77, -77,
1892 -77, -77, -77, 90, -77, -77, -77, -77, -77, 176,
1893 178, 179, -77, 91, -77, -77, -77, -77, -77, -77,
1894 -77, 180, 181, 185, -5, -77, 186, 124, 146, 149,
1895 187, 51, -77, 93, 159, 160, -77, 161, -77, -77,
1896 -77, 169, -77, -77, -77, -77, -77, -77, -77, -77,
1901 NetconfParser::yydefact_[] =
1903 0, 2, 4, 6, 0, 0, 0, 0, 1, 25,
1904 18, 15, 14, 11, 12, 13, 3, 10, 16, 17,
1905 32, 5, 8, 7, 27, 21, 0, 36, 29, 0,
1906 28, 0, 0, 22, 34, 0, 52, 54, 0, 0,
1907 0, 0, 56, 123, 0, 48, 0, 37, 38, 40,
1908 41, 42, 46, 47, 44, 43, 45, 26, 0, 0,
1909 19, 0, 0, 33, 0, 0, 0, 0, 0, 0,
1910 0, 0, 31, 9, 0, 30, 23, 0, 0, 0,
1911 0, 49, 50, 51, 73, 0, 0, 39, 0, 36,
1912 20, 53, 55, 75, 58, 0, 24, 0, 84, 86,
1913 88, 90, 83, 0, 76, 77, 79, 80, 81, 82,
1914 62, 0, 59, 60, 127, 0, 125, 35, 0, 0,
1915 0, 0, 74, 0, 0, 57, 0, 0, 0, 124,
1916 0, 0, 0, 0, 78, 69, 71, 66, 0, 64,
1917 67, 68, 61, 138, 143, 0, 141, 137, 135, 136,
1918 0, 129, 131, 133, 134, 132, 126, 0, 0, 0,
1919 0, 0, 0, 0, 63, 0, 0, 0, 0, 0,
1920 128, 102, 104, 101, 95, 96, 97, 99, 100, 0,
1921 92, 94, 98, 0, 0, 0, 0, 0, 65, 0,
1922 0, 140, 0, 130, 0, 0, 0, 85, 87, 89,
1923 91, 70, 72, 139, 0, 142, 0, 0, 93, 147,
1924 0, 145, 103, 0, 0, 0, 144, 114, 119, 121,
1925 113, 111, 112, 0, 106, 108, 109, 110, 156, 0,
1926 0, 0, 161, 0, 149, 151, 152, 153, 154, 155,
1927 146, 0, 0, 0, 0, 105, 0, 0, 0, 0,
1928 0, 0, 148, 0, 0, 0, 107, 0, 158, 159,
1929 160, 0, 150, 116, 117, 118, 115, 120, 122, 157,
1934 NetconfParser::yypgoto_[] =
1936 -77, -77, -77, -77, -77, -77, -77, -77, -20, -76,
1937 -77, 6, -77, -77, -77, -77, -77, -77, -27, -77,
1938 -77, -77, -77, 105, -77, 137, -22, -19, -18, -26,
1939 -77, -25, -77, -77, -77, -77, -77, 70, -77, -77,
1940 34, -77, -77, -77, -77, -77, -77, -77, -77, 38,
1941 -77, -77, -77, -77, -77, -77, -77, -77, -36, 2,
1942 -77, -77, -77, -77, -77, -45, -77, -77, -77, -77,
1943 -77, -77, -77, -77, -77, -77, 73, -77, -77, 31,
1944 -77, -77, -77, -77, -77, -77, -77, -77, -13, -77,
1945 -77, -48, -77, -77, -77, -77, -77, -77, -77
1949 NetconfParser::yydefgoto_[] =
1951 0, 4, 5, 6, 7, 23, 27, 16, 17, 18,
1952 25, 91, 32, 33, 19, 24, 29, 30, 173, 21,
1953 26, 35, 62, 46, 47, 48, 174, 175, 176, 177,
1954 64, 178, 65, 54, 70, 111, 112, 113, 124, 138,
1955 139, 140, 161, 141, 162, 55, 93, 103, 104, 105,
1956 106, 118, 107, 119, 108, 120, 109, 121, 179, 180,
1957 181, 194, 182, 195, 223, 224, 225, 241, 266, 226,
1958 242, 227, 243, 56, 71, 115, 116, 127, 150, 151,
1959 152, 165, 153, 154, 168, 155, 166, 210, 211, 214,
1960 233, 234, 235, 246, 236, 237, 238, 239, 250
1964 NetconfParser::yytable_[] =
1966 45, 52, 53, 90, 28, 49, 36, 37, 50, 51,
1967 36, 37, 38, 39, 40, 41, 20, 9, 217, 10,
1968 163, 11, 218, 219, 169, 164, 135, 136, 42, 170,
1969 8, 43, 196, 98, 99, 100, 101, 197, 75, 76,
1970 44, 44, 22, 31, 44, 196, 196, 45, 52, 53,
1971 198, 199, 49, 135, 136, 50, 51, 12, 13, 14,
1972 15, 44, 45, 52, 53, 34, 102, 49, 96, 57,
1973 50, 51, 36, 37, 38, 39, 40, 58, 128, 60,
1974 196, 129, 171, 172, 59, 200, 228, 36, 37, 229,
1975 230, 231, 232, 244, 251, 61, 102, 137, 245, 252,
1976 147, 148, 149, 63, 215, 73, 44, 216, 66, 143,
1977 144, 90, 145, 146, 1, 2, 3, 263, 264, 265,
1978 67, 44, 183, 184, 185, 68, 69, 72, 74, 77,
1979 78, 79, 80, 81, 82, 83, 84, 85, 86, 88,
1980 117, 92, 147, 148, 149, 89, 10, 94, 95, 122,
1981 123, 110, 114, 126, 125, 130, 131, 132, 133, 191,
1982 201, 134, 157, 158, 159, 160, 167, 186, 187, 189,
1983 190, 192, 258, 204, 206, 203, 205, 207, 209, 213,
1984 247, 212, 248, 249, 253, 254, 220, 221, 222, 255,
1985 257, 261, 259, 202, 97, 260, 142, 188, 208, 256,
1986 193, 156, 240, 262, 267, 268, 269, 0, 0, 0,
1987 0, 87, 0, 0, 270, 0, 0, 220, 221, 222
1991 NetconfParser::yycheck_[] =
1993 27, 27, 27, 79, 24, 27, 11, 12, 27, 27,
1994 11, 12, 13, 14, 15, 16, 7, 5, 23, 7,
1995 3, 9, 27, 28, 3, 8, 30, 31, 29, 8,
1996 0, 32, 3, 17, 18, 19, 20, 8, 58, 59,
1997 45, 45, 7, 45, 45, 3, 3, 74, 74, 74,
1998 8, 8, 74, 30, 31, 74, 74, 45, 46, 47,
1999 48, 45, 89, 89, 89, 10, 93, 89, 88, 6,
2000 89, 89, 11, 12, 13, 14, 15, 3, 3, 8,
2001 3, 6, 21, 22, 4, 8, 35, 11, 12, 38,
2002 39, 40, 41, 3, 3, 3, 123, 124, 8, 8,
2003 127, 127, 127, 8, 3, 8, 45, 6, 4, 33,
2004 34, 187, 36, 37, 42, 43, 44, 24, 25, 26,
2005 4, 45, 158, 159, 160, 4, 4, 4, 3, 45,
2006 4, 4, 4, 48, 48, 48, 7, 4, 4, 4,
2007 8, 45, 169, 169, 169, 7, 7, 5, 5, 8,
2008 3, 7, 7, 3, 6, 4, 4, 4, 4, 46,
2009 45, 123, 7, 7, 7, 7, 4, 4, 4, 4,
2010 4, 4, 48, 5, 4, 45, 45, 4, 7, 7,
2011 4, 45, 4, 4, 4, 4, 213, 213, 213, 4,
2012 4, 4, 46, 187, 89, 46, 126, 163, 196, 244,
2013 169, 128, 215, 251, 45, 45, 45, -1, -1, -1,
2014 -1, 74, -1, -1, 45, -1, -1, 244, 244, 244
2018 NetconfParser::yystos_[] =
2020 0, 42, 43, 44, 50, 51, 52, 53, 0, 5,
2021 7, 9, 45, 46, 47, 48, 56, 57, 58, 63,
2022 7, 68, 7, 54, 64, 59, 69, 55, 57, 65,
2023 66, 45, 61, 62, 10, 70, 11, 12, 13, 14,
2024 15, 16, 29, 32, 45, 67, 72, 73, 74, 75,
2025 76, 77, 78, 80, 82, 94, 122, 6, 3, 4,
2026 8, 3, 71, 8, 79, 81, 4, 4, 4, 4,
2027 83, 123, 4, 8, 3, 57, 57, 45, 4, 4,
2028 4, 48, 48, 48, 7, 4, 4, 74, 4, 7,
2029 58, 60, 45, 95, 5, 5, 57, 72, 17, 18,
2030 19, 20, 67, 96, 97, 98, 99, 101, 103, 105,
2031 7, 84, 85, 86, 7, 124, 125, 8, 100, 102,
2032 104, 106, 8, 3, 87, 6, 3, 126, 3, 6,
2033 4, 4, 4, 4, 98, 30, 31, 67, 88, 89,
2034 90, 92, 86, 33, 34, 36, 37, 67, 78, 80,
2035 127, 128, 129, 131, 132, 134, 125, 7, 7, 7,
2036 7, 91, 93, 3, 8, 130, 135, 4, 133, 3,
2037 8, 21, 22, 67, 75, 76, 77, 78, 80, 107,
2038 108, 109, 111, 107, 107, 107, 4, 4, 89, 4,
2039 4, 46, 4, 128, 110, 112, 3, 8, 8, 8,
2040 8, 45, 60, 45, 5, 45, 4, 4, 108, 7,
2041 136, 137, 45, 7, 138, 3, 6, 23, 27, 28,
2042 67, 78, 80, 113, 114, 115, 118, 120, 35, 38,
2043 39, 40, 41, 139, 140, 141, 143, 144, 145, 146,
2044 137, 116, 119, 121, 3, 8, 142, 4, 4, 4,
2045 147, 3, 8, 4, 4, 4, 114, 4, 48, 46,
2046 46, 4, 140, 24, 25, 26, 117, 45, 45, 45,
2051 NetconfParser::yyr1_[] =
2053 0, 49, 51, 50, 52, 50, 53, 50, 55, 54,
2054 56, 57, 57, 57, 57, 57, 57, 57, 59, 58,
2055 60, 61, 61, 62, 62, 64, 63, 65, 65, 66,
2056 66, 67, 69, 68, 71, 70, 72, 72, 73, 73,
2057 74, 74, 74, 74, 74, 74, 74, 74, 74, 75,
2058 76, 77, 79, 78, 81, 80, 83, 82, 84, 84,
2059 85, 85, 87, 86, 88, 88, 88, 89, 89, 91,
2060 90, 93, 92, 95, 94, 96, 96, 97, 97, 98,
2061 98, 98, 98, 98, 100, 99, 102, 101, 104, 103,
2062 106, 105, 107, 107, 108, 108, 108, 108, 108, 108,
2063 108, 108, 110, 109, 112, 111, 113, 113, 114, 114,
2064 114, 114, 114, 114, 116, 115, 117, 117, 117, 119,
2065 118, 121, 120, 123, 122, 124, 124, 126, 125, 127,
2066 127, 128, 128, 128, 128, 128, 128, 128, 130, 129,
2067 131, 133, 132, 135, 134, 136, 136, 138, 137, 139,
2068 139, 140, 140, 140, 140, 140, 142, 141, 143, 144,
2073 NetconfParser::yyr2_[] =
2075 0, 2, 0, 3, 0, 3, 0, 3, 0, 4,
2076 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
2077 1, 0, 1, 3, 5, 0, 4, 0, 1, 1,
2078 3, 2, 0, 4, 0, 6, 0, 1, 1, 3,
2079 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2080 3, 3, 0, 4, 0, 4, 0, 6, 0, 1,
2081 1, 3, 0, 4, 1, 3, 1, 1, 1, 0,
2082 4, 0, 4, 0, 6, 0, 1, 1, 3, 1,
2083 1, 1, 1, 1, 0, 6, 0, 6, 0, 6,
2084 0, 6, 1, 3, 1, 1, 1, 1, 1, 1,
2085 1, 1, 0, 4, 0, 6, 1, 3, 1, 1,
2086 1, 1, 1, 1, 0, 4, 1, 1, 1, 0,
2087 4, 0, 4, 0, 6, 1, 3, 0, 4, 1,
2088 3, 1, 1, 1, 1, 1, 1, 1, 0, 4,
2089 3, 0, 4, 0, 6, 1, 3, 0, 4, 1,
2090 3, 1, 1, 1, 1, 1, 0, 4, 3, 3,
2095 #if NETCONF_DEBUG || 1
2099 const NetconfParser::yytname_[] =
2101 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
2102 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"Netconf\"",
2103 "\"user-context\"",
"\"comment\"",
"\"boot-update\"",
2104 "\"subscribe-changes\"",
"\"validate-changes\"",
"\"managed-servers\"",
2105 "\"dhcp4\"",
"\"dhcp6\"",
"\"d2\"",
"\"ca\"",
"\"model\"",
2106 "\"control-socket\"",
"\"socket-type\"",
"\"unix\"",
"\"http\"",
2107 "\"stdout\"",
"\"socket-name\"",
"\"socket-url\"",
"\"hooks-libraries\"",
2108 "\"library\"",
"\"parameters\"",
"\"loggers\"",
"\"name\"",
2109 "\"output_options\"",
"\"output\"",
"\"debuglevel\"",
"\"severity\"",
2110 "\"flush\"",
"\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"START_JSON",
2111 "START_NETCONF",
"START_SUB_NETCONF",
"\"constant string\"",
2112 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
2113 "$@1",
"$@2",
"$@3",
"sub_netconf",
"$@4",
"json",
"value",
"map",
"$@5",
2114 "map_value",
"map_content",
"not_empty_map",
"list_generic",
"$@6",
2115 "list_content",
"not_empty_list",
"unknown_map_entry",
2116 "netconf_syntax_map",
"$@7",
"global_object",
"$@8",
"global_params",
2117 "not_empty_global_params",
"global_param",
"boot_update",
2118 "subscribe_changes",
"validate_changes",
"user_context",
"$@9",
2119 "comment",
"$@10",
"hooks_libraries",
"$@11",
"hooks_libraries_list",
2120 "not_empty_hooks_libraries_list",
"hooks_library",
"$@12",
2121 "hooks_params",
"hooks_param",
"library",
"$@13",
"parameters",
"$@14",
2122 "managed_servers",
"$@15",
"servers_entries",
2123 "not_empty_servers_entries",
"server_entry",
"dhcp4_server",
"$@16",
2124 "dhcp6_server",
"$@17",
"d2_server",
"$@18",
"ca_server",
"$@19",
2125 "managed_server_params",
"managed_server_param",
"model",
"$@20",
2126 "control_socket",
"$@21",
"control_socket_params",
2127 "control_socket_param",
"socket_type",
"$@22",
"socket_type_value",
2128 "socket_name",
"$@23",
"socket_url",
"$@24",
"loggers",
"$@25",
2129 "loggers_entries",
"logger_entry",
"$@26",
"logger_params",
2130 "logger_param",
"name",
"$@27",
"debuglevel",
"severity",
"$@28",
2131 "output_options_list",
"$@29",
"output_options_list_content",
2132 "output_entry",
"$@30",
"output_params_list",
"output_params",
"output",
2133 "$@31",
"flush",
"maxsize",
"maxver",
"pattern",
"$@32", YY_NULLPTR
2140 NetconfParser::yyrline_[] =
2142 0, 118, 118, 118, 119, 119, 120, 120, 128, 128,
2143 139, 145, 146, 147, 148, 149, 150, 151, 155, 155,
2144 166, 171, 172, 180, 185, 193, 193, 199, 200, 203,
2145 207, 220, 228, 228, 240, 240, 260, 261, 264, 265,
2146 270, 271, 272, 273, 274, 275, 276, 277, 278, 281,
2147 287, 293, 299, 299, 324, 324, 352, 352, 363, 364,
2148 367, 368, 371, 371, 379, 380, 381, 384, 385, 388,
2149 388, 397, 397, 408, 408, 419, 420, 423, 424, 430,
2150 431, 432, 433, 434, 438, 438, 450, 450, 462, 462,
2151 474, 474, 486, 487, 491, 492, 493, 494, 495, 496,
2152 497, 498, 502, 502, 512, 512, 524, 525, 528, 529,
2153 530, 531, 532, 533, 536, 536, 545, 546, 547, 550,
2154 550, 560, 560, 573, 573, 586, 587, 591, 591, 599,
2155 600, 603, 604, 605, 606, 607, 608, 609, 612, 612,
2156 621, 627, 627, 636, 636, 647, 648, 651, 651, 659,
2157 660, 663, 664, 665, 666, 667, 670, 670, 679, 685,
2162 NetconfParser::yy_stack_print_ ()
const
2164 *yycdebug_ <<
"Stack now";
2165 for (stack_type::const_iterator
2166 i = yystack_.begin (),
2167 i_end = yystack_.end ();
2169 *yycdebug_ <<
' ' <<
int (i->state);
2174 NetconfParser::yy_reduce_print_ (
int yyrule)
const
2176 int yylno = yyrline_[yyrule];
2177 int yynrhs = yyr2_[yyrule];
2179 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2180 <<
" (line " << yylno <<
"):\n";
2182 for (
int yyi = 0; yyi < yynrhs; yyi++)
2184 yystack_[(yynrhs) - (yyi + 1)]);
2186 #endif // NETCONF_DEBUG
2189 #line 14 "netconf_parser.yy"
2191 #line 2192 "netconf_parser.cc"
2193 #line 706 "netconf_parser.yy"
2198 const std::string& what)
2200 ctx.error(loc, what);
Used while parsing Netconf/loggers/output_options structures.
Used while parsing Netconf/managed-servers/*/control-socket/socket-type.
location location_type
Symbol locations.
#define YY_CAST(Type, Val)
symbol_kind_type kind_
The symbol kind.
#define YY_SYMBOL_PRINT(Title, Symbol)
NetconfParser(isc::netconf::ParserContext &ctx_yyarg)
Build a parser object.
bool empty() const YY_NOEXCEPT
Whether empty.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
void leave()
Leave a syntactic context.
#define YY_MOVE_REF(Type)
boost::shared_ptr< Element > ElementPtr
LexerContext ctx_
Current syntactic context.
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
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...
location_type location
The location.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
#define YY_REDUCE_PRINT(Rule)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
void set_debug_level(debug_level_type l)
Set the current debugging level.
virtual int parse()
Parse.
static const symbol_kind_type YYNTOKENS
The number of tokens.
Notes: IntElement type is changed to int64_t.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
boost::shared_ptr< const Element > ConstElementPtr
"External" symbols: returned by the scanner.
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Used while parsing Netconf/hooks-libraries.
isc::data::Element::Position loc2pos(isc::netconf::location &loc)
Converts bison's position to one understandable by isc::data::Element.
#define YYLLOC_DEFAULT(Current, Rhs, N)
Used while parsing Netconf/loggers structures.
Used while parsing Netconf/manages-servers/*/control-socket.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Used while parsing content of Netconf.
This one is used in pure JSON mode.
Define the isc::netconf::parser class.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.
void unique(const std::string &name, isc::data::Element::Position loc)
Check if a parameter is already present.
Parser context is a wrapper around flex/bison instances dedicated to Netconf-agent config file parser...
const symbol_type & lookahead() const YY_NOEXCEPT
int debug_level_type
Type for debugging levels.
void enter(const LexerContext &ctx)
Enter a new syntactic context.
symbol_kind_type token() const YY_NOEXCEPT
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
~syntax_error() YY_NOEXCEPT YY_NOTHROW
Syntax errors thrown from user actions.
Used while parsing Netconf/managed-servers.
context(const NetconfParser &yyparser, const symbol_type &yyla)
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
const std::string contextName()
Get the syntactic context name.