38 #define yylex agent_lex
46 #line 33 "agent_parser.yy" // lalr1.cc:438
50 #line 51 "agent_parser.cc" // lalr1.cc:438
54 # if defined YYENABLE_NLS && YYENABLE_NLS
57 # define YY_(msgid) dgettext ("bison-runtime", msgid)
61 # define YY_(msgid) msgid
67 # if defined __GNUC__ && !defined __EXCEPTIONS
68 # define YY_EXCEPTIONS 0
70 # define YY_EXCEPTIONS 1
74 #define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
79 # ifndef YYLLOC_DEFAULT
80 # define YYLLOC_DEFAULT(Current, Rhs, N) \
84 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
85 (Current).end = YYRHSLOC (Rhs, N).end; \
89 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
96 #define YYUSE(E) ((void) (E))
102 # define YYCDEBUG if (yydebug_) (*yycdebug_)
104 # define YY_SYMBOL_PRINT(Title, Symbol) \
108 *yycdebug_ << Title << ' '; \
109 yy_print_ (*yycdebug_, Symbol); \
110 *yycdebug_ << '\n'; \
114 # define YY_REDUCE_PRINT(Rule) \
117 yy_reduce_print_ (Rule); \
120 # define YY_STACK_PRINT() \
126 #else // !AGENT_DEBUG
128 # define YYCDEBUG if (false) std::cerr
129 # define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
130 # define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
131 # define YY_STACK_PRINT() static_cast<void> (0)
133 #endif // !AGENT_DEBUG
135 #define yyerrok (yyerrstatus_ = 0)
136 #define yyclearin (yyla.clear ())
138 #define YYACCEPT goto yyacceptlab
139 #define YYABORT goto yyabortlab
140 #define YYERROR goto yyerrorlab
141 #define YYRECOVERING() (!!yyerrstatus_)
143 #line 14 "agent_parser.yy" // lalr1.cc:513
144 namespace isc {
namespace agent {
145 #line 146 "agent_parser.cc" // lalr1.cc:513
153 AgentParser::yytnamerr_ (
const char *yystr)
157 std::string yyr =
"";
158 char const *yyp = yystr;
165 goto do_not_strip_quotes;
169 goto do_not_strip_quotes;
178 do_not_strip_quotes: ;
190 yycdebug_ (&std::cerr),
206 AgentParser::by_state::by_state ()
207 : state (empty_state)
210 AgentParser::by_state::by_state (
const by_state& other)
211 : state (other.state)
215 AgentParser::by_state::clear ()
221 AgentParser::by_state::move (by_state& that)
227 AgentParser::by_state::by_state (state_type s)
232 AgentParser::by_state::type_get ()
const
234 if (state == empty_state)
237 return yystos_[state];
240 AgentParser::stack_symbol_type::stack_symbol_type ()
243 AgentParser::stack_symbol_type::stack_symbol_type (
YY_RVREF (stack_symbol_type) that)
246 switch (that.type_get ())
255 value.YY_MOVE_OR_COPY<
bool > (
YY_MOVE (that.value));
259 value.YY_MOVE_OR_COPY<
double > (
YY_MOVE (that.value));
263 value.YY_MOVE_OR_COPY< int64_t > (
YY_MOVE (that.value));
267 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (that.value));
274 #if 201103L <= YY_CPLUSPLUS
276 that.state = empty_state;
280 AgentParser::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
281 : super_type (s,
YY_MOVE (that.location))
283 switch (that.type_get ())
292 value.move<
bool > (
YY_MOVE (that.value));
296 value.move<
double > (
YY_MOVE (that.value));
300 value.move< int64_t > (
YY_MOVE (that.value));
304 value.move< std::string > (
YY_MOVE (that.value));
315 #if YY_CPLUSPLUS < 201103L
316 AgentParser::stack_symbol_type&
317 AgentParser::stack_symbol_type::operator= (stack_symbol_type& that)
320 switch (that.type_get ())
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 AgentParser::yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const
364 template <
typename Base>
366 AgentParser::yy_print_ (std::ostream& yyo,
367 const basic_symbol<Base>& yysym)
const
369 std::ostream& yyoutput = yyo;
376 yyo << (yytype < yyntokens_ ?
"token" :
"nterm")
377 <<
' ' << yytname_[yytype] <<
" ("
378 << yysym.location <<
": ";
383 #line 103 "agent_parser.yy" // lalr1.cc:672
384 { yyoutput << yysym.value.template as< std::string > (); }
385 #line 386 "agent_parser.cc" // lalr1.cc:672
390 #line 103 "agent_parser.yy" // lalr1.cc:672
391 { yyoutput << yysym.value.template as< int64_t > (); }
392 #line 393 "agent_parser.cc" // lalr1.cc:672
397 #line 103 "agent_parser.yy" // lalr1.cc:672
398 { yyoutput << yysym.value.template as< double > (); }
399 #line 400 "agent_parser.cc" // lalr1.cc:672
404 #line 103 "agent_parser.yy" // lalr1.cc:672
405 { yyoutput << yysym.value.template as< bool > (); }
406 #line 407 "agent_parser.cc" // lalr1.cc:672
411 #line 103 "agent_parser.yy" // lalr1.cc:672
412 { yyoutput << yysym.value.template as< ElementPtr > (); }
413 #line 414 "agent_parser.cc" // lalr1.cc:672
418 #line 103 "agent_parser.yy" // lalr1.cc:672
419 { yyoutput << yysym.value.template as< ElementPtr > (); }
420 #line 421 "agent_parser.cc" // lalr1.cc:672
425 #line 103 "agent_parser.yy" // lalr1.cc:672
426 { yyoutput << yysym.value.template as< ElementPtr > (); }
427 #line 428 "agent_parser.cc" // lalr1.cc:672
439 AgentParser::yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym)
447 AgentParser::yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym)
449 #if 201103L <= YY_CPLUSPLUS
450 yypush_ (m, stack_symbol_type (s, std::move (sym)));
452 stack_symbol_type ss (s, sym);
458 AgentParser::yypop_ (
int n)
488 #endif // AGENT_DEBUG
490 AgentParser::state_type
491 AgentParser::yy_lr_goto_state_ (state_type yystate,
int yysym)
493 int yyr = yypgoto_[yysym - yyntokens_] + yystate;
494 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
495 return yytable_[yyr];
497 return yydefgoto_[yysym - yyntokens_];
501 AgentParser::yy_pact_value_is_default_ (
int yyvalue)
503 return yyvalue == yypact_ninf_;
507 AgentParser::yy_table_value_is_error_ (
int yyvalue)
509 return yyvalue == yytable_ninf_;
528 int yyerrstatus_ = 0;
534 stack_symbol_type yyerror_range[3];
541 #endif // YY_EXCEPTIONS
551 yypush_ (YY_NULLPTR, 0,
YY_MOVE (yyla));
555 YYCDEBUG <<
"Entering state " << yystack_[0].state <<
'\n';
558 if (yystack_[0].state == yyfinal_)
566 yyn = yypact_[yystack_[0].state];
567 if (yy_pact_value_is_default_ (yyn))
576 #endif // YY_EXCEPTIONS
579 yyla.
move (yylookahead);
587 #endif // YY_EXCEPTIONS
593 yyn += yyla.type_get ();
594 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ())
601 if (yy_table_value_is_error_ (yyn))
612 yypush_ (
"Shifting", yyn,
YY_MOVE (yyla));
619 yyn = yydefact_[yystack_[0].state];
630 stack_symbol_type yylhs;
631 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
644 yylhs.value.emplace<
bool > ();
648 yylhs.value.emplace<
double > ();
652 yylhs.value.emplace< int64_t > ();
656 yylhs.value.emplace< std::string > ();
668 yyerror_range[1].location = yylhs.location;
675 #endif // YY_EXCEPTIONS
680 #line 114 "agent_parser.yy" // lalr1.cc:907
682 #line 683 "agent_parser.cc" // lalr1.cc:907
686 #line 115 "agent_parser.yy" // lalr1.cc:907
688 #line 689 "agent_parser.cc" // lalr1.cc:907
692 #line 116 "agent_parser.yy" // lalr1.cc:907
694 #line 695 "agent_parser.cc" // lalr1.cc:907
698 #line 124 "agent_parser.yy" // lalr1.cc:907
704 #line 705 "agent_parser.cc" // lalr1.cc:907
708 #line 128 "agent_parser.yy" // lalr1.cc:907
712 #line 713 "agent_parser.cc" // lalr1.cc:907
716 #line 135 "agent_parser.yy" // lalr1.cc:907
721 #line 722 "agent_parser.cc" // lalr1.cc:907
725 #line 141 "agent_parser.yy" // lalr1.cc:907
727 #line 728 "agent_parser.cc" // lalr1.cc:907
731 #line 142 "agent_parser.yy" // lalr1.cc:907
733 #line 734 "agent_parser.cc" // lalr1.cc:907
737 #line 143 "agent_parser.yy" // lalr1.cc:907
739 #line 740 "agent_parser.cc" // lalr1.cc:907
743 #line 144 "agent_parser.yy" // lalr1.cc:907
745 #line 746 "agent_parser.cc" // lalr1.cc:907
749 #line 145 "agent_parser.yy" // lalr1.cc:907
751 #line 752 "agent_parser.cc" // lalr1.cc:907
755 #line 146 "agent_parser.yy" // lalr1.cc:907
757 #line 758 "agent_parser.cc" // lalr1.cc:907
761 #line 147 "agent_parser.yy" // lalr1.cc:907
763 #line 764 "agent_parser.cc" // lalr1.cc:907
767 #line 151 "agent_parser.yy" // lalr1.cc:907
774 #line 775 "agent_parser.cc" // lalr1.cc:907
778 #line 156 "agent_parser.yy" // lalr1.cc:907
784 #line 785 "agent_parser.cc" // lalr1.cc:907
788 #line 162 "agent_parser.yy" // lalr1.cc:907
790 #line 791 "agent_parser.cc" // lalr1.cc:907
794 #line 176 "agent_parser.yy" // lalr1.cc:907
797 ctx.
stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as<
ElementPtr > ());
799 #line 800 "agent_parser.cc" // lalr1.cc:907
803 #line 180 "agent_parser.yy" // lalr1.cc:907
807 ctx.
stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as<
ElementPtr > ());
809 #line 810 "agent_parser.cc" // lalr1.cc:907
813 #line 187 "agent_parser.yy" // lalr1.cc:907
818 #line 819 "agent_parser.cc" // lalr1.cc:907
822 #line 190 "agent_parser.yy" // lalr1.cc:907
825 #line 826 "agent_parser.cc" // lalr1.cc:907
829 #line 197 "agent_parser.yy" // lalr1.cc:907
834 #line 835 "agent_parser.cc" // lalr1.cc:907
838 #line 201 "agent_parser.yy" // lalr1.cc:907
843 #line 844 "agent_parser.cc" // lalr1.cc:907
847 #line 214 "agent_parser.yy" // lalr1.cc:907
850 const std::string& keyword = yystack_[1].value.as< std::string > ();
851 error(yystack_[1].location,
852 "got unexpected keyword \"" + keyword +
"\" in " + where +
" map.");
854 #line 855 "agent_parser.cc" // lalr1.cc:907
858 #line 223 "agent_parser.yy" // lalr1.cc:907
865 #line 866 "agent_parser.cc" // lalr1.cc:907
869 #line 228 "agent_parser.yy" // lalr1.cc:907
875 #line 876 "agent_parser.cc" // lalr1.cc:907
879 #line 249 "agent_parser.yy" // lalr1.cc:907
887 ctx.
stack_.back()->set(
"Control-agent", m);
891 #line 892 "agent_parser.cc" // lalr1.cc:907
895 #line 259 "agent_parser.yy" // lalr1.cc:907
902 #line 903 "agent_parser.cc" // lalr1.cc:907
906 #line 281 "agent_parser.yy" // lalr1.cc:907
910 #line 911 "agent_parser.cc" // lalr1.cc:907
914 #line 283 "agent_parser.yy" // lalr1.cc:907
917 ctx.
stack_.back()->set(
"http-host", host);
920 #line 921 "agent_parser.cc" // lalr1.cc:907
924 #line 289 "agent_parser.yy" // lalr1.cc:907
927 ctx.
stack_.back()->set(
"http-port", prf);
929 #line 930 "agent_parser.cc" // lalr1.cc:907
933 #line 294 "agent_parser.yy" // lalr1.cc:907
937 #line 938 "agent_parser.cc" // lalr1.cc:907
941 #line 296 "agent_parser.yy" // lalr1.cc:907
950 if ((old->size() != 1) || !old->contains(
"comment")) {
951 std::stringstream msg;
952 msg <<
"duplicate user-context entries (previous at "
953 << old->getPosition().str() <<
")";
954 error(yystack_[3].location, msg.str());
957 user_context->set(
"comment", old->get(
"comment"));
961 parent->set(
"user-context", user_context);
964 #line 965 "agent_parser.cc" // lalr1.cc:907
968 #line 319 "agent_parser.yy" // lalr1.cc:907
972 #line 973 "agent_parser.cc" // lalr1.cc:907
976 #line 321 "agent_parser.yy" // lalr1.cc:907
981 user_context->set(
"comment", comment);
987 if (old->contains(
"comment")) {
988 std::stringstream msg;
989 msg <<
"duplicate user-context/comment entries (previous at "
990 << old->getPosition().str() <<
")";
991 error(yystack_[3].location, msg.str());
994 merge(user_context, old);
998 parent->set(
"user-context", user_context);
1001 #line 1002 "agent_parser.cc" // lalr1.cc:907
1005 #line 347 "agent_parser.yy" // lalr1.cc:907
1008 ctx.
stack_.back()->set(
"hooks-libraries", l);
1012 #line 1013 "agent_parser.cc" // lalr1.cc:907
1016 #line 352 "agent_parser.yy" // lalr1.cc:907
1021 #line 1022 "agent_parser.cc" // lalr1.cc:907
1025 #line 365 "agent_parser.yy" // lalr1.cc:907
1028 ctx.
stack_.back()->add(m);
1031 #line 1032 "agent_parser.cc" // lalr1.cc:907
1035 #line 369 "agent_parser.yy" // lalr1.cc:907
1039 #line 1040 "agent_parser.cc" // lalr1.cc:907
1043 #line 382 "agent_parser.yy" // lalr1.cc:907
1047 #line 1048 "agent_parser.cc" // lalr1.cc:907
1051 #line 384 "agent_parser.yy" // lalr1.cc:907
1054 ctx.
stack_.back()->set(
"library", lib);
1057 #line 1058 "agent_parser.cc" // lalr1.cc:907
1061 #line 390 "agent_parser.yy" // lalr1.cc:907
1065 #line 1066 "agent_parser.cc" // lalr1.cc:907
1069 #line 392 "agent_parser.yy" // lalr1.cc:907
1071 ctx.
stack_.back()->set(
"parameters", yystack_[0].value.as<
ElementPtr > ());
1074 #line 1075 "agent_parser.cc" // lalr1.cc:907
1078 #line 400 "agent_parser.yy" // lalr1.cc:907
1081 ctx.
stack_.back()->set(
"control-sockets", m);
1085 #line 1086 "agent_parser.cc" // lalr1.cc:907
1089 #line 405 "agent_parser.yy" // lalr1.cc:907
1094 #line 1095 "agent_parser.cc" // lalr1.cc:907
1098 #line 426 "agent_parser.yy" // lalr1.cc:907
1101 ctx.
stack_.back()->set(
"dhcp4", m);
1105 #line 1106 "agent_parser.cc" // lalr1.cc:907
1109 #line 431 "agent_parser.yy" // lalr1.cc:907
1114 #line 1115 "agent_parser.cc" // lalr1.cc:907
1118 #line 437 "agent_parser.yy" // lalr1.cc:907
1121 ctx.
stack_.back()->set(
"dhcp6", m);
1125 #line 1126 "agent_parser.cc" // lalr1.cc:907
1129 #line 442 "agent_parser.yy" // lalr1.cc:907
1134 #line 1135 "agent_parser.cc" // lalr1.cc:907
1138 #line 448 "agent_parser.yy" // lalr1.cc:907
1141 ctx.
stack_.back()->set(
"d2", m);
1145 #line 1146 "agent_parser.cc" // lalr1.cc:907
1149 #line 453 "agent_parser.yy" // lalr1.cc:907
1154 #line 1155 "agent_parser.cc" // lalr1.cc:907
1158 #line 472 "agent_parser.yy" // lalr1.cc:907
1162 #line 1163 "agent_parser.cc" // lalr1.cc:907
1166 #line 474 "agent_parser.yy" // lalr1.cc:907
1169 ctx.
stack_.back()->set(
"socket-name", name);
1172 #line 1173 "agent_parser.cc" // lalr1.cc:907
1176 #line 481 "agent_parser.yy" // lalr1.cc:907
1180 #line 1181 "agent_parser.cc" // lalr1.cc:907
1184 #line 483 "agent_parser.yy" // lalr1.cc:907
1186 ctx.
stack_.back()->set(
"socket-type", yystack_[0].value.as<
ElementPtr > ());
1189 #line 1190 "agent_parser.cc" // lalr1.cc:907
1193 #line 489 "agent_parser.yy" // lalr1.cc:907
1195 #line 1196 "agent_parser.cc" // lalr1.cc:907
1199 #line 495 "agent_parser.yy" // lalr1.cc:907
1203 #line 1204 "agent_parser.cc" // lalr1.cc:907
1207 #line 497 "agent_parser.yy" // lalr1.cc:907
1212 #line 1213 "agent_parser.cc" // lalr1.cc:907
1216 #line 502 "agent_parser.yy" // lalr1.cc:907
1220 #line 1221 "agent_parser.cc" // lalr1.cc:907
1224 #line 504 "agent_parser.yy" // lalr1.cc:907
1229 #line 1230 "agent_parser.cc" // lalr1.cc:907
1233 #line 509 "agent_parser.yy" // lalr1.cc:907
1237 #line 1238 "agent_parser.cc" // lalr1.cc:907
1241 #line 511 "agent_parser.yy" // lalr1.cc:907
1246 #line 1247 "agent_parser.cc" // lalr1.cc:907
1250 #line 521 "agent_parser.yy" // lalr1.cc:907
1253 ctx.
stack_.back()->set(
"Logging", m);
1257 #line 1258 "agent_parser.cc" // lalr1.cc:907
1261 #line 526 "agent_parser.yy" // lalr1.cc:907
1266 #line 1267 "agent_parser.cc" // lalr1.cc:907
1270 #line 543 "agent_parser.yy" // lalr1.cc:907
1273 ctx.
stack_.back()->set(
"loggers", l);
1277 #line 1278 "agent_parser.cc" // lalr1.cc:907
1281 #line 548 "agent_parser.yy" // lalr1.cc:907
1286 #line 1287 "agent_parser.cc" // lalr1.cc:907
1290 #line 560 "agent_parser.yy" // lalr1.cc:907
1293 ctx.
stack_.back()->add(l);
1296 #line 1297 "agent_parser.cc" // lalr1.cc:907
1300 #line 564 "agent_parser.yy" // lalr1.cc:907
1304 #line 1305 "agent_parser.cc" // lalr1.cc:907
1308 #line 581 "agent_parser.yy" // lalr1.cc:907
1312 #line 1313 "agent_parser.cc" // lalr1.cc:907
1316 #line 583 "agent_parser.yy" // lalr1.cc:907
1319 ctx.
stack_.back()->set(
"name", name);
1322 #line 1323 "agent_parser.cc" // lalr1.cc:907
1326 #line 589 "agent_parser.yy" // lalr1.cc:907
1329 ctx.
stack_.back()->set(
"debuglevel", dl);
1331 #line 1332 "agent_parser.cc" // lalr1.cc:907
1335 #line 594 "agent_parser.yy" // lalr1.cc:907
1339 #line 1340 "agent_parser.cc" // lalr1.cc:907
1343 #line 596 "agent_parser.yy" // lalr1.cc:907
1346 ctx.
stack_.back()->set(
"severity", sev);
1349 #line 1350 "agent_parser.cc" // lalr1.cc:907
1353 #line 602 "agent_parser.yy" // lalr1.cc:907
1356 ctx.
stack_.back()->set(
"output_options", l);
1360 #line 1361 "agent_parser.cc" // lalr1.cc:907
1364 #line 607 "agent_parser.yy" // lalr1.cc:907
1369 #line 1370 "agent_parser.cc" // lalr1.cc:907
1373 #line 616 "agent_parser.yy" // lalr1.cc:907
1376 ctx.
stack_.back()->add(m);
1379 #line 1380 "agent_parser.cc" // lalr1.cc:907
1383 #line 620 "agent_parser.yy" // lalr1.cc:907
1387 #line 1388 "agent_parser.cc" // lalr1.cc:907
1391 #line 634 "agent_parser.yy" // lalr1.cc:907
1395 #line 1396 "agent_parser.cc" // lalr1.cc:907
1399 #line 636 "agent_parser.yy" // lalr1.cc:907
1402 ctx.
stack_.back()->set(
"output", sev);
1405 #line 1406 "agent_parser.cc" // lalr1.cc:907
1409 #line 642 "agent_parser.yy" // lalr1.cc:907
1412 ctx.
stack_.back()->set(
"flush", flush);
1414 #line 1415 "agent_parser.cc" // lalr1.cc:907
1418 #line 647 "agent_parser.yy" // lalr1.cc:907
1421 ctx.
stack_.back()->set(
"maxsize", maxsize);
1423 #line 1424 "agent_parser.cc" // lalr1.cc:907
1427 #line 652 "agent_parser.yy" // lalr1.cc:907
1430 ctx.
stack_.back()->set(
"maxver", maxver);
1432 #line 1433 "agent_parser.cc" // lalr1.cc:907
1436 #line 1437 "agent_parser.cc" // lalr1.cc:907
1447 #endif // YY_EXCEPTIONS
1454 yypush_ (YY_NULLPTR,
YY_MOVE (yylhs));
1466 error (yyla.
location, yysyntax_error_ (yystack_[0].state, yyla));
1470 yyerror_range[1].location = yyla.
location;
1471 if (yyerrstatus_ == 3)
1477 if (yyla.type_get () == yyeof_)
1479 else if (!yyla.
empty ())
1481 yy_destroy_ (
"Error: discarding", yyla);
1512 stack_symbol_type error_token;
1515 yyn = yypact_[yystack_[0].state];
1516 if (!yy_pact_value_is_default_ (yyn))
1519 if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
1521 yyn = yytable_[yyn];
1528 if (yystack_.size () == 1)
1531 yyerror_range[1].location = yystack_[0].location;
1532 yy_destroy_ (
"Error: popping", yystack_[0]);
1537 yyerror_range[2].location = yyla.
location;
1541 error_token.state = yyn;
1542 yypush_ (
"Shifting",
YY_MOVE (error_token));
1558 yy_destroy_ (
"Cleanup: discarding lookahead", yyla);
1563 while (1 < yystack_.size ())
1565 yy_destroy_ (
"Cleanup: popping", yystack_[0]);
1574 YYCDEBUG <<
"Exception caught: cleaning lookahead and stack\n";
1578 yy_destroy_ (YY_NULLPTR, yyla);
1580 while (1 < yystack_.
size ())
1582 yy_destroy_ (YY_NULLPTR, yystack_[0]);
1587 #endif // YY_EXCEPTIONS
1598 AgentParser::yysyntax_error_ (state_type yystate,
const symbol_type& yyla)
const
1604 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1606 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1635 int yytoken = yyla.type_get ();
1636 yyarg[yycount++] = yytname_[yytoken];
1637 int yyn = yypact_[yystate];
1638 if (!yy_pact_value_is_default_ (yyn))
1643 int yyxbegin = yyn < 0 ? -yyn : 0;
1645 int yychecklim = yylast_ - yyn + 1;
1646 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
1647 for (
int yyx = yyxbegin; yyx < yyxend; ++yyx)
1648 if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
1649 && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
1651 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1657 yyarg[yycount++] = yytname_[yyx];
1662 char const* yyformat = YY_NULLPTR;
1665 #define YYCASE_(N, S) \
1671 YYCASE_ (1,
YY_(
"syntax error, unexpected %s"));
1672 YYCASE_ (2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1673 YYCASE_ (3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1674 YYCASE_ (4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1675 YYCASE_ (5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1682 for (
char const* yyp = yyformat; *yyp; ++yyp)
1683 if (yyp[0] ==
'%' && yyp[1] ==
's' && yyi < yycount)
1685 yyres += yytnamerr_ (yyarg[yyi++]);
1694 const signed char AgentParser::yypact_ninf_ = -68;
1696 const signed char AgentParser::yytable_ninf_ = -1;
1699 AgentParser::yypact_[] =
1701 59, -68, -68, -68, 6, 8, 9, 34, -68, -68,
1702 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
1703 -68, -68, -68, -68, 8, -29, -5, -4, -68, 41,
1704 51, 98, 85, 100, -68, -68, -68, -68, -68, 101,
1705 -68, 11, -68, -68, -68, -68, -68, -68, -68, 102,
1706 -68, -68, 103, -68, -68, 21, -68, -68, -68, -68,
1707 -68, -68, -68, -68, 8, 8, -68, 63, 104, 105,
1708 106, 107, 109, -68, -5, -68, 111, 74, 113, 114,
1709 112, 116, -4, -68, -68, -68, 117, 115, 118, 8,
1710 8, 8, -68, 83, -68, 119, 87, -68, 122, -68,
1711 8, -4, 97, -68, -68, -68, -68, -68, -68, -68,
1712 5, 123, -68, 64, -68, 65, -68, -68, -68, -68,
1713 -68, -68, 71, -68, -68, -68, -68, -68, 125, 126,
1714 -68, -68, 128, 97, -68, 129, 130, 131, 5, -68,
1715 37, -68, 123, 132, -68, 133, 134, 135, -68, -68,
1716 -68, -68, 78, -68, -68, -68, -68, 136, 14, 14,
1717 14, 140, 141, 42, -68, -68, 32, -68, -68, -68,
1718 -68, -68, -68, 79, -68, -68, -68, 80, 82, 95,
1719 8, -68, 12, 136, -68, 142, 143, 14, -68, -68,
1720 -68, -68, -68, -68, -68, 144, -68, -68, -68, -68,
1721 86, -68, -68, -68, -68, -68, -68, 108, 138, -68,
1722 146, 147, 96, 148, 12, -68, -68, -68, -68, 120,
1723 149, -68, 121, -68, -68, 156, -68, -68, 89, -68,
1724 30, 156, -68, -68, 151, 160, 161, 88, -68, -68,
1725 -68, -68, -68, -68, 162, 124, 127, 137, 30, -68,
1726 139, -68, -68, -68, -68, -68
1730 AgentParser::yydefact_[] =
1732 0, 2, 4, 6, 0, 0, 0, 0, 1, 25,
1733 18, 15, 14, 11, 12, 13, 3, 10, 16, 17,
1734 32, 5, 8, 7, 27, 21, 0, 0, 29, 0,
1735 28, 0, 0, 22, 42, 109, 103, 105, 107, 0,
1736 41, 0, 34, 36, 38, 39, 40, 37, 53, 0,
1737 56, 58, 0, 60, 52, 0, 44, 46, 47, 50,
1738 51, 49, 48, 26, 0, 0, 19, 0, 0, 0,
1739 0, 0, 0, 31, 0, 33, 0, 0, 0, 0,
1740 0, 0, 0, 9, 30, 23, 0, 0, 0, 0,
1741 0, 0, 35, 0, 55, 0, 0, 77, 0, 45,
1742 0, 0, 0, 104, 106, 108, 54, 20, 57, 59,
1743 0, 62, 24, 0, 114, 0, 111, 113, 85, 87,
1744 89, 84, 0, 79, 81, 82, 83, 66, 0, 63,
1745 64, 43, 0, 0, 110, 0, 0, 0, 0, 78,
1746 0, 61, 0, 0, 112, 0, 0, 0, 80, 73,
1747 75, 70, 0, 68, 71, 72, 65, 0, 0, 0,
1748 0, 0, 0, 0, 67, 118, 0, 116, 98, 100,
1749 97, 95, 96, 0, 91, 93, 94, 0, 0, 0,
1750 0, 69, 0, 0, 115, 0, 0, 0, 86, 88,
1751 90, 74, 76, 129, 134, 0, 132, 128, 126, 127,
1752 0, 120, 122, 124, 125, 123, 117, 0, 0, 92,
1753 0, 0, 0, 0, 0, 119, 99, 102, 101, 0,
1754 0, 131, 0, 121, 130, 0, 133, 138, 0, 136,
1755 0, 0, 135, 146, 0, 0, 0, 0, 140, 142,
1756 143, 144, 145, 137, 0, 0, 0, 0, 0, 139,
1757 0, 148, 149, 150, 141, 147
1761 AgentParser::yypgoto_[] =
1763 -68, -68, -68, -68, -68, -68, -68, -68, -20, 44,
1764 -68, -68, -68, -68, -68, -68, -68, -68, -26, -68,
1765 -68, -68, 93, -68, -68, 52, 90, -68, -68, -68,
1766 -25, -68, -24, -68, -68, -68, -68, -68, 28, -68,
1767 -68, 10, -68, -68, -68, -68, -68, -68, -68, 33,
1768 -68, -68, -68, -68, -68, -68, -59, -13, -68, -68,
1769 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
1770 -68, -68, 43, -68, -68, -68, -8, -68, -68, -37,
1771 -68, -68, -68, -68, -68, -68, -68, -68, -53, -68,
1772 -68, -67, -68, -68, -68, -68, -68
1776 AgentParser::yydefgoto_[] =
1778 -1, 4, 5, 6, 7, 23, 27, 16, 17, 18,
1779 25, 108, 32, 33, 19, 24, 29, 30, 170, 21,
1780 26, 41, 42, 43, 68, 55, 56, 57, 76, 58,
1781 171, 78, 172, 79, 61, 81, 128, 129, 130, 140,
1782 152, 153, 154, 161, 155, 162, 62, 110, 122, 123,
1783 124, 135, 125, 136, 126, 137, 173, 174, 175, 185,
1784 176, 186, 218, 44, 70, 45, 71, 46, 72, 47,
1785 69, 115, 116, 117, 132, 166, 167, 182, 200, 201,
1786 202, 210, 203, 204, 213, 205, 211, 228, 229, 230,
1787 237, 238, 239, 244, 240, 241, 242
1791 AgentParser::yytable_[] =
1793 40, 54, 59, 60, 28, 34, 8, 48, 49, 50,
1794 51, 52, 31, 9, 74, 10, 20, 11, 53, 75,
1795 35, 118, 119, 120, 82, 50, 51, 50, 51, 83,
1796 36, 37, 38, 168, 169, 183, 39, 39, 184, 193,
1797 194, 22, 195, 196, 84, 85, 39, 63, 40, 12,
1798 13, 14, 15, 39, 64, 39, 54, 59, 60, 233,
1799 149, 150, 234, 235, 236, 149, 150, 82, 133, 103,
1800 104, 105, 131, 134, 138, 54, 59, 60, 39, 139,
1801 112, 163, 187, 187, 121, 187, 164, 188, 189, 214,
1802 190, 248, 231, 66, 215, 232, 249, 1, 2, 3,
1803 177, 178, 65, 67, 86, 73, 77, 80, 87, 88,
1804 89, 90, 121, 91, 151, 93, 94, 95, 96, 97,
1805 98, 100, 101, 114, 106, 102, 10, 111, 109, 142,
1806 127, 141, 143, 145, 146, 147, 191, 157, 221, 107,
1807 158, 159, 160, 165, 179, 180, 207, 208, 212, 216,
1808 219, 220, 222, 113, 225, 245, 197, 198, 199, 217,
1809 192, 224, 226, 227, 246, 247, 250, 92, 251, 252,
1810 156, 148, 99, 181, 209, 206, 144, 223, 243, 253,
1811 255, 254, 0, 0, 0, 0, 0, 0, 197, 198,
1816 AgentParser::yycheck_[] =
1818 26, 27, 27, 27, 24, 10, 0, 11, 12, 13,
1819 14, 15, 41, 5, 3, 7, 7, 9, 22, 8,
1820 25, 16, 17, 18, 3, 13, 14, 13, 14, 8,
1821 35, 36, 37, 19, 20, 3, 41, 41, 6, 27,
1822 28, 7, 30, 31, 64, 65, 41, 6, 74, 41,
1823 42, 43, 44, 41, 3, 41, 82, 82, 82, 29,
1824 23, 24, 32, 33, 34, 23, 24, 3, 3, 89,
1825 90, 91, 8, 8, 3, 101, 101, 101, 41, 8,
1826 100, 3, 3, 3, 110, 3, 8, 8, 8, 3,
1827 8, 3, 3, 8, 8, 6, 8, 38, 39, 40,
1828 159, 160, 4, 3, 41, 4, 4, 4, 4, 4,
1829 4, 4, 138, 4, 140, 4, 42, 4, 4, 7,
1830 4, 4, 7, 26, 41, 7, 7, 5, 41, 3,
1831 7, 6, 4, 4, 4, 4, 41, 5, 42, 95,
1832 7, 7, 7, 7, 4, 4, 4, 4, 4, 41,
1833 4, 4, 4, 101, 5, 4, 182, 182, 182, 21,
1834 180, 41, 41, 7, 4, 4, 4, 74, 44, 42,
1835 142, 138, 82, 163, 187, 183, 133, 214, 231, 42,
1836 41, 248, -1, -1, -1, -1, -1, -1, 214, 214,
1841 AgentParser::yystos_[] =
1843 0, 38, 39, 40, 46, 47, 48, 49, 0, 5,
1844 7, 9, 41, 42, 43, 44, 52, 53, 54, 59,
1845 7, 64, 7, 50, 60, 55, 65, 51, 53, 61,
1846 62, 41, 57, 58, 10, 25, 35, 36, 37, 41,
1847 63, 66, 67, 68, 108, 110, 112, 114, 11, 12,
1848 13, 14, 15, 22, 63, 70, 71, 72, 74, 75,
1849 77, 79, 91, 6, 3, 4, 8, 3, 69, 115,
1850 109, 111, 113, 4, 3, 8, 73, 4, 76, 78,
1851 4, 80, 3, 8, 53, 53, 41, 4, 4, 4,
1852 4, 4, 67, 4, 42, 4, 4, 7, 4, 71,
1853 4, 7, 7, 53, 53, 53, 41, 54, 56, 41,
1854 92, 5, 53, 70, 26, 116, 117, 118, 16, 17,
1855 18, 63, 93, 94, 95, 97, 99, 7, 81, 82,
1856 83, 8, 119, 3, 8, 96, 98, 100, 3, 8,
1857 84, 6, 3, 4, 117, 4, 4, 4, 94, 23,
1858 24, 63, 85, 86, 87, 89, 83, 5, 7, 7,
1859 7, 88, 90, 3, 8, 7, 120, 121, 19, 20,
1860 63, 75, 77, 101, 102, 103, 105, 101, 101, 4,
1861 4, 86, 122, 3, 6, 104, 106, 3, 8, 8,
1862 8, 41, 53, 27, 28, 30, 31, 63, 75, 77,
1863 123, 124, 125, 127, 128, 130, 121, 4, 4, 102,
1864 126, 131, 4, 129, 3, 8, 41, 21, 107, 4,
1865 4, 42, 4, 124, 41, 5, 41, 7, 132, 133,
1866 134, 3, 6, 29, 32, 33, 34, 135, 136, 137,
1867 139, 140, 141, 133, 138, 4, 4, 4, 3, 8,
1868 4, 44, 42, 42, 136, 41
1872 AgentParser::yyr1_[] =
1874 0, 45, 47, 46, 48, 46, 49, 46, 51, 50,
1875 52, 53, 53, 53, 53, 53, 53, 53, 55, 54,
1876 56, 57, 57, 58, 58, 60, 59, 61, 61, 62,
1877 62, 63, 65, 64, 66, 66, 67, 67, 67, 67,
1878 67, 67, 69, 68, 70, 70, 71, 71, 71, 71,
1879 71, 71, 71, 73, 72, 74, 76, 75, 78, 77,
1880 80, 79, 81, 81, 82, 82, 84, 83, 85, 85,
1881 85, 86, 86, 88, 87, 90, 89, 92, 91, 93,
1882 93, 94, 94, 94, 94, 96, 95, 98, 97, 100,
1883 99, 101, 101, 102, 102, 102, 102, 102, 104, 103,
1884 106, 105, 107, 109, 108, 111, 110, 113, 112, 115,
1885 114, 116, 116, 117, 119, 118, 120, 120, 122, 121,
1886 123, 123, 124, 124, 124, 124, 124, 124, 124, 126,
1887 125, 127, 129, 128, 131, 130, 132, 132, 134, 133,
1888 135, 135, 136, 136, 136, 136, 138, 137, 139, 140,
1893 AgentParser::yyr2_[] =
1895 0, 2, 0, 3, 0, 3, 0, 3, 0, 4,
1896 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
1897 1, 0, 1, 3, 5, 0, 4, 0, 1, 1,
1898 3, 2, 0, 4, 1, 3, 1, 1, 1, 1,
1899 1, 1, 0, 6, 1, 3, 1, 1, 1, 1,
1900 1, 1, 1, 0, 4, 3, 0, 4, 0, 4,
1901 0, 6, 0, 1, 1, 3, 0, 4, 1, 3,
1902 1, 1, 1, 0, 4, 0, 4, 0, 6, 1,
1903 3, 1, 1, 1, 1, 0, 6, 0, 6, 0,
1904 6, 1, 3, 1, 1, 1, 1, 1, 0, 4,
1905 0, 4, 1, 0, 4, 0, 4, 0, 4, 0,
1906 6, 1, 3, 1, 0, 6, 1, 3, 0, 4,
1907 1, 3, 1, 1, 1, 1, 1, 1, 1, 0,
1908 4, 3, 0, 4, 0, 6, 1, 3, 0, 4,
1909 1, 3, 1, 1, 1, 1, 0, 4, 3, 3,
1918 const AgentParser::yytname_[] =
1920 "\"end of file\"",
"error",
"$undefined",
"\",\"",
"\":\"",
"\"[\"",
1921 "\"]\"",
"\"{\"",
"\"}\"",
"\"null\"",
"\"Control-agent\"",
1922 "\"http-host\"",
"\"http-port\"",
"\"user-context\"",
"\"comment\"",
1923 "\"control-sockets\"",
"\"dhcp4\"",
"\"dhcp6\"",
"\"d2\"",
1924 "\"socket-name\"",
"\"socket-type\"",
"\"unix\"",
"\"hooks-libraries\"",
1925 "\"library\"",
"\"parameters\"",
"\"Logging\"",
"\"loggers\"",
1926 "\"name\"",
"\"output_options\"",
"\"output\"",
"\"debuglevel\"",
1927 "\"severity\"",
"\"flush\"",
"\"maxsize\"",
"\"maxver\"",
"\"Dhcp4\"",
1928 "\"Dhcp6\"",
"\"DhcpDdns\"",
"START_JSON",
"START_AGENT",
1929 "START_SUB_AGENT",
"\"constant string\"",
"\"integer\"",
1930 "\"floating point\"",
"\"boolean\"",
"$accept",
"start",
"$@1",
"$@2",
1931 "$@3",
"sub_agent",
"$@4",
"json",
"value",
"map",
"$@5",
"map_value",
1932 "map_content",
"not_empty_map",
"list_generic",
"$@6",
"list_content",
1933 "not_empty_list",
"unknown_map_entry",
"agent_syntax_map",
"$@7",
1934 "global_objects",
"global_object",
"agent_object",
"$@8",
1935 "global_params",
"global_param",
"http_host",
"$@9",
"http_port",
1936 "user_context",
"$@10",
"comment",
"$@11",
"hooks_libraries",
"$@12",
1937 "hooks_libraries_list",
"not_empty_hooks_libraries_list",
1938 "hooks_library",
"$@13",
"hooks_params",
"hooks_param",
"library",
1939 "$@14",
"parameters",
"$@15",
"control_sockets",
"$@16",
1940 "control_sockets_params",
"control_socket",
"dhcp4_server_socket",
1941 "$@17",
"dhcp6_server_socket",
"$@18",
"d2_server_socket",
"$@19",
1942 "control_socket_params",
"control_socket_param",
"socket_name",
"$@20",
1943 "socket_type",
"$@21",
"socket_type_value",
"dhcp4_json_object",
"$@22",
1944 "dhcp6_json_object",
"$@23",
"dhcpddns_json_object",
"$@24",
1945 "logging_object",
"$@25",
"logging_params",
"logging_param",
"loggers",
1946 "$@26",
"loggers_entries",
"logger_entry",
"$@27",
"logger_params",
1947 "logger_param",
"name",
"$@28",
"debuglevel",
"severity",
"$@29",
1948 "output_options_list",
"$@30",
"output_options_list_content",
1949 "output_entry",
"$@31",
"output_params_list",
"output_params",
"output",
1950 "$@32",
"flush",
"maxsize",
"maxver", YY_NULLPTR
1954 const unsigned short
1955 AgentParser::yyrline_[] =
1957 0, 114, 114, 114, 115, 115, 116, 116, 124, 124,
1958 135, 141, 142, 143, 144, 145, 146, 147, 151, 151,
1959 162, 167, 168, 176, 180, 187, 187, 193, 194, 197,
1960 201, 214, 223, 223, 235, 236, 240, 241, 242, 243,
1961 244, 245, 249, 249, 266, 267, 272, 273, 274, 275,
1962 276, 277, 278, 281, 281, 289, 294, 294, 319, 319,
1963 347, 347, 357, 358, 361, 362, 365, 365, 373, 374,
1964 375, 378, 379, 382, 382, 390, 390, 400, 400, 413,
1965 414, 419, 420, 421, 422, 426, 426, 437, 437, 448,
1966 448, 459, 460, 464, 465, 466, 467, 468, 472, 472,
1967 481, 481, 489, 495, 495, 502, 502, 509, 509, 521,
1968 521, 534, 535, 539, 543, 543, 555, 556, 560, 560,
1969 568, 569, 572, 573, 574, 575, 576, 577, 578, 581,
1970 581, 589, 594, 594, 602, 602, 612, 613, 616, 616,
1971 624, 625, 628, 629, 630, 631, 634, 634, 642, 647,
1977 AgentParser::yystack_print_ ()
1979 *yycdebug_ <<
"Stack now";
1981 i = yystack_.
begin (),
1982 i_end = yystack_.
end ();
1984 *yycdebug_ <<
' ' << i->state;
1990 AgentParser::yy_reduce_print_ (
int yyrule)
1992 unsigned yylno = yyrline_[yyrule];
1993 int yynrhs = yyr2_[yyrule];
1995 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1996 <<
" (line " << yylno <<
"):\n";
1998 for (
int yyi = 0; yyi < yynrhs; yyi++)
2000 yystack_[(yynrhs) - (yyi + 1)]);
2002 #endif // AGENT_DEBUG
2005 #line 14 "agent_parser.yy" // lalr1.cc:1218
2007 #line 2008 "agent_parser.cc" // lalr1.cc:1218
2008 #line 657 "agent_parser.yy" // lalr1.cc:1219
2013 const std::string& what)
2015 ctx.
error(loc, what);