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_ (); \
127# define YYCDEBUG if (false) std::cerr
128# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
129# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
130# define YY_STACK_PRINT() static_cast<void> (0)
134#define yyerrok (yyerrstatus_ = 0)
135#define yyclearin (yyla.clear ())
137#define YYACCEPT goto yyacceptlab
138#define YYABORT goto yyabortlab
139#define YYERROR goto yyerrorlab
140#define YYRECOVERING() (!!yyerrstatus_)
142#line 14 "netconf_parser.yy"
143namespace 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);
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)
YY_NOEXCEPT
495 return yyvalue == yypact_ninf_;
499 NetconfParser::yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT
501 return yyvalue == yytable_ninf_;
519 int yyerrstatus_ = 0;
525 stack_symbol_type yyerror_range[3];
542 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
548 YYCDEBUG <<
"Entering state " << int (yystack_[0].state) <<
'\n';
552 if (yystack_[0].state == yyfinal_)
563 yyn = yypact_[+yystack_[0].state];
564 if (yy_pact_value_is_default_ (yyn))
576 yyla.
move (yylookahead);
581 YYCDEBUG <<
"Caught exception: " << yyexc.what() <<
'\n';
602 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ())
611 if (yy_table_value_is_error_ (yyn))
622 yypush_ (
"Shifting", state_type (yyn),
YY_MOVE (yyla));
630 yyn = yydefact_[+yystack_[0].state];
642 stack_symbol_type yylhs;
643 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
656 yylhs.value.emplace<
bool > ();
660 yylhs.value.emplace<
double > ();
664 yylhs.value.emplace< int64_t > ();
668 yylhs.value.emplace< std::string > ();
680 yyerror_range[1].location = yylhs.location;
692#line 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';
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]);
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 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1753 if (!yy_pact_value_is_default_ (yyn))
1758 const int yyxbegin = yyn < 0 ? -yyn : 0;
1760 const 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)
1786 NetconfParser::yy_syntax_error_arguments_ (
const context& yyctx,
1817 yyarg[0] = yyctx.
token ();
1818 int yyn = yyctx.
expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1826 NetconfParser::yysyntax_error_ (
const context& yyctx)
const
1829 enum { YYARGS_MAX = 5 };
1832 int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
1834 char const* yyformat = YY_NULLPTR;
1837#define YYCASE_(N, S) \
1843 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1844 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1845 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1846 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1847 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1853 std::ptrdiff_t yyi = 0;
1854 for (
char const* yyp = yyformat; *yyp; ++yyp)
1855 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1866 const signed char NetconfParser::yypact_ninf_ = -77;
1868 const signed char NetconfParser::yytable_ninf_ = -1;
1871 NetconfParser::yypact_[] =
1873 72, -77, -77, -77, 30, 12, 9, 35, -77, -77,
1874 -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
1875 -77, -77, -77, -77, 12, -2, 55, -1, -77, 63,
1876 74, 80, 71, 92, -77, 95, -77, -77, 104, 116,
1877 121, 122, -77, -77, 123, -77, 97, 125, -77, -77,
1878 -77, -77, -77, -77, -77, -77, -77, -77, 12, 12,
1879 -77, 84, 126, -77, 127, 128, 85, 86, 87, 129,
1880 133, 134, -77, -77, -1, -77, -77, 135, 138, 139,
1881 96, -77, -77, -77, -77, 142, 143, -77, 12, -1,
1882 -77, -77, -77, 16, 144, 145, -77, 132, -77, -77,
1883 -77, -77, -77, 141, 147, -77, -77, -77, -77, -77,
1884 -77, 148, 150, -77, -77, 75, -77, -77, 151, 152,
1885 153, 154, -77, 16, -4, -77, 144, 76, 145, -77,
1886 155, 156, 157, 158, -77, -77, -77, -77, 17, -77,
1887 -77, -77, -77, -77, -77, 162, -77, -77, -77, -77,
1888 21, -77, -77, -77, -77, -77, -77, 61, 61, 61,
1889 61, 163, 164, 23, -77, 165, 166, 113, 167, 76,
1890 -77, -77, -77, -77, -77, -77, -77, -77, -77, 29,
1891 -77, -77, -77, 42, 43, 77, 115, 139, -77, 130,
1892 168, -77, 131, -77, 170, 173, 61, -77, -77, -77,
1893 -77, -77, -77, -77, 171, -77, 136, 172, -77, -77,
1894 101, -77, -77, -5, 51, 171, -77, -77, -77, -77,
1895 -77, -77, -77, 90, -77, -77, -77, -77, -77, 176,
1896 178, 179, -77, 91, -77, -77, -77, -77, -77, -77,
1897 -77, 180, 181, 185, -5, -77, 186, 124, 146, 149,
1898 187, 51, -77, 93, 159, 160, -77, 161, -77, -77,
1899 -77, 169, -77, -77, -77, -77, -77, -77, -77, -77,
1904 NetconfParser::yydefact_[] =
1906 0, 2, 4, 6, 0, 0, 0, 0, 1, 25,
1907 18, 15, 14, 11, 12, 13, 3, 10, 16, 17,
1908 32, 5, 8, 7, 27, 21, 0, 36, 29, 0,
1909 28, 0, 0, 22, 34, 0, 52, 54, 0, 0,
1910 0, 0, 56, 123, 0, 48, 0, 37, 38, 40,
1911 41, 42, 46, 47, 44, 43, 45, 26, 0, 0,
1912 19, 0, 0, 33, 0, 0, 0, 0, 0, 0,
1913 0, 0, 31, 9, 0, 30, 23, 0, 0, 0,
1914 0, 49, 50, 51, 73, 0, 0, 39, 0, 36,
1915 20, 53, 55, 75, 58, 0, 24, 0, 84, 86,
1916 88, 90, 83, 0, 76, 77, 79, 80, 81, 82,
1917 62, 0, 59, 60, 127, 0, 125, 35, 0, 0,
1918 0, 0, 74, 0, 0, 57, 0, 0, 0, 124,
1919 0, 0, 0, 0, 78, 69, 71, 66, 0, 64,
1920 67, 68, 61, 138, 143, 0, 141, 137, 135, 136,
1921 0, 129, 131, 133, 134, 132, 126, 0, 0, 0,
1922 0, 0, 0, 0, 63, 0, 0, 0, 0, 0,
1923 128, 102, 104, 101, 95, 96, 97, 99, 100, 0,
1924 92, 94, 98, 0, 0, 0, 0, 0, 65, 0,
1925 0, 140, 0, 130, 0, 0, 0, 85, 87, 89,
1926 91, 70, 72, 139, 0, 142, 0, 0, 93, 147,
1927 0, 145, 103, 0, 0, 0, 144, 114, 119, 121,
1928 113, 111, 112, 0, 106, 108, 109, 110, 156, 0,
1929 0, 0, 161, 0, 149, 151, 152, 153, 154, 155,
1930 146, 0, 0, 0, 0, 105, 0, 0, 0, 0,
1931 0, 0, 148, 0, 0, 0, 107, 0, 158, 159,
1932 160, 0, 150, 116, 117, 118, 115, 120, 122, 157,
1937 NetconfParser::yypgoto_[] =
1939 -77, -77, -77, -77, -77, -77, -77, -77, -20, -76,
1940 -77, 6, -77, -77, -77, -77, -77, -77, -27, -77,
1941 -77, -77, -77, 105, -77, 137, -22, -19, -18, -26,
1942 -77, -25, -77, -77, -77, -77, -77, 70, -77, -77,
1943 34, -77, -77, -77, -77, -77, -77, -77, -77, 38,
1944 -77, -77, -77, -77, -77, -77, -77, -77, -36, 2,
1945 -77, -77, -77, -77, -77, -45, -77, -77, -77, -77,
1946 -77, -77, -77, -77, -77, -77, 73, -77, -77, 31,
1947 -77, -77, -77, -77, -77, -77, -77, -77, -13, -77,
1948 -77, -48, -77, -77, -77, -77, -77, -77, -77
1952 NetconfParser::yydefgoto_[] =
1954 0, 4, 5, 6, 7, 23, 27, 16, 17, 18,
1955 25, 91, 32, 33, 19, 24, 29, 30, 173, 21,
1956 26, 35, 62, 46, 47, 48, 174, 175, 176, 177,
1957 64, 178, 65, 54, 70, 111, 112, 113, 124, 138,
1958 139, 140, 161, 141, 162, 55, 93, 103, 104, 105,
1959 106, 118, 107, 119, 108, 120, 109, 121, 179, 180,
1960 181, 194, 182, 195, 223, 224, 225, 241, 266, 226,
1961 242, 227, 243, 56, 71, 115, 116, 127, 150, 151,
1962 152, 165, 153, 154, 168, 155, 166, 210, 211, 214,
1963 233, 234, 235, 246, 236, 237, 238, 239, 250
1967 NetconfParser::yytable_[] =
1969 45, 52, 53, 90, 28, 49, 36, 37, 50, 51,
1970 36, 37, 38, 39, 40, 41, 20, 9, 217, 10,
1971 163, 11, 218, 219, 169, 164, 135, 136, 42, 170,
1972 8, 43, 196, 98, 99, 100, 101, 197, 75, 76,
1973 44, 44, 22, 31, 44, 196, 196, 45, 52, 53,
1974 198, 199, 49, 135, 136, 50, 51, 12, 13, 14,
1975 15, 44, 45, 52, 53, 34, 102, 49, 96, 57,
1976 50, 51, 36, 37, 38, 39, 40, 58, 128, 60,
1977 196, 129, 171, 172, 59, 200, 228, 36, 37, 229,
1978 230, 231, 232, 244, 251, 61, 102, 137, 245, 252,
1979 147, 148, 149, 63, 215, 73, 44, 216, 66, 143,
1980 144, 90, 145, 146, 1, 2, 3, 263, 264, 265,
1981 67, 44, 183, 184, 185, 68, 69, 72, 74, 77,
1982 78, 79, 80, 81, 82, 83, 84, 85, 86, 88,
1983 117, 92, 147, 148, 149, 89, 10, 94, 95, 122,
1984 123, 110, 114, 126, 125, 130, 131, 132, 133, 191,
1985 201, 134, 157, 158, 159, 160, 167, 186, 187, 189,
1986 190, 192, 258, 204, 206, 203, 205, 207, 209, 213,
1987 247, 212, 248, 249, 253, 254, 220, 221, 222, 255,
1988 257, 261, 259, 202, 97, 260, 142, 188, 208, 256,
1989 193, 156, 240, 262, 267, 268, 269, 0, 0, 0,
1990 0, 87, 0, 0, 270, 0, 0, 220, 221, 222
1994 NetconfParser::yycheck_[] =
1996 27, 27, 27, 79, 24, 27, 11, 12, 27, 27,
1997 11, 12, 13, 14, 15, 16, 7, 5, 23, 7,
1998 3, 9, 27, 28, 3, 8, 30, 31, 29, 8,
1999 0, 32, 3, 17, 18, 19, 20, 8, 58, 59,
2000 45, 45, 7, 45, 45, 3, 3, 74, 74, 74,
2001 8, 8, 74, 30, 31, 74, 74, 45, 46, 47,
2002 48, 45, 89, 89, 89, 10, 93, 89, 88, 6,
2003 89, 89, 11, 12, 13, 14, 15, 3, 3, 8,
2004 3, 6, 21, 22, 4, 8, 35, 11, 12, 38,
2005 39, 40, 41, 3, 3, 3, 123, 124, 8, 8,
2006 127, 127, 127, 8, 3, 8, 45, 6, 4, 33,
2007 34, 187, 36, 37, 42, 43, 44, 24, 25, 26,
2008 4, 45, 158, 159, 160, 4, 4, 4, 3, 45,
2009 4, 4, 4, 48, 48, 48, 7, 4, 4, 4,
2010 8, 45, 169, 169, 169, 7, 7, 5, 5, 8,
2011 3, 7, 7, 3, 6, 4, 4, 4, 4, 46,
2012 45, 123, 7, 7, 7, 7, 4, 4, 4, 4,
2013 4, 4, 48, 5, 4, 45, 45, 4, 7, 7,
2014 4, 45, 4, 4, 4, 4, 213, 213, 213, 4,
2015 4, 4, 46, 187, 89, 46, 126, 163, 196, 244,
2016 169, 128, 215, 251, 45, 45, 45, -1, -1, -1,
2017 -1, 74, -1, -1, 45, -1, -1, 244, 244, 244
2021 NetconfParser::yystos_[] =
2023 0, 42, 43, 44, 50, 51, 52, 53, 0, 5,
2024 7, 9, 45, 46, 47, 48, 56, 57, 58, 63,
2025 7, 68, 7, 54, 64, 59, 69, 55, 57, 65,
2026 66, 45, 61, 62, 10, 70, 11, 12, 13, 14,
2027 15, 16, 29, 32, 45, 67, 72, 73, 74, 75,
2028 76, 77, 78, 80, 82, 94, 122, 6, 3, 4,
2029 8, 3, 71, 8, 79, 81, 4, 4, 4, 4,
2030 83, 123, 4, 8, 3, 57, 57, 45, 4, 4,
2031 4, 48, 48, 48, 7, 4, 4, 74, 4, 7,
2032 58, 60, 45, 95, 5, 5, 57, 72, 17, 18,
2033 19, 20, 67, 96, 97, 98, 99, 101, 103, 105,
2034 7, 84, 85, 86, 7, 124, 125, 8, 100, 102,
2035 104, 106, 8, 3, 87, 6, 3, 126, 3, 6,
2036 4, 4, 4, 4, 98, 30, 31, 67, 88, 89,
2037 90, 92, 86, 33, 34, 36, 37, 67, 78, 80,
2038 127, 128, 129, 131, 132, 134, 125, 7, 7, 7,
2039 7, 91, 93, 3, 8, 130, 135, 4, 133, 3,
2040 8, 21, 22, 67, 75, 76, 77, 78, 80, 107,
2041 108, 109, 111, 107, 107, 107, 4, 4, 89, 4,
2042 4, 46, 4, 128, 110, 112, 3, 8, 8, 8,
2043 8, 45, 60, 45, 5, 45, 4, 4, 108, 7,
2044 136, 137, 45, 7, 138, 3, 6, 23, 27, 28,
2045 67, 78, 80, 113, 114, 115, 118, 120, 35, 38,
2046 39, 40, 41, 139, 140, 141, 143, 144, 145, 146,
2047 137, 116, 119, 121, 3, 8, 142, 4, 4, 4,
2048 147, 3, 8, 4, 4, 4, 114, 4, 48, 46,
2049 46, 4, 140, 24, 25, 26, 117, 45, 45, 45,
2054 NetconfParser::yyr1_[] =
2056 0, 49, 51, 50, 52, 50, 53, 50, 55, 54,
2057 56, 57, 57, 57, 57, 57, 57, 57, 59, 58,
2058 60, 61, 61, 62, 62, 64, 63, 65, 65, 66,
2059 66, 67, 69, 68, 71, 70, 72, 72, 73, 73,
2060 74, 74, 74, 74, 74, 74, 74, 74, 74, 75,
2061 76, 77, 79, 78, 81, 80, 83, 82, 84, 84,
2062 85, 85, 87, 86, 88, 88, 88, 89, 89, 91,
2063 90, 93, 92, 95, 94, 96, 96, 97, 97, 98,
2064 98, 98, 98, 98, 100, 99, 102, 101, 104, 103,
2065 106, 105, 107, 107, 108, 108, 108, 108, 108, 108,
2066 108, 108, 110, 109, 112, 111, 113, 113, 114, 114,
2067 114, 114, 114, 114, 116, 115, 117, 117, 117, 119,
2068 118, 121, 120, 123, 122, 124, 124, 126, 125, 127,
2069 127, 128, 128, 128, 128, 128, 128, 128, 130, 129,
2070 131, 133, 132, 135, 134, 136, 136, 138, 137, 139,
2071 139, 140, 140, 140, 140, 140, 142, 141, 143, 144,
2076 NetconfParser::yyr2_[] =
2078 0, 2, 0, 3, 0, 3, 0, 3, 0, 4,
2079 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
2080 1, 0, 1, 3, 5, 0, 4, 0, 1, 1,
2081 3, 2, 0, 4, 0, 6, 0, 1, 1, 3,
2082 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2083 3, 3, 0, 4, 0, 4, 0, 6, 0, 1,
2084 1, 3, 0, 4, 1, 3, 1, 1, 1, 0,
2085 4, 0, 4, 0, 6, 0, 1, 1, 3, 1,
2086 1, 1, 1, 1, 0, 6, 0, 6, 0, 6,
2087 0, 6, 1, 3, 1, 1, 1, 1, 1, 1,
2088 1, 1, 0, 4, 0, 6, 1, 3, 1, 1,
2089 1, 1, 1, 1, 0, 4, 1, 1, 1, 0,
2090 4, 0, 4, 0, 6, 1, 3, 0, 4, 1,
2091 3, 1, 1, 1, 1, 1, 1, 1, 0, 4,
2092 3, 0, 4, 0, 6, 1, 3, 0, 4, 1,
2093 3, 1, 1, 1, 1, 1, 0, 4, 3, 3,
2098#if NETCONF_DEBUG || 1
2102 const NetconfParser::yytname_[] =
2104 "\"end of file\"",
"error",
"\"invalid token\"",
"\",\"",
"\":\"",
2105 "\"[\"",
"\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"Netconf\"",
2106 "\"user-context\"",
"\"comment\"",
"\"boot-update\"",
2107 "\"subscribe-changes\"",
"\"validate-changes\"",
"\"managed-servers\"",
2108 "\"dhcp4\"",
"\"dhcp6\"",
"\"d2\"",
"\"ca\"",
"\"model\"",
2109 "\"control-socket\"",
"\"socket-type\"",
"\"unix\"",
"\"http\"",
2110 "\"stdout\"",
"\"socket-name\"",
"\"socket-url\"",
"\"hooks-libraries\"",
2111 "\"library\"",
"\"parameters\"",
"\"loggers\"",
"\"name\"",
2112 "\"output_options\"",
"\"output\"",
"\"debuglevel\"",
"\"severity\"",
2113 "\"flush\"",
"\"maxsize\"",
"\"maxver\"",
"\"pattern\"",
"START_JSON",
2114 "START_NETCONF",
"START_SUB_NETCONF",
"\"constant string\"",
2115 "\"integer\"",
"\"floating point\"",
"\"boolean\"",
"$accept",
"start",
2116 "$@1",
"$@2",
"$@3",
"sub_netconf",
"$@4",
"json",
"value",
"map",
"$@5",
2117 "map_value",
"map_content",
"not_empty_map",
"list_generic",
"$@6",
2118 "list_content",
"not_empty_list",
"unknown_map_entry",
2119 "netconf_syntax_map",
"$@7",
"global_object",
"$@8",
"global_params",
2120 "not_empty_global_params",
"global_param",
"boot_update",
2121 "subscribe_changes",
"validate_changes",
"user_context",
"$@9",
2122 "comment",
"$@10",
"hooks_libraries",
"$@11",
"hooks_libraries_list",
2123 "not_empty_hooks_libraries_list",
"hooks_library",
"$@12",
2124 "hooks_params",
"hooks_param",
"library",
"$@13",
"parameters",
"$@14",
2125 "managed_servers",
"$@15",
"servers_entries",
2126 "not_empty_servers_entries",
"server_entry",
"dhcp4_server",
"$@16",
2127 "dhcp6_server",
"$@17",
"d2_server",
"$@18",
"ca_server",
"$@19",
2128 "managed_server_params",
"managed_server_param",
"model",
"$@20",
2129 "control_socket",
"$@21",
"control_socket_params",
2130 "control_socket_param",
"socket_type",
"$@22",
"socket_type_value",
2131 "socket_name",
"$@23",
"socket_url",
"$@24",
"loggers",
"$@25",
2132 "loggers_entries",
"logger_entry",
"$@26",
"logger_params",
2133 "logger_param",
"name",
"$@27",
"debuglevel",
"severity",
"$@28",
2134 "output_options_list",
"$@29",
"output_options_list_content",
2135 "output_entry",
"$@30",
"output_params_list",
"output_params",
"output",
2136 "$@31",
"flush",
"maxsize",
"maxver",
"pattern",
"$@32", YY_NULLPTR
2143 NetconfParser::yyrline_[] =
2145 0, 118, 118, 118, 119, 119, 120, 120, 128, 128,
2146 139, 145, 146, 147, 148, 149, 150, 151, 155, 155,
2147 166, 171, 172, 180, 185, 193, 193, 199, 200, 203,
2148 207, 220, 228, 228, 240, 240, 260, 261, 264, 265,
2149 270, 271, 272, 273, 274, 275, 276, 277, 278, 281,
2150 287, 293, 299, 299, 324, 324, 352, 352, 363, 364,
2151 367, 368, 371, 371, 379, 380, 381, 384, 385, 388,
2152 388, 397, 397, 408, 408, 419, 420, 423, 424, 430,
2153 431, 432, 433, 434, 438, 438, 450, 450, 462, 462,
2154 474, 474, 486, 487, 491, 492, 493, 494, 495, 496,
2155 497, 498, 502, 502, 512, 512, 524, 525, 528, 529,
2156 530, 531, 532, 533, 536, 536, 545, 546, 547, 550,
2157 550, 560, 560, 573, 573, 586, 587, 591, 591, 599,
2158 600, 603, 604, 605, 606, 607, 608, 609, 612, 612,
2159 621, 627, 627, 636, 636, 647, 648, 651, 651, 659,
2160 660, 663, 664, 665, 666, 667, 670, 670, 679, 685,
2165 NetconfParser::yy_stack_print_ ()
const
2167 *yycdebug_ <<
"Stack now";
2168 for (stack_type::const_iterator
2169 i = yystack_.begin (),
2170 i_end = yystack_.end ();
2172 *yycdebug_ <<
' ' << int (i->state);
2177 NetconfParser::yy_reduce_print_ (
int yyrule)
const
2179 int yylno = yyrline_[yyrule];
2180 int yynrhs = yyr2_[yyrule];
2182 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
2183 <<
" (line " << yylno <<
"):\n";
2185 for (
int yyi = 0; yyi < yynrhs; yyi++)
2187 yystack_[(yynrhs) - (yyi + 1)]);
2192#line 14 "netconf_parser.yy"
2194#line 2195 "netconf_parser.cc"
2196#line 706 "netconf_parser.yy"
2201 const std::string& what)
2203 ctx.error(loc, what);
#define YY_CAST(Type, Val)
#define YY_MOVE_REF(Type)
Notes: IntElement type is changed to int64_t.
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.
symbol_kind_type token() const YY_NOEXCEPT
context(const NetconfParser &yyparser, const symbol_type &yyla)
const symbol_type & lookahead() const YY_NOEXCEPT
Present a slice of the top of a stack.
virtual int parse()
Parse.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
NetconfParser(isc::netconf::ParserContext &ctx_yyarg)
Build a parser object.
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
int debug_level_type
Type for debugging levels.
static const symbol_kind_type YYNTOKENS
The number of tokens.
location location_type
Symbol locations.
void set_debug_level(debug_level_type l)
Set the current debugging level.
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
Parser context is a wrapper around flex/bison instances dedicated to Netconf-agent config file parser...
LexerContext ctx_
Current syntactic context.
const std::string contextName()
Get the syntactic context name.
void unique(const std::string &name, isc::data::Element::Position loc)
Check if a parameter is already present.
isc::data::Element::Position loc2pos(isc::netconf::location &loc)
Converts bison's position to one understandable by isc::data::Element.
void enter(const LexerContext &ctx)
Enter a new syntactic context.
@ NO_KEYWORDS
This one is used in pure JSON mode.
@ HOOKS_LIBRARIES
Used while parsing Netconf/loggers structures.
@ CONFIG
Used while parsing content of Netconf.
@ MANAGED_SERVERS
Used while parsing Netconf/managed-servers.
@ SERVER
Used while parsing Netconf/manages-servers/*/control-socket.
@ LOGGERS
Used while parsing Netconf/loggers/output_options structures.
@ SOCKET_TYPE
Used while parsing Netconf/hooks-libraries.
@ CONTROL_SOCKET
Used while parsing Netconf/managed-servers/*/control-socket/socket-type.
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
void leave()
Leave a syntactic context.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Symbol)
Define the isc::netconf::parser class.
bool empty() const YY_NOEXCEPT
Whether empty.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
location_type location
The location.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
~syntax_error() YY_NOEXCEPT YY_NOTHROW