From: Francis Dupont Date: Tue, 19 May 2020 07:21:03 +0000 (+0000) Subject: [#1224] Regen bison files with 3.6.2 X-Git-Tag: Kea-1.7.8~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfc299dc07fa7e675bfda25925bdcb4519b994a4;p=thirdparty%2Fkea.git [#1224] Regen bison files with 3.6.2 --- diff --git a/src/bin/agent/agent_parser.cc b/src/bin/agent/agent_parser.cc index 10a41fefff..92f5286ca2 100644 --- a/src/bin/agent/agent_parser.cc +++ b/src/bin/agent/agent_parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ #include -#line 51 "agent_parser.cc" +#line 52 "agent_parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !AGENT_DEBUG @@ -139,49 +141,7 @@ #line 14 "agent_parser.yy" namespace isc { namespace agent { -#line 143 "agent_parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - AgentParser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "agent_parser.cc" /// Build a parser object. AgentParser::AgentParser (isc::agent::ParserContext& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace agent { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace agent { : state (s) {} - AgentParser::symbol_number_type - AgentParser::by_state::type_get () const YY_NOEXCEPT + AgentParser::symbol_kind_type + AgentParser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } AgentParser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace agent { AgentParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 54: // value case 57: // map_value @@ -284,7 +244,7 @@ namespace isc { namespace agent { AgentParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 54: // value case 57: // map_value @@ -313,7 +273,7 @@ namespace isc { namespace agent { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -321,7 +281,7 @@ namespace isc { namespace agent { AgentParser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 54: // value case 57: // map_value @@ -357,7 +317,7 @@ namespace isc { namespace agent { AgentParser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 54: // value case 57: // map_value @@ -403,69 +363,67 @@ namespace isc { namespace agent { #if AGENT_DEBUG template void - AgentParser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + AgentParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 42: // "constant string" #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 427 "agent_parser.cc" +#line 384 "agent_parser.cc" break; case 43: // "integer" #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < int64_t > (); } -#line 433 "agent_parser.cc" +#line 390 "agent_parser.cc" break; case 44: // "floating point" #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < double > (); } -#line 439 "agent_parser.cc" +#line 396 "agent_parser.cc" break; case 45: // "boolean" #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < bool > (); } -#line 445 "agent_parser.cc" +#line 402 "agent_parser.cc" break; case 54: // value #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 451 "agent_parser.cc" +#line 408 "agent_parser.cc" break; case 57: // map_value #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 457 "agent_parser.cc" +#line 414 "agent_parser.cc" break; case 108: // socket_type_value #line 104 "agent_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 463 "agent_parser.cc" +#line 420 "agent_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -524,11 +482,11 @@ namespace isc { namespace agent { AgentParser::state_type AgentParser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -588,6 +546,7 @@ namespace isc { namespace agent { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -608,7 +567,7 @@ namespace isc { namespace agent { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -627,10 +586,20 @@ namespace isc { namespace agent { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -722,19 +691,19 @@ namespace isc { namespace agent { case 2: #line 115 "agent_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORDS; } -#line 726 "agent_parser.cc" +#line 695 "agent_parser.cc" break; case 4: #line 116 "agent_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 732 "agent_parser.cc" +#line 701 "agent_parser.cc" break; case 6: #line 117 "agent_parser.yy" { ctx.ctx_ = ctx.AGENT; } -#line 738 "agent_parser.cc" +#line 707 "agent_parser.cc" break; case 8: @@ -744,7 +713,7 @@ namespace isc { namespace agent { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 748 "agent_parser.cc" +#line 717 "agent_parser.cc" break; case 9: @@ -752,7 +721,7 @@ namespace isc { namespace agent { { // parsing completed } -#line 756 "agent_parser.cc" +#line 725 "agent_parser.cc" break; case 10: @@ -761,49 +730,49 @@ namespace isc { namespace agent { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 765 "agent_parser.cc" +#line 734 "agent_parser.cc" break; case 11: #line 142 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 771 "agent_parser.cc" +#line 740 "agent_parser.cc" break; case 12: #line 143 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 777 "agent_parser.cc" +#line 746 "agent_parser.cc" break; case 13: #line 144 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 783 "agent_parser.cc" +#line 752 "agent_parser.cc" break; case 14: #line 145 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 789 "agent_parser.cc" +#line 758 "agent_parser.cc" break; case 15: #line 146 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 795 "agent_parser.cc" +#line 764 "agent_parser.cc" break; case 16: #line 147 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 801 "agent_parser.cc" +#line 770 "agent_parser.cc" break; case 17: #line 148 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 807 "agent_parser.cc" +#line 776 "agent_parser.cc" break; case 18: @@ -814,7 +783,7 @@ namespace isc { namespace agent { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 818 "agent_parser.cc" +#line 787 "agent_parser.cc" break; case 19: @@ -824,13 +793,13 @@ namespace isc { namespace agent { // (maybe some sanity checking), this would be the best place // for it. } -#line 828 "agent_parser.cc" +#line 797 "agent_parser.cc" break; case 20: #line 163 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 834 "agent_parser.cc" +#line 803 "agent_parser.cc" break; case 23: @@ -839,7 +808,7 @@ namespace isc { namespace agent { // map containing a single entry ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 843 "agent_parser.cc" +#line 812 "agent_parser.cc" break; case 24: @@ -849,7 +818,7 @@ namespace isc { namespace agent { // comma and string:value ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 853 "agent_parser.cc" +#line 822 "agent_parser.cc" break; case 25: @@ -858,14 +827,14 @@ namespace isc { namespace agent { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 862 "agent_parser.cc" +#line 831 "agent_parser.cc" break; case 26: #line 191 "agent_parser.yy" { } -#line 869 "agent_parser.cc" +#line 838 "agent_parser.cc" break; case 29: @@ -874,7 +843,7 @@ namespace isc { namespace agent { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 878 "agent_parser.cc" +#line 847 "agent_parser.cc" break; case 30: @@ -883,7 +852,7 @@ namespace isc { namespace agent { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 887 "agent_parser.cc" +#line 856 "agent_parser.cc" break; case 31: @@ -894,7 +863,7 @@ namespace isc { namespace agent { error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 898 "agent_parser.cc" +#line 867 "agent_parser.cc" break; case 32: @@ -905,7 +874,7 @@ namespace isc { namespace agent { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 909 "agent_parser.cc" +#line 878 "agent_parser.cc" break; case 33: @@ -915,7 +884,7 @@ namespace isc { namespace agent { // (maybe some sanity checking), this would be the best place // for it. } -#line 919 "agent_parser.cc" +#line 888 "agent_parser.cc" break; case 42: @@ -931,7 +900,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.AGENT); } -#line 935 "agent_parser.cc" +#line 904 "agent_parser.cc" break; case 43: @@ -942,7 +911,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 946 "agent_parser.cc" +#line 915 "agent_parser.cc" break; case 54: @@ -950,7 +919,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 954 "agent_parser.cc" +#line 923 "agent_parser.cc" break; case 55: @@ -960,7 +929,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("http-host", host); ctx.leave(); } -#line 964 "agent_parser.cc" +#line 933 "agent_parser.cc" break; case 56: @@ -969,7 +938,7 @@ namespace isc { namespace agent { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("http-port", prf); } -#line 973 "agent_parser.cc" +#line 942 "agent_parser.cc" break; case 57: @@ -977,7 +946,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 981 "agent_parser.cc" +#line 950 "agent_parser.cc" break; case 58: @@ -1004,7 +973,7 @@ namespace isc { namespace agent { parent->set("user-context", user_context); ctx.leave(); } -#line 1008 "agent_parser.cc" +#line 977 "agent_parser.cc" break; case 59: @@ -1012,7 +981,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1016 "agent_parser.cc" +#line 985 "agent_parser.cc" break; case 60: @@ -1041,7 +1010,7 @@ namespace isc { namespace agent { parent->set("user-context", user_context); ctx.leave(); } -#line 1045 "agent_parser.cc" +#line 1014 "agent_parser.cc" break; case 61: @@ -1052,7 +1021,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 1056 "agent_parser.cc" +#line 1025 "agent_parser.cc" break; case 62: @@ -1061,7 +1030,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1065 "agent_parser.cc" +#line 1034 "agent_parser.cc" break; case 67: @@ -1071,7 +1040,7 @@ namespace isc { namespace agent { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1075 "agent_parser.cc" +#line 1044 "agent_parser.cc" break; case 68: @@ -1079,7 +1048,7 @@ namespace isc { namespace agent { { ctx.stack_.pop_back(); } -#line 1083 "agent_parser.cc" +#line 1052 "agent_parser.cc" break; case 74: @@ -1087,7 +1056,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1091 "agent_parser.cc" +#line 1060 "agent_parser.cc" break; case 75: @@ -1097,7 +1066,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 1101 "agent_parser.cc" +#line 1070 "agent_parser.cc" break; case 76: @@ -1105,7 +1074,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1109 "agent_parser.cc" +#line 1078 "agent_parser.cc" break; case 77: @@ -1114,7 +1083,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1118 "agent_parser.cc" +#line 1087 "agent_parser.cc" break; case 78: @@ -1125,7 +1094,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKETS); } -#line 1129 "agent_parser.cc" +#line 1098 "agent_parser.cc" break; case 79: @@ -1134,7 +1103,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1138 "agent_parser.cc" +#line 1107 "agent_parser.cc" break; case 86: @@ -1145,7 +1114,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1149 "agent_parser.cc" +#line 1118 "agent_parser.cc" break; case 87: @@ -1154,7 +1123,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1158 "agent_parser.cc" +#line 1127 "agent_parser.cc" break; case 88: @@ -1165,7 +1134,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1169 "agent_parser.cc" +#line 1138 "agent_parser.cc" break; case 89: @@ -1174,7 +1143,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1178 "agent_parser.cc" +#line 1147 "agent_parser.cc" break; case 90: @@ -1185,7 +1154,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1189 "agent_parser.cc" +#line 1158 "agent_parser.cc" break; case 91: @@ -1194,7 +1163,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1198 "agent_parser.cc" +#line 1167 "agent_parser.cc" break; case 99: @@ -1202,7 +1171,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1206 "agent_parser.cc" +#line 1175 "agent_parser.cc" break; case 100: @@ -1212,7 +1181,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 1216 "agent_parser.cc" +#line 1185 "agent_parser.cc" break; case 101: @@ -1220,7 +1189,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.SOCKET_TYPE); } -#line 1224 "agent_parser.cc" +#line 1193 "agent_parser.cc" break; case 102: @@ -1229,13 +1198,13 @@ namespace isc { namespace agent { ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1233 "agent_parser.cc" +#line 1202 "agent_parser.cc" break; case 103: #line 491 "agent_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); } -#line 1239 "agent_parser.cc" +#line 1208 "agent_parser.cc" break; case 104: @@ -1243,7 +1212,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1247 "agent_parser.cc" +#line 1216 "agent_parser.cc" break; case 105: @@ -1252,7 +1221,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1256 "agent_parser.cc" +#line 1225 "agent_parser.cc" break; case 106: @@ -1260,7 +1229,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1264 "agent_parser.cc" +#line 1233 "agent_parser.cc" break; case 107: @@ -1269,7 +1238,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1273 "agent_parser.cc" +#line 1242 "agent_parser.cc" break; case 108: @@ -1277,7 +1246,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1281 "agent_parser.cc" +#line 1250 "agent_parser.cc" break; case 109: @@ -1286,7 +1255,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1290 "agent_parser.cc" +#line 1259 "agent_parser.cc" break; case 110: @@ -1297,7 +1266,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 1301 "agent_parser.cc" +#line 1270 "agent_parser.cc" break; case 111: @@ -1306,7 +1275,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1310 "agent_parser.cc" +#line 1279 "agent_parser.cc" break; case 115: @@ -1317,7 +1286,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 1321 "agent_parser.cc" +#line 1290 "agent_parser.cc" break; case 116: @@ -1326,7 +1295,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1330 "agent_parser.cc" +#line 1299 "agent_parser.cc" break; case 119: @@ -1336,7 +1305,7 @@ namespace isc { namespace agent { ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 1340 "agent_parser.cc" +#line 1309 "agent_parser.cc" break; case 120: @@ -1344,7 +1313,7 @@ namespace isc { namespace agent { { ctx.stack_.pop_back(); } -#line 1348 "agent_parser.cc" +#line 1317 "agent_parser.cc" break; case 130: @@ -1352,7 +1321,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1356 "agent_parser.cc" +#line 1325 "agent_parser.cc" break; case 131: @@ -1362,7 +1331,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1366 "agent_parser.cc" +#line 1335 "agent_parser.cc" break; case 132: @@ -1371,7 +1340,7 @@ namespace isc { namespace agent { ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 1375 "agent_parser.cc" +#line 1344 "agent_parser.cc" break; case 133: @@ -1379,7 +1348,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1383 "agent_parser.cc" +#line 1352 "agent_parser.cc" break; case 134: @@ -1389,7 +1358,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 1393 "agent_parser.cc" +#line 1362 "agent_parser.cc" break; case 135: @@ -1400,7 +1369,7 @@ namespace isc { namespace agent { ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 1404 "agent_parser.cc" +#line 1373 "agent_parser.cc" break; case 136: @@ -1409,7 +1378,7 @@ namespace isc { namespace agent { ctx.stack_.pop_back(); ctx.leave(); } -#line 1413 "agent_parser.cc" +#line 1382 "agent_parser.cc" break; case 139: @@ -1419,7 +1388,7 @@ namespace isc { namespace agent { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1423 "agent_parser.cc" +#line 1392 "agent_parser.cc" break; case 140: @@ -1427,7 +1396,7 @@ namespace isc { namespace agent { { ctx.stack_.pop_back(); } -#line 1431 "agent_parser.cc" +#line 1400 "agent_parser.cc" break; case 148: @@ -1435,7 +1404,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1439 "agent_parser.cc" +#line 1408 "agent_parser.cc" break; case 149: @@ -1445,7 +1414,7 @@ namespace isc { namespace agent { ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 1449 "agent_parser.cc" +#line 1418 "agent_parser.cc" break; case 150: @@ -1454,7 +1423,7 @@ namespace isc { namespace agent { ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 1458 "agent_parser.cc" +#line 1427 "agent_parser.cc" break; case 151: @@ -1463,7 +1432,7 @@ namespace isc { namespace agent { ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 1467 "agent_parser.cc" +#line 1436 "agent_parser.cc" break; case 152: @@ -1472,7 +1441,7 @@ namespace isc { namespace agent { ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 1476 "agent_parser.cc" +#line 1445 "agent_parser.cc" break; case 153: @@ -1480,7 +1449,7 @@ namespace isc { namespace agent { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1484 "agent_parser.cc" +#line 1453 "agent_parser.cc" break; case 154: @@ -1490,11 +1459,11 @@ namespace isc { namespace agent { ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 1494 "agent_parser.cc" +#line 1463 "agent_parser.cc" break; -#line 1498 "agent_parser.cc" +#line 1467 "agent_parser.cc" default: break; @@ -1511,7 +1480,6 @@ namespace isc { namespace agent { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -1527,7 +1495,9 @@ namespace isc { namespace agent { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -1538,7 +1508,7 @@ namespace isc { namespace agent { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -1564,6 +1534,7 @@ namespace isc { namespace agent { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -1572,31 +1543,33 @@ namespace isc { namespace agent { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -1634,6 +1607,7 @@ namespace isc { namespace agent { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -1667,18 +1641,100 @@ namespace isc { namespace agent { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - AgentParser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + AgentParser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + std::string + AgentParser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // AgentParser::context. + AgentParser::context::context (const AgentParser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + AgentParser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + int + AgentParser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1703,35 +1759,26 @@ namespace isc { namespace agent { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + AgentParser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -1756,7 +1803,7 @@ namespace isc { namespace agent { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -1990,14 +2037,14 @@ namespace isc { namespace agent { }; - +#if AGENT_DEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const AgentParser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\",\"", "\":\"", "\"[\"", - "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Control-agent\"", + "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\":\"", + "\"[\"", "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Control-agent\"", "\"http-host\"", "\"http-port\"", "\"user-context\"", "\"comment\"", "\"control-sockets\"", "\"dhcp4\"", "\"dhcp6\"", "\"d2\"", "\"socket-name\"", "\"socket-type\"", "\"unix\"", "\"hooks-libraries\"", @@ -2028,6 +2075,8 @@ namespace isc { namespace agent { "output_entry", "$@31", "output_params_list", "output_params", "output", "$@32", "flush", "maxsize", "maxver", "pattern", "$@33", YY_NULLPTR }; +#endif + #if AGENT_DEBUG const short @@ -2051,9 +2100,8 @@ namespace isc { namespace agent { 645, 650, 655, 660, 660 }; - // Print the state stack on the debug stream. void - AgentParser::yystack_print_ () + AgentParser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -2064,9 +2112,8 @@ namespace isc { namespace agent { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - AgentParser::yy_reduce_print_ (int yyrule) + AgentParser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -2083,7 +2130,7 @@ namespace isc { namespace agent { #line 14 "agent_parser.yy" } } // isc::agent -#line 2087 "agent_parser.cc" +#line 2134 "agent_parser.cc" #line 668 "agent_parser.yy" diff --git a/src/bin/agent/agent_parser.h b/src/bin/agent/agent_parser.h index b3c73901b9..15adcc71a0 100644 --- a/src/bin/agent/agent_parser.h +++ b/src/bin/agent/agent_parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_AGENT_AGENT_PARSER_H_INCLUDED # define YY_AGENT_AGENT_PARSER_H_INCLUDED @@ -55,7 +56,7 @@ using namespace isc::agent; using namespace isc::data; using namespace std; -#line 59 "agent_parser.h" +#line 60 "agent_parser.h" # include # include // std::abort @@ -198,7 +199,7 @@ using namespace std; #line 14 "agent_parser.yy" namespace isc { namespace agent { -#line 202 "agent_parser.h" +#line 203 "agent_parser.h" @@ -234,6 +235,13 @@ namespace isc { namespace agent { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -377,9 +385,12 @@ namespace isc { namespace agent { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -460,74 +471,234 @@ namespace isc { namespace agent { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_COMMA = 258, - TOKEN_COLON = 259, - TOKEN_LSQUARE_BRACKET = 260, - TOKEN_RSQUARE_BRACKET = 261, - TOKEN_LCURLY_BRACKET = 262, - TOKEN_RCURLY_BRACKET = 263, - TOKEN_NULL_TYPE = 264, - TOKEN_CONTROL_AGENT = 265, - TOKEN_HTTP_HOST = 266, - TOKEN_HTTP_PORT = 267, - TOKEN_USER_CONTEXT = 268, - TOKEN_COMMENT = 269, - TOKEN_CONTROL_SOCKETS = 270, - TOKEN_DHCP4_SERVER = 271, - TOKEN_DHCP6_SERVER = 272, - TOKEN_D2_SERVER = 273, - TOKEN_SOCKET_NAME = 274, - TOKEN_SOCKET_TYPE = 275, - TOKEN_UNIX = 276, - TOKEN_HOOKS_LIBRARIES = 277, - TOKEN_LIBRARY = 278, - TOKEN_PARAMETERS = 279, - TOKEN_LOGGING = 280, - TOKEN_LOGGERS = 281, - TOKEN_NAME = 282, - TOKEN_OUTPUT_OPTIONS = 283, - TOKEN_OUTPUT = 284, - TOKEN_DEBUGLEVEL = 285, - TOKEN_SEVERITY = 286, - TOKEN_FLUSH = 287, - TOKEN_MAXSIZE = 288, - TOKEN_MAXVER = 289, - TOKEN_PATTERN = 290, - TOKEN_DHCP4 = 291, - TOKEN_DHCP6 = 292, - TOKEN_DHCPDDNS = 293, - TOKEN_START_JSON = 294, - TOKEN_START_AGENT = 295, - TOKEN_START_SUB_AGENT = 296, - TOKEN_STRING = 297, - TOKEN_INTEGER = 298, - TOKEN_FLOAT = 299, - TOKEN_BOOLEAN = 300 + enum token_kind_type + { + TOKEN_AGENT_EMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_AGENT_error = 256, // error + TOKEN_AGENT_UNDEF = 257, // "invalid token" + TOKEN_COMMA = 258, // "," + TOKEN_COLON = 259, // ":" + TOKEN_LSQUARE_BRACKET = 260, // "[" + TOKEN_RSQUARE_BRACKET = 261, // "]" + TOKEN_LCURLY_BRACKET = 262, // "{" + TOKEN_RCURLY_BRACKET = 263, // "}" + TOKEN_NULL_TYPE = 264, // "null" + TOKEN_CONTROL_AGENT = 265, // "Control-agent" + TOKEN_HTTP_HOST = 266, // "http-host" + TOKEN_HTTP_PORT = 267, // "http-port" + TOKEN_USER_CONTEXT = 268, // "user-context" + TOKEN_COMMENT = 269, // "comment" + TOKEN_CONTROL_SOCKETS = 270, // "control-sockets" + TOKEN_DHCP4_SERVER = 271, // "dhcp4" + TOKEN_DHCP6_SERVER = 272, // "dhcp6" + TOKEN_D2_SERVER = 273, // "d2" + TOKEN_SOCKET_NAME = 274, // "socket-name" + TOKEN_SOCKET_TYPE = 275, // "socket-type" + TOKEN_UNIX = 276, // "unix" + TOKEN_HOOKS_LIBRARIES = 277, // "hooks-libraries" + TOKEN_LIBRARY = 278, // "library" + TOKEN_PARAMETERS = 279, // "parameters" + TOKEN_LOGGING = 280, // "Logging" + TOKEN_LOGGERS = 281, // "loggers" + TOKEN_NAME = 282, // "name" + TOKEN_OUTPUT_OPTIONS = 283, // "output_options" + TOKEN_OUTPUT = 284, // "output" + TOKEN_DEBUGLEVEL = 285, // "debuglevel" + TOKEN_SEVERITY = 286, // "severity" + TOKEN_FLUSH = 287, // "flush" + TOKEN_MAXSIZE = 288, // "maxsize" + TOKEN_MAXVER = 289, // "maxver" + TOKEN_PATTERN = 290, // "pattern" + TOKEN_DHCP4 = 291, // "Dhcp4" + TOKEN_DHCP6 = 292, // "Dhcp6" + TOKEN_DHCPDDNS = 293, // "DhcpDdns" + TOKEN_START_JSON = 294, // START_JSON + TOKEN_START_AGENT = 295, // START_AGENT + TOKEN_START_SUB_AGENT = 296, // START_SUB_AGENT + TOKEN_STRING = 297, // "constant string" + TOKEN_INTEGER = 298, // "integer" + TOKEN_FLOAT = 299, // "floating point" + TOKEN_BOOLEAN = 300 // "boolean" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 46, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_COMMA = 3, // "," + S_COLON = 4, // ":" + S_LSQUARE_BRACKET = 5, // "[" + S_RSQUARE_BRACKET = 6, // "]" + S_LCURLY_BRACKET = 7, // "{" + S_RCURLY_BRACKET = 8, // "}" + S_NULL_TYPE = 9, // "null" + S_CONTROL_AGENT = 10, // "Control-agent" + S_HTTP_HOST = 11, // "http-host" + S_HTTP_PORT = 12, // "http-port" + S_USER_CONTEXT = 13, // "user-context" + S_COMMENT = 14, // "comment" + S_CONTROL_SOCKETS = 15, // "control-sockets" + S_DHCP4_SERVER = 16, // "dhcp4" + S_DHCP6_SERVER = 17, // "dhcp6" + S_D2_SERVER = 18, // "d2" + S_SOCKET_NAME = 19, // "socket-name" + S_SOCKET_TYPE = 20, // "socket-type" + S_UNIX = 21, // "unix" + S_HOOKS_LIBRARIES = 22, // "hooks-libraries" + S_LIBRARY = 23, // "library" + S_PARAMETERS = 24, // "parameters" + S_LOGGING = 25, // "Logging" + S_LOGGERS = 26, // "loggers" + S_NAME = 27, // "name" + S_OUTPUT_OPTIONS = 28, // "output_options" + S_OUTPUT = 29, // "output" + S_DEBUGLEVEL = 30, // "debuglevel" + S_SEVERITY = 31, // "severity" + S_FLUSH = 32, // "flush" + S_MAXSIZE = 33, // "maxsize" + S_MAXVER = 34, // "maxver" + S_PATTERN = 35, // "pattern" + S_DHCP4 = 36, // "Dhcp4" + S_DHCP6 = 37, // "Dhcp6" + S_DHCPDDNS = 38, // "DhcpDdns" + S_START_JSON = 39, // START_JSON + S_START_AGENT = 40, // START_AGENT + S_START_SUB_AGENT = 41, // START_SUB_AGENT + S_STRING = 42, // "constant string" + S_INTEGER = 43, // "integer" + S_FLOAT = 44, // "floating point" + S_BOOLEAN = 45, // "boolean" + S_YYACCEPT = 46, // $accept + S_start = 47, // start + S_48_1 = 48, // $@1 + S_49_2 = 49, // $@2 + S_50_3 = 50, // $@3 + S_sub_agent = 51, // sub_agent + S_52_4 = 52, // $@4 + S_json = 53, // json + S_value = 54, // value + S_map = 55, // map + S_56_5 = 56, // $@5 + S_map_value = 57, // map_value + S_map_content = 58, // map_content + S_not_empty_map = 59, // not_empty_map + S_list_generic = 60, // list_generic + S_61_6 = 61, // $@6 + S_list_content = 62, // list_content + S_not_empty_list = 63, // not_empty_list + S_unknown_map_entry = 64, // unknown_map_entry + S_agent_syntax_map = 65, // agent_syntax_map + S_66_7 = 66, // $@7 + S_global_objects = 67, // global_objects + S_global_object = 68, // global_object + S_agent_object = 69, // agent_object + S_70_8 = 70, // $@8 + S_global_params = 71, // global_params + S_global_param = 72, // global_param + S_http_host = 73, // http_host + S_74_9 = 74, // $@9 + S_http_port = 75, // http_port + S_user_context = 76, // user_context + S_77_10 = 77, // $@10 + S_comment = 78, // comment + S_79_11 = 79, // $@11 + S_hooks_libraries = 80, // hooks_libraries + S_81_12 = 81, // $@12 + S_hooks_libraries_list = 82, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 83, // not_empty_hooks_libraries_list + S_hooks_library = 84, // hooks_library + S_85_13 = 85, // $@13 + S_hooks_params = 86, // hooks_params + S_hooks_param = 87, // hooks_param + S_library = 88, // library + S_89_14 = 89, // $@14 + S_parameters = 90, // parameters + S_91_15 = 91, // $@15 + S_control_sockets = 92, // control_sockets + S_93_16 = 93, // $@16 + S_control_sockets_params = 94, // control_sockets_params + S_control_socket = 95, // control_socket + S_dhcp4_server_socket = 96, // dhcp4_server_socket + S_97_17 = 97, // $@17 + S_dhcp6_server_socket = 98, // dhcp6_server_socket + S_99_18 = 99, // $@18 + S_d2_server_socket = 100, // d2_server_socket + S_101_19 = 101, // $@19 + S_control_socket_params = 102, // control_socket_params + S_control_socket_param = 103, // control_socket_param + S_socket_name = 104, // socket_name + S_105_20 = 105, // $@20 + S_socket_type = 106, // socket_type + S_107_21 = 107, // $@21 + S_socket_type_value = 108, // socket_type_value + S_dhcp4_json_object = 109, // dhcp4_json_object + S_110_22 = 110, // $@22 + S_dhcp6_json_object = 111, // dhcp6_json_object + S_112_23 = 112, // $@23 + S_dhcpddns_json_object = 113, // dhcpddns_json_object + S_114_24 = 114, // $@24 + S_logging_object = 115, // logging_object + S_116_25 = 116, // $@25 + S_logging_params = 117, // logging_params + S_logging_param = 118, // logging_param + S_loggers = 119, // loggers + S_120_26 = 120, // $@26 + S_loggers_entries = 121, // loggers_entries + S_logger_entry = 122, // logger_entry + S_123_27 = 123, // $@27 + S_logger_params = 124, // logger_params + S_logger_param = 125, // logger_param + S_name = 126, // name + S_127_28 = 127, // $@28 + S_debuglevel = 128, // debuglevel + S_severity = 129, // severity + S_130_29 = 130, // $@29 + S_output_options_list = 131, // output_options_list + S_132_30 = 132, // $@30 + S_output_options_list_content = 133, // output_options_list_content + S_output_entry = 134, // output_entry + S_135_31 = 135, // $@31 + S_output_params_list = 136, // output_params_list + S_output_params = 137, // output_params + S_output = 138, // output + S_139_32 = 139, // $@32 + S_flush = 140, // flush + S_maxsize = 141, // maxsize + S_maxver = 142, // maxver + S_pattern = 143, // pattern + S_144_33 = 144 // $@33 + }; + }; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef signed char token_number_type; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -544,7 +715,40 @@ namespace isc { namespace agent { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 54: // value + case 57: // map_value + case 108: // socket_type_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case 45: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case 44: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case 43: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case 42: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -638,17 +842,17 @@ namespace isc { namespace agent { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 54: // value case 57: // map_value @@ -679,6 +883,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return AgentParser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -699,46 +912,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -748,13 +966,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_AGENT_error || tok == token::TOKEN_AGENT_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_AGENT_error || tok == token::TOKEN_AGENT_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); } #endif #if 201103L <= YY_CPLUSPLUS @@ -815,6 +1033,13 @@ switch (yytype) AgentParser (isc::agent::ParserContext& ctx_yyarg); virtual ~AgentParser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + AgentParser (const AgentParser&) = delete; + /// Non copyable. + AgentParser& operator= (const AgentParser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -845,6 +1070,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -861,6 +1090,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AGENT_error (location_type l) + { + return symbol_type (token::TOKEN_AGENT_error, std::move (l)); + } +#else + static + symbol_type + make_AGENT_error (const location_type& l) + { + return symbol_type (token::TOKEN_AGENT_error, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AGENT_UNDEF (location_type l) + { + return symbol_type (token::TOKEN_AGENT_UNDEF, std::move (l)); + } +#else + static + symbol_type + make_AGENT_UNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_AGENT_UNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -1508,20 +1767,43 @@ switch (yytype) #endif + class context + { + public: + context (const AgentParser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const AgentParser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. AgentParser (const AgentParser&); + /// Non copyable. AgentParser& operator= (const AgentParser&); +#endif + /// Stored state numbers (used for stacks). typedef short state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -1538,65 +1820,66 @@ switch (yytype) static const signed char yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const unsigned char yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const signed char yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const unsigned char yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const unsigned char yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if AGENT_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -1617,7 +1900,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -1629,12 +1912,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -1673,8 +1956,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -1682,6 +1965,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -1732,24 +2022,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -1773,8 +2057,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -1804,33 +2092,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 202, ///< Last index in yytable_. yynnts_ = 99, ///< Number of nonterminal symbols. - yyfinal_ = 8, ///< Termination state number. - yyntokens_ = 46 ///< Number of tokens. + yyfinal_ = 8 ///< Termination state number. }; // User arguments. isc::agent::ParserContext& ctx; + }; inline - AgentParser::token_number_type + AgentParser::symbol_kind_type AgentParser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const signed char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1868,59 +2151,21 @@ switch (yytype) const int user_token_number_max_ = 300; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - AgentParser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 54: // value - case 57: // map_value - case 108: // socket_type_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 45: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 44: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 43: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 42: // "constant string" - value.move< std::string > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template AgentParser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 54: // value case 57: // map_value @@ -1952,11 +2197,18 @@ switch (yytype) + template + AgentParser::symbol_kind_type + AgentParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool AgentParser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -1964,7 +2216,7 @@ switch (yytype) AgentParser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 54: // value case 57: // map_value @@ -1995,56 +2247,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - AgentParser::by_type::by_type () - : type (empty_symbol) + AgentParser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - AgentParser::by_type::by_type (by_type&& that) - : type (that.type) + AgentParser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - AgentParser::by_type::by_type (const by_type& that) - : type (that.type) + AgentParser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - AgentParser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + AgentParser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - AgentParser::by_type::clear () + AgentParser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - AgentParser::by_type::move (by_type& that) + AgentParser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - AgentParser::by_type::type_get () const YY_NOEXCEPT + AgentParser::symbol_kind_type + AgentParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + AgentParser::symbol_kind_type + AgentParser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "agent_parser.yy" } } // isc::agent -#line 2048 "agent_parser.h" +#line 2307 "agent_parser.h" diff --git a/src/bin/agent/location.hh b/src/bin/agent/location.hh index 75111995ea..dcb95c64e4 100644 --- a/src/bin/agent/location.hh +++ b/src/bin/agent/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/bin/agent/position.hh b/src/bin/agent/position.hh index 8395a65672..384596b595 100644 --- a/src/bin/agent/position.hh +++ b/src/bin/agent/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/agent/stack.hh b/src/bin/agent/stack.hh index 1540faa869..8e491d3cf2 100644 --- a/src/bin/agent/stack.hh +++ b/src/bin/agent/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/d2/d2_parser.cc b/src/bin/d2/d2_parser.cc index d0f5f71260..b610ee479f 100644 --- a/src/bin/d2/d2_parser.cc +++ b/src/bin/d2/d2_parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ #include -#line 51 "d2_parser.cc" +#line 52 "d2_parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !D2_PARSER_DEBUG @@ -139,49 +141,7 @@ #line 14 "d2_parser.yy" namespace isc { namespace d2 { -#line 143 "d2_parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - D2Parser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "d2_parser.cc" /// Build a parser object. D2Parser::D2Parser (isc::d2::D2ParserContext& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace d2 { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace d2 { : state (s) {} - D2Parser::symbol_number_type - D2Parser::by_state::type_get () const YY_NOEXCEPT + D2Parser::symbol_kind_type + D2Parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } D2Parser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace d2 { D2Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 72: // value case 76: // map_value @@ -284,7 +244,7 @@ namespace isc { namespace d2 { D2Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 72: // value case 76: // map_value @@ -313,7 +273,7 @@ namespace isc { namespace d2 { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -321,7 +281,7 @@ namespace isc { namespace d2 { D2Parser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 72: // value case 76: // map_value @@ -357,7 +317,7 @@ namespace isc { namespace d2 { D2Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 72: // value case 76: // map_value @@ -403,69 +363,67 @@ namespace isc { namespace d2 { #if D2_PARSER_DEBUG template void - D2Parser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + D2Parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 57: // "constant string" #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 427 "d2_parser.cc" +#line 384 "d2_parser.cc" break; case 58: // "integer" #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < int64_t > (); } -#line 433 "d2_parser.cc" +#line 390 "d2_parser.cc" break; case 59: // "floating point" #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < double > (); } -#line 439 "d2_parser.cc" +#line 396 "d2_parser.cc" break; case 60: // "boolean" #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < bool > (); } -#line 445 "d2_parser.cc" +#line 402 "d2_parser.cc" break; case 72: // value #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 451 "d2_parser.cc" +#line 408 "d2_parser.cc" break; case 76: // map_value #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 457 "d2_parser.cc" +#line 414 "d2_parser.cc" break; case 100: // ncr_protocol_value #line 116 "d2_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 463 "d2_parser.cc" +#line 420 "d2_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -524,11 +482,11 @@ namespace isc { namespace d2 { D2Parser::state_type D2Parser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -588,6 +546,7 @@ namespace isc { namespace d2 { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -608,7 +567,7 @@ namespace isc { namespace d2 { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -627,10 +586,20 @@ namespace isc { namespace d2 { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -722,97 +691,97 @@ namespace isc { namespace d2 { case 2: #line 125 "d2_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 726 "d2_parser.cc" +#line 695 "d2_parser.cc" break; case 4: #line 126 "d2_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 732 "d2_parser.cc" +#line 701 "d2_parser.cc" break; case 6: #line 127 "d2_parser.yy" { ctx.ctx_ = ctx.DHCPDDNS; } -#line 738 "d2_parser.cc" +#line 707 "d2_parser.cc" break; case 8: #line 128 "d2_parser.yy" { ctx.ctx_ = ctx.TSIG_KEY; } -#line 744 "d2_parser.cc" +#line 713 "d2_parser.cc" break; case 10: #line 129 "d2_parser.yy" { ctx.ctx_ = ctx.TSIG_KEYS; } -#line 750 "d2_parser.cc" +#line 719 "d2_parser.cc" break; case 12: #line 130 "d2_parser.yy" { ctx.ctx_ = ctx.DDNS_DOMAIN; } -#line 756 "d2_parser.cc" +#line 725 "d2_parser.cc" break; case 14: #line 131 "d2_parser.yy" { ctx.ctx_ = ctx.DDNS_DOMAINS; } -#line 762 "d2_parser.cc" +#line 731 "d2_parser.cc" break; case 16: #line 132 "d2_parser.yy" { ctx.ctx_ = ctx.DNS_SERVERS; } -#line 768 "d2_parser.cc" +#line 737 "d2_parser.cc" break; case 18: #line 133 "d2_parser.yy" { ctx.ctx_ = ctx.DNS_SERVERS; } -#line 774 "d2_parser.cc" +#line 743 "d2_parser.cc" break; case 20: #line 141 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 780 "d2_parser.cc" +#line 749 "d2_parser.cc" break; case 21: #line 142 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 786 "d2_parser.cc" +#line 755 "d2_parser.cc" break; case 22: #line 143 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 792 "d2_parser.cc" +#line 761 "d2_parser.cc" break; case 23: #line 144 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 798 "d2_parser.cc" +#line 767 "d2_parser.cc" break; case 24: #line 145 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 804 "d2_parser.cc" +#line 773 "d2_parser.cc" break; case 25: #line 146 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 810 "d2_parser.cc" +#line 779 "d2_parser.cc" break; case 26: #line 147 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 816 "d2_parser.cc" +#line 785 "d2_parser.cc" break; case 27: @@ -821,7 +790,7 @@ namespace isc { namespace d2 { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 825 "d2_parser.cc" +#line 794 "d2_parser.cc" break; case 28: @@ -832,7 +801,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 836 "d2_parser.cc" +#line 805 "d2_parser.cc" break; case 29: @@ -842,13 +811,13 @@ namespace isc { namespace d2 { // (maybe some sanity checking), this would be the best place // for it. } -#line 846 "d2_parser.cc" +#line 815 "d2_parser.cc" break; case 30: #line 166 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 852 "d2_parser.cc" +#line 821 "d2_parser.cc" break; case 33: @@ -857,7 +826,7 @@ namespace isc { namespace d2 { // map containing a single entry ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 861 "d2_parser.cc" +#line 830 "d2_parser.cc" break; case 34: @@ -867,7 +836,7 @@ namespace isc { namespace d2 { // comma and string:value ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 871 "d2_parser.cc" +#line 840 "d2_parser.cc" break; case 35: @@ -876,7 +845,7 @@ namespace isc { namespace d2 { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 880 "d2_parser.cc" +#line 849 "d2_parser.cc" break; case 36: @@ -884,7 +853,7 @@ namespace isc { namespace d2 { { // list parsing complete. Put any sanity checking here } -#line 888 "d2_parser.cc" +#line 857 "d2_parser.cc" break; case 39: @@ -893,7 +862,7 @@ namespace isc { namespace d2 { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 897 "d2_parser.cc" +#line 866 "d2_parser.cc" break; case 40: @@ -902,7 +871,7 @@ namespace isc { namespace d2 { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 906 "d2_parser.cc" +#line 875 "d2_parser.cc" break; case 41: @@ -913,7 +882,7 @@ namespace isc { namespace d2 { error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 917 "d2_parser.cc" +#line 886 "d2_parser.cc" break; case 42: @@ -924,7 +893,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 928 "d2_parser.cc" +#line 897 "d2_parser.cc" break; case 43: @@ -934,7 +903,7 @@ namespace isc { namespace d2 { // (maybe some sanity checking), this would be the best place // for it. } -#line 938 "d2_parser.cc" +#line 907 "d2_parser.cc" break; case 52: @@ -945,7 +914,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(m); ctx.enter(ctx.DHCPDDNS); } -#line 949 "d2_parser.cc" +#line 918 "d2_parser.cc" break; case 53: @@ -954,7 +923,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 958 "d2_parser.cc" +#line 927 "d2_parser.cc" break; case 54: @@ -964,7 +933,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 968 "d2_parser.cc" +#line 937 "d2_parser.cc" break; case 55: @@ -972,7 +941,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 976 "d2_parser.cc" +#line 945 "d2_parser.cc" break; case 71: @@ -980,7 +949,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 984 "d2_parser.cc" +#line 953 "d2_parser.cc" break; case 72: @@ -990,7 +959,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("ip-address", s); ctx.leave(); } -#line 994 "d2_parser.cc" +#line 963 "d2_parser.cc" break; case 73: @@ -1002,7 +971,7 @@ namespace isc { namespace d2 { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", i); } -#line 1006 "d2_parser.cc" +#line 975 "d2_parser.cc" break; case 74: @@ -1015,7 +984,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("dns-server-timeout", i); } } -#line 1019 "d2_parser.cc" +#line 988 "d2_parser.cc" break; case 75: @@ -1023,7 +992,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NCR_PROTOCOL); } -#line 1027 "d2_parser.cc" +#line 996 "d2_parser.cc" break; case 76: @@ -1032,19 +1001,19 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1036 "d2_parser.cc" +#line 1005 "d2_parser.cc" break; case 77: #line 318 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 1042 "d2_parser.cc" +#line 1011 "d2_parser.cc" break; case 78: #line 319 "d2_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 1048 "d2_parser.cc" +#line 1017 "d2_parser.cc" break; case 79: @@ -1052,7 +1021,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NCR_FORMAT); } -#line 1056 "d2_parser.cc" +#line 1025 "d2_parser.cc" break; case 80: @@ -1062,7 +1031,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 1066 "d2_parser.cc" +#line 1035 "d2_parser.cc" break; case 81: @@ -1070,7 +1039,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1074 "d2_parser.cc" +#line 1043 "d2_parser.cc" break; case 82: @@ -1097,7 +1066,7 @@ namespace isc { namespace d2 { parent->set("user-context", user_context); ctx.leave(); } -#line 1101 "d2_parser.cc" +#line 1070 "d2_parser.cc" break; case 83: @@ -1105,7 +1074,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1109 "d2_parser.cc" +#line 1078 "d2_parser.cc" break; case 84: @@ -1134,7 +1103,7 @@ namespace isc { namespace d2 { parent->set("user-context", user_context); ctx.leave(); } -#line 1138 "d2_parser.cc" +#line 1107 "d2_parser.cc" break; case 85: @@ -1145,7 +1114,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(m); ctx.enter(ctx.FORWARD_DDNS); } -#line 1149 "d2_parser.cc" +#line 1118 "d2_parser.cc" break; case 86: @@ -1154,7 +1123,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1158 "d2_parser.cc" +#line 1127 "d2_parser.cc" break; case 87: @@ -1165,7 +1134,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(m); ctx.enter(ctx.REVERSE_DDNS); } -#line 1169 "d2_parser.cc" +#line 1138 "d2_parser.cc" break; case 88: @@ -1174,7 +1143,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1178 "d2_parser.cc" +#line 1147 "d2_parser.cc" break; case 95: @@ -1185,7 +1154,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(l); ctx.enter(ctx.DDNS_DOMAINS); } -#line 1189 "d2_parser.cc" +#line 1158 "d2_parser.cc" break; case 96: @@ -1194,7 +1163,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1198 "d2_parser.cc" +#line 1167 "d2_parser.cc" break; case 97: @@ -1203,7 +1172,7 @@ namespace isc { namespace d2 { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1207 "d2_parser.cc" +#line 1176 "d2_parser.cc" break; case 98: @@ -1211,7 +1180,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1215 "d2_parser.cc" +#line 1184 "d2_parser.cc" break; case 103: @@ -1221,7 +1190,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1225 "d2_parser.cc" +#line 1194 "d2_parser.cc" break; case 104: @@ -1229,7 +1198,7 @@ namespace isc { namespace d2 { { ctx.stack_.pop_back(); } -#line 1233 "d2_parser.cc" +#line 1202 "d2_parser.cc" break; case 105: @@ -1238,7 +1207,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1242 "d2_parser.cc" +#line 1211 "d2_parser.cc" break; case 106: @@ -1246,7 +1215,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1250 "d2_parser.cc" +#line 1219 "d2_parser.cc" break; case 115: @@ -1254,7 +1223,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1258 "d2_parser.cc" +#line 1227 "d2_parser.cc" break; case 116: @@ -1268,7 +1237,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1272 "d2_parser.cc" +#line 1241 "d2_parser.cc" break; case 117: @@ -1276,7 +1245,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1280 "d2_parser.cc" +#line 1249 "d2_parser.cc" break; case 118: @@ -1287,7 +1256,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("key-name", name); ctx.leave(); } -#line 1291 "d2_parser.cc" +#line 1260 "d2_parser.cc" break; case 119: @@ -1298,7 +1267,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(l); ctx.enter(ctx.DNS_SERVERS); } -#line 1302 "d2_parser.cc" +#line 1271 "d2_parser.cc" break; case 120: @@ -1307,7 +1276,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1311 "d2_parser.cc" +#line 1280 "d2_parser.cc" break; case 121: @@ -1316,7 +1285,7 @@ namespace isc { namespace d2 { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1320 "d2_parser.cc" +#line 1289 "d2_parser.cc" break; case 122: @@ -1324,7 +1293,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1328 "d2_parser.cc" +#line 1297 "d2_parser.cc" break; case 125: @@ -1334,7 +1303,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1338 "d2_parser.cc" +#line 1307 "d2_parser.cc" break; case 126: @@ -1342,7 +1311,7 @@ namespace isc { namespace d2 { { ctx.stack_.pop_back(); } -#line 1346 "d2_parser.cc" +#line 1315 "d2_parser.cc" break; case 127: @@ -1351,7 +1320,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1355 "d2_parser.cc" +#line 1324 "d2_parser.cc" break; case 128: @@ -1359,7 +1328,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1363 "d2_parser.cc" +#line 1332 "d2_parser.cc" break; case 137: @@ -1367,7 +1336,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1371 "d2_parser.cc" +#line 1340 "d2_parser.cc" break; case 138: @@ -1381,7 +1350,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("hostname", name); ctx.leave(); } -#line 1385 "d2_parser.cc" +#line 1354 "d2_parser.cc" break; case 139: @@ -1389,7 +1358,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1393 "d2_parser.cc" +#line 1362 "d2_parser.cc" break; case 140: @@ -1399,7 +1368,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("ip-address", s); ctx.leave(); } -#line 1403 "d2_parser.cc" +#line 1372 "d2_parser.cc" break; case 141: @@ -1411,7 +1380,7 @@ namespace isc { namespace d2 { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", i); } -#line 1415 "d2_parser.cc" +#line 1384 "d2_parser.cc" break; case 142: @@ -1422,7 +1391,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(l); ctx.enter(ctx.TSIG_KEYS); } -#line 1426 "d2_parser.cc" +#line 1395 "d2_parser.cc" break; case 143: @@ -1431,7 +1400,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1435 "d2_parser.cc" +#line 1404 "d2_parser.cc" break; case 144: @@ -1440,7 +1409,7 @@ namespace isc { namespace d2 { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1444 "d2_parser.cc" +#line 1413 "d2_parser.cc" break; case 145: @@ -1448,7 +1417,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1452 "d2_parser.cc" +#line 1421 "d2_parser.cc" break; case 150: @@ -1458,7 +1427,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1462 "d2_parser.cc" +#line 1431 "d2_parser.cc" break; case 151: @@ -1466,7 +1435,7 @@ namespace isc { namespace d2 { { ctx.stack_.pop_back(); } -#line 1470 "d2_parser.cc" +#line 1439 "d2_parser.cc" break; case 152: @@ -1476,7 +1445,7 @@ namespace isc { namespace d2 { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1480 "d2_parser.cc" +#line 1449 "d2_parser.cc" break; case 153: @@ -1484,7 +1453,7 @@ namespace isc { namespace d2 { { // parsing completed } -#line 1488 "d2_parser.cc" +#line 1457 "d2_parser.cc" break; case 163: @@ -1492,7 +1461,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1496 "d2_parser.cc" +#line 1465 "d2_parser.cc" break; case 164: @@ -1506,7 +1475,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1510 "d2_parser.cc" +#line 1479 "d2_parser.cc" break; case 165: @@ -1514,7 +1483,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1518 "d2_parser.cc" +#line 1487 "d2_parser.cc" break; case 166: @@ -1527,7 +1496,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("algorithm", elem); ctx.leave(); } -#line 1531 "d2_parser.cc" +#line 1500 "d2_parser.cc" break; case 167: @@ -1539,7 +1508,7 @@ namespace isc { namespace d2 { ElementPtr elem(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("digest-bits", elem); } -#line 1543 "d2_parser.cc" +#line 1512 "d2_parser.cc" break; case 168: @@ -1547,7 +1516,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1551 "d2_parser.cc" +#line 1520 "d2_parser.cc" break; case 169: @@ -1560,7 +1529,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("secret", elem); ctx.leave(); } -#line 1564 "d2_parser.cc" +#line 1533 "d2_parser.cc" break; case 170: @@ -1571,7 +1540,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 1575 "d2_parser.cc" +#line 1544 "d2_parser.cc" break; case 171: @@ -1580,7 +1549,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1584 "d2_parser.cc" +#line 1553 "d2_parser.cc" break; case 179: @@ -1588,7 +1557,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1592 "d2_parser.cc" +#line 1561 "d2_parser.cc" break; case 180: @@ -1598,7 +1567,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 1602 "d2_parser.cc" +#line 1571 "d2_parser.cc" break; case 181: @@ -1606,7 +1575,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1610 "d2_parser.cc" +#line 1579 "d2_parser.cc" break; case 182: @@ -1616,7 +1585,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 1620 "d2_parser.cc" +#line 1589 "d2_parser.cc" break; case 183: @@ -1624,7 +1593,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1628 "d2_parser.cc" +#line 1597 "d2_parser.cc" break; case 184: @@ -1633,7 +1602,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1637 "d2_parser.cc" +#line 1606 "d2_parser.cc" break; case 185: @@ -1641,7 +1610,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1645 "d2_parser.cc" +#line 1614 "d2_parser.cc" break; case 186: @@ -1650,7 +1619,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1654 "d2_parser.cc" +#line 1623 "d2_parser.cc" break; case 187: @@ -1658,7 +1627,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1662 "d2_parser.cc" +#line 1631 "d2_parser.cc" break; case 188: @@ -1667,7 +1636,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1671 "d2_parser.cc" +#line 1640 "d2_parser.cc" break; case 189: @@ -1678,7 +1647,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 1682 "d2_parser.cc" +#line 1651 "d2_parser.cc" break; case 190: @@ -1687,7 +1656,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1691 "d2_parser.cc" +#line 1660 "d2_parser.cc" break; case 194: @@ -1698,7 +1667,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 1702 "d2_parser.cc" +#line 1671 "d2_parser.cc" break; case 195: @@ -1707,7 +1676,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1711 "d2_parser.cc" +#line 1680 "d2_parser.cc" break; case 198: @@ -1717,7 +1686,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 1721 "d2_parser.cc" +#line 1690 "d2_parser.cc" break; case 199: @@ -1725,7 +1694,7 @@ namespace isc { namespace d2 { { ctx.stack_.pop_back(); } -#line 1729 "d2_parser.cc" +#line 1698 "d2_parser.cc" break; case 209: @@ -1733,7 +1702,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1737 "d2_parser.cc" +#line 1706 "d2_parser.cc" break; case 210: @@ -1743,7 +1712,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1747 "d2_parser.cc" +#line 1716 "d2_parser.cc" break; case 211: @@ -1752,7 +1721,7 @@ namespace isc { namespace d2 { ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 1756 "d2_parser.cc" +#line 1725 "d2_parser.cc" break; case 212: @@ -1760,7 +1729,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1764 "d2_parser.cc" +#line 1733 "d2_parser.cc" break; case 213: @@ -1770,7 +1739,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 1774 "d2_parser.cc" +#line 1743 "d2_parser.cc" break; case 214: @@ -1781,7 +1750,7 @@ namespace isc { namespace d2 { ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 1785 "d2_parser.cc" +#line 1754 "d2_parser.cc" break; case 215: @@ -1790,7 +1759,7 @@ namespace isc { namespace d2 { ctx.stack_.pop_back(); ctx.leave(); } -#line 1794 "d2_parser.cc" +#line 1763 "d2_parser.cc" break; case 218: @@ -1800,7 +1769,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1804 "d2_parser.cc" +#line 1773 "d2_parser.cc" break; case 219: @@ -1808,7 +1777,7 @@ namespace isc { namespace d2 { { ctx.stack_.pop_back(); } -#line 1812 "d2_parser.cc" +#line 1781 "d2_parser.cc" break; case 227: @@ -1816,7 +1785,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1820 "d2_parser.cc" +#line 1789 "d2_parser.cc" break; case 228: @@ -1826,7 +1795,7 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 1830 "d2_parser.cc" +#line 1799 "d2_parser.cc" break; case 229: @@ -1835,7 +1804,7 @@ namespace isc { namespace d2 { ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 1839 "d2_parser.cc" +#line 1808 "d2_parser.cc" break; case 230: @@ -1844,7 +1813,7 @@ namespace isc { namespace d2 { ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 1848 "d2_parser.cc" +#line 1817 "d2_parser.cc" break; case 231: @@ -1853,7 +1822,7 @@ namespace isc { namespace d2 { ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 1857 "d2_parser.cc" +#line 1826 "d2_parser.cc" break; case 232: @@ -1861,7 +1830,7 @@ namespace isc { namespace d2 { { ctx.enter(ctx.NO_KEYWORD); } -#line 1865 "d2_parser.cc" +#line 1834 "d2_parser.cc" break; case 233: @@ -1871,11 +1840,11 @@ namespace isc { namespace d2 { ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 1875 "d2_parser.cc" +#line 1844 "d2_parser.cc" break; -#line 1879 "d2_parser.cc" +#line 1848 "d2_parser.cc" default: break; @@ -1892,7 +1861,6 @@ namespace isc { namespace d2 { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -1908,7 +1876,9 @@ namespace isc { namespace d2 { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -1919,7 +1889,7 @@ namespace isc { namespace d2 { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -1945,6 +1915,7 @@ namespace isc { namespace d2 { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -1953,31 +1924,33 @@ namespace isc { namespace d2 { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -2015,6 +1988,7 @@ namespace isc { namespace d2 { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -2048,18 +2022,100 @@ namespace isc { namespace d2 { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - D2Parser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + D2Parser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + D2Parser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // D2Parser::context. + D2Parser::context::context (const D2Parser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + D2Parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + int + D2Parser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -2084,35 +2140,26 @@ namespace isc { namespace d2 { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + D2Parser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -2137,7 +2184,7 @@ namespace isc { namespace d2 { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -2453,14 +2500,14 @@ namespace isc { namespace d2 { }; - +#if D2_PARSER_DEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const D2Parser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\",\"", "\":\"", "\"[\"", - "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp6\"", "\"Dhcp4\"", + "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\":\"", + "\"[\"", "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp6\"", "\"Dhcp4\"", "\"Control-agent\"", "\"DhcpDdns\"", "\"ip-address\"", "\"port\"", "\"dns-server-timeout\"", "\"ncr-protocol\"", "\"UDP\"", "\"TCP\"", "\"ncr-format\"", "\"JSON\"", "\"user-context\"", "\"comment\"", @@ -2507,6 +2554,8 @@ namespace isc { namespace d2 { "output_params_list", "output_params", "output", "$@54", "flush", "maxsize", "maxver", "pattern", "$@55", YY_NULLPTR }; +#endif + #if D2_PARSER_DEBUG const short @@ -2538,9 +2587,8 @@ namespace isc { namespace d2 { 868, 873, 878, 878 }; - // Print the state stack on the debug stream. void - D2Parser::yystack_print_ () + D2Parser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -2551,9 +2599,8 @@ namespace isc { namespace d2 { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - D2Parser::yy_reduce_print_ (int yyrule) + D2Parser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -2570,7 +2617,7 @@ namespace isc { namespace d2 { #line 14 "d2_parser.yy" } } // isc::d2 -#line 2574 "d2_parser.cc" +#line 2621 "d2_parser.cc" #line 886 "d2_parser.yy" diff --git a/src/bin/d2/d2_parser.h b/src/bin/d2/d2_parser.h index 33b81f5958..d6eb6f90b8 100644 --- a/src/bin/d2/d2_parser.h +++ b/src/bin/d2/d2_parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED # define YY_D2_PARSER_D2_PARSER_H_INCLUDED @@ -56,7 +57,7 @@ using namespace isc::d2; using namespace isc::data; using namespace std; -#line 60 "d2_parser.h" +#line 61 "d2_parser.h" # include # include // std::abort @@ -199,7 +200,7 @@ using namespace std; #line 14 "d2_parser.yy" namespace isc { namespace d2 { -#line 203 "d2_parser.h" +#line 204 "d2_parser.h" @@ -235,6 +236,13 @@ namespace isc { namespace d2 { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -378,9 +386,12 @@ namespace isc { namespace d2 { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -461,89 +472,313 @@ namespace isc { namespace d2 { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_COMMA = 258, - TOKEN_COLON = 259, - TOKEN_LSQUARE_BRACKET = 260, - TOKEN_RSQUARE_BRACKET = 261, - TOKEN_LCURLY_BRACKET = 262, - TOKEN_RCURLY_BRACKET = 263, - TOKEN_NULL_TYPE = 264, - TOKEN_DHCP6 = 265, - TOKEN_DHCP4 = 266, - TOKEN_CONTROL_AGENT = 267, - TOKEN_DHCPDDNS = 268, - TOKEN_IP_ADDRESS = 269, - TOKEN_PORT = 270, - TOKEN_DNS_SERVER_TIMEOUT = 271, - TOKEN_NCR_PROTOCOL = 272, - TOKEN_UDP = 273, - TOKEN_TCP = 274, - TOKEN_NCR_FORMAT = 275, - TOKEN_JSON = 276, - TOKEN_USER_CONTEXT = 277, - TOKEN_COMMENT = 278, - TOKEN_FORWARD_DDNS = 279, - TOKEN_REVERSE_DDNS = 280, - TOKEN_DDNS_DOMAINS = 281, - TOKEN_KEY_NAME = 282, - TOKEN_DNS_SERVERS = 283, - TOKEN_HOSTNAME = 284, - TOKEN_TSIG_KEYS = 285, - TOKEN_ALGORITHM = 286, - TOKEN_DIGEST_BITS = 287, - TOKEN_SECRET = 288, - TOKEN_CONTROL_SOCKET = 289, - TOKEN_SOCKET_TYPE = 290, - TOKEN_SOCKET_NAME = 291, - TOKEN_LOGGING = 292, - TOKEN_LOGGERS = 293, - TOKEN_NAME = 294, - TOKEN_OUTPUT_OPTIONS = 295, - TOKEN_OUTPUT = 296, - TOKEN_DEBUGLEVEL = 297, - TOKEN_SEVERITY = 298, - TOKEN_FLUSH = 299, - TOKEN_MAXSIZE = 300, - TOKEN_MAXVER = 301, - TOKEN_PATTERN = 302, - TOKEN_TOPLEVEL_JSON = 303, - TOKEN_TOPLEVEL_DHCPDDNS = 304, - TOKEN_SUB_DHCPDDNS = 305, - TOKEN_SUB_TSIG_KEY = 306, - TOKEN_SUB_TSIG_KEYS = 307, - TOKEN_SUB_DDNS_DOMAIN = 308, - TOKEN_SUB_DDNS_DOMAINS = 309, - TOKEN_SUB_DNS_SERVER = 310, - TOKEN_SUB_DNS_SERVERS = 311, - TOKEN_STRING = 312, - TOKEN_INTEGER = 313, - TOKEN_FLOAT = 314, - TOKEN_BOOLEAN = 315 + enum token_kind_type + { + TOKEN_D2_PARSER_EMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_D2_PARSER_error = 256, // error + TOKEN_D2_PARSER_UNDEF = 257, // "invalid token" + TOKEN_COMMA = 258, // "," + TOKEN_COLON = 259, // ":" + TOKEN_LSQUARE_BRACKET = 260, // "[" + TOKEN_RSQUARE_BRACKET = 261, // "]" + TOKEN_LCURLY_BRACKET = 262, // "{" + TOKEN_RCURLY_BRACKET = 263, // "}" + TOKEN_NULL_TYPE = 264, // "null" + TOKEN_DHCP6 = 265, // "Dhcp6" + TOKEN_DHCP4 = 266, // "Dhcp4" + TOKEN_CONTROL_AGENT = 267, // "Control-agent" + TOKEN_DHCPDDNS = 268, // "DhcpDdns" + TOKEN_IP_ADDRESS = 269, // "ip-address" + TOKEN_PORT = 270, // "port" + TOKEN_DNS_SERVER_TIMEOUT = 271, // "dns-server-timeout" + TOKEN_NCR_PROTOCOL = 272, // "ncr-protocol" + TOKEN_UDP = 273, // "UDP" + TOKEN_TCP = 274, // "TCP" + TOKEN_NCR_FORMAT = 275, // "ncr-format" + TOKEN_JSON = 276, // "JSON" + TOKEN_USER_CONTEXT = 277, // "user-context" + TOKEN_COMMENT = 278, // "comment" + TOKEN_FORWARD_DDNS = 279, // "forward-ddns" + TOKEN_REVERSE_DDNS = 280, // "reverse-ddns" + TOKEN_DDNS_DOMAINS = 281, // "ddns-domains" + TOKEN_KEY_NAME = 282, // "key-name" + TOKEN_DNS_SERVERS = 283, // "dns-servers" + TOKEN_HOSTNAME = 284, // "hostname" + TOKEN_TSIG_KEYS = 285, // "tsig-keys" + TOKEN_ALGORITHM = 286, // "algorithm" + TOKEN_DIGEST_BITS = 287, // "digest-bits" + TOKEN_SECRET = 288, // "secret" + TOKEN_CONTROL_SOCKET = 289, // "control-socket" + TOKEN_SOCKET_TYPE = 290, // "socket-type" + TOKEN_SOCKET_NAME = 291, // "socket-name" + TOKEN_LOGGING = 292, // "Logging" + TOKEN_LOGGERS = 293, // "loggers" + TOKEN_NAME = 294, // "name" + TOKEN_OUTPUT_OPTIONS = 295, // "output_options" + TOKEN_OUTPUT = 296, // "output" + TOKEN_DEBUGLEVEL = 297, // "debuglevel" + TOKEN_SEVERITY = 298, // "severity" + TOKEN_FLUSH = 299, // "flush" + TOKEN_MAXSIZE = 300, // "maxsize" + TOKEN_MAXVER = 301, // "maxver" + TOKEN_PATTERN = 302, // "pattern" + TOKEN_TOPLEVEL_JSON = 303, // TOPLEVEL_JSON + TOKEN_TOPLEVEL_DHCPDDNS = 304, // TOPLEVEL_DHCPDDNS + TOKEN_SUB_DHCPDDNS = 305, // SUB_DHCPDDNS + TOKEN_SUB_TSIG_KEY = 306, // SUB_TSIG_KEY + TOKEN_SUB_TSIG_KEYS = 307, // SUB_TSIG_KEYS + TOKEN_SUB_DDNS_DOMAIN = 308, // SUB_DDNS_DOMAIN + TOKEN_SUB_DDNS_DOMAINS = 309, // SUB_DDNS_DOMAINS + TOKEN_SUB_DNS_SERVER = 310, // SUB_DNS_SERVER + TOKEN_SUB_DNS_SERVERS = 311, // SUB_DNS_SERVERS + TOKEN_STRING = 312, // "constant string" + TOKEN_INTEGER = 313, // "integer" + TOKEN_FLOAT = 314, // "floating point" + TOKEN_BOOLEAN = 315 // "boolean" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 61, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_COMMA = 3, // "," + S_COLON = 4, // ":" + S_LSQUARE_BRACKET = 5, // "[" + S_RSQUARE_BRACKET = 6, // "]" + S_LCURLY_BRACKET = 7, // "{" + S_RCURLY_BRACKET = 8, // "}" + S_NULL_TYPE = 9, // "null" + S_DHCP6 = 10, // "Dhcp6" + S_DHCP4 = 11, // "Dhcp4" + S_CONTROL_AGENT = 12, // "Control-agent" + S_DHCPDDNS = 13, // "DhcpDdns" + S_IP_ADDRESS = 14, // "ip-address" + S_PORT = 15, // "port" + S_DNS_SERVER_TIMEOUT = 16, // "dns-server-timeout" + S_NCR_PROTOCOL = 17, // "ncr-protocol" + S_UDP = 18, // "UDP" + S_TCP = 19, // "TCP" + S_NCR_FORMAT = 20, // "ncr-format" + S_JSON = 21, // "JSON" + S_USER_CONTEXT = 22, // "user-context" + S_COMMENT = 23, // "comment" + S_FORWARD_DDNS = 24, // "forward-ddns" + S_REVERSE_DDNS = 25, // "reverse-ddns" + S_DDNS_DOMAINS = 26, // "ddns-domains" + S_KEY_NAME = 27, // "key-name" + S_DNS_SERVERS = 28, // "dns-servers" + S_HOSTNAME = 29, // "hostname" + S_TSIG_KEYS = 30, // "tsig-keys" + S_ALGORITHM = 31, // "algorithm" + S_DIGEST_BITS = 32, // "digest-bits" + S_SECRET = 33, // "secret" + S_CONTROL_SOCKET = 34, // "control-socket" + S_SOCKET_TYPE = 35, // "socket-type" + S_SOCKET_NAME = 36, // "socket-name" + S_LOGGING = 37, // "Logging" + S_LOGGERS = 38, // "loggers" + S_NAME = 39, // "name" + S_OUTPUT_OPTIONS = 40, // "output_options" + S_OUTPUT = 41, // "output" + S_DEBUGLEVEL = 42, // "debuglevel" + S_SEVERITY = 43, // "severity" + S_FLUSH = 44, // "flush" + S_MAXSIZE = 45, // "maxsize" + S_MAXVER = 46, // "maxver" + S_PATTERN = 47, // "pattern" + S_TOPLEVEL_JSON = 48, // TOPLEVEL_JSON + S_TOPLEVEL_DHCPDDNS = 49, // TOPLEVEL_DHCPDDNS + S_SUB_DHCPDDNS = 50, // SUB_DHCPDDNS + S_SUB_TSIG_KEY = 51, // SUB_TSIG_KEY + S_SUB_TSIG_KEYS = 52, // SUB_TSIG_KEYS + S_SUB_DDNS_DOMAIN = 53, // SUB_DDNS_DOMAIN + S_SUB_DDNS_DOMAINS = 54, // SUB_DDNS_DOMAINS + S_SUB_DNS_SERVER = 55, // SUB_DNS_SERVER + S_SUB_DNS_SERVERS = 56, // SUB_DNS_SERVERS + S_STRING = 57, // "constant string" + S_INTEGER = 58, // "integer" + S_FLOAT = 59, // "floating point" + S_BOOLEAN = 60, // "boolean" + S_YYACCEPT = 61, // $accept + S_start = 62, // start + S_63_1 = 63, // $@1 + S_64_2 = 64, // $@2 + S_65_3 = 65, // $@3 + S_66_4 = 66, // $@4 + S_67_5 = 67, // $@5 + S_68_6 = 68, // $@6 + S_69_7 = 69, // $@7 + S_70_8 = 70, // $@8 + S_71_9 = 71, // $@9 + S_value = 72, // value + S_sub_json = 73, // sub_json + S_map2 = 74, // map2 + S_75_10 = 75, // $@10 + S_map_value = 76, // map_value + S_map_content = 77, // map_content + S_not_empty_map = 78, // not_empty_map + S_list_generic = 79, // list_generic + S_80_11 = 80, // $@11 + S_list_content = 81, // list_content + S_not_empty_list = 82, // not_empty_list + S_unknown_map_entry = 83, // unknown_map_entry + S_syntax_map = 84, // syntax_map + S_85_12 = 85, // $@12 + S_global_objects = 86, // global_objects + S_global_object = 87, // global_object + S_dhcpddns_object = 88, // dhcpddns_object + S_89_13 = 89, // $@13 + S_sub_dhcpddns = 90, // sub_dhcpddns + S_91_14 = 91, // $@14 + S_dhcpddns_params = 92, // dhcpddns_params + S_dhcpddns_param = 93, // dhcpddns_param + S_ip_address = 94, // ip_address + S_95_15 = 95, // $@15 + S_port = 96, // port + S_dns_server_timeout = 97, // dns_server_timeout + S_ncr_protocol = 98, // ncr_protocol + S_99_16 = 99, // $@16 + S_ncr_protocol_value = 100, // ncr_protocol_value + S_ncr_format = 101, // ncr_format + S_102_17 = 102, // $@17 + S_user_context = 103, // user_context + S_104_18 = 104, // $@18 + S_comment = 105, // comment + S_106_19 = 106, // $@19 + S_forward_ddns = 107, // forward_ddns + S_108_20 = 108, // $@20 + S_reverse_ddns = 109, // reverse_ddns + S_110_21 = 110, // $@21 + S_ddns_mgr_params = 111, // ddns_mgr_params + S_not_empty_ddns_mgr_params = 112, // not_empty_ddns_mgr_params + S_ddns_mgr_param = 113, // ddns_mgr_param + S_ddns_domains = 114, // ddns_domains + S_115_22 = 115, // $@22 + S_sub_ddns_domains = 116, // sub_ddns_domains + S_117_23 = 117, // $@23 + S_ddns_domain_list = 118, // ddns_domain_list + S_not_empty_ddns_domain_list = 119, // not_empty_ddns_domain_list + S_ddns_domain = 120, // ddns_domain + S_121_24 = 121, // $@24 + S_sub_ddns_domain = 122, // sub_ddns_domain + S_123_25 = 123, // $@25 + S_ddns_domain_params = 124, // ddns_domain_params + S_ddns_domain_param = 125, // ddns_domain_param + S_ddns_domain_name = 126, // ddns_domain_name + S_127_26 = 127, // $@26 + S_ddns_domain_key_name = 128, // ddns_domain_key_name + S_129_27 = 129, // $@27 + S_dns_servers = 130, // dns_servers + S_131_28 = 131, // $@28 + S_sub_dns_servers = 132, // sub_dns_servers + S_133_29 = 133, // $@29 + S_dns_server_list = 134, // dns_server_list + S_dns_server = 135, // dns_server + S_136_30 = 136, // $@30 + S_sub_dns_server = 137, // sub_dns_server + S_138_31 = 138, // $@31 + S_dns_server_params = 139, // dns_server_params + S_dns_server_param = 140, // dns_server_param + S_dns_server_hostname = 141, // dns_server_hostname + S_142_32 = 142, // $@32 + S_dns_server_ip_address = 143, // dns_server_ip_address + S_144_33 = 144, // $@33 + S_dns_server_port = 145, // dns_server_port + S_tsig_keys = 146, // tsig_keys + S_147_34 = 147, // $@34 + S_sub_tsig_keys = 148, // sub_tsig_keys + S_149_35 = 149, // $@35 + S_tsig_keys_list = 150, // tsig_keys_list + S_not_empty_tsig_keys_list = 151, // not_empty_tsig_keys_list + S_tsig_key = 152, // tsig_key + S_153_36 = 153, // $@36 + S_sub_tsig_key = 154, // sub_tsig_key + S_155_37 = 155, // $@37 + S_tsig_key_params = 156, // tsig_key_params + S_tsig_key_param = 157, // tsig_key_param + S_tsig_key_name = 158, // tsig_key_name + S_159_38 = 159, // $@38 + S_tsig_key_algorithm = 160, // tsig_key_algorithm + S_161_39 = 161, // $@39 + S_tsig_key_digest_bits = 162, // tsig_key_digest_bits + S_tsig_key_secret = 163, // tsig_key_secret + S_164_40 = 164, // $@40 + S_control_socket = 165, // control_socket + S_166_41 = 166, // $@41 + S_control_socket_params = 167, // control_socket_params + S_control_socket_param = 168, // control_socket_param + S_control_socket_type = 169, // control_socket_type + S_170_42 = 170, // $@42 + S_control_socket_name = 171, // control_socket_name + S_172_43 = 172, // $@43 + S_dhcp6_json_object = 173, // dhcp6_json_object + S_174_44 = 174, // $@44 + S_dhcp4_json_object = 175, // dhcp4_json_object + S_176_45 = 176, // $@45 + S_control_agent_json_object = 177, // control_agent_json_object + S_178_46 = 178, // $@46 + S_logging_object = 179, // logging_object + S_180_47 = 180, // $@47 + S_logging_params = 181, // logging_params + S_logging_param = 182, // logging_param + S_loggers = 183, // loggers + S_184_48 = 184, // $@48 + S_loggers_entries = 185, // loggers_entries + S_logger_entry = 186, // logger_entry + S_187_49 = 187, // $@49 + S_logger_params = 188, // logger_params + S_logger_param = 189, // logger_param + S_name = 190, // name + S_191_50 = 191, // $@50 + S_debuglevel = 192, // debuglevel + S_severity = 193, // severity + S_194_51 = 194, // $@51 + S_output_options_list = 195, // output_options_list + S_196_52 = 196, // $@52 + S_output_options_list_content = 197, // output_options_list_content + S_output_entry = 198, // output_entry + S_199_53 = 199, // $@53 + S_output_params_list = 200, // output_params_list + S_output_params = 201, // output_params + S_output = 202, // output + S_203_54 = 203, // $@54 + S_flush = 204, // flush + S_maxsize = 205, // maxsize + S_maxver = 206, // maxver + S_pattern = 207, // pattern + S_208_55 = 208 // $@55 + }; + }; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef signed char token_number_type; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -560,7 +795,40 @@ namespace isc { namespace d2 { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 72: // value + case 76: // map_value + case 100: // ncr_protocol_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case 60: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case 59: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case 58: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case 57: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -654,17 +922,17 @@ namespace isc { namespace d2 { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 72: // value case 76: // map_value @@ -695,6 +963,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return D2Parser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -715,46 +992,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -764,13 +1046,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_D2_PARSER_error || tok == token::TOKEN_D2_PARSER_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_D2_PARSER_error || tok == token::TOKEN_D2_PARSER_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); } #endif #if 201103L <= YY_CPLUSPLUS @@ -831,6 +1113,13 @@ switch (yytype) D2Parser (isc::d2::D2ParserContext& ctx_yyarg); virtual ~D2Parser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + D2Parser (const D2Parser&) = delete; + /// Non copyable. + D2Parser& operator= (const D2Parser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -861,6 +1150,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -877,6 +1170,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_D2_PARSER_error (location_type l) + { + return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l)); + } +#else + static + symbol_type + make_D2_PARSER_error (const location_type& l) + { + return symbol_type (token::TOKEN_D2_PARSER_error, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_D2_PARSER_UNDEF (location_type l) + { + return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l)); + } +#else + static + symbol_type + make_D2_PARSER_UNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_D2_PARSER_UNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -1749,20 +2072,43 @@ switch (yytype) #endif + class context + { + public: + context (const D2Parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const D2Parser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. D2Parser (const D2Parser&); + /// Non copyable. D2Parser& operator= (const D2Parser&); +#endif + /// Stored state numbers (used for stacks). typedef short state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -1779,65 +2125,66 @@ switch (yytype) static const short yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const unsigned char yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const unsigned char yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const unsigned char yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if D2_PARSER_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -1858,7 +2205,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -1870,12 +2217,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -1914,8 +2261,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -1923,6 +2270,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -1973,24 +2327,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -2014,8 +2362,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -2045,33 +2397,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 304, ///< Last index in yytable_. yynnts_ = 148, ///< Number of nonterminal symbols. - yyfinal_ = 20, ///< Termination state number. - yyntokens_ = 61 ///< Number of tokens. + yyfinal_ = 20 ///< Termination state number. }; // User arguments. isc::d2::D2ParserContext& ctx; + }; inline - D2Parser::token_number_type + D2Parser::symbol_kind_type D2Parser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const signed char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -2110,59 +2457,21 @@ switch (yytype) const int user_token_number_max_ = 315; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - D2Parser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 72: // value - case 76: // map_value - case 100: // ncr_protocol_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 60: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 59: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 58: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 57: // "constant string" - value.move< std::string > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template D2Parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 72: // value case 76: // map_value @@ -2194,11 +2503,18 @@ switch (yytype) + template + D2Parser::symbol_kind_type + D2Parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool D2Parser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -2206,7 +2522,7 @@ switch (yytype) D2Parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 72: // value case 76: // map_value @@ -2237,56 +2553,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - D2Parser::by_type::by_type () - : type (empty_symbol) + D2Parser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - D2Parser::by_type::by_type (by_type&& that) - : type (that.type) + D2Parser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - D2Parser::by_type::by_type (const by_type& that) - : type (that.type) + D2Parser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - D2Parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + D2Parser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - D2Parser::by_type::clear () + D2Parser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - D2Parser::by_type::move (by_type& that) + D2Parser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - D2Parser::by_type::type_get () const YY_NOEXCEPT + D2Parser::symbol_kind_type + D2Parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + D2Parser::symbol_kind_type + D2Parser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "d2_parser.yy" } } // isc::d2 -#line 2290 "d2_parser.h" +#line 2613 "d2_parser.h" diff --git a/src/bin/d2/location.hh b/src/bin/d2/location.hh index 063421bf5e..37511f67e3 100644 --- a/src/bin/d2/location.hh +++ b/src/bin/d2/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/bin/d2/position.hh b/src/bin/d2/position.hh index 8395a65672..384596b595 100644 --- a/src/bin/d2/position.hh +++ b/src/bin/d2/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/d2/stack.hh b/src/bin/d2/stack.hh index 1540faa869..8e491d3cf2 100644 --- a/src/bin/d2/stack.hh +++ b/src/bin/d2/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/dhcp4/dhcp4_parser.cc b/src/bin/dhcp4/dhcp4_parser.cc index 9787d4d694..7912c90159 100644 --- a/src/bin/dhcp4/dhcp4_parser.cc +++ b/src/bin/dhcp4/dhcp4_parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ #include -#line 51 "dhcp4_parser.cc" +#line 52 "dhcp4_parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !PARSER4_DEBUG @@ -139,49 +141,7 @@ #line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 143 "dhcp4_parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - Dhcp4Parser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "dhcp4_parser.cc" /// Build a parser object. Dhcp4Parser::Dhcp4Parser (isc::dhcp::Parser4Context& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace dhcp { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace dhcp { : state (s) {} - Dhcp4Parser::symbol_number_type - Dhcp4Parser::by_state::type_get () const YY_NOEXCEPT + Dhcp4Parser::symbol_kind_type + Dhcp4Parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } Dhcp4Parser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace dhcp { Dhcp4Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 211: // value case 215: // map_value @@ -289,7 +249,7 @@ namespace isc { namespace dhcp { Dhcp4Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 211: // value case 215: // map_value @@ -323,7 +283,7 @@ namespace isc { namespace dhcp { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -331,7 +291,7 @@ namespace isc { namespace dhcp { Dhcp4Parser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 211: // value case 215: // map_value @@ -372,7 +332,7 @@ namespace isc { namespace dhcp { Dhcp4Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 211: // value case 215: // map_value @@ -423,99 +383,97 @@ namespace isc { namespace dhcp { #if PARSER4_DEBUG template void - Dhcp4Parser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + Dhcp4Parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 191: // "constant string" #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 447 "dhcp4_parser.cc" +#line 404 "dhcp4_parser.cc" break; case 192: // "integer" #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < int64_t > (); } -#line 453 "dhcp4_parser.cc" +#line 410 "dhcp4_parser.cc" break; case 193: // "floating point" #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < double > (); } -#line 459 "dhcp4_parser.cc" +#line 416 "dhcp4_parser.cc" break; case 194: // "boolean" #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < bool > (); } -#line 465 "dhcp4_parser.cc" +#line 422 "dhcp4_parser.cc" break; case 211: // value #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 471 "dhcp4_parser.cc" +#line 428 "dhcp4_parser.cc" break; case 215: // map_value #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 477 "dhcp4_parser.cc" +#line 434 "dhcp4_parser.cc" break; case 256: // ddns_replace_client_name_value #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 483 "dhcp4_parser.cc" +#line 440 "dhcp4_parser.cc" break; case 278: // socket_type #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 489 "dhcp4_parser.cc" +#line 446 "dhcp4_parser.cc" break; case 281: // outbound_interface_value #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 495 "dhcp4_parser.cc" +#line 452 "dhcp4_parser.cc" break; case 303: // db_type #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 501 "dhcp4_parser.cc" +#line 458 "dhcp4_parser.cc" break; case 397: // hr_mode #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 507 "dhcp4_parser.cc" +#line 464 "dhcp4_parser.cc" break; case 552: // ncr_protocol_value #line 274 "dhcp4_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 513 "dhcp4_parser.cc" +#line 470 "dhcp4_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -574,11 +532,11 @@ namespace isc { namespace dhcp { Dhcp4Parser::state_type Dhcp4Parser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -638,6 +596,7 @@ namespace isc { namespace dhcp { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -658,7 +617,7 @@ namespace isc { namespace dhcp { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -677,10 +636,20 @@ namespace isc { namespace dhcp { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -777,127 +746,127 @@ namespace isc { namespace dhcp { case 2: #line 283 "dhcp4_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 781 "dhcp4_parser.cc" +#line 750 "dhcp4_parser.cc" break; case 4: #line 284 "dhcp4_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 787 "dhcp4_parser.cc" +#line 756 "dhcp4_parser.cc" break; case 6: #line 285 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP4; } -#line 793 "dhcp4_parser.cc" +#line 762 "dhcp4_parser.cc" break; case 8: #line 286 "dhcp4_parser.yy" { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 799 "dhcp4_parser.cc" +#line 768 "dhcp4_parser.cc" break; case 10: #line 287 "dhcp4_parser.yy" { ctx.ctx_ = ctx.SUBNET4; } -#line 805 "dhcp4_parser.cc" +#line 774 "dhcp4_parser.cc" break; case 12: #line 288 "dhcp4_parser.yy" { ctx.ctx_ = ctx.POOLS; } -#line 811 "dhcp4_parser.cc" +#line 780 "dhcp4_parser.cc" break; case 14: #line 289 "dhcp4_parser.yy" { ctx.ctx_ = ctx.RESERVATIONS; } -#line 817 "dhcp4_parser.cc" +#line 786 "dhcp4_parser.cc" break; case 16: #line 290 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP4; } -#line 823 "dhcp4_parser.cc" +#line 792 "dhcp4_parser.cc" break; case 18: #line 291 "dhcp4_parser.yy" { ctx.ctx_ = ctx.OPTION_DEF; } -#line 829 "dhcp4_parser.cc" +#line 798 "dhcp4_parser.cc" break; case 20: #line 292 "dhcp4_parser.yy" { ctx.ctx_ = ctx.OPTION_DATA; } -#line 835 "dhcp4_parser.cc" +#line 804 "dhcp4_parser.cc" break; case 22: #line 293 "dhcp4_parser.yy" { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 841 "dhcp4_parser.cc" +#line 810 "dhcp4_parser.cc" break; case 24: #line 294 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 847 "dhcp4_parser.cc" +#line 816 "dhcp4_parser.cc" break; case 26: #line 295 "dhcp4_parser.yy" { ctx.ctx_ = ctx.LOGGING; } -#line 853 "dhcp4_parser.cc" +#line 822 "dhcp4_parser.cc" break; case 28: #line 296 "dhcp4_parser.yy" { ctx.ctx_ = ctx.CONFIG_CONTROL; } -#line 859 "dhcp4_parser.cc" +#line 828 "dhcp4_parser.cc" break; case 30: #line 304 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 865 "dhcp4_parser.cc" +#line 834 "dhcp4_parser.cc" break; case 31: #line 305 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 871 "dhcp4_parser.cc" +#line 840 "dhcp4_parser.cc" break; case 32: #line 306 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 877 "dhcp4_parser.cc" +#line 846 "dhcp4_parser.cc" break; case 33: #line 307 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 883 "dhcp4_parser.cc" +#line 852 "dhcp4_parser.cc" break; case 34: #line 308 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 889 "dhcp4_parser.cc" +#line 858 "dhcp4_parser.cc" break; case 35: #line 309 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 895 "dhcp4_parser.cc" +#line 864 "dhcp4_parser.cc" break; case 36: #line 310 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 901 "dhcp4_parser.cc" +#line 870 "dhcp4_parser.cc" break; case 37: @@ -906,7 +875,7 @@ namespace isc { namespace dhcp { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 910 "dhcp4_parser.cc" +#line 879 "dhcp4_parser.cc" break; case 38: @@ -917,7 +886,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 921 "dhcp4_parser.cc" +#line 890 "dhcp4_parser.cc" break; case 39: @@ -927,13 +896,13 @@ namespace isc { namespace dhcp { // (maybe some sanity checking), this would be the best place // for it. } -#line 931 "dhcp4_parser.cc" +#line 900 "dhcp4_parser.cc" break; case 40: #line 329 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 937 "dhcp4_parser.cc" +#line 906 "dhcp4_parser.cc" break; case 43: @@ -942,7 +911,7 @@ namespace isc { namespace dhcp { // map containing a single entry ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 946 "dhcp4_parser.cc" +#line 915 "dhcp4_parser.cc" break; case 44: @@ -952,7 +921,7 @@ namespace isc { namespace dhcp { // comma and string:value ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 956 "dhcp4_parser.cc" +#line 925 "dhcp4_parser.cc" break; case 45: @@ -961,7 +930,7 @@ namespace isc { namespace dhcp { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 965 "dhcp4_parser.cc" +#line 934 "dhcp4_parser.cc" break; case 46: @@ -969,7 +938,7 @@ namespace isc { namespace dhcp { { // list parsing complete. Put any sanity checking here } -#line 973 "dhcp4_parser.cc" +#line 942 "dhcp4_parser.cc" break; case 49: @@ -978,7 +947,7 @@ namespace isc { namespace dhcp { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 982 "dhcp4_parser.cc" +#line 951 "dhcp4_parser.cc" break; case 50: @@ -987,7 +956,7 @@ namespace isc { namespace dhcp { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 991 "dhcp4_parser.cc" +#line 960 "dhcp4_parser.cc" break; case 51: @@ -995,7 +964,7 @@ namespace isc { namespace dhcp { { // List parsing about to start } -#line 999 "dhcp4_parser.cc" +#line 968 "dhcp4_parser.cc" break; case 52: @@ -1004,7 +973,7 @@ namespace isc { namespace dhcp { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 1008 "dhcp4_parser.cc" +#line 977 "dhcp4_parser.cc" break; case 55: @@ -1013,7 +982,7 @@ namespace isc { namespace dhcp { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 1017 "dhcp4_parser.cc" +#line 986 "dhcp4_parser.cc" break; case 56: @@ -1022,7 +991,7 @@ namespace isc { namespace dhcp { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 1026 "dhcp4_parser.cc" +#line 995 "dhcp4_parser.cc" break; case 57: @@ -1033,7 +1002,7 @@ namespace isc { namespace dhcp { error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 1037 "dhcp4_parser.cc" +#line 1006 "dhcp4_parser.cc" break; case 58: @@ -1044,7 +1013,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1048 "dhcp4_parser.cc" +#line 1017 "dhcp4_parser.cc" break; case 59: @@ -1057,7 +1026,7 @@ namespace isc { namespace dhcp { // Dhcp4 is required ctx.require("Dhcp4", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1061 "dhcp4_parser.cc" +#line 1030 "dhcp4_parser.cc" break; case 68: @@ -1070,7 +1039,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP4); } -#line 1074 "dhcp4_parser.cc" +#line 1043 "dhcp4_parser.cc" break; case 69: @@ -1080,7 +1049,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1084 "dhcp4_parser.cc" +#line 1053 "dhcp4_parser.cc" break; case 70: @@ -1090,7 +1059,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1094 "dhcp4_parser.cc" +#line 1063 "dhcp4_parser.cc" break; case 71: @@ -1099,7 +1068,7 @@ namespace isc { namespace dhcp { // No global parameter is required // parsing completed } -#line 1103 "dhcp4_parser.cc" +#line 1072 "dhcp4_parser.cc" break; case 126: @@ -1108,7 +1077,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1112 "dhcp4_parser.cc" +#line 1081 "dhcp4_parser.cc" break; case 127: @@ -1117,7 +1086,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-valid-lifetime", prf); } -#line 1121 "dhcp4_parser.cc" +#line 1090 "dhcp4_parser.cc" break; case 128: @@ -1126,7 +1095,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-valid-lifetime", prf); } -#line 1130 "dhcp4_parser.cc" +#line 1099 "dhcp4_parser.cc" break; case 129: @@ -1135,7 +1104,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1139 "dhcp4_parser.cc" +#line 1108 "dhcp4_parser.cc" break; case 130: @@ -1144,7 +1113,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1148 "dhcp4_parser.cc" +#line 1117 "dhcp4_parser.cc" break; case 131: @@ -1153,7 +1122,7 @@ namespace isc { namespace dhcp { ElementPtr ctt(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("calculate-tee-times", ctt); } -#line 1157 "dhcp4_parser.cc" +#line 1126 "dhcp4_parser.cc" break; case 132: @@ -1162,7 +1131,7 @@ namespace isc { namespace dhcp { ElementPtr t1(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t1-percent", t1); } -#line 1166 "dhcp4_parser.cc" +#line 1135 "dhcp4_parser.cc" break; case 133: @@ -1171,7 +1140,7 @@ namespace isc { namespace dhcp { ElementPtr t2(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t2-percent", t2); } -#line 1175 "dhcp4_parser.cc" +#line 1144 "dhcp4_parser.cc" break; case 134: @@ -1180,7 +1149,7 @@ namespace isc { namespace dhcp { ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1184 "dhcp4_parser.cc" +#line 1153 "dhcp4_parser.cc" break; case 135: @@ -1188,7 +1157,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1192 "dhcp4_parser.cc" +#line 1161 "dhcp4_parser.cc" break; case 136: @@ -1198,7 +1167,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("server-tag", stag); ctx.leave(); } -#line 1202 "dhcp4_parser.cc" +#line 1171 "dhcp4_parser.cc" break; case 137: @@ -1207,7 +1176,7 @@ namespace isc { namespace dhcp { ElementPtr echo(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("echo-client-id", echo); } -#line 1211 "dhcp4_parser.cc" +#line 1180 "dhcp4_parser.cc" break; case 138: @@ -1216,7 +1185,7 @@ namespace isc { namespace dhcp { ElementPtr match(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("match-client-id", match); } -#line 1220 "dhcp4_parser.cc" +#line 1189 "dhcp4_parser.cc" break; case 139: @@ -1225,7 +1194,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("authoritative", prf); } -#line 1229 "dhcp4_parser.cc" +#line 1198 "dhcp4_parser.cc" break; case 140: @@ -1234,7 +1203,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-send-updates", b); } -#line 1238 "dhcp4_parser.cc" +#line 1207 "dhcp4_parser.cc" break; case 141: @@ -1243,7 +1212,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-no-update", b); } -#line 1247 "dhcp4_parser.cc" +#line 1216 "dhcp4_parser.cc" break; case 142: @@ -1252,7 +1221,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-client-update", b); } -#line 1256 "dhcp4_parser.cc" +#line 1225 "dhcp4_parser.cc" break; case 143: @@ -1260,7 +1229,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 1264 "dhcp4_parser.cc" +#line 1233 "dhcp4_parser.cc" break; case 144: @@ -1269,7 +1238,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1273 "dhcp4_parser.cc" +#line 1242 "dhcp4_parser.cc" break; case 145: @@ -1277,7 +1246,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 1281 "dhcp4_parser.cc" +#line 1250 "dhcp4_parser.cc" break; case 146: @@ -1285,7 +1254,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 1289 "dhcp4_parser.cc" +#line 1258 "dhcp4_parser.cc" break; case 147: @@ -1293,7 +1262,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 1297 "dhcp4_parser.cc" +#line 1266 "dhcp4_parser.cc" break; case 148: @@ -1301,7 +1270,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 1305 "dhcp4_parser.cc" +#line 1274 "dhcp4_parser.cc" break; case 149: @@ -1310,7 +1279,7 @@ namespace isc { namespace dhcp { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 1314 "dhcp4_parser.cc" +#line 1283 "dhcp4_parser.cc" break; case 150: @@ -1318,7 +1287,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1322 "dhcp4_parser.cc" +#line 1291 "dhcp4_parser.cc" break; case 151: @@ -1328,7 +1297,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-generated-prefix", s); ctx.leave(); } -#line 1332 "dhcp4_parser.cc" +#line 1301 "dhcp4_parser.cc" break; case 152: @@ -1336,7 +1305,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1340 "dhcp4_parser.cc" +#line 1309 "dhcp4_parser.cc" break; case 153: @@ -1346,7 +1315,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-qualifying-suffix", s); ctx.leave(); } -#line 1350 "dhcp4_parser.cc" +#line 1319 "dhcp4_parser.cc" break; case 154: @@ -1354,7 +1323,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1358 "dhcp4_parser.cc" +#line 1327 "dhcp4_parser.cc" break; case 155: @@ -1364,7 +1333,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 1368 "dhcp4_parser.cc" +#line 1337 "dhcp4_parser.cc" break; case 156: @@ -1372,7 +1341,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1376 "dhcp4_parser.cc" +#line 1345 "dhcp4_parser.cc" break; case 157: @@ -1382,7 +1351,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 1386 "dhcp4_parser.cc" +#line 1355 "dhcp4_parser.cc" break; case 158: @@ -1391,7 +1360,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("store-extended-info", b); } -#line 1395 "dhcp4_parser.cc" +#line 1364 "dhcp4_parser.cc" break; case 159: @@ -1400,7 +1369,7 @@ namespace isc { namespace dhcp { ElementPtr count(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("statistic-default-sample-count", count); } -#line 1404 "dhcp4_parser.cc" +#line 1373 "dhcp4_parser.cc" break; case 160: @@ -1409,7 +1378,7 @@ namespace isc { namespace dhcp { ElementPtr age(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("statistic-default-sample-age", age); } -#line 1413 "dhcp4_parser.cc" +#line 1382 "dhcp4_parser.cc" break; case 161: @@ -1420,7 +1389,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1424 "dhcp4_parser.cc" +#line 1393 "dhcp4_parser.cc" break; case 162: @@ -1430,7 +1399,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1434 "dhcp4_parser.cc" +#line 1403 "dhcp4_parser.cc" break; case 172: @@ -1440,7 +1409,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1444 "dhcp4_parser.cc" +#line 1413 "dhcp4_parser.cc" break; case 173: @@ -1449,7 +1418,7 @@ namespace isc { namespace dhcp { // No interfaces config param is required // parsing completed } -#line 1453 "dhcp4_parser.cc" +#line 1422 "dhcp4_parser.cc" break; case 174: @@ -1460,7 +1429,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1464 "dhcp4_parser.cc" +#line 1433 "dhcp4_parser.cc" break; case 175: @@ -1469,7 +1438,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1473 "dhcp4_parser.cc" +#line 1442 "dhcp4_parser.cc" break; case 176: @@ -1477,7 +1446,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.DHCP_SOCKET_TYPE); } -#line 1481 "dhcp4_parser.cc" +#line 1450 "dhcp4_parser.cc" break; case 177: @@ -1486,19 +1455,19 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("dhcp-socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1490 "dhcp4_parser.cc" +#line 1459 "dhcp4_parser.cc" break; case 178: #line 724 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); } -#line 1496 "dhcp4_parser.cc" +#line 1465 "dhcp4_parser.cc" break; case 179: #line 725 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); } -#line 1502 "dhcp4_parser.cc" +#line 1471 "dhcp4_parser.cc" break; case 180: @@ -1506,7 +1475,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.OUTBOUND_INTERFACE); } -#line 1510 "dhcp4_parser.cc" +#line 1479 "dhcp4_parser.cc" break; case 181: @@ -1515,7 +1484,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("outbound-interface", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1519 "dhcp4_parser.cc" +#line 1488 "dhcp4_parser.cc" break; case 182: @@ -1523,7 +1492,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("same-as-inbound", ctx.loc2pos(yystack_[0].location))); } -#line 1527 "dhcp4_parser.cc" +#line 1496 "dhcp4_parser.cc" break; case 183: @@ -1531,7 +1500,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("use-routing", ctx.loc2pos(yystack_[0].location))); } -#line 1535 "dhcp4_parser.cc" +#line 1504 "dhcp4_parser.cc" break; case 184: @@ -1540,7 +1509,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1544 "dhcp4_parser.cc" +#line 1513 "dhcp4_parser.cc" break; case 185: @@ -1551,7 +1520,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1555 "dhcp4_parser.cc" +#line 1524 "dhcp4_parser.cc" break; case 186: @@ -1562,7 +1531,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1566 "dhcp4_parser.cc" +#line 1535 "dhcp4_parser.cc" break; case 187: @@ -1573,7 +1542,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.SANITY_CHECKS); } -#line 1577 "dhcp4_parser.cc" +#line 1546 "dhcp4_parser.cc" break; case 188: @@ -1582,7 +1551,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1586 "dhcp4_parser.cc" +#line 1555 "dhcp4_parser.cc" break; case 192: @@ -1590,7 +1559,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1594 "dhcp4_parser.cc" +#line 1563 "dhcp4_parser.cc" break; case 193: @@ -1610,7 +1579,7 @@ namespace isc { namespace dhcp { ", supported values are: none, warn, fix, fix-del, del"); } } -#line 1614 "dhcp4_parser.cc" +#line 1583 "dhcp4_parser.cc" break; case 194: @@ -1621,7 +1590,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1625 "dhcp4_parser.cc" +#line 1594 "dhcp4_parser.cc" break; case 195: @@ -1632,7 +1601,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1636 "dhcp4_parser.cc" +#line 1605 "dhcp4_parser.cc" break; case 196: @@ -1643,7 +1612,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1647 "dhcp4_parser.cc" +#line 1616 "dhcp4_parser.cc" break; case 197: @@ -1652,7 +1621,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1656 "dhcp4_parser.cc" +#line 1625 "dhcp4_parser.cc" break; case 202: @@ -1662,7 +1631,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1666 "dhcp4_parser.cc" +#line 1635 "dhcp4_parser.cc" break; case 203: @@ -1672,7 +1641,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1676 "dhcp4_parser.cc" +#line 1645 "dhcp4_parser.cc" break; case 227: @@ -1680,7 +1649,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.DATABASE_TYPE); } -#line 1684 "dhcp4_parser.cc" +#line 1653 "dhcp4_parser.cc" break; case 228: @@ -1689,31 +1658,31 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1693 "dhcp4_parser.cc" +#line 1662 "dhcp4_parser.cc" break; case 229: #line 866 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1699 "dhcp4_parser.cc" +#line 1668 "dhcp4_parser.cc" break; case 230: #line 867 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1705 "dhcp4_parser.cc" +#line 1674 "dhcp4_parser.cc" break; case 231: #line 868 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1711 "dhcp4_parser.cc" +#line 1680 "dhcp4_parser.cc" break; case 232: #line 869 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1717 "dhcp4_parser.cc" +#line 1686 "dhcp4_parser.cc" break; case 233: @@ -1721,7 +1690,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1725 "dhcp4_parser.cc" +#line 1694 "dhcp4_parser.cc" break; case 234: @@ -1731,7 +1700,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1735 "dhcp4_parser.cc" +#line 1704 "dhcp4_parser.cc" break; case 235: @@ -1739,7 +1708,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1743 "dhcp4_parser.cc" +#line 1712 "dhcp4_parser.cc" break; case 236: @@ -1749,7 +1718,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1753 "dhcp4_parser.cc" +#line 1722 "dhcp4_parser.cc" break; case 237: @@ -1757,7 +1726,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1761 "dhcp4_parser.cc" +#line 1730 "dhcp4_parser.cc" break; case 238: @@ -1767,7 +1736,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1771 "dhcp4_parser.cc" +#line 1740 "dhcp4_parser.cc" break; case 239: @@ -1776,7 +1745,7 @@ namespace isc { namespace dhcp { ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1780 "dhcp4_parser.cc" +#line 1749 "dhcp4_parser.cc" break; case 240: @@ -1784,7 +1753,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1788 "dhcp4_parser.cc" +#line 1757 "dhcp4_parser.cc" break; case 241: @@ -1794,7 +1763,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1798 "dhcp4_parser.cc" +#line 1767 "dhcp4_parser.cc" break; case 242: @@ -1803,7 +1772,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1807 "dhcp4_parser.cc" +#line 1776 "dhcp4_parser.cc" break; case 243: @@ -1812,7 +1781,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1816 "dhcp4_parser.cc" +#line 1785 "dhcp4_parser.cc" break; case 244: @@ -1821,7 +1790,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1825 "dhcp4_parser.cc" +#line 1794 "dhcp4_parser.cc" break; case 245: @@ -1830,7 +1799,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1834 "dhcp4_parser.cc" +#line 1803 "dhcp4_parser.cc" break; case 246: @@ -1839,7 +1808,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1843 "dhcp4_parser.cc" +#line 1812 "dhcp4_parser.cc" break; case 247: @@ -1848,7 +1817,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1852 "dhcp4_parser.cc" +#line 1821 "dhcp4_parser.cc" break; case 248: @@ -1857,7 +1826,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1861 "dhcp4_parser.cc" +#line 1830 "dhcp4_parser.cc" break; case 249: @@ -1865,7 +1834,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1869 "dhcp4_parser.cc" +#line 1838 "dhcp4_parser.cc" break; case 250: @@ -1875,7 +1844,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1879 "dhcp4_parser.cc" +#line 1848 "dhcp4_parser.cc" break; case 251: @@ -1883,7 +1852,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1887 "dhcp4_parser.cc" +#line 1856 "dhcp4_parser.cc" break; case 252: @@ -1893,7 +1862,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1897 "dhcp4_parser.cc" +#line 1866 "dhcp4_parser.cc" break; case 253: @@ -1901,7 +1870,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1905 "dhcp4_parser.cc" +#line 1874 "dhcp4_parser.cc" break; case 254: @@ -1911,7 +1880,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("consistency", c); ctx.leave(); } -#line 1915 "dhcp4_parser.cc" +#line 1884 "dhcp4_parser.cc" break; case 255: @@ -1919,7 +1888,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1923 "dhcp4_parser.cc" +#line 1892 "dhcp4_parser.cc" break; case 256: @@ -1929,7 +1898,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("serial-consistency", c); ctx.leave(); } -#line 1933 "dhcp4_parser.cc" +#line 1902 "dhcp4_parser.cc" break; case 257: @@ -1938,7 +1907,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 1942 "dhcp4_parser.cc" +#line 1911 "dhcp4_parser.cc" break; case 258: @@ -1947,7 +1916,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 1951 "dhcp4_parser.cc" +#line 1920 "dhcp4_parser.cc" break; case 259: @@ -1956,7 +1925,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 1960 "dhcp4_parser.cc" +#line 1929 "dhcp4_parser.cc" break; case 260: @@ -1967,7 +1936,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 1971 "dhcp4_parser.cc" +#line 1940 "dhcp4_parser.cc" break; case 261: @@ -1976,7 +1945,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1980 "dhcp4_parser.cc" +#line 1949 "dhcp4_parser.cc" break; case 269: @@ -1985,7 +1954,7 @@ namespace isc { namespace dhcp { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1989 "dhcp4_parser.cc" +#line 1958 "dhcp4_parser.cc" break; case 270: @@ -1994,7 +1963,7 @@ namespace isc { namespace dhcp { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 1998 "dhcp4_parser.cc" +#line 1967 "dhcp4_parser.cc" break; case 271: @@ -2003,7 +1972,7 @@ namespace isc { namespace dhcp { ElementPtr circuit(new StringElement("circuit-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(circuit); } -#line 2007 "dhcp4_parser.cc" +#line 1976 "dhcp4_parser.cc" break; case 272: @@ -2012,7 +1981,7 @@ namespace isc { namespace dhcp { ElementPtr client(new StringElement("client-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(client); } -#line 2016 "dhcp4_parser.cc" +#line 1985 "dhcp4_parser.cc" break; case 273: @@ -2021,7 +1990,7 @@ namespace isc { namespace dhcp { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 2025 "dhcp4_parser.cc" +#line 1994 "dhcp4_parser.cc" break; case 274: @@ -2032,7 +2001,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(mt); ctx.enter(ctx.DHCP_MULTI_THREADING); } -#line 2036 "dhcp4_parser.cc" +#line 2005 "dhcp4_parser.cc" break; case 275: @@ -2043,7 +2012,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2047 "dhcp4_parser.cc" +#line 2016 "dhcp4_parser.cc" break; case 284: @@ -2052,7 +2021,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-multi-threading", b); } -#line 2056 "dhcp4_parser.cc" +#line 2025 "dhcp4_parser.cc" break; case 285: @@ -2061,7 +2030,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("thread-pool-size", prf); } -#line 2065 "dhcp4_parser.cc" +#line 2034 "dhcp4_parser.cc" break; case 286: @@ -2070,7 +2039,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("packet-queue-size", prf); } -#line 2074 "dhcp4_parser.cc" +#line 2043 "dhcp4_parser.cc" break; case 287: @@ -2081,7 +2050,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 2085 "dhcp4_parser.cc" +#line 2054 "dhcp4_parser.cc" break; case 288: @@ -2090,7 +2059,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2094 "dhcp4_parser.cc" +#line 2063 "dhcp4_parser.cc" break; case 293: @@ -2100,7 +2069,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2104 "dhcp4_parser.cc" +#line 2073 "dhcp4_parser.cc" break; case 294: @@ -2110,7 +2079,7 @@ namespace isc { namespace dhcp { ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2114 "dhcp4_parser.cc" +#line 2083 "dhcp4_parser.cc" break; case 295: @@ -2120,7 +2089,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2124 "dhcp4_parser.cc" +#line 2093 "dhcp4_parser.cc" break; case 296: @@ -2130,7 +2099,7 @@ namespace isc { namespace dhcp { ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2134 "dhcp4_parser.cc" +#line 2103 "dhcp4_parser.cc" break; case 302: @@ -2138,7 +2107,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2142 "dhcp4_parser.cc" +#line 2111 "dhcp4_parser.cc" break; case 303: @@ -2148,7 +2117,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 2152 "dhcp4_parser.cc" +#line 2121 "dhcp4_parser.cc" break; case 304: @@ -2156,7 +2125,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2160 "dhcp4_parser.cc" +#line 2129 "dhcp4_parser.cc" break; case 305: @@ -2165,7 +2134,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2169 "dhcp4_parser.cc" +#line 2138 "dhcp4_parser.cc" break; case 306: @@ -2176,7 +2145,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 2180 "dhcp4_parser.cc" +#line 2149 "dhcp4_parser.cc" break; case 307: @@ -2186,7 +2155,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2190 "dhcp4_parser.cc" +#line 2159 "dhcp4_parser.cc" break; case 316: @@ -2195,7 +2164,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reclaim-timer-wait-time", value); } -#line 2199 "dhcp4_parser.cc" +#line 2168 "dhcp4_parser.cc" break; case 317: @@ -2204,7 +2173,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value); } -#line 2208 "dhcp4_parser.cc" +#line 2177 "dhcp4_parser.cc" break; case 318: @@ -2213,7 +2182,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 2217 "dhcp4_parser.cc" +#line 2186 "dhcp4_parser.cc" break; case 319: @@ -2222,7 +2191,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 2226 "dhcp4_parser.cc" +#line 2195 "dhcp4_parser.cc" break; case 320: @@ -2231,7 +2200,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 2235 "dhcp4_parser.cc" +#line 2204 "dhcp4_parser.cc" break; case 321: @@ -2240,7 +2209,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 2244 "dhcp4_parser.cc" +#line 2213 "dhcp4_parser.cc" break; case 322: @@ -2251,7 +2220,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET4); } -#line 2255 "dhcp4_parser.cc" +#line 2224 "dhcp4_parser.cc" break; case 323: @@ -2260,7 +2229,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2264 "dhcp4_parser.cc" +#line 2233 "dhcp4_parser.cc" break; case 328: @@ -2270,7 +2239,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2274 "dhcp4_parser.cc" +#line 2243 "dhcp4_parser.cc" break; case 329: @@ -2296,7 +2265,7 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2300 "dhcp4_parser.cc" +#line 2269 "dhcp4_parser.cc" break; case 330: @@ -2306,7 +2275,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2310 "dhcp4_parser.cc" +#line 2279 "dhcp4_parser.cc" break; case 331: @@ -2316,7 +2285,7 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2320 "dhcp4_parser.cc" +#line 2289 "dhcp4_parser.cc" break; case 372: @@ -2324,7 +2293,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2328 "dhcp4_parser.cc" +#line 2297 "dhcp4_parser.cc" break; case 373: @@ -2334,7 +2303,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 2338 "dhcp4_parser.cc" +#line 2307 "dhcp4_parser.cc" break; case 374: @@ -2342,7 +2311,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2346 "dhcp4_parser.cc" +#line 2315 "dhcp4_parser.cc" break; case 375: @@ -2352,7 +2321,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("4o6-interface", iface); ctx.leave(); } -#line 2356 "dhcp4_parser.cc" +#line 2325 "dhcp4_parser.cc" break; case 376: @@ -2360,7 +2329,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2364 "dhcp4_parser.cc" +#line 2333 "dhcp4_parser.cc" break; case 377: @@ -2370,7 +2339,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("4o6-interface-id", iface); ctx.leave(); } -#line 2374 "dhcp4_parser.cc" +#line 2343 "dhcp4_parser.cc" break; case 378: @@ -2378,7 +2347,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2382 "dhcp4_parser.cc" +#line 2351 "dhcp4_parser.cc" break; case 379: @@ -2388,7 +2357,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("4o6-subnet", iface); ctx.leave(); } -#line 2392 "dhcp4_parser.cc" +#line 2361 "dhcp4_parser.cc" break; case 380: @@ -2396,7 +2365,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2400 "dhcp4_parser.cc" +#line 2369 "dhcp4_parser.cc" break; case 381: @@ -2406,7 +2375,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 2410 "dhcp4_parser.cc" +#line 2379 "dhcp4_parser.cc" break; case 382: @@ -2414,7 +2383,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2418 "dhcp4_parser.cc" +#line 2387 "dhcp4_parser.cc" break; case 383: @@ -2424,7 +2393,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 2428 "dhcp4_parser.cc" +#line 2397 "dhcp4_parser.cc" break; case 384: @@ -2435,7 +2404,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2439 "dhcp4_parser.cc" +#line 2408 "dhcp4_parser.cc" break; case 385: @@ -2444,7 +2413,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2448 "dhcp4_parser.cc" +#line 2417 "dhcp4_parser.cc" break; case 386: @@ -2452,7 +2421,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.RESERVATION_MODE); } -#line 2456 "dhcp4_parser.cc" +#line 2425 "dhcp4_parser.cc" break; case 387: @@ -2461,31 +2430,31 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2465 "dhcp4_parser.cc" +#line 2434 "dhcp4_parser.cc" break; case 388: #line 1370 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 2471 "dhcp4_parser.cc" +#line 2440 "dhcp4_parser.cc" break; case 389: #line 1371 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 2477 "dhcp4_parser.cc" +#line 2446 "dhcp4_parser.cc" break; case 390: #line 1372 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } -#line 2483 "dhcp4_parser.cc" +#line 2452 "dhcp4_parser.cc" break; case 391: #line 1373 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 2489 "dhcp4_parser.cc" +#line 2458 "dhcp4_parser.cc" break; case 392: @@ -2494,7 +2463,7 @@ namespace isc { namespace dhcp { ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 2498 "dhcp4_parser.cc" +#line 2467 "dhcp4_parser.cc" break; case 393: @@ -2505,7 +2474,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 2509 "dhcp4_parser.cc" +#line 2478 "dhcp4_parser.cc" break; case 394: @@ -2514,7 +2483,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2518 "dhcp4_parser.cc" +#line 2487 "dhcp4_parser.cc" break; case 399: @@ -2524,7 +2493,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2528 "dhcp4_parser.cc" +#line 2497 "dhcp4_parser.cc" break; case 400: @@ -2532,7 +2501,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 2536 "dhcp4_parser.cc" +#line 2505 "dhcp4_parser.cc" break; case 436: @@ -2543,7 +2512,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2547 "dhcp4_parser.cc" +#line 2516 "dhcp4_parser.cc" break; case 437: @@ -2552,7 +2521,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2556 "dhcp4_parser.cc" +#line 2525 "dhcp4_parser.cc" break; case 438: @@ -2561,7 +2530,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2565 "dhcp4_parser.cc" +#line 2534 "dhcp4_parser.cc" break; case 439: @@ -2569,7 +2538,7 @@ namespace isc { namespace dhcp { { // parsing completed } -#line 2573 "dhcp4_parser.cc" +#line 2542 "dhcp4_parser.cc" break; case 444: @@ -2579,7 +2548,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2583 "dhcp4_parser.cc" +#line 2552 "dhcp4_parser.cc" break; case 445: @@ -2591,7 +2560,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2595 "dhcp4_parser.cc" +#line 2564 "dhcp4_parser.cc" break; case 446: @@ -2601,7 +2570,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2605 "dhcp4_parser.cc" +#line 2574 "dhcp4_parser.cc" break; case 447: @@ -2613,7 +2582,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2617 "dhcp4_parser.cc" +#line 2586 "dhcp4_parser.cc" break; case 463: @@ -2622,7 +2591,7 @@ namespace isc { namespace dhcp { ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2626 "dhcp4_parser.cc" +#line 2595 "dhcp4_parser.cc" break; case 465: @@ -2630,7 +2599,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2634 "dhcp4_parser.cc" +#line 2603 "dhcp4_parser.cc" break; case 466: @@ -2640,7 +2609,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2644 "dhcp4_parser.cc" +#line 2613 "dhcp4_parser.cc" break; case 467: @@ -2648,7 +2617,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2652 "dhcp4_parser.cc" +#line 2621 "dhcp4_parser.cc" break; case 468: @@ -2658,7 +2627,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2662 "dhcp4_parser.cc" +#line 2631 "dhcp4_parser.cc" break; case 469: @@ -2666,7 +2635,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2670 "dhcp4_parser.cc" +#line 2639 "dhcp4_parser.cc" break; case 470: @@ -2676,7 +2645,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2680 "dhcp4_parser.cc" +#line 2649 "dhcp4_parser.cc" break; case 472: @@ -2684,7 +2653,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2688 "dhcp4_parser.cc" +#line 2657 "dhcp4_parser.cc" break; case 473: @@ -2694,7 +2663,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2698 "dhcp4_parser.cc" +#line 2667 "dhcp4_parser.cc" break; case 474: @@ -2703,7 +2672,7 @@ namespace isc { namespace dhcp { ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2707 "dhcp4_parser.cc" +#line 2676 "dhcp4_parser.cc" break; case 475: @@ -2714,7 +2683,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2718 "dhcp4_parser.cc" +#line 2687 "dhcp4_parser.cc" break; case 476: @@ -2723,7 +2692,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2727 "dhcp4_parser.cc" +#line 2696 "dhcp4_parser.cc" break; case 481: @@ -2733,7 +2702,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2737 "dhcp4_parser.cc" +#line 2706 "dhcp4_parser.cc" break; case 482: @@ -2742,7 +2711,7 @@ namespace isc { namespace dhcp { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2746 "dhcp4_parser.cc" +#line 2715 "dhcp4_parser.cc" break; case 483: @@ -2752,7 +2721,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2756 "dhcp4_parser.cc" +#line 2725 "dhcp4_parser.cc" break; case 484: @@ -2761,7 +2730,7 @@ namespace isc { namespace dhcp { /// @todo: the code or name parameters are required. // parsing completed } -#line 2765 "dhcp4_parser.cc" +#line 2734 "dhcp4_parser.cc" break; case 499: @@ -2769,7 +2738,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2773 "dhcp4_parser.cc" +#line 2742 "dhcp4_parser.cc" break; case 500: @@ -2779,7 +2748,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2783 "dhcp4_parser.cc" +#line 2752 "dhcp4_parser.cc" break; case 503: @@ -2788,7 +2757,7 @@ namespace isc { namespace dhcp { ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2792 "dhcp4_parser.cc" +#line 2761 "dhcp4_parser.cc" break; case 504: @@ -2797,7 +2766,7 @@ namespace isc { namespace dhcp { ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2801 "dhcp4_parser.cc" +#line 2770 "dhcp4_parser.cc" break; case 505: @@ -2808,7 +2777,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2812 "dhcp4_parser.cc" +#line 2781 "dhcp4_parser.cc" break; case 506: @@ -2817,7 +2786,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2821 "dhcp4_parser.cc" +#line 2790 "dhcp4_parser.cc" break; case 511: @@ -2827,7 +2796,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2831 "dhcp4_parser.cc" +#line 2800 "dhcp4_parser.cc" break; case 512: @@ -2837,7 +2806,7 @@ namespace isc { namespace dhcp { ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2841 "dhcp4_parser.cc" +#line 2810 "dhcp4_parser.cc" break; case 513: @@ -2847,7 +2816,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2851 "dhcp4_parser.cc" +#line 2820 "dhcp4_parser.cc" break; case 514: @@ -2857,7 +2826,7 @@ namespace isc { namespace dhcp { ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2861 "dhcp4_parser.cc" +#line 2830 "dhcp4_parser.cc" break; case 524: @@ -2865,7 +2834,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2869 "dhcp4_parser.cc" +#line 2838 "dhcp4_parser.cc" break; case 525: @@ -2875,7 +2844,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 2879 "dhcp4_parser.cc" +#line 2848 "dhcp4_parser.cc" break; case 526: @@ -2883,7 +2852,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2887 "dhcp4_parser.cc" +#line 2856 "dhcp4_parser.cc" break; case 527: @@ -2910,7 +2879,7 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2914 "dhcp4_parser.cc" +#line 2883 "dhcp4_parser.cc" break; case 528: @@ -2918,7 +2887,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2922 "dhcp4_parser.cc" +#line 2891 "dhcp4_parser.cc" break; case 529: @@ -2947,7 +2916,7 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2951 "dhcp4_parser.cc" +#line 2920 "dhcp4_parser.cc" break; case 530: @@ -2958,7 +2927,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 2962 "dhcp4_parser.cc" +#line 2931 "dhcp4_parser.cc" break; case 531: @@ -2967,7 +2936,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2971 "dhcp4_parser.cc" +#line 2940 "dhcp4_parser.cc" break; case 536: @@ -2977,7 +2946,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2981 "dhcp4_parser.cc" +#line 2950 "dhcp4_parser.cc" break; case 537: @@ -2986,7 +2955,7 @@ namespace isc { namespace dhcp { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 2990 "dhcp4_parser.cc" +#line 2959 "dhcp4_parser.cc" break; case 538: @@ -2996,7 +2965,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3000 "dhcp4_parser.cc" +#line 2969 "dhcp4_parser.cc" break; case 539: @@ -3005,7 +2974,7 @@ namespace isc { namespace dhcp { /// @todo: an identifier parameter is required. // parsing completed } -#line 3009 "dhcp4_parser.cc" +#line 2978 "dhcp4_parser.cc" break; case 559: @@ -3013,7 +2982,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3017 "dhcp4_parser.cc" +#line 2986 "dhcp4_parser.cc" break; case 560: @@ -3023,7 +2992,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("next-server", next_server); ctx.leave(); } -#line 3027 "dhcp4_parser.cc" +#line 2996 "dhcp4_parser.cc" break; case 561: @@ -3031,7 +3000,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3035 "dhcp4_parser.cc" +#line 3004 "dhcp4_parser.cc" break; case 562: @@ -3041,7 +3010,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("server-hostname", srv); ctx.leave(); } -#line 3045 "dhcp4_parser.cc" +#line 3014 "dhcp4_parser.cc" break; case 563: @@ -3049,7 +3018,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3053 "dhcp4_parser.cc" +#line 3022 "dhcp4_parser.cc" break; case 564: @@ -3059,7 +3028,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("boot-file-name", bootfile); ctx.leave(); } -#line 3063 "dhcp4_parser.cc" +#line 3032 "dhcp4_parser.cc" break; case 565: @@ -3067,7 +3036,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3071 "dhcp4_parser.cc" +#line 3040 "dhcp4_parser.cc" break; case 566: @@ -3077,7 +3046,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 3081 "dhcp4_parser.cc" +#line 3050 "dhcp4_parser.cc" break; case 567: @@ -3088,7 +3057,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3092 "dhcp4_parser.cc" +#line 3061 "dhcp4_parser.cc" break; case 568: @@ -3097,7 +3066,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3101 "dhcp4_parser.cc" +#line 3070 "dhcp4_parser.cc" break; case 569: @@ -3105,7 +3074,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3109 "dhcp4_parser.cc" +#line 3078 "dhcp4_parser.cc" break; case 570: @@ -3115,7 +3084,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 3119 "dhcp4_parser.cc" +#line 3088 "dhcp4_parser.cc" break; case 571: @@ -3123,7 +3092,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3127 "dhcp4_parser.cc" +#line 3096 "dhcp4_parser.cc" break; case 572: @@ -3133,7 +3102,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 3137 "dhcp4_parser.cc" +#line 3106 "dhcp4_parser.cc" break; case 573: @@ -3141,7 +3110,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3145 "dhcp4_parser.cc" +#line 3114 "dhcp4_parser.cc" break; case 574: @@ -3151,7 +3120,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("client-id", hw); ctx.leave(); } -#line 3155 "dhcp4_parser.cc" +#line 3124 "dhcp4_parser.cc" break; case 575: @@ -3159,7 +3128,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3163 "dhcp4_parser.cc" +#line 3132 "dhcp4_parser.cc" break; case 576: @@ -3169,7 +3138,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("circuit-id", hw); ctx.leave(); } -#line 3173 "dhcp4_parser.cc" +#line 3142 "dhcp4_parser.cc" break; case 577: @@ -3177,7 +3146,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3181 "dhcp4_parser.cc" +#line 3150 "dhcp4_parser.cc" break; case 578: @@ -3187,7 +3156,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 3191 "dhcp4_parser.cc" +#line 3160 "dhcp4_parser.cc" break; case 579: @@ -3195,7 +3164,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3199 "dhcp4_parser.cc" +#line 3168 "dhcp4_parser.cc" break; case 580: @@ -3205,7 +3174,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 3209 "dhcp4_parser.cc" +#line 3178 "dhcp4_parser.cc" break; case 581: @@ -3216,7 +3185,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 3220 "dhcp4_parser.cc" +#line 3189 "dhcp4_parser.cc" break; case 582: @@ -3225,7 +3194,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3229 "dhcp4_parser.cc" +#line 3198 "dhcp4_parser.cc" break; case 583: @@ -3236,7 +3205,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 3240 "dhcp4_parser.cc" +#line 3209 "dhcp4_parser.cc" break; case 584: @@ -3245,7 +3214,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3249 "dhcp4_parser.cc" +#line 3218 "dhcp4_parser.cc" break; case 587: @@ -3256,7 +3225,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 3260 "dhcp4_parser.cc" +#line 3229 "dhcp4_parser.cc" break; case 588: @@ -3265,7 +3234,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3269 "dhcp4_parser.cc" +#line 3238 "dhcp4_parser.cc" break; case 591: @@ -3275,7 +3244,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3279 "dhcp4_parser.cc" +#line 3248 "dhcp4_parser.cc" break; case 592: @@ -3285,7 +3254,7 @@ namespace isc { namespace dhcp { ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3289 "dhcp4_parser.cc" +#line 3258 "dhcp4_parser.cc" break; case 609: @@ -3293,7 +3262,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3297 "dhcp4_parser.cc" +#line 3266 "dhcp4_parser.cc" break; case 610: @@ -3303,7 +3272,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 3307 "dhcp4_parser.cc" +#line 3276 "dhcp4_parser.cc" break; case 611: @@ -3312,7 +3281,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 3316 "dhcp4_parser.cc" +#line 3285 "dhcp4_parser.cc" break; case 612: @@ -3321,7 +3290,7 @@ namespace isc { namespace dhcp { ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 3325 "dhcp4_parser.cc" +#line 3294 "dhcp4_parser.cc" break; case 613: @@ -3332,7 +3301,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 3336 "dhcp4_parser.cc" +#line 3305 "dhcp4_parser.cc" break; case 614: @@ -3341,7 +3310,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3345 "dhcp4_parser.cc" +#line 3314 "dhcp4_parser.cc" break; case 622: @@ -3349,7 +3318,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3353 "dhcp4_parser.cc" +#line 3322 "dhcp4_parser.cc" break; case 623: @@ -3359,7 +3328,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 3363 "dhcp4_parser.cc" +#line 3332 "dhcp4_parser.cc" break; case 624: @@ -3367,7 +3336,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3371 "dhcp4_parser.cc" +#line 3340 "dhcp4_parser.cc" break; case 625: @@ -3377,7 +3346,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 3381 "dhcp4_parser.cc" +#line 3350 "dhcp4_parser.cc" break; case 626: @@ -3388,7 +3357,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(qc); ctx.enter(ctx.DHCP_QUEUE_CONTROL); } -#line 3392 "dhcp4_parser.cc" +#line 3361 "dhcp4_parser.cc" break; case 627: @@ -3399,7 +3368,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3403 "dhcp4_parser.cc" +#line 3372 "dhcp4_parser.cc" break; case 636: @@ -3408,7 +3377,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-queue", b); } -#line 3412 "dhcp4_parser.cc" +#line 3381 "dhcp4_parser.cc" break; case 637: @@ -3416,7 +3385,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3420 "dhcp4_parser.cc" +#line 3389 "dhcp4_parser.cc" break; case 638: @@ -3426,7 +3395,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("queue-type", qt); ctx.leave(); } -#line 3430 "dhcp4_parser.cc" +#line 3399 "dhcp4_parser.cc" break; case 639: @@ -3435,7 +3404,7 @@ namespace isc { namespace dhcp { ElementPtr c(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("capacity", c); } -#line 3439 "dhcp4_parser.cc" +#line 3408 "dhcp4_parser.cc" break; case 640: @@ -3443,7 +3412,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3447 "dhcp4_parser.cc" +#line 3416 "dhcp4_parser.cc" break; case 641: @@ -3452,7 +3421,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set(yystack_[3].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3456 "dhcp4_parser.cc" +#line 3425 "dhcp4_parser.cc" break; case 642: @@ -3463,7 +3432,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 3467 "dhcp4_parser.cc" +#line 3436 "dhcp4_parser.cc" break; case 643: @@ -3474,7 +3443,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3478 "dhcp4_parser.cc" +#line 3447 "dhcp4_parser.cc" break; case 644: @@ -3484,7 +3453,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3488 "dhcp4_parser.cc" +#line 3457 "dhcp4_parser.cc" break; case 645: @@ -3494,7 +3463,7 @@ namespace isc { namespace dhcp { ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3498 "dhcp4_parser.cc" +#line 3467 "dhcp4_parser.cc" break; case 666: @@ -3503,7 +3472,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3507 "dhcp4_parser.cc" +#line 3476 "dhcp4_parser.cc" break; case 667: @@ -3511,7 +3480,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3515 "dhcp4_parser.cc" +#line 3484 "dhcp4_parser.cc" break; case 668: @@ -3521,7 +3490,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3525 "dhcp4_parser.cc" +#line 3494 "dhcp4_parser.cc" break; case 669: @@ -3530,7 +3499,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3534 "dhcp4_parser.cc" +#line 3503 "dhcp4_parser.cc" break; case 670: @@ -3538,7 +3507,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3542 "dhcp4_parser.cc" +#line 3511 "dhcp4_parser.cc" break; case 671: @@ -3548,7 +3517,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3552 "dhcp4_parser.cc" +#line 3521 "dhcp4_parser.cc" break; case 672: @@ -3557,7 +3526,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3561 "dhcp4_parser.cc" +#line 3530 "dhcp4_parser.cc" break; case 673: @@ -3566,7 +3535,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3570 "dhcp4_parser.cc" +#line 3539 "dhcp4_parser.cc" break; case 674: @@ -3574,7 +3543,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NCR_PROTOCOL); } -#line 3578 "dhcp4_parser.cc" +#line 3547 "dhcp4_parser.cc" break; case 675: @@ -3583,19 +3552,19 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3587 "dhcp4_parser.cc" +#line 3556 "dhcp4_parser.cc" break; case 676: #line 2233 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3593 "dhcp4_parser.cc" +#line 3562 "dhcp4_parser.cc" break; case 677: #line 2234 "dhcp4_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3599 "dhcp4_parser.cc" +#line 3568 "dhcp4_parser.cc" break; case 678: @@ -3603,7 +3572,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NCR_FORMAT); } -#line 3607 "dhcp4_parser.cc" +#line 3576 "dhcp4_parser.cc" break; case 679: @@ -3613,7 +3582,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3617 "dhcp4_parser.cc" +#line 3586 "dhcp4_parser.cc" break; case 680: @@ -3621,7 +3590,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3625 "dhcp4_parser.cc" +#line 3594 "dhcp4_parser.cc" break; case 681: @@ -3631,7 +3600,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3635 "dhcp4_parser.cc" +#line 3604 "dhcp4_parser.cc" break; case 682: @@ -3640,7 +3609,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3644 "dhcp4_parser.cc" +#line 3613 "dhcp4_parser.cc" break; case 683: @@ -3649,7 +3618,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 3653 "dhcp4_parser.cc" +#line 3622 "dhcp4_parser.cc" break; case 684: @@ -3657,7 +3626,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 3661 "dhcp4_parser.cc" +#line 3630 "dhcp4_parser.cc" break; case 685: @@ -3666,7 +3635,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3670 "dhcp4_parser.cc" +#line 3639 "dhcp4_parser.cc" break; case 686: @@ -3674,7 +3643,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3678 "dhcp4_parser.cc" +#line 3647 "dhcp4_parser.cc" break; case 687: @@ -3684,7 +3653,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 3688 "dhcp4_parser.cc" +#line 3657 "dhcp4_parser.cc" break; case 688: @@ -3692,7 +3661,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3696 "dhcp4_parser.cc" +#line 3665 "dhcp4_parser.cc" break; case 689: @@ -3702,7 +3671,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 3706 "dhcp4_parser.cc" +#line 3675 "dhcp4_parser.cc" break; case 690: @@ -3710,7 +3679,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3714 "dhcp4_parser.cc" +#line 3683 "dhcp4_parser.cc" break; case 691: @@ -3720,7 +3689,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 3724 "dhcp4_parser.cc" +#line 3693 "dhcp4_parser.cc" break; case 692: @@ -3728,7 +3697,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3732 "dhcp4_parser.cc" +#line 3701 "dhcp4_parser.cc" break; case 693: @@ -3737,7 +3706,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3741 "dhcp4_parser.cc" +#line 3710 "dhcp4_parser.cc" break; case 694: @@ -3745,7 +3714,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3749 "dhcp4_parser.cc" +#line 3718 "dhcp4_parser.cc" break; case 695: @@ -3754,7 +3723,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3758 "dhcp4_parser.cc" +#line 3727 "dhcp4_parser.cc" break; case 696: @@ -3762,7 +3731,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3766 "dhcp4_parser.cc" +#line 3735 "dhcp4_parser.cc" break; case 697: @@ -3771,7 +3740,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3775 "dhcp4_parser.cc" +#line 3744 "dhcp4_parser.cc" break; case 698: @@ -3782,7 +3751,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.CONFIG_CONTROL); } -#line 3786 "dhcp4_parser.cc" +#line 3755 "dhcp4_parser.cc" break; case 699: @@ -3792,7 +3761,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3796 "dhcp4_parser.cc" +#line 3765 "dhcp4_parser.cc" break; case 700: @@ -3802,7 +3771,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3806 "dhcp4_parser.cc" +#line 3775 "dhcp4_parser.cc" break; case 701: @@ -3811,7 +3780,7 @@ namespace isc { namespace dhcp { // No config_control params are required // parsing completed } -#line 3815 "dhcp4_parser.cc" +#line 3784 "dhcp4_parser.cc" break; case 706: @@ -3822,7 +3791,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.CONFIG_DATABASE); } -#line 3826 "dhcp4_parser.cc" +#line 3795 "dhcp4_parser.cc" break; case 707: @@ -3831,7 +3800,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3835 "dhcp4_parser.cc" +#line 3804 "dhcp4_parser.cc" break; case 708: @@ -3840,7 +3809,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-fetch-wait-time", value); } -#line 3844 "dhcp4_parser.cc" +#line 3813 "dhcp4_parser.cc" break; case 709: @@ -3851,7 +3820,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 3855 "dhcp4_parser.cc" +#line 3824 "dhcp4_parser.cc" break; case 710: @@ -3860,7 +3829,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3864 "dhcp4_parser.cc" +#line 3833 "dhcp4_parser.cc" break; case 711: @@ -3870,7 +3839,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3874 "dhcp4_parser.cc" +#line 3843 "dhcp4_parser.cc" break; case 712: @@ -3878,7 +3847,7 @@ namespace isc { namespace dhcp { { // parsing completed } -#line 3882 "dhcp4_parser.cc" +#line 3851 "dhcp4_parser.cc" break; case 716: @@ -3889,7 +3858,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 3893 "dhcp4_parser.cc" +#line 3862 "dhcp4_parser.cc" break; case 717: @@ -3898,7 +3867,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3902 "dhcp4_parser.cc" +#line 3871 "dhcp4_parser.cc" break; case 720: @@ -3908,7 +3877,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 3912 "dhcp4_parser.cc" +#line 3881 "dhcp4_parser.cc" break; case 721: @@ -3916,7 +3885,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 3920 "dhcp4_parser.cc" +#line 3889 "dhcp4_parser.cc" break; case 731: @@ -3925,7 +3894,7 @@ namespace isc { namespace dhcp { ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 3929 "dhcp4_parser.cc" +#line 3898 "dhcp4_parser.cc" break; case 732: @@ -3933,7 +3902,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3937 "dhcp4_parser.cc" +#line 3906 "dhcp4_parser.cc" break; case 733: @@ -3943,7 +3912,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 3947 "dhcp4_parser.cc" +#line 3916 "dhcp4_parser.cc" break; case 734: @@ -3954,7 +3923,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 3958 "dhcp4_parser.cc" +#line 3927 "dhcp4_parser.cc" break; case 735: @@ -3963,7 +3932,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3967 "dhcp4_parser.cc" +#line 3936 "dhcp4_parser.cc" break; case 738: @@ -3973,7 +3942,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3977 "dhcp4_parser.cc" +#line 3946 "dhcp4_parser.cc" break; case 739: @@ -3981,7 +3950,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 3985 "dhcp4_parser.cc" +#line 3954 "dhcp4_parser.cc" break; case 747: @@ -3989,7 +3958,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3993 "dhcp4_parser.cc" +#line 3962 "dhcp4_parser.cc" break; case 748: @@ -3999,7 +3968,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 4003 "dhcp4_parser.cc" +#line 3972 "dhcp4_parser.cc" break; case 749: @@ -4008,7 +3977,7 @@ namespace isc { namespace dhcp { ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 4012 "dhcp4_parser.cc" +#line 3981 "dhcp4_parser.cc" break; case 750: @@ -4017,7 +3986,7 @@ namespace isc { namespace dhcp { ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 4021 "dhcp4_parser.cc" +#line 3990 "dhcp4_parser.cc" break; case 751: @@ -4026,7 +3995,7 @@ namespace isc { namespace dhcp { ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 4030 "dhcp4_parser.cc" +#line 3999 "dhcp4_parser.cc" break; case 752: @@ -4034,7 +4003,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 4038 "dhcp4_parser.cc" +#line 4007 "dhcp4_parser.cc" break; case 753: @@ -4044,11 +4013,11 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 4048 "dhcp4_parser.cc" +#line 4017 "dhcp4_parser.cc" break; -#line 4052 "dhcp4_parser.cc" +#line 4021 "dhcp4_parser.cc" default: break; @@ -4065,7 +4034,6 @@ namespace isc { namespace dhcp { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -4081,7 +4049,9 @@ namespace isc { namespace dhcp { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -4092,7 +4062,7 @@ namespace isc { namespace dhcp { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -4118,6 +4088,7 @@ namespace isc { namespace dhcp { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -4126,31 +4097,33 @@ namespace isc { namespace dhcp { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -4188,6 +4161,7 @@ namespace isc { namespace dhcp { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -4221,18 +4195,100 @@ namespace isc { namespace dhcp { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - Dhcp4Parser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + Dhcp4Parser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + Dhcp4Parser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // Dhcp4Parser::context. + Dhcp4Parser::context::context (const Dhcp4Parser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + Dhcp4Parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + int + Dhcp4Parser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -4257,35 +4313,26 @@ namespace isc { namespace dhcp { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + Dhcp4Parser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -4310,7 +4357,7 @@ namespace isc { namespace dhcp { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -5240,31 +5287,32 @@ namespace isc { namespace dhcp { }; - +#if PARSER4_DEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const Dhcp4Parser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\",\"", "\":\"", "\"[\"", - "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp4\"", "\"config-control\"", - "\"config-databases\"", "\"config-fetch-wait-time\"", - "\"interfaces-config\"", "\"interfaces\"", "\"dhcp-socket-type\"", - "\"raw\"", "\"udp\"", "\"outbound-interface\"", "\"same-as-inbound\"", - "\"use-routing\"", "\"re-detect\"", "\"sanity-checks\"", - "\"lease-checks\"", "\"echo-client-id\"", "\"match-client-id\"", - "\"authoritative\"", "\"next-server\"", "\"server-hostname\"", - "\"boot-file-name\"", "\"lease-database\"", "\"hosts-database\"", - "\"hosts-databases\"", "\"type\"", "\"memfile\"", "\"mysql\"", - "\"postgresql\"", "\"cql\"", "\"user\"", "\"password\"", "\"host\"", - "\"port\"", "\"persist\"", "\"lfc-interval\"", "\"readonly\"", - "\"connect-timeout\"", "\"contact-points\"", "\"keyspace\"", - "\"consistency\"", "\"serial-consistency\"", "\"max-reconnect-tries\"", - "\"reconnect-wait-time\"", "\"request-timeout\"", "\"tcp-keepalive\"", - "\"tcp-nodelay\"", "\"max-row-errors\"", "\"valid-lifetime\"", - "\"min-valid-lifetime\"", "\"max-valid-lifetime\"", "\"renew-timer\"", - "\"rebind-timer\"", "\"calculate-tee-times\"", "\"t1-percent\"", - "\"t2-percent\"", "\"decline-probation-period\"", "\"server-tag\"", + "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\":\"", + "\"[\"", "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp4\"", + "\"config-control\"", "\"config-databases\"", + "\"config-fetch-wait-time\"", "\"interfaces-config\"", "\"interfaces\"", + "\"dhcp-socket-type\"", "\"raw\"", "\"udp\"", "\"outbound-interface\"", + "\"same-as-inbound\"", "\"use-routing\"", "\"re-detect\"", + "\"sanity-checks\"", "\"lease-checks\"", "\"echo-client-id\"", + "\"match-client-id\"", "\"authoritative\"", "\"next-server\"", + "\"server-hostname\"", "\"boot-file-name\"", "\"lease-database\"", + "\"hosts-database\"", "\"hosts-databases\"", "\"type\"", "\"memfile\"", + "\"mysql\"", "\"postgresql\"", "\"cql\"", "\"user\"", "\"password\"", + "\"host\"", "\"port\"", "\"persist\"", "\"lfc-interval\"", + "\"readonly\"", "\"connect-timeout\"", "\"contact-points\"", + "\"keyspace\"", "\"consistency\"", "\"serial-consistency\"", + "\"max-reconnect-tries\"", "\"reconnect-wait-time\"", + "\"request-timeout\"", "\"tcp-keepalive\"", "\"tcp-nodelay\"", + "\"max-row-errors\"", "\"valid-lifetime\"", "\"min-valid-lifetime\"", + "\"max-valid-lifetime\"", "\"renew-timer\"", "\"rebind-timer\"", + "\"calculate-tee-times\"", "\"t1-percent\"", "\"t2-percent\"", + "\"decline-probation-period\"", "\"server-tag\"", "\"statistic-default-sample-count\"", "\"statistic-default-sample-age\"", "\"ddns-send-updates\"", "\"ddns-override-no-update\"", "\"ddns-override-client-update\"", "\"ddns-replace-client-name\"", @@ -5406,6 +5454,8 @@ namespace isc { namespace dhcp { "output_params_list", "output_params", "output", "$@135", "flush", "maxsize", "maxver", "pattern", "$@136", YY_NULLPTR }; +#endif + #if PARSER4_DEBUG const short @@ -5489,9 +5539,8 @@ namespace isc { namespace dhcp { 2504, 2509, 2514, 2514 }; - // Print the state stack on the debug stream. void - Dhcp4Parser::yystack_print_ () + Dhcp4Parser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -5502,9 +5551,8 @@ namespace isc { namespace dhcp { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - Dhcp4Parser::yy_reduce_print_ (int yyrule) + Dhcp4Parser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -5521,7 +5569,7 @@ namespace isc { namespace dhcp { #line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 5525 "dhcp4_parser.cc" +#line 5573 "dhcp4_parser.cc" #line 2522 "dhcp4_parser.yy" diff --git a/src/bin/dhcp4/dhcp4_parser.h b/src/bin/dhcp4/dhcp4_parser.h index 12e0216007..c58202809c 100644 --- a/src/bin/dhcp4/dhcp4_parser.h +++ b/src/bin/dhcp4/dhcp4_parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_PARSER4_DHCP4_PARSER_H_INCLUDED # define YY_PARSER4_DHCP4_PARSER_H_INCLUDED @@ -56,7 +57,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp4_parser.h" +#line 61 "dhcp4_parser.h" # include # include // std::abort @@ -199,7 +200,7 @@ using namespace std; #line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 203 "dhcp4_parser.h" +#line 204 "dhcp4_parser.h" @@ -235,6 +236,13 @@ namespace isc { namespace dhcp { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -378,9 +386,12 @@ namespace isc { namespace dhcp { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -466,223 +477,850 @@ namespace isc { namespace dhcp { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_COMMA = 258, - TOKEN_COLON = 259, - TOKEN_LSQUARE_BRACKET = 260, - TOKEN_RSQUARE_BRACKET = 261, - TOKEN_LCURLY_BRACKET = 262, - TOKEN_RCURLY_BRACKET = 263, - TOKEN_NULL_TYPE = 264, - TOKEN_DHCP4 = 265, - TOKEN_CONFIG_CONTROL = 266, - TOKEN_CONFIG_DATABASES = 267, - TOKEN_CONFIG_FETCH_WAIT_TIME = 268, - TOKEN_INTERFACES_CONFIG = 269, - TOKEN_INTERFACES = 270, - TOKEN_DHCP_SOCKET_TYPE = 271, - TOKEN_RAW = 272, - TOKEN_UDP = 273, - TOKEN_OUTBOUND_INTERFACE = 274, - TOKEN_SAME_AS_INBOUND = 275, - TOKEN_USE_ROUTING = 276, - TOKEN_RE_DETECT = 277, - TOKEN_SANITY_CHECKS = 278, - TOKEN_LEASE_CHECKS = 279, - TOKEN_ECHO_CLIENT_ID = 280, - TOKEN_MATCH_CLIENT_ID = 281, - TOKEN_AUTHORITATIVE = 282, - TOKEN_NEXT_SERVER = 283, - TOKEN_SERVER_HOSTNAME = 284, - TOKEN_BOOT_FILE_NAME = 285, - TOKEN_LEASE_DATABASE = 286, - TOKEN_HOSTS_DATABASE = 287, - TOKEN_HOSTS_DATABASES = 288, - TOKEN_TYPE = 289, - TOKEN_MEMFILE = 290, - TOKEN_MYSQL = 291, - TOKEN_POSTGRESQL = 292, - TOKEN_CQL = 293, - TOKEN_USER = 294, - TOKEN_PASSWORD = 295, - TOKEN_HOST = 296, - TOKEN_PORT = 297, - TOKEN_PERSIST = 298, - TOKEN_LFC_INTERVAL = 299, - TOKEN_READONLY = 300, - TOKEN_CONNECT_TIMEOUT = 301, - TOKEN_CONTACT_POINTS = 302, - TOKEN_KEYSPACE = 303, - TOKEN_CONSISTENCY = 304, - TOKEN_SERIAL_CONSISTENCY = 305, - TOKEN_MAX_RECONNECT_TRIES = 306, - TOKEN_RECONNECT_WAIT_TIME = 307, - TOKEN_REQUEST_TIMEOUT = 308, - TOKEN_TCP_KEEPALIVE = 309, - TOKEN_TCP_NODELAY = 310, - TOKEN_MAX_ROW_ERRORS = 311, - TOKEN_VALID_LIFETIME = 312, - TOKEN_MIN_VALID_LIFETIME = 313, - TOKEN_MAX_VALID_LIFETIME = 314, - TOKEN_RENEW_TIMER = 315, - TOKEN_REBIND_TIMER = 316, - TOKEN_CALCULATE_TEE_TIMES = 317, - TOKEN_T1_PERCENT = 318, - TOKEN_T2_PERCENT = 319, - TOKEN_DECLINE_PROBATION_PERIOD = 320, - TOKEN_SERVER_TAG = 321, - TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 322, - TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 323, - TOKEN_DDNS_SEND_UPDATES = 324, - TOKEN_DDNS_OVERRIDE_NO_UPDATE = 325, - TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 326, - TOKEN_DDNS_REPLACE_CLIENT_NAME = 327, - TOKEN_DDNS_GENERATED_PREFIX = 328, - TOKEN_DDNS_QUALIFYING_SUFFIX = 329, - TOKEN_STORE_EXTENDED_INFO = 330, - TOKEN_SUBNET4 = 331, - TOKEN_SUBNET_4O6_INTERFACE = 332, - TOKEN_SUBNET_4O6_INTERFACE_ID = 333, - TOKEN_SUBNET_4O6_SUBNET = 334, - TOKEN_OPTION_DEF = 335, - TOKEN_OPTION_DATA = 336, - TOKEN_NAME = 337, - TOKEN_DATA = 338, - TOKEN_CODE = 339, - TOKEN_SPACE = 340, - TOKEN_CSV_FORMAT = 341, - TOKEN_ALWAYS_SEND = 342, - TOKEN_RECORD_TYPES = 343, - TOKEN_ENCAPSULATE = 344, - TOKEN_ARRAY = 345, - TOKEN_SHARED_NETWORKS = 346, - TOKEN_POOLS = 347, - TOKEN_POOL = 348, - TOKEN_USER_CONTEXT = 349, - TOKEN_COMMENT = 350, - TOKEN_SUBNET = 351, - TOKEN_INTERFACE = 352, - TOKEN_ID = 353, - TOKEN_RESERVATION_MODE = 354, - TOKEN_DISABLED = 355, - TOKEN_OUT_OF_POOL = 356, - TOKEN_GLOBAL = 357, - TOKEN_ALL = 358, - TOKEN_HOST_RESERVATION_IDENTIFIERS = 359, - TOKEN_CLIENT_CLASSES = 360, - TOKEN_REQUIRE_CLIENT_CLASSES = 361, - TOKEN_TEST = 362, - TOKEN_ONLY_IF_REQUIRED = 363, - TOKEN_CLIENT_CLASS = 364, - TOKEN_RESERVATIONS = 365, - TOKEN_DUID = 366, - TOKEN_HW_ADDRESS = 367, - TOKEN_CIRCUIT_ID = 368, - TOKEN_CLIENT_ID = 369, - TOKEN_HOSTNAME = 370, - TOKEN_FLEX_ID = 371, - TOKEN_RELAY = 372, - TOKEN_IP_ADDRESS = 373, - TOKEN_IP_ADDRESSES = 374, - TOKEN_HOOKS_LIBRARIES = 375, - TOKEN_LIBRARY = 376, - TOKEN_PARAMETERS = 377, - TOKEN_EXPIRED_LEASES_PROCESSING = 378, - TOKEN_RECLAIM_TIMER_WAIT_TIME = 379, - TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 380, - TOKEN_HOLD_RECLAIMED_TIME = 381, - TOKEN_MAX_RECLAIM_LEASES = 382, - TOKEN_MAX_RECLAIM_TIME = 383, - TOKEN_UNWARNED_RECLAIM_CYCLES = 384, - TOKEN_DHCP4O6_PORT = 385, - TOKEN_DHCP_MULTI_THREADING = 386, - TOKEN_ENABLE_MULTI_THREADING = 387, - TOKEN_THREAD_POOL_SIZE = 388, - TOKEN_PACKET_QUEUE_SIZE = 389, - TOKEN_CONTROL_SOCKET = 390, - TOKEN_SOCKET_TYPE = 391, - TOKEN_SOCKET_NAME = 392, - TOKEN_DHCP_QUEUE_CONTROL = 393, - TOKEN_ENABLE_QUEUE = 394, - TOKEN_QUEUE_TYPE = 395, - TOKEN_CAPACITY = 396, - TOKEN_DHCP_DDNS = 397, - TOKEN_ENABLE_UPDATES = 398, - TOKEN_QUALIFYING_SUFFIX = 399, - TOKEN_SERVER_IP = 400, - TOKEN_SERVER_PORT = 401, - TOKEN_SENDER_IP = 402, - TOKEN_SENDER_PORT = 403, - TOKEN_MAX_QUEUE_SIZE = 404, - TOKEN_NCR_PROTOCOL = 405, - TOKEN_NCR_FORMAT = 406, - TOKEN_OVERRIDE_NO_UPDATE = 407, - TOKEN_OVERRIDE_CLIENT_UPDATE = 408, - TOKEN_REPLACE_CLIENT_NAME = 409, - TOKEN_GENERATED_PREFIX = 410, - TOKEN_TCP = 411, - TOKEN_JSON = 412, - TOKEN_WHEN_PRESENT = 413, - TOKEN_NEVER = 414, - TOKEN_ALWAYS = 415, - TOKEN_WHEN_NOT_PRESENT = 416, - TOKEN_HOSTNAME_CHAR_SET = 417, - TOKEN_HOSTNAME_CHAR_REPLACEMENT = 418, - TOKEN_LOGGING = 419, - TOKEN_LOGGERS = 420, - TOKEN_OUTPUT_OPTIONS = 421, - TOKEN_OUTPUT = 422, - TOKEN_DEBUGLEVEL = 423, - TOKEN_SEVERITY = 424, - TOKEN_FLUSH = 425, - TOKEN_MAXSIZE = 426, - TOKEN_MAXVER = 427, - TOKEN_PATTERN = 428, - TOKEN_DHCP6 = 429, - TOKEN_DHCPDDNS = 430, - TOKEN_CONTROL_AGENT = 431, - TOKEN_TOPLEVEL_JSON = 432, - TOKEN_TOPLEVEL_DHCP4 = 433, - TOKEN_SUB_DHCP4 = 434, - TOKEN_SUB_INTERFACES4 = 435, - TOKEN_SUB_SUBNET4 = 436, - TOKEN_SUB_POOL4 = 437, - TOKEN_SUB_RESERVATION = 438, - TOKEN_SUB_OPTION_DEFS = 439, - TOKEN_SUB_OPTION_DEF = 440, - TOKEN_SUB_OPTION_DATA = 441, - TOKEN_SUB_HOOKS_LIBRARY = 442, - TOKEN_SUB_DHCP_DDNS = 443, - TOKEN_SUB_LOGGING = 444, - TOKEN_SUB_CONFIG_CONTROL = 445, - TOKEN_STRING = 446, - TOKEN_INTEGER = 447, - TOKEN_FLOAT = 448, - TOKEN_BOOLEAN = 449 + enum token_kind_type + { + TOKEN_PARSER4_EMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_PARSER4_error = 256, // error + TOKEN_PARSER4_UNDEF = 257, // "invalid token" + TOKEN_COMMA = 258, // "," + TOKEN_COLON = 259, // ":" + TOKEN_LSQUARE_BRACKET = 260, // "[" + TOKEN_RSQUARE_BRACKET = 261, // "]" + TOKEN_LCURLY_BRACKET = 262, // "{" + TOKEN_RCURLY_BRACKET = 263, // "}" + TOKEN_NULL_TYPE = 264, // "null" + TOKEN_DHCP4 = 265, // "Dhcp4" + TOKEN_CONFIG_CONTROL = 266, // "config-control" + TOKEN_CONFIG_DATABASES = 267, // "config-databases" + TOKEN_CONFIG_FETCH_WAIT_TIME = 268, // "config-fetch-wait-time" + TOKEN_INTERFACES_CONFIG = 269, // "interfaces-config" + TOKEN_INTERFACES = 270, // "interfaces" + TOKEN_DHCP_SOCKET_TYPE = 271, // "dhcp-socket-type" + TOKEN_RAW = 272, // "raw" + TOKEN_UDP = 273, // "udp" + TOKEN_OUTBOUND_INTERFACE = 274, // "outbound-interface" + TOKEN_SAME_AS_INBOUND = 275, // "same-as-inbound" + TOKEN_USE_ROUTING = 276, // "use-routing" + TOKEN_RE_DETECT = 277, // "re-detect" + TOKEN_SANITY_CHECKS = 278, // "sanity-checks" + TOKEN_LEASE_CHECKS = 279, // "lease-checks" + TOKEN_ECHO_CLIENT_ID = 280, // "echo-client-id" + TOKEN_MATCH_CLIENT_ID = 281, // "match-client-id" + TOKEN_AUTHORITATIVE = 282, // "authoritative" + TOKEN_NEXT_SERVER = 283, // "next-server" + TOKEN_SERVER_HOSTNAME = 284, // "server-hostname" + TOKEN_BOOT_FILE_NAME = 285, // "boot-file-name" + TOKEN_LEASE_DATABASE = 286, // "lease-database" + TOKEN_HOSTS_DATABASE = 287, // "hosts-database" + TOKEN_HOSTS_DATABASES = 288, // "hosts-databases" + TOKEN_TYPE = 289, // "type" + TOKEN_MEMFILE = 290, // "memfile" + TOKEN_MYSQL = 291, // "mysql" + TOKEN_POSTGRESQL = 292, // "postgresql" + TOKEN_CQL = 293, // "cql" + TOKEN_USER = 294, // "user" + TOKEN_PASSWORD = 295, // "password" + TOKEN_HOST = 296, // "host" + TOKEN_PORT = 297, // "port" + TOKEN_PERSIST = 298, // "persist" + TOKEN_LFC_INTERVAL = 299, // "lfc-interval" + TOKEN_READONLY = 300, // "readonly" + TOKEN_CONNECT_TIMEOUT = 301, // "connect-timeout" + TOKEN_CONTACT_POINTS = 302, // "contact-points" + TOKEN_KEYSPACE = 303, // "keyspace" + TOKEN_CONSISTENCY = 304, // "consistency" + TOKEN_SERIAL_CONSISTENCY = 305, // "serial-consistency" + TOKEN_MAX_RECONNECT_TRIES = 306, // "max-reconnect-tries" + TOKEN_RECONNECT_WAIT_TIME = 307, // "reconnect-wait-time" + TOKEN_REQUEST_TIMEOUT = 308, // "request-timeout" + TOKEN_TCP_KEEPALIVE = 309, // "tcp-keepalive" + TOKEN_TCP_NODELAY = 310, // "tcp-nodelay" + TOKEN_MAX_ROW_ERRORS = 311, // "max-row-errors" + TOKEN_VALID_LIFETIME = 312, // "valid-lifetime" + TOKEN_MIN_VALID_LIFETIME = 313, // "min-valid-lifetime" + TOKEN_MAX_VALID_LIFETIME = 314, // "max-valid-lifetime" + TOKEN_RENEW_TIMER = 315, // "renew-timer" + TOKEN_REBIND_TIMER = 316, // "rebind-timer" + TOKEN_CALCULATE_TEE_TIMES = 317, // "calculate-tee-times" + TOKEN_T1_PERCENT = 318, // "t1-percent" + TOKEN_T2_PERCENT = 319, // "t2-percent" + TOKEN_DECLINE_PROBATION_PERIOD = 320, // "decline-probation-period" + TOKEN_SERVER_TAG = 321, // "server-tag" + TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 322, // "statistic-default-sample-count" + TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 323, // "statistic-default-sample-age" + TOKEN_DDNS_SEND_UPDATES = 324, // "ddns-send-updates" + TOKEN_DDNS_OVERRIDE_NO_UPDATE = 325, // "ddns-override-no-update" + TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 326, // "ddns-override-client-update" + TOKEN_DDNS_REPLACE_CLIENT_NAME = 327, // "ddns-replace-client-name" + TOKEN_DDNS_GENERATED_PREFIX = 328, // "ddns-generated-prefix" + TOKEN_DDNS_QUALIFYING_SUFFIX = 329, // "ddns-qualifying-suffix" + TOKEN_STORE_EXTENDED_INFO = 330, // "store-extended-info" + TOKEN_SUBNET4 = 331, // "subnet4" + TOKEN_SUBNET_4O6_INTERFACE = 332, // "4o6-interface" + TOKEN_SUBNET_4O6_INTERFACE_ID = 333, // "4o6-interface-id" + TOKEN_SUBNET_4O6_SUBNET = 334, // "4o6-subnet" + TOKEN_OPTION_DEF = 335, // "option-def" + TOKEN_OPTION_DATA = 336, // "option-data" + TOKEN_NAME = 337, // "name" + TOKEN_DATA = 338, // "data" + TOKEN_CODE = 339, // "code" + TOKEN_SPACE = 340, // "space" + TOKEN_CSV_FORMAT = 341, // "csv-format" + TOKEN_ALWAYS_SEND = 342, // "always-send" + TOKEN_RECORD_TYPES = 343, // "record-types" + TOKEN_ENCAPSULATE = 344, // "encapsulate" + TOKEN_ARRAY = 345, // "array" + TOKEN_SHARED_NETWORKS = 346, // "shared-networks" + TOKEN_POOLS = 347, // "pools" + TOKEN_POOL = 348, // "pool" + TOKEN_USER_CONTEXT = 349, // "user-context" + TOKEN_COMMENT = 350, // "comment" + TOKEN_SUBNET = 351, // "subnet" + TOKEN_INTERFACE = 352, // "interface" + TOKEN_ID = 353, // "id" + TOKEN_RESERVATION_MODE = 354, // "reservation-mode" + TOKEN_DISABLED = 355, // "disabled" + TOKEN_OUT_OF_POOL = 356, // "out-of-pool" + TOKEN_GLOBAL = 357, // "global" + TOKEN_ALL = 358, // "all" + TOKEN_HOST_RESERVATION_IDENTIFIERS = 359, // "host-reservation-identifiers" + TOKEN_CLIENT_CLASSES = 360, // "client-classes" + TOKEN_REQUIRE_CLIENT_CLASSES = 361, // "require-client-classes" + TOKEN_TEST = 362, // "test" + TOKEN_ONLY_IF_REQUIRED = 363, // "only-if-required" + TOKEN_CLIENT_CLASS = 364, // "client-class" + TOKEN_RESERVATIONS = 365, // "reservations" + TOKEN_DUID = 366, // "duid" + TOKEN_HW_ADDRESS = 367, // "hw-address" + TOKEN_CIRCUIT_ID = 368, // "circuit-id" + TOKEN_CLIENT_ID = 369, // "client-id" + TOKEN_HOSTNAME = 370, // "hostname" + TOKEN_FLEX_ID = 371, // "flex-id" + TOKEN_RELAY = 372, // "relay" + TOKEN_IP_ADDRESS = 373, // "ip-address" + TOKEN_IP_ADDRESSES = 374, // "ip-addresses" + TOKEN_HOOKS_LIBRARIES = 375, // "hooks-libraries" + TOKEN_LIBRARY = 376, // "library" + TOKEN_PARAMETERS = 377, // "parameters" + TOKEN_EXPIRED_LEASES_PROCESSING = 378, // "expired-leases-processing" + TOKEN_RECLAIM_TIMER_WAIT_TIME = 379, // "reclaim-timer-wait-time" + TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 380, // "flush-reclaimed-timer-wait-time" + TOKEN_HOLD_RECLAIMED_TIME = 381, // "hold-reclaimed-time" + TOKEN_MAX_RECLAIM_LEASES = 382, // "max-reclaim-leases" + TOKEN_MAX_RECLAIM_TIME = 383, // "max-reclaim-time" + TOKEN_UNWARNED_RECLAIM_CYCLES = 384, // "unwarned-reclaim-cycles" + TOKEN_DHCP4O6_PORT = 385, // "dhcp4o6-port" + TOKEN_DHCP_MULTI_THREADING = 386, // "multi-threading" + TOKEN_ENABLE_MULTI_THREADING = 387, // "enable-multi-threading" + TOKEN_THREAD_POOL_SIZE = 388, // "thread-pool-size" + TOKEN_PACKET_QUEUE_SIZE = 389, // "packet-queue-size" + TOKEN_CONTROL_SOCKET = 390, // "control-socket" + TOKEN_SOCKET_TYPE = 391, // "socket-type" + TOKEN_SOCKET_NAME = 392, // "socket-name" + TOKEN_DHCP_QUEUE_CONTROL = 393, // "dhcp-queue-control" + TOKEN_ENABLE_QUEUE = 394, // "enable-queue" + TOKEN_QUEUE_TYPE = 395, // "queue-type" + TOKEN_CAPACITY = 396, // "capacity" + TOKEN_DHCP_DDNS = 397, // "dhcp-ddns" + TOKEN_ENABLE_UPDATES = 398, // "enable-updates" + TOKEN_QUALIFYING_SUFFIX = 399, // "qualifying-suffix" + TOKEN_SERVER_IP = 400, // "server-ip" + TOKEN_SERVER_PORT = 401, // "server-port" + TOKEN_SENDER_IP = 402, // "sender-ip" + TOKEN_SENDER_PORT = 403, // "sender-port" + TOKEN_MAX_QUEUE_SIZE = 404, // "max-queue-size" + TOKEN_NCR_PROTOCOL = 405, // "ncr-protocol" + TOKEN_NCR_FORMAT = 406, // "ncr-format" + TOKEN_OVERRIDE_NO_UPDATE = 407, // "override-no-update" + TOKEN_OVERRIDE_CLIENT_UPDATE = 408, // "override-client-update" + TOKEN_REPLACE_CLIENT_NAME = 409, // "replace-client-name" + TOKEN_GENERATED_PREFIX = 410, // "generated-prefix" + TOKEN_TCP = 411, // "tcp" + TOKEN_JSON = 412, // "JSON" + TOKEN_WHEN_PRESENT = 413, // "when-present" + TOKEN_NEVER = 414, // "never" + TOKEN_ALWAYS = 415, // "always" + TOKEN_WHEN_NOT_PRESENT = 416, // "when-not-present" + TOKEN_HOSTNAME_CHAR_SET = 417, // "hostname-char-set" + TOKEN_HOSTNAME_CHAR_REPLACEMENT = 418, // "hostname-char-replacement" + TOKEN_LOGGING = 419, // "Logging" + TOKEN_LOGGERS = 420, // "loggers" + TOKEN_OUTPUT_OPTIONS = 421, // "output_options" + TOKEN_OUTPUT = 422, // "output" + TOKEN_DEBUGLEVEL = 423, // "debuglevel" + TOKEN_SEVERITY = 424, // "severity" + TOKEN_FLUSH = 425, // "flush" + TOKEN_MAXSIZE = 426, // "maxsize" + TOKEN_MAXVER = 427, // "maxver" + TOKEN_PATTERN = 428, // "pattern" + TOKEN_DHCP6 = 429, // "Dhcp6" + TOKEN_DHCPDDNS = 430, // "DhcpDdns" + TOKEN_CONTROL_AGENT = 431, // "Control-agent" + TOKEN_TOPLEVEL_JSON = 432, // TOPLEVEL_JSON + TOKEN_TOPLEVEL_DHCP4 = 433, // TOPLEVEL_DHCP4 + TOKEN_SUB_DHCP4 = 434, // SUB_DHCP4 + TOKEN_SUB_INTERFACES4 = 435, // SUB_INTERFACES4 + TOKEN_SUB_SUBNET4 = 436, // SUB_SUBNET4 + TOKEN_SUB_POOL4 = 437, // SUB_POOL4 + TOKEN_SUB_RESERVATION = 438, // SUB_RESERVATION + TOKEN_SUB_OPTION_DEFS = 439, // SUB_OPTION_DEFS + TOKEN_SUB_OPTION_DEF = 440, // SUB_OPTION_DEF + TOKEN_SUB_OPTION_DATA = 441, // SUB_OPTION_DATA + TOKEN_SUB_HOOKS_LIBRARY = 442, // SUB_HOOKS_LIBRARY + TOKEN_SUB_DHCP_DDNS = 443, // SUB_DHCP_DDNS + TOKEN_SUB_LOGGING = 444, // SUB_LOGGING + TOKEN_SUB_CONFIG_CONTROL = 445, // SUB_CONFIG_CONTROL + TOKEN_STRING = 446, // "constant string" + TOKEN_INTEGER = 447, // "integer" + TOKEN_FLOAT = 448, // "floating point" + TOKEN_BOOLEAN = 449 // "boolean" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 195, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_COMMA = 3, // "," + S_COLON = 4, // ":" + S_LSQUARE_BRACKET = 5, // "[" + S_RSQUARE_BRACKET = 6, // "]" + S_LCURLY_BRACKET = 7, // "{" + S_RCURLY_BRACKET = 8, // "}" + S_NULL_TYPE = 9, // "null" + S_DHCP4 = 10, // "Dhcp4" + S_CONFIG_CONTROL = 11, // "config-control" + S_CONFIG_DATABASES = 12, // "config-databases" + S_CONFIG_FETCH_WAIT_TIME = 13, // "config-fetch-wait-time" + S_INTERFACES_CONFIG = 14, // "interfaces-config" + S_INTERFACES = 15, // "interfaces" + S_DHCP_SOCKET_TYPE = 16, // "dhcp-socket-type" + S_RAW = 17, // "raw" + S_UDP = 18, // "udp" + S_OUTBOUND_INTERFACE = 19, // "outbound-interface" + S_SAME_AS_INBOUND = 20, // "same-as-inbound" + S_USE_ROUTING = 21, // "use-routing" + S_RE_DETECT = 22, // "re-detect" + S_SANITY_CHECKS = 23, // "sanity-checks" + S_LEASE_CHECKS = 24, // "lease-checks" + S_ECHO_CLIENT_ID = 25, // "echo-client-id" + S_MATCH_CLIENT_ID = 26, // "match-client-id" + S_AUTHORITATIVE = 27, // "authoritative" + S_NEXT_SERVER = 28, // "next-server" + S_SERVER_HOSTNAME = 29, // "server-hostname" + S_BOOT_FILE_NAME = 30, // "boot-file-name" + S_LEASE_DATABASE = 31, // "lease-database" + S_HOSTS_DATABASE = 32, // "hosts-database" + S_HOSTS_DATABASES = 33, // "hosts-databases" + S_TYPE = 34, // "type" + S_MEMFILE = 35, // "memfile" + S_MYSQL = 36, // "mysql" + S_POSTGRESQL = 37, // "postgresql" + S_CQL = 38, // "cql" + S_USER = 39, // "user" + S_PASSWORD = 40, // "password" + S_HOST = 41, // "host" + S_PORT = 42, // "port" + S_PERSIST = 43, // "persist" + S_LFC_INTERVAL = 44, // "lfc-interval" + S_READONLY = 45, // "readonly" + S_CONNECT_TIMEOUT = 46, // "connect-timeout" + S_CONTACT_POINTS = 47, // "contact-points" + S_KEYSPACE = 48, // "keyspace" + S_CONSISTENCY = 49, // "consistency" + S_SERIAL_CONSISTENCY = 50, // "serial-consistency" + S_MAX_RECONNECT_TRIES = 51, // "max-reconnect-tries" + S_RECONNECT_WAIT_TIME = 52, // "reconnect-wait-time" + S_REQUEST_TIMEOUT = 53, // "request-timeout" + S_TCP_KEEPALIVE = 54, // "tcp-keepalive" + S_TCP_NODELAY = 55, // "tcp-nodelay" + S_MAX_ROW_ERRORS = 56, // "max-row-errors" + S_VALID_LIFETIME = 57, // "valid-lifetime" + S_MIN_VALID_LIFETIME = 58, // "min-valid-lifetime" + S_MAX_VALID_LIFETIME = 59, // "max-valid-lifetime" + S_RENEW_TIMER = 60, // "renew-timer" + S_REBIND_TIMER = 61, // "rebind-timer" + S_CALCULATE_TEE_TIMES = 62, // "calculate-tee-times" + S_T1_PERCENT = 63, // "t1-percent" + S_T2_PERCENT = 64, // "t2-percent" + S_DECLINE_PROBATION_PERIOD = 65, // "decline-probation-period" + S_SERVER_TAG = 66, // "server-tag" + S_STATISTIC_DEFAULT_SAMPLE_COUNT = 67, // "statistic-default-sample-count" + S_STATISTIC_DEFAULT_SAMPLE_AGE = 68, // "statistic-default-sample-age" + S_DDNS_SEND_UPDATES = 69, // "ddns-send-updates" + S_DDNS_OVERRIDE_NO_UPDATE = 70, // "ddns-override-no-update" + S_DDNS_OVERRIDE_CLIENT_UPDATE = 71, // "ddns-override-client-update" + S_DDNS_REPLACE_CLIENT_NAME = 72, // "ddns-replace-client-name" + S_DDNS_GENERATED_PREFIX = 73, // "ddns-generated-prefix" + S_DDNS_QUALIFYING_SUFFIX = 74, // "ddns-qualifying-suffix" + S_STORE_EXTENDED_INFO = 75, // "store-extended-info" + S_SUBNET4 = 76, // "subnet4" + S_SUBNET_4O6_INTERFACE = 77, // "4o6-interface" + S_SUBNET_4O6_INTERFACE_ID = 78, // "4o6-interface-id" + S_SUBNET_4O6_SUBNET = 79, // "4o6-subnet" + S_OPTION_DEF = 80, // "option-def" + S_OPTION_DATA = 81, // "option-data" + S_NAME = 82, // "name" + S_DATA = 83, // "data" + S_CODE = 84, // "code" + S_SPACE = 85, // "space" + S_CSV_FORMAT = 86, // "csv-format" + S_ALWAYS_SEND = 87, // "always-send" + S_RECORD_TYPES = 88, // "record-types" + S_ENCAPSULATE = 89, // "encapsulate" + S_ARRAY = 90, // "array" + S_SHARED_NETWORKS = 91, // "shared-networks" + S_POOLS = 92, // "pools" + S_POOL = 93, // "pool" + S_USER_CONTEXT = 94, // "user-context" + S_COMMENT = 95, // "comment" + S_SUBNET = 96, // "subnet" + S_INTERFACE = 97, // "interface" + S_ID = 98, // "id" + S_RESERVATION_MODE = 99, // "reservation-mode" + S_DISABLED = 100, // "disabled" + S_OUT_OF_POOL = 101, // "out-of-pool" + S_GLOBAL = 102, // "global" + S_ALL = 103, // "all" + S_HOST_RESERVATION_IDENTIFIERS = 104, // "host-reservation-identifiers" + S_CLIENT_CLASSES = 105, // "client-classes" + S_REQUIRE_CLIENT_CLASSES = 106, // "require-client-classes" + S_TEST = 107, // "test" + S_ONLY_IF_REQUIRED = 108, // "only-if-required" + S_CLIENT_CLASS = 109, // "client-class" + S_RESERVATIONS = 110, // "reservations" + S_DUID = 111, // "duid" + S_HW_ADDRESS = 112, // "hw-address" + S_CIRCUIT_ID = 113, // "circuit-id" + S_CLIENT_ID = 114, // "client-id" + S_HOSTNAME = 115, // "hostname" + S_FLEX_ID = 116, // "flex-id" + S_RELAY = 117, // "relay" + S_IP_ADDRESS = 118, // "ip-address" + S_IP_ADDRESSES = 119, // "ip-addresses" + S_HOOKS_LIBRARIES = 120, // "hooks-libraries" + S_LIBRARY = 121, // "library" + S_PARAMETERS = 122, // "parameters" + S_EXPIRED_LEASES_PROCESSING = 123, // "expired-leases-processing" + S_RECLAIM_TIMER_WAIT_TIME = 124, // "reclaim-timer-wait-time" + S_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 125, // "flush-reclaimed-timer-wait-time" + S_HOLD_RECLAIMED_TIME = 126, // "hold-reclaimed-time" + S_MAX_RECLAIM_LEASES = 127, // "max-reclaim-leases" + S_MAX_RECLAIM_TIME = 128, // "max-reclaim-time" + S_UNWARNED_RECLAIM_CYCLES = 129, // "unwarned-reclaim-cycles" + S_DHCP4O6_PORT = 130, // "dhcp4o6-port" + S_DHCP_MULTI_THREADING = 131, // "multi-threading" + S_ENABLE_MULTI_THREADING = 132, // "enable-multi-threading" + S_THREAD_POOL_SIZE = 133, // "thread-pool-size" + S_PACKET_QUEUE_SIZE = 134, // "packet-queue-size" + S_CONTROL_SOCKET = 135, // "control-socket" + S_SOCKET_TYPE = 136, // "socket-type" + S_SOCKET_NAME = 137, // "socket-name" + S_DHCP_QUEUE_CONTROL = 138, // "dhcp-queue-control" + S_ENABLE_QUEUE = 139, // "enable-queue" + S_QUEUE_TYPE = 140, // "queue-type" + S_CAPACITY = 141, // "capacity" + S_DHCP_DDNS = 142, // "dhcp-ddns" + S_ENABLE_UPDATES = 143, // "enable-updates" + S_QUALIFYING_SUFFIX = 144, // "qualifying-suffix" + S_SERVER_IP = 145, // "server-ip" + S_SERVER_PORT = 146, // "server-port" + S_SENDER_IP = 147, // "sender-ip" + S_SENDER_PORT = 148, // "sender-port" + S_MAX_QUEUE_SIZE = 149, // "max-queue-size" + S_NCR_PROTOCOL = 150, // "ncr-protocol" + S_NCR_FORMAT = 151, // "ncr-format" + S_OVERRIDE_NO_UPDATE = 152, // "override-no-update" + S_OVERRIDE_CLIENT_UPDATE = 153, // "override-client-update" + S_REPLACE_CLIENT_NAME = 154, // "replace-client-name" + S_GENERATED_PREFIX = 155, // "generated-prefix" + S_TCP = 156, // "tcp" + S_JSON = 157, // "JSON" + S_WHEN_PRESENT = 158, // "when-present" + S_NEVER = 159, // "never" + S_ALWAYS = 160, // "always" + S_WHEN_NOT_PRESENT = 161, // "when-not-present" + S_HOSTNAME_CHAR_SET = 162, // "hostname-char-set" + S_HOSTNAME_CHAR_REPLACEMENT = 163, // "hostname-char-replacement" + S_LOGGING = 164, // "Logging" + S_LOGGERS = 165, // "loggers" + S_OUTPUT_OPTIONS = 166, // "output_options" + S_OUTPUT = 167, // "output" + S_DEBUGLEVEL = 168, // "debuglevel" + S_SEVERITY = 169, // "severity" + S_FLUSH = 170, // "flush" + S_MAXSIZE = 171, // "maxsize" + S_MAXVER = 172, // "maxver" + S_PATTERN = 173, // "pattern" + S_DHCP6 = 174, // "Dhcp6" + S_DHCPDDNS = 175, // "DhcpDdns" + S_CONTROL_AGENT = 176, // "Control-agent" + S_TOPLEVEL_JSON = 177, // TOPLEVEL_JSON + S_TOPLEVEL_DHCP4 = 178, // TOPLEVEL_DHCP4 + S_SUB_DHCP4 = 179, // SUB_DHCP4 + S_SUB_INTERFACES4 = 180, // SUB_INTERFACES4 + S_SUB_SUBNET4 = 181, // SUB_SUBNET4 + S_SUB_POOL4 = 182, // SUB_POOL4 + S_SUB_RESERVATION = 183, // SUB_RESERVATION + S_SUB_OPTION_DEFS = 184, // SUB_OPTION_DEFS + S_SUB_OPTION_DEF = 185, // SUB_OPTION_DEF + S_SUB_OPTION_DATA = 186, // SUB_OPTION_DATA + S_SUB_HOOKS_LIBRARY = 187, // SUB_HOOKS_LIBRARY + S_SUB_DHCP_DDNS = 188, // SUB_DHCP_DDNS + S_SUB_LOGGING = 189, // SUB_LOGGING + S_SUB_CONFIG_CONTROL = 190, // SUB_CONFIG_CONTROL + S_STRING = 191, // "constant string" + S_INTEGER = 192, // "integer" + S_FLOAT = 193, // "floating point" + S_BOOLEAN = 194, // "boolean" + S_YYACCEPT = 195, // $accept + S_start = 196, // start + S_197_1 = 197, // $@1 + S_198_2 = 198, // $@2 + S_199_3 = 199, // $@3 + S_200_4 = 200, // $@4 + S_201_5 = 201, // $@5 + S_202_6 = 202, // $@6 + S_203_7 = 203, // $@7 + S_204_8 = 204, // $@8 + S_205_9 = 205, // $@9 + S_206_10 = 206, // $@10 + S_207_11 = 207, // $@11 + S_208_12 = 208, // $@12 + S_209_13 = 209, // $@13 + S_210_14 = 210, // $@14 + S_value = 211, // value + S_sub_json = 212, // sub_json + S_map2 = 213, // map2 + S_214_15 = 214, // $@15 + S_map_value = 215, // map_value + S_map_content = 216, // map_content + S_not_empty_map = 217, // not_empty_map + S_list_generic = 218, // list_generic + S_219_16 = 219, // $@16 + S_list_content = 220, // list_content + S_not_empty_list = 221, // not_empty_list + S_list_strings = 222, // list_strings + S_223_17 = 223, // $@17 + S_list_strings_content = 224, // list_strings_content + S_not_empty_list_strings = 225, // not_empty_list_strings + S_unknown_map_entry = 226, // unknown_map_entry + S_syntax_map = 227, // syntax_map + S_228_18 = 228, // $@18 + S_global_objects = 229, // global_objects + S_global_object = 230, // global_object + S_dhcp4_object = 231, // dhcp4_object + S_232_19 = 232, // $@19 + S_sub_dhcp4 = 233, // sub_dhcp4 + S_234_20 = 234, // $@20 + S_global_params = 235, // global_params + S_global_param = 236, // global_param + S_valid_lifetime = 237, // valid_lifetime + S_min_valid_lifetime = 238, // min_valid_lifetime + S_max_valid_lifetime = 239, // max_valid_lifetime + S_renew_timer = 240, // renew_timer + S_rebind_timer = 241, // rebind_timer + S_calculate_tee_times = 242, // calculate_tee_times + S_t1_percent = 243, // t1_percent + S_t2_percent = 244, // t2_percent + S_decline_probation_period = 245, // decline_probation_period + S_server_tag = 246, // server_tag + S_247_21 = 247, // $@21 + S_echo_client_id = 248, // echo_client_id + S_match_client_id = 249, // match_client_id + S_authoritative = 250, // authoritative + S_ddns_send_updates = 251, // ddns_send_updates + S_ddns_override_no_update = 252, // ddns_override_no_update + S_ddns_override_client_update = 253, // ddns_override_client_update + S_ddns_replace_client_name = 254, // ddns_replace_client_name + S_255_22 = 255, // $@22 + S_ddns_replace_client_name_value = 256, // ddns_replace_client_name_value + S_ddns_generated_prefix = 257, // ddns_generated_prefix + S_258_23 = 258, // $@23 + S_ddns_qualifying_suffix = 259, // ddns_qualifying_suffix + S_260_24 = 260, // $@24 + S_hostname_char_set = 261, // hostname_char_set + S_262_25 = 262, // $@25 + S_hostname_char_replacement = 263, // hostname_char_replacement + S_264_26 = 264, // $@26 + S_store_extended_info = 265, // store_extended_info + S_statistic_default_sample_count = 266, // statistic_default_sample_count + S_statistic_default_sample_age = 267, // statistic_default_sample_age + S_interfaces_config = 268, // interfaces_config + S_269_27 = 269, // $@27 + S_interfaces_config_params = 270, // interfaces_config_params + S_interfaces_config_param = 271, // interfaces_config_param + S_sub_interfaces4 = 272, // sub_interfaces4 + S_273_28 = 273, // $@28 + S_interfaces_list = 274, // interfaces_list + S_275_29 = 275, // $@29 + S_dhcp_socket_type = 276, // dhcp_socket_type + S_277_30 = 277, // $@30 + S_socket_type = 278, // socket_type + S_outbound_interface = 279, // outbound_interface + S_280_31 = 280, // $@31 + S_outbound_interface_value = 281, // outbound_interface_value + S_re_detect = 282, // re_detect + S_lease_database = 283, // lease_database + S_284_32 = 284, // $@32 + S_sanity_checks = 285, // sanity_checks + S_286_33 = 286, // $@33 + S_sanity_checks_params = 287, // sanity_checks_params + S_sanity_checks_param = 288, // sanity_checks_param + S_lease_checks = 289, // lease_checks + S_290_34 = 290, // $@34 + S_hosts_database = 291, // hosts_database + S_292_35 = 292, // $@35 + S_hosts_databases = 293, // hosts_databases + S_294_36 = 294, // $@36 + S_database_list = 295, // database_list + S_not_empty_database_list = 296, // not_empty_database_list + S_database = 297, // database + S_298_37 = 298, // $@37 + S_database_map_params = 299, // database_map_params + S_database_map_param = 300, // database_map_param + S_database_type = 301, // database_type + S_302_38 = 302, // $@38 + S_db_type = 303, // db_type + S_user = 304, // user + S_305_39 = 305, // $@39 + S_password = 306, // password + S_307_40 = 307, // $@40 + S_host = 308, // host + S_309_41 = 309, // $@41 + S_port = 310, // port + S_name = 311, // name + S_312_42 = 312, // $@42 + S_persist = 313, // persist + S_lfc_interval = 314, // lfc_interval + S_readonly = 315, // readonly + S_connect_timeout = 316, // connect_timeout + S_request_timeout = 317, // request_timeout + S_tcp_keepalive = 318, // tcp_keepalive + S_tcp_nodelay = 319, // tcp_nodelay + S_contact_points = 320, // contact_points + S_321_43 = 321, // $@43 + S_keyspace = 322, // keyspace + S_323_44 = 323, // $@44 + S_consistency = 324, // consistency + S_325_45 = 325, // $@45 + S_serial_consistency = 326, // serial_consistency + S_327_46 = 327, // $@46 + S_max_reconnect_tries = 328, // max_reconnect_tries + S_reconnect_wait_time = 329, // reconnect_wait_time + S_max_row_errors = 330, // max_row_errors + S_host_reservation_identifiers = 331, // host_reservation_identifiers + S_332_47 = 332, // $@47 + S_host_reservation_identifiers_list = 333, // host_reservation_identifiers_list + S_host_reservation_identifier = 334, // host_reservation_identifier + S_duid_id = 335, // duid_id + S_hw_address_id = 336, // hw_address_id + S_circuit_id = 337, // circuit_id + S_client_id = 338, // client_id + S_flex_id = 339, // flex_id + S_dhcp_multi_threading = 340, // dhcp_multi_threading + S_341_48 = 341, // $@48 + S_multi_threading_params = 342, // multi_threading_params + S_multi_threading_param = 343, // multi_threading_param + S_enable_multi_threading = 344, // enable_multi_threading + S_thread_pool_size = 345, // thread_pool_size + S_packet_queue_size = 346, // packet_queue_size + S_hooks_libraries = 347, // hooks_libraries + S_348_49 = 348, // $@49 + S_hooks_libraries_list = 349, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 350, // not_empty_hooks_libraries_list + S_hooks_library = 351, // hooks_library + S_352_50 = 352, // $@50 + S_sub_hooks_library = 353, // sub_hooks_library + S_354_51 = 354, // $@51 + S_hooks_params = 355, // hooks_params + S_hooks_param = 356, // hooks_param + S_library = 357, // library + S_358_52 = 358, // $@52 + S_parameters = 359, // parameters + S_360_53 = 360, // $@53 + S_expired_leases_processing = 361, // expired_leases_processing + S_362_54 = 362, // $@54 + S_expired_leases_params = 363, // expired_leases_params + S_expired_leases_param = 364, // expired_leases_param + S_reclaim_timer_wait_time = 365, // reclaim_timer_wait_time + S_flush_reclaimed_timer_wait_time = 366, // flush_reclaimed_timer_wait_time + S_hold_reclaimed_time = 367, // hold_reclaimed_time + S_max_reclaim_leases = 368, // max_reclaim_leases + S_max_reclaim_time = 369, // max_reclaim_time + S_unwarned_reclaim_cycles = 370, // unwarned_reclaim_cycles + S_subnet4_list = 371, // subnet4_list + S_372_55 = 372, // $@55 + S_subnet4_list_content = 373, // subnet4_list_content + S_not_empty_subnet4_list = 374, // not_empty_subnet4_list + S_subnet4 = 375, // subnet4 + S_376_56 = 376, // $@56 + S_sub_subnet4 = 377, // sub_subnet4 + S_378_57 = 378, // $@57 + S_subnet4_params = 379, // subnet4_params + S_subnet4_param = 380, // subnet4_param + S_subnet = 381, // subnet + S_382_58 = 382, // $@58 + S_subnet_4o6_interface = 383, // subnet_4o6_interface + S_384_59 = 384, // $@59 + S_subnet_4o6_interface_id = 385, // subnet_4o6_interface_id + S_386_60 = 386, // $@60 + S_subnet_4o6_subnet = 387, // subnet_4o6_subnet + S_388_61 = 388, // $@61 + S_interface = 389, // interface + S_390_62 = 390, // $@62 + S_client_class = 391, // client_class + S_392_63 = 392, // $@63 + S_require_client_classes = 393, // require_client_classes + S_394_64 = 394, // $@64 + S_reservation_mode = 395, // reservation_mode + S_396_65 = 396, // $@65 + S_hr_mode = 397, // hr_mode + S_id = 398, // id + S_shared_networks = 399, // shared_networks + S_400_66 = 400, // $@66 + S_shared_networks_content = 401, // shared_networks_content + S_shared_networks_list = 402, // shared_networks_list + S_shared_network = 403, // shared_network + S_404_67 = 404, // $@67 + S_shared_network_params = 405, // shared_network_params + S_shared_network_param = 406, // shared_network_param + S_option_def_list = 407, // option_def_list + S_408_68 = 408, // $@68 + S_sub_option_def_list = 409, // sub_option_def_list + S_410_69 = 410, // $@69 + S_option_def_list_content = 411, // option_def_list_content + S_not_empty_option_def_list = 412, // not_empty_option_def_list + S_option_def_entry = 413, // option_def_entry + S_414_70 = 414, // $@70 + S_sub_option_def = 415, // sub_option_def + S_416_71 = 416, // $@71 + S_option_def_params = 417, // option_def_params + S_not_empty_option_def_params = 418, // not_empty_option_def_params + S_option_def_param = 419, // option_def_param + S_option_def_name = 420, // option_def_name + S_code = 421, // code + S_option_def_code = 422, // option_def_code + S_option_def_type = 423, // option_def_type + S_424_72 = 424, // $@72 + S_option_def_record_types = 425, // option_def_record_types + S_426_73 = 426, // $@73 + S_space = 427, // space + S_428_74 = 428, // $@74 + S_option_def_space = 429, // option_def_space + S_option_def_encapsulate = 430, // option_def_encapsulate + S_431_75 = 431, // $@75 + S_option_def_array = 432, // option_def_array + S_option_data_list = 433, // option_data_list + S_434_76 = 434, // $@76 + S_option_data_list_content = 435, // option_data_list_content + S_not_empty_option_data_list = 436, // not_empty_option_data_list + S_option_data_entry = 437, // option_data_entry + S_438_77 = 438, // $@77 + S_sub_option_data = 439, // sub_option_data + S_440_78 = 440, // $@78 + S_option_data_params = 441, // option_data_params + S_not_empty_option_data_params = 442, // not_empty_option_data_params + S_option_data_param = 443, // option_data_param + S_option_data_name = 444, // option_data_name + S_option_data_data = 445, // option_data_data + S_446_79 = 446, // $@79 + S_option_data_code = 447, // option_data_code + S_option_data_space = 448, // option_data_space + S_option_data_csv_format = 449, // option_data_csv_format + S_option_data_always_send = 450, // option_data_always_send + S_pools_list = 451, // pools_list + S_452_80 = 452, // $@80 + S_pools_list_content = 453, // pools_list_content + S_not_empty_pools_list = 454, // not_empty_pools_list + S_pool_list_entry = 455, // pool_list_entry + S_456_81 = 456, // $@81 + S_sub_pool4 = 457, // sub_pool4 + S_458_82 = 458, // $@82 + S_pool_params = 459, // pool_params + S_pool_param = 460, // pool_param + S_pool_entry = 461, // pool_entry + S_462_83 = 462, // $@83 + S_user_context = 463, // user_context + S_464_84 = 464, // $@84 + S_comment = 465, // comment + S_466_85 = 466, // $@85 + S_reservations = 467, // reservations + S_468_86 = 468, // $@86 + S_reservations_list = 469, // reservations_list + S_not_empty_reservations_list = 470, // not_empty_reservations_list + S_reservation = 471, // reservation + S_472_87 = 472, // $@87 + S_sub_reservation = 473, // sub_reservation + S_474_88 = 474, // $@88 + S_reservation_params = 475, // reservation_params + S_not_empty_reservation_params = 476, // not_empty_reservation_params + S_reservation_param = 477, // reservation_param + S_next_server = 478, // next_server + S_479_89 = 479, // $@89 + S_server_hostname = 480, // server_hostname + S_481_90 = 481, // $@90 + S_boot_file_name = 482, // boot_file_name + S_483_91 = 483, // $@91 + S_ip_address = 484, // ip_address + S_485_92 = 485, // $@92 + S_ip_addresses = 486, // ip_addresses + S_487_93 = 487, // $@93 + S_duid = 488, // duid + S_489_94 = 489, // $@94 + S_hw_address = 490, // hw_address + S_491_95 = 491, // $@95 + S_client_id_value = 492, // client_id_value + S_493_96 = 493, // $@96 + S_circuit_id_value = 494, // circuit_id_value + S_495_97 = 495, // $@97 + S_flex_id_value = 496, // flex_id_value + S_497_98 = 497, // $@98 + S_hostname = 498, // hostname + S_499_99 = 499, // $@99 + S_reservation_client_classes = 500, // reservation_client_classes + S_501_100 = 501, // $@100 + S_relay = 502, // relay + S_503_101 = 503, // $@101 + S_relay_map = 504, // relay_map + S_client_classes = 505, // client_classes + S_506_102 = 506, // $@102 + S_client_classes_list = 507, // client_classes_list + S_client_class_entry = 508, // client_class_entry + S_509_103 = 509, // $@103 + S_client_class_params = 510, // client_class_params + S_not_empty_client_class_params = 511, // not_empty_client_class_params + S_client_class_param = 512, // client_class_param + S_client_class_name = 513, // client_class_name + S_client_class_test = 514, // client_class_test + S_515_104 = 515, // $@104 + S_only_if_required = 516, // only_if_required + S_dhcp4o6_port = 517, // dhcp4o6_port + S_control_socket = 518, // control_socket + S_519_105 = 519, // $@105 + S_control_socket_params = 520, // control_socket_params + S_control_socket_param = 521, // control_socket_param + S_control_socket_type = 522, // control_socket_type + S_523_106 = 523, // $@106 + S_control_socket_name = 524, // control_socket_name + S_525_107 = 525, // $@107 + S_dhcp_queue_control = 526, // dhcp_queue_control + S_527_108 = 527, // $@108 + S_queue_control_params = 528, // queue_control_params + S_queue_control_param = 529, // queue_control_param + S_enable_queue = 530, // enable_queue + S_queue_type = 531, // queue_type + S_532_109 = 532, // $@109 + S_capacity = 533, // capacity + S_arbitrary_map_entry = 534, // arbitrary_map_entry + S_535_110 = 535, // $@110 + S_dhcp_ddns = 536, // dhcp_ddns + S_537_111 = 537, // $@111 + S_sub_dhcp_ddns = 538, // sub_dhcp_ddns + S_539_112 = 539, // $@112 + S_dhcp_ddns_params = 540, // dhcp_ddns_params + S_dhcp_ddns_param = 541, // dhcp_ddns_param + S_enable_updates = 542, // enable_updates + S_server_ip = 543, // server_ip + S_544_113 = 544, // $@113 + S_server_port = 545, // server_port + S_sender_ip = 546, // sender_ip + S_547_114 = 547, // $@114 + S_sender_port = 548, // sender_port + S_max_queue_size = 549, // max_queue_size + S_ncr_protocol = 550, // ncr_protocol + S_551_115 = 551, // $@115 + S_ncr_protocol_value = 552, // ncr_protocol_value + S_ncr_format = 553, // ncr_format + S_554_116 = 554, // $@116 + S_dep_qualifying_suffix = 555, // dep_qualifying_suffix + S_556_117 = 556, // $@117 + S_dep_override_no_update = 557, // dep_override_no_update + S_dep_override_client_update = 558, // dep_override_client_update + S_dep_replace_client_name = 559, // dep_replace_client_name + S_560_118 = 560, // $@118 + S_dep_generated_prefix = 561, // dep_generated_prefix + S_562_119 = 562, // $@119 + S_dep_hostname_char_set = 563, // dep_hostname_char_set + S_564_120 = 564, // $@120 + S_dep_hostname_char_replacement = 565, // dep_hostname_char_replacement + S_566_121 = 566, // $@121 + S_dhcp6_json_object = 567, // dhcp6_json_object + S_568_122 = 568, // $@122 + S_dhcpddns_json_object = 569, // dhcpddns_json_object + S_570_123 = 570, // $@123 + S_control_agent_json_object = 571, // control_agent_json_object + S_572_124 = 572, // $@124 + S_config_control = 573, // config_control + S_574_125 = 574, // $@125 + S_sub_config_control = 575, // sub_config_control + S_576_126 = 576, // $@126 + S_config_control_params = 577, // config_control_params + S_config_control_param = 578, // config_control_param + S_config_databases = 579, // config_databases + S_580_127 = 580, // $@127 + S_config_fetch_wait_time = 581, // config_fetch_wait_time + S_logging_object = 582, // logging_object + S_583_128 = 583, // $@128 + S_sub_logging = 584, // sub_logging + S_585_129 = 585, // $@129 + S_logging_params = 586, // logging_params + S_logging_param = 587, // logging_param + S_loggers = 588, // loggers + S_589_130 = 589, // $@130 + S_loggers_entries = 590, // loggers_entries + S_logger_entry = 591, // logger_entry + S_592_131 = 592, // $@131 + S_logger_params = 593, // logger_params + S_logger_param = 594, // logger_param + S_debuglevel = 595, // debuglevel + S_severity = 596, // severity + S_597_132 = 597, // $@132 + S_output_options_list = 598, // output_options_list + S_599_133 = 599, // $@133 + S_output_options_list_content = 600, // output_options_list_content + S_output_entry = 601, // output_entry + S_602_134 = 602, // $@134 + S_output_params_list = 603, // output_params_list + S_output_params = 604, // output_params + S_output = 605, // output + S_606_135 = 606, // $@135 + S_flush = 607, // flush + S_maxsize = 608, // maxsize + S_maxver = 609, // maxver + S_pattern = 610, // pattern + S_611_136 = 611 // $@136 + }; + }; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef unsigned char token_number_type; + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -699,7 +1337,45 @@ namespace isc { namespace dhcp { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 211: // value + case 215: // map_value + case 256: // ddns_replace_client_name_value + case 278: // socket_type + case 281: // outbound_interface_value + case 303: // db_type + case 397: // hr_mode + case 552: // ncr_protocol_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case 194: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case 193: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case 192: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case 191: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -793,17 +1469,17 @@ namespace isc { namespace dhcp { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 211: // value case 215: // map_value @@ -839,6 +1515,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return Dhcp4Parser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -859,46 +1544,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -908,13 +1598,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_AUTHORITATIVE || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_ID || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_PARSER4_error || tok == token::TOKEN_PARSER4_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_AUTHORITATIVE || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_ID || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_AUTHORITATIVE || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_ID || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_PARSER4_error || tok == token::TOKEN_PARSER4_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_AUTHORITATIVE || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_ID || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); } #endif #if 201103L <= YY_CPLUSPLUS @@ -975,6 +1665,13 @@ switch (yytype) Dhcp4Parser (isc::dhcp::Parser4Context& ctx_yyarg); virtual ~Dhcp4Parser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + Dhcp4Parser (const Dhcp4Parser&) = delete; + /// Non copyable. + Dhcp4Parser& operator= (const Dhcp4Parser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -1005,6 +1702,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -1021,6 +1722,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARSER4_error (location_type l) + { + return symbol_type (token::TOKEN_PARSER4_error, std::move (l)); + } +#else + static + symbol_type + make_PARSER4_error (const location_type& l) + { + return symbol_type (token::TOKEN_PARSER4_error, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARSER4_UNDEF (location_type l) + { + return symbol_type (token::TOKEN_PARSER4_UNDEF, std::move (l)); + } +#else + static + symbol_type + make_PARSER4_UNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_PARSER4_UNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -3903,20 +4634,43 @@ switch (yytype) #endif + class context + { + public: + context (const Dhcp4Parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const Dhcp4Parser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. Dhcp4Parser (const Dhcp4Parser&); + /// Non copyable. Dhcp4Parser& operator= (const Dhcp4Parser&); +#endif + /// Stored state numbers (used for stacks). typedef short state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -3933,65 +4687,66 @@ switch (yytype) static const short yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const short yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const short yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const short yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if PARSER4_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -4012,7 +4767,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -4024,12 +4779,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -4068,8 +4823,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -4077,6 +4832,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -4127,24 +4889,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -4168,8 +4924,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -4199,33 +4959,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 1357, ///< Last index in yytable_. yynnts_ = 417, ///< Number of nonterminal symbols. - yyfinal_ = 30, ///< Termination state number. - yyntokens_ = 195 ///< Number of tokens. + yyfinal_ = 30 ///< Termination state number. }; // User arguments. isc::dhcp::Parser4Context& ctx; + }; inline - Dhcp4Parser::token_number_type + Dhcp4Parser::symbol_kind_type Dhcp4Parser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const unsigned char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -4277,64 +5032,21 @@ switch (yytype) const int user_token_number_max_ = 449; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - Dhcp4Parser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 211: // value - case 215: // map_value - case 256: // ddns_replace_client_name_value - case 278: // socket_type - case 281: // outbound_interface_value - case 303: // db_type - case 397: // hr_mode - case 552: // ncr_protocol_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 194: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 193: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 192: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 191: // "constant string" - value.move< std::string > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template Dhcp4Parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 211: // value case 215: // map_value @@ -4371,11 +5083,18 @@ switch (yytype) + template + Dhcp4Parser::symbol_kind_type + Dhcp4Parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool Dhcp4Parser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -4383,7 +5102,7 @@ switch (yytype) Dhcp4Parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 211: // value case 215: // map_value @@ -4419,56 +5138,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - Dhcp4Parser::by_type::by_type () - : type (empty_symbol) + Dhcp4Parser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - Dhcp4Parser::by_type::by_type (by_type&& that) - : type (that.type) + Dhcp4Parser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - Dhcp4Parser::by_type::by_type (const by_type& that) - : type (that.type) + Dhcp4Parser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - Dhcp4Parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + Dhcp4Parser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - Dhcp4Parser::by_type::clear () + Dhcp4Parser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - Dhcp4Parser::by_type::move (by_type& that) + Dhcp4Parser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - Dhcp4Parser::by_type::type_get () const YY_NOEXCEPT + Dhcp4Parser::symbol_kind_type + Dhcp4Parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + Dhcp4Parser::symbol_kind_type + Dhcp4Parser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 4472 "dhcp4_parser.h" +#line 5198 "dhcp4_parser.h" diff --git a/src/bin/dhcp4/location.hh b/src/bin/dhcp4/location.hh index 3c10c3dd81..e9dfd0ad02 100644 --- a/src/bin/dhcp4/location.hh +++ b/src/bin/dhcp4/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/bin/dhcp4/position.hh b/src/bin/dhcp4/position.hh index add5b83242..fc6b0c4b80 100644 --- a/src/bin/dhcp4/position.hh +++ b/src/bin/dhcp4/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/dhcp4/stack.hh b/src/bin/dhcp4/stack.hh index 5c5e60931b..6147536e45 100644 --- a/src/bin/dhcp4/stack.hh +++ b/src/bin/dhcp4/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/dhcp6/dhcp6_parser.cc b/src/bin/dhcp6/dhcp6_parser.cc index 7bb3b318c8..a67ec73307 100644 --- a/src/bin/dhcp6/dhcp6_parser.cc +++ b/src/bin/dhcp6/dhcp6_parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ #include -#line 51 "dhcp6_parser.cc" +#line 52 "dhcp6_parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !PARSER6_DEBUG @@ -139,49 +141,7 @@ #line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 143 "dhcp6_parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - Dhcp6Parser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "dhcp6_parser.cc" /// Build a parser object. Dhcp6Parser::Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace dhcp { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace dhcp { : state (s) {} - Dhcp6Parser::symbol_number_type - Dhcp6Parser::by_state::type_get () const YY_NOEXCEPT + Dhcp6Parser::symbol_kind_type + Dhcp6Parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } Dhcp6Parser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace dhcp { Dhcp6Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 220: // value case 224: // map_value @@ -288,7 +248,7 @@ namespace isc { namespace dhcp { Dhcp6Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 220: // value case 224: // map_value @@ -321,7 +281,7 @@ namespace isc { namespace dhcp { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -329,7 +289,7 @@ namespace isc { namespace dhcp { Dhcp6Parser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 220: // value case 224: // map_value @@ -369,7 +329,7 @@ namespace isc { namespace dhcp { Dhcp6Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 220: // value case 224: // map_value @@ -419,93 +379,91 @@ namespace isc { namespace dhcp { #if PARSER6_DEBUG template void - Dhcp6Parser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + Dhcp6Parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 199: // "constant string" #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 443 "dhcp6_parser.cc" +#line 400 "dhcp6_parser.cc" break; case 200: // "integer" #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < int64_t > (); } -#line 449 "dhcp6_parser.cc" +#line 406 "dhcp6_parser.cc" break; case 201: // "floating point" #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < double > (); } -#line 455 "dhcp6_parser.cc" +#line 412 "dhcp6_parser.cc" break; case 202: // "boolean" #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < bool > (); } -#line 461 "dhcp6_parser.cc" +#line 418 "dhcp6_parser.cc" break; case 220: // value #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 467 "dhcp6_parser.cc" +#line 424 "dhcp6_parser.cc" break; case 224: // map_value #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 473 "dhcp6_parser.cc" +#line 430 "dhcp6_parser.cc" break; case 265: // ddns_replace_client_name_value #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 479 "dhcp6_parser.cc" +#line 436 "dhcp6_parser.cc" break; case 302: // db_type #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 485 "dhcp6_parser.cc" +#line 442 "dhcp6_parser.cc" break; case 403: // hr_mode #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 491 "dhcp6_parser.cc" +#line 448 "dhcp6_parser.cc" break; case 539: // duid_type #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 497 "dhcp6_parser.cc" +#line 454 "dhcp6_parser.cc" break; case 582: // ncr_protocol_value #line 280 "dhcp6_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 503 "dhcp6_parser.cc" +#line 460 "dhcp6_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -564,11 +522,11 @@ namespace isc { namespace dhcp { Dhcp6Parser::state_type Dhcp6Parser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -628,6 +586,7 @@ namespace isc { namespace dhcp { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -648,7 +607,7 @@ namespace isc { namespace dhcp { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -667,10 +626,20 @@ namespace isc { namespace dhcp { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -766,133 +735,133 @@ namespace isc { namespace dhcp { case 2: #line 289 "dhcp6_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 770 "dhcp6_parser.cc" +#line 739 "dhcp6_parser.cc" break; case 4: #line 290 "dhcp6_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 776 "dhcp6_parser.cc" +#line 745 "dhcp6_parser.cc" break; case 6: #line 291 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP6; } -#line 782 "dhcp6_parser.cc" +#line 751 "dhcp6_parser.cc" break; case 8: #line 292 "dhcp6_parser.yy" { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 788 "dhcp6_parser.cc" +#line 757 "dhcp6_parser.cc" break; case 10: #line 293 "dhcp6_parser.yy" { ctx.ctx_ = ctx.SUBNET6; } -#line 794 "dhcp6_parser.cc" +#line 763 "dhcp6_parser.cc" break; case 12: #line 294 "dhcp6_parser.yy" { ctx.ctx_ = ctx.POOLS; } -#line 800 "dhcp6_parser.cc" +#line 769 "dhcp6_parser.cc" break; case 14: #line 295 "dhcp6_parser.yy" { ctx.ctx_ = ctx.PD_POOLS; } -#line 806 "dhcp6_parser.cc" +#line 775 "dhcp6_parser.cc" break; case 16: #line 296 "dhcp6_parser.yy" { ctx.ctx_ = ctx.RESERVATIONS; } -#line 812 "dhcp6_parser.cc" +#line 781 "dhcp6_parser.cc" break; case 18: #line 297 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP6; } -#line 818 "dhcp6_parser.cc" +#line 787 "dhcp6_parser.cc" break; case 20: #line 298 "dhcp6_parser.yy" { ctx.ctx_ = ctx.OPTION_DEF; } -#line 824 "dhcp6_parser.cc" +#line 793 "dhcp6_parser.cc" break; case 22: #line 299 "dhcp6_parser.yy" { ctx.ctx_ = ctx.OPTION_DATA; } -#line 830 "dhcp6_parser.cc" +#line 799 "dhcp6_parser.cc" break; case 24: #line 300 "dhcp6_parser.yy" { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 836 "dhcp6_parser.cc" +#line 805 "dhcp6_parser.cc" break; case 26: #line 301 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 842 "dhcp6_parser.cc" +#line 811 "dhcp6_parser.cc" break; case 28: #line 302 "dhcp6_parser.yy" { ctx.ctx_ = ctx.LOGGING; } -#line 848 "dhcp6_parser.cc" +#line 817 "dhcp6_parser.cc" break; case 30: #line 303 "dhcp6_parser.yy" { ctx.ctx_ = ctx.CONFIG_CONTROL; } -#line 854 "dhcp6_parser.cc" +#line 823 "dhcp6_parser.cc" break; case 32: #line 311 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 860 "dhcp6_parser.cc" +#line 829 "dhcp6_parser.cc" break; case 33: #line 312 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 866 "dhcp6_parser.cc" +#line 835 "dhcp6_parser.cc" break; case 34: #line 313 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 872 "dhcp6_parser.cc" +#line 841 "dhcp6_parser.cc" break; case 35: #line 314 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 878 "dhcp6_parser.cc" +#line 847 "dhcp6_parser.cc" break; case 36: #line 315 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 884 "dhcp6_parser.cc" +#line 853 "dhcp6_parser.cc" break; case 37: #line 316 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 890 "dhcp6_parser.cc" +#line 859 "dhcp6_parser.cc" break; case 38: #line 317 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 896 "dhcp6_parser.cc" +#line 865 "dhcp6_parser.cc" break; case 39: @@ -901,7 +870,7 @@ namespace isc { namespace dhcp { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 905 "dhcp6_parser.cc" +#line 874 "dhcp6_parser.cc" break; case 40: @@ -912,7 +881,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 916 "dhcp6_parser.cc" +#line 885 "dhcp6_parser.cc" break; case 41: @@ -922,13 +891,13 @@ namespace isc { namespace dhcp { // (maybe some sanity checking), this would be the best place // for it. } -#line 926 "dhcp6_parser.cc" +#line 895 "dhcp6_parser.cc" break; case 42: #line 336 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 932 "dhcp6_parser.cc" +#line 901 "dhcp6_parser.cc" break; case 45: @@ -937,7 +906,7 @@ namespace isc { namespace dhcp { // map containing a single entry ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 941 "dhcp6_parser.cc" +#line 910 "dhcp6_parser.cc" break; case 46: @@ -947,7 +916,7 @@ namespace isc { namespace dhcp { // comma and string:value ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 951 "dhcp6_parser.cc" +#line 920 "dhcp6_parser.cc" break; case 47: @@ -956,7 +925,7 @@ namespace isc { namespace dhcp { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 960 "dhcp6_parser.cc" +#line 929 "dhcp6_parser.cc" break; case 48: @@ -964,7 +933,7 @@ namespace isc { namespace dhcp { { // list parsing complete. Put any sanity checking here } -#line 968 "dhcp6_parser.cc" +#line 937 "dhcp6_parser.cc" break; case 51: @@ -973,7 +942,7 @@ namespace isc { namespace dhcp { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 977 "dhcp6_parser.cc" +#line 946 "dhcp6_parser.cc" break; case 52: @@ -982,7 +951,7 @@ namespace isc { namespace dhcp { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 986 "dhcp6_parser.cc" +#line 955 "dhcp6_parser.cc" break; case 53: @@ -990,7 +959,7 @@ namespace isc { namespace dhcp { { // List parsing about to start } -#line 994 "dhcp6_parser.cc" +#line 963 "dhcp6_parser.cc" break; case 54: @@ -999,7 +968,7 @@ namespace isc { namespace dhcp { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 1003 "dhcp6_parser.cc" +#line 972 "dhcp6_parser.cc" break; case 57: @@ -1008,7 +977,7 @@ namespace isc { namespace dhcp { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 1012 "dhcp6_parser.cc" +#line 981 "dhcp6_parser.cc" break; case 58: @@ -1017,7 +986,7 @@ namespace isc { namespace dhcp { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 1021 "dhcp6_parser.cc" +#line 990 "dhcp6_parser.cc" break; case 59: @@ -1028,7 +997,7 @@ namespace isc { namespace dhcp { error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 1032 "dhcp6_parser.cc" +#line 1001 "dhcp6_parser.cc" break; case 60: @@ -1039,7 +1008,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1043 "dhcp6_parser.cc" +#line 1012 "dhcp6_parser.cc" break; case 61: @@ -1052,7 +1021,7 @@ namespace isc { namespace dhcp { // Dhcp6 is required ctx.require("Dhcp6", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1056 "dhcp6_parser.cc" +#line 1025 "dhcp6_parser.cc" break; case 70: @@ -1065,7 +1034,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP6); } -#line 1069 "dhcp6_parser.cc" +#line 1038 "dhcp6_parser.cc" break; case 71: @@ -1075,7 +1044,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1079 "dhcp6_parser.cc" +#line 1048 "dhcp6_parser.cc" break; case 72: @@ -1085,7 +1054,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1089 "dhcp6_parser.cc" +#line 1058 "dhcp6_parser.cc" break; case 73: @@ -1094,7 +1063,7 @@ namespace isc { namespace dhcp { // No global parameter is required // parsing completed } -#line 1098 "dhcp6_parser.cc" +#line 1067 "dhcp6_parser.cc" break; case 129: @@ -1102,7 +1071,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1106 "dhcp6_parser.cc" +#line 1075 "dhcp6_parser.cc" break; case 130: @@ -1112,7 +1081,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("data-directory", datadir); ctx.leave(); } -#line 1116 "dhcp6_parser.cc" +#line 1085 "dhcp6_parser.cc" break; case 131: @@ -1121,7 +1090,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("preferred-lifetime", prf); } -#line 1125 "dhcp6_parser.cc" +#line 1094 "dhcp6_parser.cc" break; case 132: @@ -1130,7 +1099,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-preferred-lifetime", prf); } -#line 1134 "dhcp6_parser.cc" +#line 1103 "dhcp6_parser.cc" break; case 133: @@ -1139,7 +1108,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-preferred-lifetime", prf); } -#line 1143 "dhcp6_parser.cc" +#line 1112 "dhcp6_parser.cc" break; case 134: @@ -1148,7 +1117,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1152 "dhcp6_parser.cc" +#line 1121 "dhcp6_parser.cc" break; case 135: @@ -1157,7 +1126,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-valid-lifetime", prf); } -#line 1161 "dhcp6_parser.cc" +#line 1130 "dhcp6_parser.cc" break; case 136: @@ -1166,7 +1135,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-valid-lifetime", prf); } -#line 1170 "dhcp6_parser.cc" +#line 1139 "dhcp6_parser.cc" break; case 137: @@ -1175,7 +1144,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1179 "dhcp6_parser.cc" +#line 1148 "dhcp6_parser.cc" break; case 138: @@ -1184,7 +1153,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1188 "dhcp6_parser.cc" +#line 1157 "dhcp6_parser.cc" break; case 139: @@ -1193,7 +1162,7 @@ namespace isc { namespace dhcp { ElementPtr ctt(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("calculate-tee-times", ctt); } -#line 1197 "dhcp6_parser.cc" +#line 1166 "dhcp6_parser.cc" break; case 140: @@ -1202,7 +1171,7 @@ namespace isc { namespace dhcp { ElementPtr t1(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t1-percent", t1); } -#line 1206 "dhcp6_parser.cc" +#line 1175 "dhcp6_parser.cc" break; case 141: @@ -1211,7 +1180,7 @@ namespace isc { namespace dhcp { ElementPtr t2(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t2-percent", t2); } -#line 1215 "dhcp6_parser.cc" +#line 1184 "dhcp6_parser.cc" break; case 142: @@ -1220,7 +1189,7 @@ namespace isc { namespace dhcp { ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1224 "dhcp6_parser.cc" +#line 1193 "dhcp6_parser.cc" break; case 143: @@ -1229,7 +1198,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-send-updates", b); } -#line 1233 "dhcp6_parser.cc" +#line 1202 "dhcp6_parser.cc" break; case 144: @@ -1238,7 +1207,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-no-update", b); } -#line 1242 "dhcp6_parser.cc" +#line 1211 "dhcp6_parser.cc" break; case 145: @@ -1247,7 +1216,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-client-update", b); } -#line 1251 "dhcp6_parser.cc" +#line 1220 "dhcp6_parser.cc" break; case 146: @@ -1255,7 +1224,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 1259 "dhcp6_parser.cc" +#line 1228 "dhcp6_parser.cc" break; case 147: @@ -1264,7 +1233,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1268 "dhcp6_parser.cc" +#line 1237 "dhcp6_parser.cc" break; case 148: @@ -1272,7 +1241,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 1276 "dhcp6_parser.cc" +#line 1245 "dhcp6_parser.cc" break; case 149: @@ -1280,7 +1249,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 1284 "dhcp6_parser.cc" +#line 1253 "dhcp6_parser.cc" break; case 150: @@ -1288,7 +1257,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 1292 "dhcp6_parser.cc" +#line 1261 "dhcp6_parser.cc" break; case 151: @@ -1296,7 +1265,7 @@ namespace isc { namespace dhcp { { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 1300 "dhcp6_parser.cc" +#line 1269 "dhcp6_parser.cc" break; case 152: @@ -1305,7 +1274,7 @@ namespace isc { namespace dhcp { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 1309 "dhcp6_parser.cc" +#line 1278 "dhcp6_parser.cc" break; case 153: @@ -1313,7 +1282,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1317 "dhcp6_parser.cc" +#line 1286 "dhcp6_parser.cc" break; case 154: @@ -1323,7 +1292,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-generated-prefix", s); ctx.leave(); } -#line 1327 "dhcp6_parser.cc" +#line 1296 "dhcp6_parser.cc" break; case 155: @@ -1331,7 +1300,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1335 "dhcp6_parser.cc" +#line 1304 "dhcp6_parser.cc" break; case 156: @@ -1341,7 +1310,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ddns-qualifying-suffix", s); ctx.leave(); } -#line 1345 "dhcp6_parser.cc" +#line 1314 "dhcp6_parser.cc" break; case 157: @@ -1349,7 +1318,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1353 "dhcp6_parser.cc" +#line 1322 "dhcp6_parser.cc" break; case 158: @@ -1359,7 +1328,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 1363 "dhcp6_parser.cc" +#line 1332 "dhcp6_parser.cc" break; case 159: @@ -1367,7 +1336,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1371 "dhcp6_parser.cc" +#line 1340 "dhcp6_parser.cc" break; case 160: @@ -1377,7 +1346,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 1381 "dhcp6_parser.cc" +#line 1350 "dhcp6_parser.cc" break; case 161: @@ -1386,7 +1355,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("store-extended-info", b); } -#line 1390 "dhcp6_parser.cc" +#line 1359 "dhcp6_parser.cc" break; case 162: @@ -1395,7 +1364,7 @@ namespace isc { namespace dhcp { ElementPtr count(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("statistic-default-sample-count", count); } -#line 1399 "dhcp6_parser.cc" +#line 1368 "dhcp6_parser.cc" break; case 163: @@ -1404,7 +1373,7 @@ namespace isc { namespace dhcp { ElementPtr age(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("statistic-default-sample-age", age); } -#line 1408 "dhcp6_parser.cc" +#line 1377 "dhcp6_parser.cc" break; case 164: @@ -1412,7 +1381,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1416 "dhcp6_parser.cc" +#line 1385 "dhcp6_parser.cc" break; case 165: @@ -1422,7 +1391,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("server-tag", stag); ctx.leave(); } -#line 1426 "dhcp6_parser.cc" +#line 1395 "dhcp6_parser.cc" break; case 166: @@ -1433,7 +1402,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1437 "dhcp6_parser.cc" +#line 1406 "dhcp6_parser.cc" break; case 167: @@ -1443,7 +1412,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1447 "dhcp6_parser.cc" +#line 1416 "dhcp6_parser.cc" break; case 168: @@ -1453,7 +1422,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1457 "dhcp6_parser.cc" +#line 1426 "dhcp6_parser.cc" break; case 169: @@ -1462,7 +1431,7 @@ namespace isc { namespace dhcp { // No interfaces config param is required // parsing completed } -#line 1466 "dhcp6_parser.cc" +#line 1435 "dhcp6_parser.cc" break; case 177: @@ -1473,7 +1442,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1477 "dhcp6_parser.cc" +#line 1446 "dhcp6_parser.cc" break; case 178: @@ -1482,7 +1451,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1486 "dhcp6_parser.cc" +#line 1455 "dhcp6_parser.cc" break; case 179: @@ -1491,7 +1460,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1495 "dhcp6_parser.cc" +#line 1464 "dhcp6_parser.cc" break; case 180: @@ -1502,7 +1471,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1506 "dhcp6_parser.cc" +#line 1475 "dhcp6_parser.cc" break; case 181: @@ -1513,7 +1482,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1517 "dhcp6_parser.cc" +#line 1486 "dhcp6_parser.cc" break; case 182: @@ -1524,7 +1493,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1528 "dhcp6_parser.cc" +#line 1497 "dhcp6_parser.cc" break; case 183: @@ -1535,7 +1504,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1539 "dhcp6_parser.cc" +#line 1508 "dhcp6_parser.cc" break; case 184: @@ -1546,7 +1515,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1550 "dhcp6_parser.cc" +#line 1519 "dhcp6_parser.cc" break; case 185: @@ -1555,7 +1524,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1559 "dhcp6_parser.cc" +#line 1528 "dhcp6_parser.cc" break; case 190: @@ -1565,7 +1534,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1569 "dhcp6_parser.cc" +#line 1538 "dhcp6_parser.cc" break; case 191: @@ -1575,7 +1544,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1579 "dhcp6_parser.cc" +#line 1548 "dhcp6_parser.cc" break; case 215: @@ -1583,7 +1552,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.DATABASE_TYPE); } -#line 1587 "dhcp6_parser.cc" +#line 1556 "dhcp6_parser.cc" break; case 216: @@ -1592,31 +1561,31 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1596 "dhcp6_parser.cc" +#line 1565 "dhcp6_parser.cc" break; case 217: #line 822 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1602 "dhcp6_parser.cc" +#line 1571 "dhcp6_parser.cc" break; case 218: #line 823 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1608 "dhcp6_parser.cc" +#line 1577 "dhcp6_parser.cc" break; case 219: #line 824 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1614 "dhcp6_parser.cc" +#line 1583 "dhcp6_parser.cc" break; case 220: #line 825 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1620 "dhcp6_parser.cc" +#line 1589 "dhcp6_parser.cc" break; case 221: @@ -1624,7 +1593,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1628 "dhcp6_parser.cc" +#line 1597 "dhcp6_parser.cc" break; case 222: @@ -1634,7 +1603,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1638 "dhcp6_parser.cc" +#line 1607 "dhcp6_parser.cc" break; case 223: @@ -1642,7 +1611,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1646 "dhcp6_parser.cc" +#line 1615 "dhcp6_parser.cc" break; case 224: @@ -1652,7 +1621,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1656 "dhcp6_parser.cc" +#line 1625 "dhcp6_parser.cc" break; case 225: @@ -1660,7 +1629,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1664 "dhcp6_parser.cc" +#line 1633 "dhcp6_parser.cc" break; case 226: @@ -1670,7 +1639,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1674 "dhcp6_parser.cc" +#line 1643 "dhcp6_parser.cc" break; case 227: @@ -1679,7 +1648,7 @@ namespace isc { namespace dhcp { ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1683 "dhcp6_parser.cc" +#line 1652 "dhcp6_parser.cc" break; case 228: @@ -1687,7 +1656,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1691 "dhcp6_parser.cc" +#line 1660 "dhcp6_parser.cc" break; case 229: @@ -1697,7 +1666,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1701 "dhcp6_parser.cc" +#line 1670 "dhcp6_parser.cc" break; case 230: @@ -1706,7 +1675,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1710 "dhcp6_parser.cc" +#line 1679 "dhcp6_parser.cc" break; case 231: @@ -1715,7 +1684,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1719 "dhcp6_parser.cc" +#line 1688 "dhcp6_parser.cc" break; case 232: @@ -1724,7 +1693,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1728 "dhcp6_parser.cc" +#line 1697 "dhcp6_parser.cc" break; case 233: @@ -1733,7 +1702,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1737 "dhcp6_parser.cc" +#line 1706 "dhcp6_parser.cc" break; case 234: @@ -1742,7 +1711,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 1746 "dhcp6_parser.cc" +#line 1715 "dhcp6_parser.cc" break; case 235: @@ -1751,7 +1720,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 1755 "dhcp6_parser.cc" +#line 1724 "dhcp6_parser.cc" break; case 236: @@ -1760,7 +1729,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1764 "dhcp6_parser.cc" +#line 1733 "dhcp6_parser.cc" break; case 237: @@ -1769,7 +1738,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1773 "dhcp6_parser.cc" +#line 1742 "dhcp6_parser.cc" break; case 238: @@ -1778,7 +1747,7 @@ namespace isc { namespace dhcp { ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1782 "dhcp6_parser.cc" +#line 1751 "dhcp6_parser.cc" break; case 239: @@ -1786,7 +1755,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1790 "dhcp6_parser.cc" +#line 1759 "dhcp6_parser.cc" break; case 240: @@ -1796,7 +1765,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1800 "dhcp6_parser.cc" +#line 1769 "dhcp6_parser.cc" break; case 241: @@ -1805,7 +1774,7 @@ namespace isc { namespace dhcp { ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 1809 "dhcp6_parser.cc" +#line 1778 "dhcp6_parser.cc" break; case 242: @@ -1813,7 +1782,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1817 "dhcp6_parser.cc" +#line 1786 "dhcp6_parser.cc" break; case 243: @@ -1823,7 +1792,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1827 "dhcp6_parser.cc" +#line 1796 "dhcp6_parser.cc" break; case 244: @@ -1831,7 +1800,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1835 "dhcp6_parser.cc" +#line 1804 "dhcp6_parser.cc" break; case 245: @@ -1841,7 +1810,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("consistency", c); ctx.leave(); } -#line 1845 "dhcp6_parser.cc" +#line 1814 "dhcp6_parser.cc" break; case 246: @@ -1849,7 +1818,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1853 "dhcp6_parser.cc" +#line 1822 "dhcp6_parser.cc" break; case 247: @@ -1859,7 +1828,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("serial-consistency", c); ctx.leave(); } -#line 1863 "dhcp6_parser.cc" +#line 1832 "dhcp6_parser.cc" break; case 248: @@ -1870,7 +1839,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.SANITY_CHECKS); } -#line 1874 "dhcp6_parser.cc" +#line 1843 "dhcp6_parser.cc" break; case 249: @@ -1879,7 +1848,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1883 "dhcp6_parser.cc" +#line 1852 "dhcp6_parser.cc" break; case 253: @@ -1887,7 +1856,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 1891 "dhcp6_parser.cc" +#line 1860 "dhcp6_parser.cc" break; case 254: @@ -1907,7 +1876,7 @@ namespace isc { namespace dhcp { ", supported values are: none, warn, fix, fix-del, del"); } } -#line 1911 "dhcp6_parser.cc" +#line 1880 "dhcp6_parser.cc" break; case 255: @@ -1918,7 +1887,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.MAC_SOURCES); } -#line 1922 "dhcp6_parser.cc" +#line 1891 "dhcp6_parser.cc" break; case 256: @@ -1927,7 +1896,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1931 "dhcp6_parser.cc" +#line 1900 "dhcp6_parser.cc" break; case 261: @@ -1936,7 +1905,7 @@ namespace isc { namespace dhcp { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1940 "dhcp6_parser.cc" +#line 1909 "dhcp6_parser.cc" break; case 262: @@ -1945,7 +1914,7 @@ namespace isc { namespace dhcp { ElementPtr duid(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1949 "dhcp6_parser.cc" +#line 1918 "dhcp6_parser.cc" break; case 263: @@ -1956,7 +1925,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 1960 "dhcp6_parser.cc" +#line 1929 "dhcp6_parser.cc" break; case 264: @@ -1965,7 +1934,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 1969 "dhcp6_parser.cc" +#line 1938 "dhcp6_parser.cc" break; case 270: @@ -1974,7 +1943,7 @@ namespace isc { namespace dhcp { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 1978 "dhcp6_parser.cc" +#line 1947 "dhcp6_parser.cc" break; case 271: @@ -1983,7 +1952,7 @@ namespace isc { namespace dhcp { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 1987 "dhcp6_parser.cc" +#line 1956 "dhcp6_parser.cc" break; case 272: @@ -1994,7 +1963,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1998 "dhcp6_parser.cc" +#line 1967 "dhcp6_parser.cc" break; case 273: @@ -2003,7 +1972,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2007 "dhcp6_parser.cc" +#line 1976 "dhcp6_parser.cc" break; case 274: @@ -2014,7 +1983,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(mt); ctx.enter(ctx.DHCP_MULTI_THREADING); } -#line 2018 "dhcp6_parser.cc" +#line 1987 "dhcp6_parser.cc" break; case 275: @@ -2025,7 +1994,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2029 "dhcp6_parser.cc" +#line 1998 "dhcp6_parser.cc" break; case 284: @@ -2034,7 +2003,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-multi-threading", b); } -#line 2038 "dhcp6_parser.cc" +#line 2007 "dhcp6_parser.cc" break; case 285: @@ -2043,7 +2012,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("thread-pool-size", prf); } -#line 2047 "dhcp6_parser.cc" +#line 2016 "dhcp6_parser.cc" break; case 286: @@ -2052,7 +2021,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("packet-queue-size", prf); } -#line 2056 "dhcp6_parser.cc" +#line 2025 "dhcp6_parser.cc" break; case 287: @@ -2063,7 +2032,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 2067 "dhcp6_parser.cc" +#line 2036 "dhcp6_parser.cc" break; case 288: @@ -2072,7 +2041,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2076 "dhcp6_parser.cc" +#line 2045 "dhcp6_parser.cc" break; case 293: @@ -2082,7 +2051,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2086 "dhcp6_parser.cc" +#line 2055 "dhcp6_parser.cc" break; case 294: @@ -2092,7 +2061,7 @@ namespace isc { namespace dhcp { ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2096 "dhcp6_parser.cc" +#line 2065 "dhcp6_parser.cc" break; case 295: @@ -2102,7 +2071,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2106 "dhcp6_parser.cc" +#line 2075 "dhcp6_parser.cc" break; case 296: @@ -2112,7 +2081,7 @@ namespace isc { namespace dhcp { ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2116 "dhcp6_parser.cc" +#line 2085 "dhcp6_parser.cc" break; case 302: @@ -2120,7 +2089,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2124 "dhcp6_parser.cc" +#line 2093 "dhcp6_parser.cc" break; case 303: @@ -2130,7 +2099,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 2134 "dhcp6_parser.cc" +#line 2103 "dhcp6_parser.cc" break; case 304: @@ -2138,7 +2107,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2142 "dhcp6_parser.cc" +#line 2111 "dhcp6_parser.cc" break; case 305: @@ -2147,7 +2116,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2151 "dhcp6_parser.cc" +#line 2120 "dhcp6_parser.cc" break; case 306: @@ -2158,7 +2127,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 2162 "dhcp6_parser.cc" +#line 2131 "dhcp6_parser.cc" break; case 307: @@ -2168,7 +2137,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2172 "dhcp6_parser.cc" +#line 2141 "dhcp6_parser.cc" break; case 316: @@ -2177,7 +2146,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reclaim-timer-wait-time", value); } -#line 2181 "dhcp6_parser.cc" +#line 2150 "dhcp6_parser.cc" break; case 317: @@ -2186,7 +2155,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value); } -#line 2190 "dhcp6_parser.cc" +#line 2159 "dhcp6_parser.cc" break; case 318: @@ -2195,7 +2164,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 2199 "dhcp6_parser.cc" +#line 2168 "dhcp6_parser.cc" break; case 319: @@ -2204,7 +2173,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 2208 "dhcp6_parser.cc" +#line 2177 "dhcp6_parser.cc" break; case 320: @@ -2213,7 +2182,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 2217 "dhcp6_parser.cc" +#line 2186 "dhcp6_parser.cc" break; case 321: @@ -2222,7 +2191,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 2226 "dhcp6_parser.cc" +#line 2195 "dhcp6_parser.cc" break; case 322: @@ -2233,7 +2202,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET6); } -#line 2237 "dhcp6_parser.cc" +#line 2206 "dhcp6_parser.cc" break; case 323: @@ -2242,7 +2211,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2246 "dhcp6_parser.cc" +#line 2215 "dhcp6_parser.cc" break; case 328: @@ -2252,7 +2221,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2256 "dhcp6_parser.cc" +#line 2225 "dhcp6_parser.cc" break; case 329: @@ -2278,7 +2247,7 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2282 "dhcp6_parser.cc" +#line 2251 "dhcp6_parser.cc" break; case 330: @@ -2288,7 +2257,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2292 "dhcp6_parser.cc" +#line 2261 "dhcp6_parser.cc" break; case 331: @@ -2298,7 +2267,7 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2302 "dhcp6_parser.cc" +#line 2271 "dhcp6_parser.cc" break; case 370: @@ -2306,7 +2275,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2310 "dhcp6_parser.cc" +#line 2279 "dhcp6_parser.cc" break; case 371: @@ -2316,7 +2285,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 2320 "dhcp6_parser.cc" +#line 2289 "dhcp6_parser.cc" break; case 372: @@ -2324,7 +2293,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2328 "dhcp6_parser.cc" +#line 2297 "dhcp6_parser.cc" break; case 373: @@ -2334,7 +2303,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 2338 "dhcp6_parser.cc" +#line 2307 "dhcp6_parser.cc" break; case 374: @@ -2342,7 +2311,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2346 "dhcp6_parser.cc" +#line 2315 "dhcp6_parser.cc" break; case 375: @@ -2352,7 +2321,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("interface-id", iface); ctx.leave(); } -#line 2356 "dhcp6_parser.cc" +#line 2325 "dhcp6_parser.cc" break; case 376: @@ -2360,7 +2329,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2364 "dhcp6_parser.cc" +#line 2333 "dhcp6_parser.cc" break; case 377: @@ -2370,7 +2339,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 2374 "dhcp6_parser.cc" +#line 2343 "dhcp6_parser.cc" break; case 378: @@ -2381,7 +2350,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2385 "dhcp6_parser.cc" +#line 2354 "dhcp6_parser.cc" break; case 379: @@ -2390,7 +2359,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2394 "dhcp6_parser.cc" +#line 2363 "dhcp6_parser.cc" break; case 380: @@ -2398,7 +2367,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.RESERVATION_MODE); } -#line 2402 "dhcp6_parser.cc" +#line 2371 "dhcp6_parser.cc" break; case 381: @@ -2407,31 +2376,31 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2411 "dhcp6_parser.cc" +#line 2380 "dhcp6_parser.cc" break; case 382: #line 1363 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 2417 "dhcp6_parser.cc" +#line 2386 "dhcp6_parser.cc" break; case 383: #line 1364 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 2423 "dhcp6_parser.cc" +#line 2392 "dhcp6_parser.cc" break; case 384: #line 1365 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } -#line 2429 "dhcp6_parser.cc" +#line 2398 "dhcp6_parser.cc" break; case 385: #line 1366 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 2435 "dhcp6_parser.cc" +#line 2404 "dhcp6_parser.cc" break; case 386: @@ -2440,7 +2409,7 @@ namespace isc { namespace dhcp { ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 2444 "dhcp6_parser.cc" +#line 2413 "dhcp6_parser.cc" break; case 387: @@ -2449,7 +2418,7 @@ namespace isc { namespace dhcp { ElementPtr rc(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rapid-commit", rc); } -#line 2453 "dhcp6_parser.cc" +#line 2422 "dhcp6_parser.cc" break; case 388: @@ -2460,7 +2429,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 2464 "dhcp6_parser.cc" +#line 2433 "dhcp6_parser.cc" break; case 389: @@ -2469,7 +2438,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2473 "dhcp6_parser.cc" +#line 2442 "dhcp6_parser.cc" break; case 394: @@ -2479,7 +2448,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2483 "dhcp6_parser.cc" +#line 2452 "dhcp6_parser.cc" break; case 395: @@ -2487,7 +2456,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 2491 "dhcp6_parser.cc" +#line 2460 "dhcp6_parser.cc" break; case 431: @@ -2498,7 +2467,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2502 "dhcp6_parser.cc" +#line 2471 "dhcp6_parser.cc" break; case 432: @@ -2507,7 +2476,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2511 "dhcp6_parser.cc" +#line 2480 "dhcp6_parser.cc" break; case 433: @@ -2516,7 +2485,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2520 "dhcp6_parser.cc" +#line 2489 "dhcp6_parser.cc" break; case 434: @@ -2524,7 +2493,7 @@ namespace isc { namespace dhcp { { // parsing completed } -#line 2528 "dhcp6_parser.cc" +#line 2497 "dhcp6_parser.cc" break; case 439: @@ -2534,7 +2503,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2538 "dhcp6_parser.cc" +#line 2507 "dhcp6_parser.cc" break; case 440: @@ -2546,7 +2515,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2550 "dhcp6_parser.cc" +#line 2519 "dhcp6_parser.cc" break; case 441: @@ -2556,7 +2525,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2560 "dhcp6_parser.cc" +#line 2529 "dhcp6_parser.cc" break; case 442: @@ -2568,7 +2537,7 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2572 "dhcp6_parser.cc" +#line 2541 "dhcp6_parser.cc" break; case 458: @@ -2577,7 +2546,7 @@ namespace isc { namespace dhcp { ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2581 "dhcp6_parser.cc" +#line 2550 "dhcp6_parser.cc" break; case 460: @@ -2585,7 +2554,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2589 "dhcp6_parser.cc" +#line 2558 "dhcp6_parser.cc" break; case 461: @@ -2595,7 +2564,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2599 "dhcp6_parser.cc" +#line 2568 "dhcp6_parser.cc" break; case 462: @@ -2603,7 +2572,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2607 "dhcp6_parser.cc" +#line 2576 "dhcp6_parser.cc" break; case 463: @@ -2613,7 +2582,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2617 "dhcp6_parser.cc" +#line 2586 "dhcp6_parser.cc" break; case 464: @@ -2621,7 +2590,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2625 "dhcp6_parser.cc" +#line 2594 "dhcp6_parser.cc" break; case 465: @@ -2631,7 +2600,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2635 "dhcp6_parser.cc" +#line 2604 "dhcp6_parser.cc" break; case 467: @@ -2639,7 +2608,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2643 "dhcp6_parser.cc" +#line 2612 "dhcp6_parser.cc" break; case 468: @@ -2649,7 +2618,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2653 "dhcp6_parser.cc" +#line 2622 "dhcp6_parser.cc" break; case 469: @@ -2658,7 +2627,7 @@ namespace isc { namespace dhcp { ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2662 "dhcp6_parser.cc" +#line 2631 "dhcp6_parser.cc" break; case 470: @@ -2669,7 +2638,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2673 "dhcp6_parser.cc" +#line 2642 "dhcp6_parser.cc" break; case 471: @@ -2678,7 +2647,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2682 "dhcp6_parser.cc" +#line 2651 "dhcp6_parser.cc" break; case 476: @@ -2688,7 +2657,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2692 "dhcp6_parser.cc" +#line 2661 "dhcp6_parser.cc" break; case 477: @@ -2697,7 +2666,7 @@ namespace isc { namespace dhcp { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2701 "dhcp6_parser.cc" +#line 2670 "dhcp6_parser.cc" break; case 478: @@ -2707,7 +2676,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2711 "dhcp6_parser.cc" +#line 2680 "dhcp6_parser.cc" break; case 479: @@ -2716,7 +2685,7 @@ namespace isc { namespace dhcp { /// @todo: the code or name parameters are required. // parsing completed } -#line 2720 "dhcp6_parser.cc" +#line 2689 "dhcp6_parser.cc" break; case 494: @@ -2724,7 +2693,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2728 "dhcp6_parser.cc" +#line 2697 "dhcp6_parser.cc" break; case 495: @@ -2734,7 +2703,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2738 "dhcp6_parser.cc" +#line 2707 "dhcp6_parser.cc" break; case 498: @@ -2743,7 +2712,7 @@ namespace isc { namespace dhcp { ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2747 "dhcp6_parser.cc" +#line 2716 "dhcp6_parser.cc" break; case 499: @@ -2752,7 +2721,7 @@ namespace isc { namespace dhcp { ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2756 "dhcp6_parser.cc" +#line 2725 "dhcp6_parser.cc" break; case 500: @@ -2763,7 +2732,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2767 "dhcp6_parser.cc" +#line 2736 "dhcp6_parser.cc" break; case 501: @@ -2772,7 +2741,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2776 "dhcp6_parser.cc" +#line 2745 "dhcp6_parser.cc" break; case 506: @@ -2782,7 +2751,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2786 "dhcp6_parser.cc" +#line 2755 "dhcp6_parser.cc" break; case 507: @@ -2792,7 +2761,7 @@ namespace isc { namespace dhcp { ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2796 "dhcp6_parser.cc" +#line 2765 "dhcp6_parser.cc" break; case 508: @@ -2802,7 +2771,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2806 "dhcp6_parser.cc" +#line 2775 "dhcp6_parser.cc" break; case 509: @@ -2812,7 +2781,7 @@ namespace isc { namespace dhcp { ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2816 "dhcp6_parser.cc" +#line 2785 "dhcp6_parser.cc" break; case 519: @@ -2820,7 +2789,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2824 "dhcp6_parser.cc" +#line 2793 "dhcp6_parser.cc" break; case 520: @@ -2830,7 +2799,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 2834 "dhcp6_parser.cc" +#line 2803 "dhcp6_parser.cc" break; case 521: @@ -2838,7 +2807,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2842 "dhcp6_parser.cc" +#line 2811 "dhcp6_parser.cc" break; case 522: @@ -2865,7 +2834,7 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2869 "dhcp6_parser.cc" +#line 2838 "dhcp6_parser.cc" break; case 523: @@ -2873,7 +2842,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2877 "dhcp6_parser.cc" +#line 2846 "dhcp6_parser.cc" break; case 524: @@ -2902,7 +2871,7 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2906 "dhcp6_parser.cc" +#line 2875 "dhcp6_parser.cc" break; case 525: @@ -2913,7 +2882,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.PD_POOLS); } -#line 2917 "dhcp6_parser.cc" +#line 2886 "dhcp6_parser.cc" break; case 526: @@ -2922,7 +2891,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 2926 "dhcp6_parser.cc" +#line 2895 "dhcp6_parser.cc" break; case 531: @@ -2932,7 +2901,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2936 "dhcp6_parser.cc" +#line 2905 "dhcp6_parser.cc" break; case 532: @@ -2944,7 +2913,7 @@ namespace isc { namespace dhcp { ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2948 "dhcp6_parser.cc" +#line 2917 "dhcp6_parser.cc" break; case 533: @@ -2954,7 +2923,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2958 "dhcp6_parser.cc" +#line 2927 "dhcp6_parser.cc" break; case 534: @@ -2966,7 +2935,7 @@ namespace isc { namespace dhcp { ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2970 "dhcp6_parser.cc" +#line 2939 "dhcp6_parser.cc" break; case 548: @@ -2974,7 +2943,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 2978 "dhcp6_parser.cc" +#line 2947 "dhcp6_parser.cc" break; case 549: @@ -2984,7 +2953,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("prefix", prf); ctx.leave(); } -#line 2988 "dhcp6_parser.cc" +#line 2957 "dhcp6_parser.cc" break; case 550: @@ -2993,7 +2962,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefix-len", prf); } -#line 2997 "dhcp6_parser.cc" +#line 2966 "dhcp6_parser.cc" break; case 551: @@ -3001,7 +2970,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3005 "dhcp6_parser.cc" +#line 2974 "dhcp6_parser.cc" break; case 552: @@ -3011,7 +2980,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("excluded-prefix", prf); ctx.leave(); } -#line 3015 "dhcp6_parser.cc" +#line 2984 "dhcp6_parser.cc" break; case 553: @@ -3020,7 +2989,7 @@ namespace isc { namespace dhcp { ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("excluded-prefix-len", prf); } -#line 3024 "dhcp6_parser.cc" +#line 2993 "dhcp6_parser.cc" break; case 554: @@ -3029,7 +2998,7 @@ namespace isc { namespace dhcp { ElementPtr deleg(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("delegated-len", deleg); } -#line 3033 "dhcp6_parser.cc" +#line 3002 "dhcp6_parser.cc" break; case 555: @@ -3040,7 +3009,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 3044 "dhcp6_parser.cc" +#line 3013 "dhcp6_parser.cc" break; case 556: @@ -3049,7 +3018,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3053 "dhcp6_parser.cc" +#line 3022 "dhcp6_parser.cc" break; case 561: @@ -3059,7 +3028,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3063 "dhcp6_parser.cc" +#line 3032 "dhcp6_parser.cc" break; case 562: @@ -3068,7 +3037,7 @@ namespace isc { namespace dhcp { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 3072 "dhcp6_parser.cc" +#line 3041 "dhcp6_parser.cc" break; case 563: @@ -3078,7 +3047,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3082 "dhcp6_parser.cc" +#line 3051 "dhcp6_parser.cc" break; case 564: @@ -3087,7 +3056,7 @@ namespace isc { namespace dhcp { /// @todo: an identifier parameter is required. // parsing completed } -#line 3091 "dhcp6_parser.cc" +#line 3060 "dhcp6_parser.cc" break; case 580: @@ -3098,7 +3067,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3102 "dhcp6_parser.cc" +#line 3071 "dhcp6_parser.cc" break; case 581: @@ -3107,7 +3076,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3111 "dhcp6_parser.cc" +#line 3080 "dhcp6_parser.cc" break; case 582: @@ -3118,7 +3087,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3122 "dhcp6_parser.cc" +#line 3091 "dhcp6_parser.cc" break; case 583: @@ -3127,7 +3096,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3131 "dhcp6_parser.cc" +#line 3100 "dhcp6_parser.cc" break; case 584: @@ -3135,7 +3104,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3139 "dhcp6_parser.cc" +#line 3108 "dhcp6_parser.cc" break; case 585: @@ -3145,7 +3114,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 3149 "dhcp6_parser.cc" +#line 3118 "dhcp6_parser.cc" break; case 586: @@ -3153,7 +3122,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3157 "dhcp6_parser.cc" +#line 3126 "dhcp6_parser.cc" break; case 587: @@ -3163,7 +3132,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 3167 "dhcp6_parser.cc" +#line 3136 "dhcp6_parser.cc" break; case 588: @@ -3171,7 +3140,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3175 "dhcp6_parser.cc" +#line 3144 "dhcp6_parser.cc" break; case 589: @@ -3181,7 +3150,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 3185 "dhcp6_parser.cc" +#line 3154 "dhcp6_parser.cc" break; case 590: @@ -3189,7 +3158,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3193 "dhcp6_parser.cc" +#line 3162 "dhcp6_parser.cc" break; case 591: @@ -3199,7 +3168,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 3203 "dhcp6_parser.cc" +#line 3172 "dhcp6_parser.cc" break; case 592: @@ -3210,7 +3179,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 3214 "dhcp6_parser.cc" +#line 3183 "dhcp6_parser.cc" break; case 593: @@ -3219,7 +3188,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3223 "dhcp6_parser.cc" +#line 3192 "dhcp6_parser.cc" break; case 594: @@ -3230,7 +3199,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 3234 "dhcp6_parser.cc" +#line 3203 "dhcp6_parser.cc" break; case 595: @@ -3239,7 +3208,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3243 "dhcp6_parser.cc" +#line 3212 "dhcp6_parser.cc" break; case 598: @@ -3247,7 +3216,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3251 "dhcp6_parser.cc" +#line 3220 "dhcp6_parser.cc" break; case 599: @@ -3257,7 +3226,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 3261 "dhcp6_parser.cc" +#line 3230 "dhcp6_parser.cc" break; case 600: @@ -3268,7 +3237,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 3272 "dhcp6_parser.cc" +#line 3241 "dhcp6_parser.cc" break; case 601: @@ -3277,7 +3246,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3281 "dhcp6_parser.cc" +#line 3250 "dhcp6_parser.cc" break; case 604: @@ -3287,7 +3256,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3291 "dhcp6_parser.cc" +#line 3260 "dhcp6_parser.cc" break; case 605: @@ -3297,7 +3266,7 @@ namespace isc { namespace dhcp { ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3301 "dhcp6_parser.cc" +#line 3270 "dhcp6_parser.cc" break; case 618: @@ -3305,7 +3274,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3309 "dhcp6_parser.cc" +#line 3278 "dhcp6_parser.cc" break; case 619: @@ -3315,7 +3284,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 3319 "dhcp6_parser.cc" +#line 3288 "dhcp6_parser.cc" break; case 620: @@ -3324,7 +3293,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 3328 "dhcp6_parser.cc" +#line 3297 "dhcp6_parser.cc" break; case 621: @@ -3335,7 +3304,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER_ID); } -#line 3339 "dhcp6_parser.cc" +#line 3308 "dhcp6_parser.cc" break; case 622: @@ -3346,7 +3315,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3350 "dhcp6_parser.cc" +#line 3319 "dhcp6_parser.cc" break; case 634: @@ -3354,7 +3323,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.DUID_TYPE); } -#line 3358 "dhcp6_parser.cc" +#line 3327 "dhcp6_parser.cc" break; case 635: @@ -3363,25 +3332,25 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3367 "dhcp6_parser.cc" +#line 3336 "dhcp6_parser.cc" break; case 636: #line 2135 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); } -#line 3373 "dhcp6_parser.cc" +#line 3342 "dhcp6_parser.cc" break; case 637: #line 2136 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); } -#line 3379 "dhcp6_parser.cc" +#line 3348 "dhcp6_parser.cc" break; case 638: #line 2137 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); } -#line 3385 "dhcp6_parser.cc" +#line 3354 "dhcp6_parser.cc" break; case 639: @@ -3390,7 +3359,7 @@ namespace isc { namespace dhcp { ElementPtr htype(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("htype", htype); } -#line 3394 "dhcp6_parser.cc" +#line 3363 "dhcp6_parser.cc" break; case 640: @@ -3398,7 +3367,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3402 "dhcp6_parser.cc" +#line 3371 "dhcp6_parser.cc" break; case 641: @@ -3408,7 +3377,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("identifier", id); ctx.leave(); } -#line 3412 "dhcp6_parser.cc" +#line 3381 "dhcp6_parser.cc" break; case 642: @@ -3417,7 +3386,7 @@ namespace isc { namespace dhcp { ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("time", time); } -#line 3421 "dhcp6_parser.cc" +#line 3390 "dhcp6_parser.cc" break; case 643: @@ -3426,7 +3395,7 @@ namespace isc { namespace dhcp { ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enterprise-id", time); } -#line 3430 "dhcp6_parser.cc" +#line 3399 "dhcp6_parser.cc" break; case 644: @@ -3435,7 +3404,7 @@ namespace isc { namespace dhcp { ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 3439 "dhcp6_parser.cc" +#line 3408 "dhcp6_parser.cc" break; case 645: @@ -3446,7 +3415,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 3450 "dhcp6_parser.cc" +#line 3419 "dhcp6_parser.cc" break; case 646: @@ -3455,7 +3424,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3459 "dhcp6_parser.cc" +#line 3428 "dhcp6_parser.cc" break; case 654: @@ -3463,7 +3432,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3467 "dhcp6_parser.cc" +#line 3436 "dhcp6_parser.cc" break; case 655: @@ -3473,7 +3442,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 3477 "dhcp6_parser.cc" +#line 3446 "dhcp6_parser.cc" break; case 656: @@ -3481,7 +3450,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3485 "dhcp6_parser.cc" +#line 3454 "dhcp6_parser.cc" break; case 657: @@ -3491,7 +3460,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 3495 "dhcp6_parser.cc" +#line 3464 "dhcp6_parser.cc" break; case 658: @@ -3502,7 +3471,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(qc); ctx.enter(ctx.DHCP_QUEUE_CONTROL); } -#line 3506 "dhcp6_parser.cc" +#line 3475 "dhcp6_parser.cc" break; case 659: @@ -3513,7 +3482,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3517 "dhcp6_parser.cc" +#line 3486 "dhcp6_parser.cc" break; case 668: @@ -3522,7 +3491,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-queue", b); } -#line 3526 "dhcp6_parser.cc" +#line 3495 "dhcp6_parser.cc" break; case 669: @@ -3530,7 +3499,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3534 "dhcp6_parser.cc" +#line 3503 "dhcp6_parser.cc" break; case 670: @@ -3540,7 +3509,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("queue-type", qt); ctx.leave(); } -#line 3544 "dhcp6_parser.cc" +#line 3513 "dhcp6_parser.cc" break; case 671: @@ -3549,7 +3518,7 @@ namespace isc { namespace dhcp { ElementPtr c(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("capacity", c); } -#line 3553 "dhcp6_parser.cc" +#line 3522 "dhcp6_parser.cc" break; case 672: @@ -3557,7 +3526,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3561 "dhcp6_parser.cc" +#line 3530 "dhcp6_parser.cc" break; case 673: @@ -3566,7 +3535,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set(yystack_[3].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3570 "dhcp6_parser.cc" +#line 3539 "dhcp6_parser.cc" break; case 674: @@ -3577,7 +3546,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 3581 "dhcp6_parser.cc" +#line 3550 "dhcp6_parser.cc" break; case 675: @@ -3588,7 +3557,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3592 "dhcp6_parser.cc" +#line 3561 "dhcp6_parser.cc" break; case 676: @@ -3598,7 +3567,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3602 "dhcp6_parser.cc" +#line 3571 "dhcp6_parser.cc" break; case 677: @@ -3608,7 +3577,7 @@ namespace isc { namespace dhcp { ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3612 "dhcp6_parser.cc" +#line 3581 "dhcp6_parser.cc" break; case 698: @@ -3617,7 +3586,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3621 "dhcp6_parser.cc" +#line 3590 "dhcp6_parser.cc" break; case 699: @@ -3625,7 +3594,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3629 "dhcp6_parser.cc" +#line 3598 "dhcp6_parser.cc" break; case 700: @@ -3635,7 +3604,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3639 "dhcp6_parser.cc" +#line 3608 "dhcp6_parser.cc" break; case 701: @@ -3643,7 +3612,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3647 "dhcp6_parser.cc" +#line 3616 "dhcp6_parser.cc" break; case 702: @@ -3653,7 +3622,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3657 "dhcp6_parser.cc" +#line 3626 "dhcp6_parser.cc" break; case 703: @@ -3662,7 +3631,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3666 "dhcp6_parser.cc" +#line 3635 "dhcp6_parser.cc" break; case 704: @@ -3670,7 +3639,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3674 "dhcp6_parser.cc" +#line 3643 "dhcp6_parser.cc" break; case 705: @@ -3680,7 +3649,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3684 "dhcp6_parser.cc" +#line 3653 "dhcp6_parser.cc" break; case 706: @@ -3689,7 +3658,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3693 "dhcp6_parser.cc" +#line 3662 "dhcp6_parser.cc" break; case 707: @@ -3698,7 +3667,7 @@ namespace isc { namespace dhcp { ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3702 "dhcp6_parser.cc" +#line 3671 "dhcp6_parser.cc" break; case 708: @@ -3706,7 +3675,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NCR_PROTOCOL); } -#line 3710 "dhcp6_parser.cc" +#line 3679 "dhcp6_parser.cc" break; case 709: @@ -3715,19 +3684,19 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3719 "dhcp6_parser.cc" +#line 3688 "dhcp6_parser.cc" break; case 710: #line 2361 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3725 "dhcp6_parser.cc" +#line 3694 "dhcp6_parser.cc" break; case 711: #line 2362 "dhcp6_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3731 "dhcp6_parser.cc" +#line 3700 "dhcp6_parser.cc" break; case 712: @@ -3735,7 +3704,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NCR_FORMAT); } -#line 3739 "dhcp6_parser.cc" +#line 3708 "dhcp6_parser.cc" break; case 713: @@ -3745,7 +3714,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3749 "dhcp6_parser.cc" +#line 3718 "dhcp6_parser.cc" break; case 714: @@ -3754,7 +3723,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3758 "dhcp6_parser.cc" +#line 3727 "dhcp6_parser.cc" break; case 715: @@ -3763,7 +3732,7 @@ namespace isc { namespace dhcp { ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 3767 "dhcp6_parser.cc" +#line 3736 "dhcp6_parser.cc" break; case 716: @@ -3771,7 +3740,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 3775 "dhcp6_parser.cc" +#line 3744 "dhcp6_parser.cc" break; case 717: @@ -3780,7 +3749,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3784 "dhcp6_parser.cc" +#line 3753 "dhcp6_parser.cc" break; case 718: @@ -3788,7 +3757,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3792 "dhcp6_parser.cc" +#line 3761 "dhcp6_parser.cc" break; case 719: @@ -3798,7 +3767,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 3802 "dhcp6_parser.cc" +#line 3771 "dhcp6_parser.cc" break; case 720: @@ -3806,7 +3775,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3810 "dhcp6_parser.cc" +#line 3779 "dhcp6_parser.cc" break; case 721: @@ -3816,7 +3785,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 3820 "dhcp6_parser.cc" +#line 3789 "dhcp6_parser.cc" break; case 722: @@ -3824,7 +3793,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3828 "dhcp6_parser.cc" +#line 3797 "dhcp6_parser.cc" break; case 723: @@ -3834,7 +3803,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 3838 "dhcp6_parser.cc" +#line 3807 "dhcp6_parser.cc" break; case 724: @@ -3842,7 +3811,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3846 "dhcp6_parser.cc" +#line 3815 "dhcp6_parser.cc" break; case 725: @@ -3851,7 +3820,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3855 "dhcp6_parser.cc" +#line 3824 "dhcp6_parser.cc" break; case 726: @@ -3859,7 +3828,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3863 "dhcp6_parser.cc" +#line 3832 "dhcp6_parser.cc" break; case 727: @@ -3868,7 +3837,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3872 "dhcp6_parser.cc" +#line 3841 "dhcp6_parser.cc" break; case 728: @@ -3876,7 +3845,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 3880 "dhcp6_parser.cc" +#line 3849 "dhcp6_parser.cc" break; case 729: @@ -3885,7 +3854,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3889 "dhcp6_parser.cc" +#line 3858 "dhcp6_parser.cc" break; case 730: @@ -3896,7 +3865,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(i); ctx.enter(ctx.CONFIG_CONTROL); } -#line 3900 "dhcp6_parser.cc" +#line 3869 "dhcp6_parser.cc" break; case 731: @@ -3906,7 +3875,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3910 "dhcp6_parser.cc" +#line 3879 "dhcp6_parser.cc" break; case 732: @@ -3916,7 +3885,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3920 "dhcp6_parser.cc" +#line 3889 "dhcp6_parser.cc" break; case 733: @@ -3925,7 +3894,7 @@ namespace isc { namespace dhcp { // No config_control params are required // parsing completed } -#line 3929 "dhcp6_parser.cc" +#line 3898 "dhcp6_parser.cc" break; case 738: @@ -3936,7 +3905,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.CONFIG_DATABASE); } -#line 3940 "dhcp6_parser.cc" +#line 3909 "dhcp6_parser.cc" break; case 739: @@ -3945,7 +3914,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3949 "dhcp6_parser.cc" +#line 3918 "dhcp6_parser.cc" break; case 740: @@ -3954,7 +3923,7 @@ namespace isc { namespace dhcp { ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-fetch-wait-time", value); } -#line 3958 "dhcp6_parser.cc" +#line 3927 "dhcp6_parser.cc" break; case 741: @@ -3965,7 +3934,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 3969 "dhcp6_parser.cc" +#line 3938 "dhcp6_parser.cc" break; case 742: @@ -3974,7 +3943,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 3978 "dhcp6_parser.cc" +#line 3947 "dhcp6_parser.cc" break; case 743: @@ -3984,7 +3953,7 @@ namespace isc { namespace dhcp { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3988 "dhcp6_parser.cc" +#line 3957 "dhcp6_parser.cc" break; case 744: @@ -3992,7 +3961,7 @@ namespace isc { namespace dhcp { { // parsing completed } -#line 3996 "dhcp6_parser.cc" +#line 3965 "dhcp6_parser.cc" break; case 748: @@ -4003,7 +3972,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 4007 "dhcp6_parser.cc" +#line 3976 "dhcp6_parser.cc" break; case 749: @@ -4012,7 +3981,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 4016 "dhcp6_parser.cc" +#line 3985 "dhcp6_parser.cc" break; case 752: @@ -4022,7 +3991,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 4026 "dhcp6_parser.cc" +#line 3995 "dhcp6_parser.cc" break; case 753: @@ -4030,7 +3999,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 4034 "dhcp6_parser.cc" +#line 4003 "dhcp6_parser.cc" break; case 763: @@ -4039,7 +4008,7 @@ namespace isc { namespace dhcp { ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 4043 "dhcp6_parser.cc" +#line 4012 "dhcp6_parser.cc" break; case 764: @@ -4047,7 +4016,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 4051 "dhcp6_parser.cc" +#line 4020 "dhcp6_parser.cc" break; case 765: @@ -4057,7 +4026,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 4061 "dhcp6_parser.cc" +#line 4030 "dhcp6_parser.cc" break; case 766: @@ -4068,7 +4037,7 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 4072 "dhcp6_parser.cc" +#line 4041 "dhcp6_parser.cc" break; case 767: @@ -4077,7 +4046,7 @@ namespace isc { namespace dhcp { ctx.stack_.pop_back(); ctx.leave(); } -#line 4081 "dhcp6_parser.cc" +#line 4050 "dhcp6_parser.cc" break; case 770: @@ -4087,7 +4056,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 4091 "dhcp6_parser.cc" +#line 4060 "dhcp6_parser.cc" break; case 771: @@ -4095,7 +4064,7 @@ namespace isc { namespace dhcp { { ctx.stack_.pop_back(); } -#line 4099 "dhcp6_parser.cc" +#line 4068 "dhcp6_parser.cc" break; case 779: @@ -4103,7 +4072,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 4107 "dhcp6_parser.cc" +#line 4076 "dhcp6_parser.cc" break; case 780: @@ -4113,7 +4082,7 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 4117 "dhcp6_parser.cc" +#line 4086 "dhcp6_parser.cc" break; case 781: @@ -4122,7 +4091,7 @@ namespace isc { namespace dhcp { ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 4126 "dhcp6_parser.cc" +#line 4095 "dhcp6_parser.cc" break; case 782: @@ -4131,7 +4100,7 @@ namespace isc { namespace dhcp { ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 4135 "dhcp6_parser.cc" +#line 4104 "dhcp6_parser.cc" break; case 783: @@ -4140,7 +4109,7 @@ namespace isc { namespace dhcp { ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 4144 "dhcp6_parser.cc" +#line 4113 "dhcp6_parser.cc" break; case 784: @@ -4148,7 +4117,7 @@ namespace isc { namespace dhcp { { ctx.enter(ctx.NO_KEYWORD); } -#line 4152 "dhcp6_parser.cc" +#line 4121 "dhcp6_parser.cc" break; case 785: @@ -4158,11 +4127,11 @@ namespace isc { namespace dhcp { ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 4162 "dhcp6_parser.cc" +#line 4131 "dhcp6_parser.cc" break; -#line 4166 "dhcp6_parser.cc" +#line 4135 "dhcp6_parser.cc" default: break; @@ -4179,7 +4148,6 @@ namespace isc { namespace dhcp { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -4195,7 +4163,9 @@ namespace isc { namespace dhcp { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -4206,7 +4176,7 @@ namespace isc { namespace dhcp { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -4232,6 +4202,7 @@ namespace isc { namespace dhcp { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -4240,31 +4211,33 @@ namespace isc { namespace dhcp { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -4302,6 +4275,7 @@ namespace isc { namespace dhcp { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -4335,18 +4309,100 @@ namespace isc { namespace dhcp { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - Dhcp6Parser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + Dhcp6Parser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + Dhcp6Parser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // Dhcp6Parser::context. + Dhcp6Parser::context::context (const Dhcp6Parser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + Dhcp6Parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + int + Dhcp6Parser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -4371,35 +4427,26 @@ namespace isc { namespace dhcp { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + Dhcp6Parser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -4424,7 +4471,7 @@ namespace isc { namespace dhcp { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -5365,15 +5412,15 @@ namespace isc { namespace dhcp { }; - +#if PARSER6_DEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const Dhcp6Parser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\",\"", "\":\"", "\"[\"", - "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp6\"", "\"data-directory\"", - "\"config-control\"", "\"config-databases\"", + "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\":\"", + "\"[\"", "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp6\"", + "\"data-directory\"", "\"config-control\"", "\"config-databases\"", "\"config-fetch-wait-time\"", "\"interfaces-config\"", "\"interfaces\"", "\"re-detect\"", "\"lease-database\"", "\"hosts-database\"", "\"hosts-databases\"", "\"type\"", "\"memfile\"", "\"mysql\"", @@ -5538,6 +5585,8 @@ namespace isc { namespace dhcp { "output_params_list", "output_params", "output", "$@139", "flush", "maxsize", "maxver", "pattern", "$@140", YY_NULLPTR }; +#endif + #if PARSER6_DEBUG const short @@ -5624,9 +5673,8 @@ namespace isc { namespace dhcp { 2610, 2618, 2623, 2628, 2633, 2633 }; - // Print the state stack on the debug stream. void - Dhcp6Parser::yystack_print_ () + Dhcp6Parser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -5637,9 +5685,8 @@ namespace isc { namespace dhcp { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - Dhcp6Parser::yy_reduce_print_ (int yyrule) + Dhcp6Parser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -5656,7 +5703,7 @@ namespace isc { namespace dhcp { #line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 5660 "dhcp6_parser.cc" +#line 5707 "dhcp6_parser.cc" #line 2641 "dhcp6_parser.yy" diff --git a/src/bin/dhcp6/dhcp6_parser.h b/src/bin/dhcp6/dhcp6_parser.h index d6818e58e4..fbf439b608 100644 --- a/src/bin/dhcp6/dhcp6_parser.h +++ b/src/bin/dhcp6/dhcp6_parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_PARSER6_DHCP6_PARSER_H_INCLUDED # define YY_PARSER6_DHCP6_PARSER_H_INCLUDED @@ -56,7 +57,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp6_parser.h" +#line 61 "dhcp6_parser.h" # include # include // std::abort @@ -199,7 +200,7 @@ using namespace std; #line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 203 "dhcp6_parser.h" +#line 204 "dhcp6_parser.h" @@ -235,6 +236,13 @@ namespace isc { namespace dhcp { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -378,9 +386,12 @@ namespace isc { namespace dhcp { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -465,231 +476,886 @@ namespace isc { namespace dhcp { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_COMMA = 258, - TOKEN_COLON = 259, - TOKEN_LSQUARE_BRACKET = 260, - TOKEN_RSQUARE_BRACKET = 261, - TOKEN_LCURLY_BRACKET = 262, - TOKEN_RCURLY_BRACKET = 263, - TOKEN_NULL_TYPE = 264, - TOKEN_DHCP6 = 265, - TOKEN_DATA_DIRECTORY = 266, - TOKEN_CONFIG_CONTROL = 267, - TOKEN_CONFIG_DATABASES = 268, - TOKEN_CONFIG_FETCH_WAIT_TIME = 269, - TOKEN_INTERFACES_CONFIG = 270, - TOKEN_INTERFACES = 271, - TOKEN_RE_DETECT = 272, - TOKEN_LEASE_DATABASE = 273, - TOKEN_HOSTS_DATABASE = 274, - TOKEN_HOSTS_DATABASES = 275, - TOKEN_TYPE = 276, - TOKEN_MEMFILE = 277, - TOKEN_MYSQL = 278, - TOKEN_POSTGRESQL = 279, - TOKEN_CQL = 280, - TOKEN_USER = 281, - TOKEN_PASSWORD = 282, - TOKEN_HOST = 283, - TOKEN_PORT = 284, - TOKEN_PERSIST = 285, - TOKEN_LFC_INTERVAL = 286, - TOKEN_READONLY = 287, - TOKEN_CONNECT_TIMEOUT = 288, - TOKEN_CONTACT_POINTS = 289, - TOKEN_MAX_RECONNECT_TRIES = 290, - TOKEN_RECONNECT_WAIT_TIME = 291, - TOKEN_KEYSPACE = 292, - TOKEN_CONSISTENCY = 293, - TOKEN_SERIAL_CONSISTENCY = 294, - TOKEN_REQUEST_TIMEOUT = 295, - TOKEN_TCP_KEEPALIVE = 296, - TOKEN_TCP_NODELAY = 297, - TOKEN_MAX_ROW_ERRORS = 298, - TOKEN_PREFERRED_LIFETIME = 299, - TOKEN_MIN_PREFERRED_LIFETIME = 300, - TOKEN_MAX_PREFERRED_LIFETIME = 301, - TOKEN_VALID_LIFETIME = 302, - TOKEN_MIN_VALID_LIFETIME = 303, - TOKEN_MAX_VALID_LIFETIME = 304, - TOKEN_RENEW_TIMER = 305, - TOKEN_REBIND_TIMER = 306, - TOKEN_CALCULATE_TEE_TIMES = 307, - TOKEN_T1_PERCENT = 308, - TOKEN_T2_PERCENT = 309, - TOKEN_DECLINE_PROBATION_PERIOD = 310, - TOKEN_SERVER_TAG = 311, - TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 312, - TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 313, - TOKEN_DDNS_SEND_UPDATES = 314, - TOKEN_DDNS_OVERRIDE_NO_UPDATE = 315, - TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 316, - TOKEN_DDNS_REPLACE_CLIENT_NAME = 317, - TOKEN_DDNS_GENERATED_PREFIX = 318, - TOKEN_DDNS_QUALIFYING_SUFFIX = 319, - TOKEN_STORE_EXTENDED_INFO = 320, - TOKEN_SUBNET6 = 321, - TOKEN_OPTION_DEF = 322, - TOKEN_OPTION_DATA = 323, - TOKEN_NAME = 324, - TOKEN_DATA = 325, - TOKEN_CODE = 326, - TOKEN_SPACE = 327, - TOKEN_CSV_FORMAT = 328, - TOKEN_ALWAYS_SEND = 329, - TOKEN_RECORD_TYPES = 330, - TOKEN_ENCAPSULATE = 331, - TOKEN_ARRAY = 332, - TOKEN_POOLS = 333, - TOKEN_POOL = 334, - TOKEN_PD_POOLS = 335, - TOKEN_PREFIX = 336, - TOKEN_PREFIX_LEN = 337, - TOKEN_EXCLUDED_PREFIX = 338, - TOKEN_EXCLUDED_PREFIX_LEN = 339, - TOKEN_DELEGATED_LEN = 340, - TOKEN_USER_CONTEXT = 341, - TOKEN_COMMENT = 342, - TOKEN_SUBNET = 343, - TOKEN_INTERFACE = 344, - TOKEN_INTERFACE_ID = 345, - TOKEN_ID = 346, - TOKEN_RAPID_COMMIT = 347, - TOKEN_RESERVATION_MODE = 348, - TOKEN_DISABLED = 349, - TOKEN_OUT_OF_POOL = 350, - TOKEN_GLOBAL = 351, - TOKEN_ALL = 352, - TOKEN_SHARED_NETWORKS = 353, - TOKEN_MAC_SOURCES = 354, - TOKEN_RELAY_SUPPLIED_OPTIONS = 355, - TOKEN_HOST_RESERVATION_IDENTIFIERS = 356, - TOKEN_SANITY_CHECKS = 357, - TOKEN_LEASE_CHECKS = 358, - TOKEN_CLIENT_CLASSES = 359, - TOKEN_REQUIRE_CLIENT_CLASSES = 360, - TOKEN_TEST = 361, - TOKEN_ONLY_IF_REQUIRED = 362, - TOKEN_CLIENT_CLASS = 363, - TOKEN_RESERVATIONS = 364, - TOKEN_IP_ADDRESSES = 365, - TOKEN_PREFIXES = 366, - TOKEN_DUID = 367, - TOKEN_HW_ADDRESS = 368, - TOKEN_HOSTNAME = 369, - TOKEN_FLEX_ID = 370, - TOKEN_RELAY = 371, - TOKEN_IP_ADDRESS = 372, - TOKEN_HOOKS_LIBRARIES = 373, - TOKEN_LIBRARY = 374, - TOKEN_PARAMETERS = 375, - TOKEN_EXPIRED_LEASES_PROCESSING = 376, - TOKEN_RECLAIM_TIMER_WAIT_TIME = 377, - TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 378, - TOKEN_HOLD_RECLAIMED_TIME = 379, - TOKEN_MAX_RECLAIM_LEASES = 380, - TOKEN_MAX_RECLAIM_TIME = 381, - TOKEN_UNWARNED_RECLAIM_CYCLES = 382, - TOKEN_SERVER_ID = 383, - TOKEN_LLT = 384, - TOKEN_EN = 385, - TOKEN_LL = 386, - TOKEN_IDENTIFIER = 387, - TOKEN_HTYPE = 388, - TOKEN_TIME = 389, - TOKEN_ENTERPRISE_ID = 390, - TOKEN_DHCP4O6_PORT = 391, - TOKEN_DHCP_MULTI_THREADING = 392, - TOKEN_ENABLE_MULTI_THREADING = 393, - TOKEN_THREAD_POOL_SIZE = 394, - TOKEN_PACKET_QUEUE_SIZE = 395, - TOKEN_CONTROL_SOCKET = 396, - TOKEN_SOCKET_TYPE = 397, - TOKEN_SOCKET_NAME = 398, - TOKEN_DHCP_QUEUE_CONTROL = 399, - TOKEN_ENABLE_QUEUE = 400, - TOKEN_QUEUE_TYPE = 401, - TOKEN_CAPACITY = 402, - TOKEN_DHCP_DDNS = 403, - TOKEN_ENABLE_UPDATES = 404, - TOKEN_QUALIFYING_SUFFIX = 405, - TOKEN_SERVER_IP = 406, - TOKEN_SERVER_PORT = 407, - TOKEN_SENDER_IP = 408, - TOKEN_SENDER_PORT = 409, - TOKEN_MAX_QUEUE_SIZE = 410, - TOKEN_NCR_PROTOCOL = 411, - TOKEN_NCR_FORMAT = 412, - TOKEN_OVERRIDE_NO_UPDATE = 413, - TOKEN_OVERRIDE_CLIENT_UPDATE = 414, - TOKEN_REPLACE_CLIENT_NAME = 415, - TOKEN_GENERATED_PREFIX = 416, - TOKEN_UDP = 417, - TOKEN_TCP = 418, - TOKEN_JSON = 419, - TOKEN_WHEN_PRESENT = 420, - TOKEN_NEVER = 421, - TOKEN_ALWAYS = 422, - TOKEN_WHEN_NOT_PRESENT = 423, - TOKEN_HOSTNAME_CHAR_SET = 424, - TOKEN_HOSTNAME_CHAR_REPLACEMENT = 425, - TOKEN_LOGGING = 426, - TOKEN_LOGGERS = 427, - TOKEN_OUTPUT_OPTIONS = 428, - TOKEN_OUTPUT = 429, - TOKEN_DEBUGLEVEL = 430, - TOKEN_SEVERITY = 431, - TOKEN_FLUSH = 432, - TOKEN_MAXSIZE = 433, - TOKEN_MAXVER = 434, - TOKEN_PATTERN = 435, - TOKEN_DHCP4 = 436, - TOKEN_DHCPDDNS = 437, - TOKEN_CONTROL_AGENT = 438, - TOKEN_TOPLEVEL_JSON = 439, - TOKEN_TOPLEVEL_DHCP6 = 440, - TOKEN_SUB_DHCP6 = 441, - TOKEN_SUB_INTERFACES6 = 442, - TOKEN_SUB_SUBNET6 = 443, - TOKEN_SUB_POOL6 = 444, - TOKEN_SUB_PD_POOL = 445, - TOKEN_SUB_RESERVATION = 446, - TOKEN_SUB_OPTION_DEFS = 447, - TOKEN_SUB_OPTION_DEF = 448, - TOKEN_SUB_OPTION_DATA = 449, - TOKEN_SUB_HOOKS_LIBRARY = 450, - TOKEN_SUB_DHCP_DDNS = 451, - TOKEN_SUB_LOGGING = 452, - TOKEN_SUB_CONFIG_CONTROL = 453, - TOKEN_STRING = 454, - TOKEN_INTEGER = 455, - TOKEN_FLOAT = 456, - TOKEN_BOOLEAN = 457 + enum token_kind_type + { + TOKEN_PARSER6_EMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_PARSER6_error = 256, // error + TOKEN_PARSER6_UNDEF = 257, // "invalid token" + TOKEN_COMMA = 258, // "," + TOKEN_COLON = 259, // ":" + TOKEN_LSQUARE_BRACKET = 260, // "[" + TOKEN_RSQUARE_BRACKET = 261, // "]" + TOKEN_LCURLY_BRACKET = 262, // "{" + TOKEN_RCURLY_BRACKET = 263, // "}" + TOKEN_NULL_TYPE = 264, // "null" + TOKEN_DHCP6 = 265, // "Dhcp6" + TOKEN_DATA_DIRECTORY = 266, // "data-directory" + TOKEN_CONFIG_CONTROL = 267, // "config-control" + TOKEN_CONFIG_DATABASES = 268, // "config-databases" + TOKEN_CONFIG_FETCH_WAIT_TIME = 269, // "config-fetch-wait-time" + TOKEN_INTERFACES_CONFIG = 270, // "interfaces-config" + TOKEN_INTERFACES = 271, // "interfaces" + TOKEN_RE_DETECT = 272, // "re-detect" + TOKEN_LEASE_DATABASE = 273, // "lease-database" + TOKEN_HOSTS_DATABASE = 274, // "hosts-database" + TOKEN_HOSTS_DATABASES = 275, // "hosts-databases" + TOKEN_TYPE = 276, // "type" + TOKEN_MEMFILE = 277, // "memfile" + TOKEN_MYSQL = 278, // "mysql" + TOKEN_POSTGRESQL = 279, // "postgresql" + TOKEN_CQL = 280, // "cql" + TOKEN_USER = 281, // "user" + TOKEN_PASSWORD = 282, // "password" + TOKEN_HOST = 283, // "host" + TOKEN_PORT = 284, // "port" + TOKEN_PERSIST = 285, // "persist" + TOKEN_LFC_INTERVAL = 286, // "lfc-interval" + TOKEN_READONLY = 287, // "readonly" + TOKEN_CONNECT_TIMEOUT = 288, // "connect-timeout" + TOKEN_CONTACT_POINTS = 289, // "contact-points" + TOKEN_MAX_RECONNECT_TRIES = 290, // "max-reconnect-tries" + TOKEN_RECONNECT_WAIT_TIME = 291, // "reconnect-wait-time" + TOKEN_KEYSPACE = 292, // "keyspace" + TOKEN_CONSISTENCY = 293, // "consistency" + TOKEN_SERIAL_CONSISTENCY = 294, // "serial-consistency" + TOKEN_REQUEST_TIMEOUT = 295, // "request-timeout" + TOKEN_TCP_KEEPALIVE = 296, // "tcp-keepalive" + TOKEN_TCP_NODELAY = 297, // "tcp-nodelay" + TOKEN_MAX_ROW_ERRORS = 298, // "max-row-errors" + TOKEN_PREFERRED_LIFETIME = 299, // "preferred-lifetime" + TOKEN_MIN_PREFERRED_LIFETIME = 300, // "min-preferred-lifetime" + TOKEN_MAX_PREFERRED_LIFETIME = 301, // "max-preferred-lifetime" + TOKEN_VALID_LIFETIME = 302, // "valid-lifetime" + TOKEN_MIN_VALID_LIFETIME = 303, // "min-valid-lifetime" + TOKEN_MAX_VALID_LIFETIME = 304, // "max-valid-lifetime" + TOKEN_RENEW_TIMER = 305, // "renew-timer" + TOKEN_REBIND_TIMER = 306, // "rebind-timer" + TOKEN_CALCULATE_TEE_TIMES = 307, // "calculate-tee-times" + TOKEN_T1_PERCENT = 308, // "t1-percent" + TOKEN_T2_PERCENT = 309, // "t2-percent" + TOKEN_DECLINE_PROBATION_PERIOD = 310, // "decline-probation-period" + TOKEN_SERVER_TAG = 311, // "server-tag" + TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 312, // "statistic-default-sample-count" + TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 313, // "statistic-default-sample-age" + TOKEN_DDNS_SEND_UPDATES = 314, // "ddns-send-updates" + TOKEN_DDNS_OVERRIDE_NO_UPDATE = 315, // "ddns-override-no-update" + TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 316, // "ddns-override-client-update" + TOKEN_DDNS_REPLACE_CLIENT_NAME = 317, // "ddns-replace-client-name" + TOKEN_DDNS_GENERATED_PREFIX = 318, // "ddns-generated-prefix" + TOKEN_DDNS_QUALIFYING_SUFFIX = 319, // "ddns-qualifying-suffix" + TOKEN_STORE_EXTENDED_INFO = 320, // "store-extended-info" + TOKEN_SUBNET6 = 321, // "subnet6" + TOKEN_OPTION_DEF = 322, // "option-def" + TOKEN_OPTION_DATA = 323, // "option-data" + TOKEN_NAME = 324, // "name" + TOKEN_DATA = 325, // "data" + TOKEN_CODE = 326, // "code" + TOKEN_SPACE = 327, // "space" + TOKEN_CSV_FORMAT = 328, // "csv-format" + TOKEN_ALWAYS_SEND = 329, // "always-send" + TOKEN_RECORD_TYPES = 330, // "record-types" + TOKEN_ENCAPSULATE = 331, // "encapsulate" + TOKEN_ARRAY = 332, // "array" + TOKEN_POOLS = 333, // "pools" + TOKEN_POOL = 334, // "pool" + TOKEN_PD_POOLS = 335, // "pd-pools" + TOKEN_PREFIX = 336, // "prefix" + TOKEN_PREFIX_LEN = 337, // "prefix-len" + TOKEN_EXCLUDED_PREFIX = 338, // "excluded-prefix" + TOKEN_EXCLUDED_PREFIX_LEN = 339, // "excluded-prefix-len" + TOKEN_DELEGATED_LEN = 340, // "delegated-len" + TOKEN_USER_CONTEXT = 341, // "user-context" + TOKEN_COMMENT = 342, // "comment" + TOKEN_SUBNET = 343, // "subnet" + TOKEN_INTERFACE = 344, // "interface" + TOKEN_INTERFACE_ID = 345, // "interface-id" + TOKEN_ID = 346, // "id" + TOKEN_RAPID_COMMIT = 347, // "rapid-commit" + TOKEN_RESERVATION_MODE = 348, // "reservation-mode" + TOKEN_DISABLED = 349, // "disabled" + TOKEN_OUT_OF_POOL = 350, // "out-of-pool" + TOKEN_GLOBAL = 351, // "global" + TOKEN_ALL = 352, // "all" + TOKEN_SHARED_NETWORKS = 353, // "shared-networks" + TOKEN_MAC_SOURCES = 354, // "mac-sources" + TOKEN_RELAY_SUPPLIED_OPTIONS = 355, // "relay-supplied-options" + TOKEN_HOST_RESERVATION_IDENTIFIERS = 356, // "host-reservation-identifiers" + TOKEN_SANITY_CHECKS = 357, // "sanity-checks" + TOKEN_LEASE_CHECKS = 358, // "lease-checks" + TOKEN_CLIENT_CLASSES = 359, // "client-classes" + TOKEN_REQUIRE_CLIENT_CLASSES = 360, // "require-client-classes" + TOKEN_TEST = 361, // "test" + TOKEN_ONLY_IF_REQUIRED = 362, // "only-if-required" + TOKEN_CLIENT_CLASS = 363, // "client-class" + TOKEN_RESERVATIONS = 364, // "reservations" + TOKEN_IP_ADDRESSES = 365, // "ip-addresses" + TOKEN_PREFIXES = 366, // "prefixes" + TOKEN_DUID = 367, // "duid" + TOKEN_HW_ADDRESS = 368, // "hw-address" + TOKEN_HOSTNAME = 369, // "hostname" + TOKEN_FLEX_ID = 370, // "flex-id" + TOKEN_RELAY = 371, // "relay" + TOKEN_IP_ADDRESS = 372, // "ip-address" + TOKEN_HOOKS_LIBRARIES = 373, // "hooks-libraries" + TOKEN_LIBRARY = 374, // "library" + TOKEN_PARAMETERS = 375, // "parameters" + TOKEN_EXPIRED_LEASES_PROCESSING = 376, // "expired-leases-processing" + TOKEN_RECLAIM_TIMER_WAIT_TIME = 377, // "reclaim-timer-wait-time" + TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 378, // "flush-reclaimed-timer-wait-time" + TOKEN_HOLD_RECLAIMED_TIME = 379, // "hold-reclaimed-time" + TOKEN_MAX_RECLAIM_LEASES = 380, // "max-reclaim-leases" + TOKEN_MAX_RECLAIM_TIME = 381, // "max-reclaim-time" + TOKEN_UNWARNED_RECLAIM_CYCLES = 382, // "unwarned-reclaim-cycles" + TOKEN_SERVER_ID = 383, // "server-id" + TOKEN_LLT = 384, // "LLT" + TOKEN_EN = 385, // "EN" + TOKEN_LL = 386, // "LL" + TOKEN_IDENTIFIER = 387, // "identifier" + TOKEN_HTYPE = 388, // "htype" + TOKEN_TIME = 389, // "time" + TOKEN_ENTERPRISE_ID = 390, // "enterprise-id" + TOKEN_DHCP4O6_PORT = 391, // "dhcp4o6-port" + TOKEN_DHCP_MULTI_THREADING = 392, // "multi-threading" + TOKEN_ENABLE_MULTI_THREADING = 393, // "enable-multi-threading" + TOKEN_THREAD_POOL_SIZE = 394, // "thread-pool-size" + TOKEN_PACKET_QUEUE_SIZE = 395, // "packet-queue-size" + TOKEN_CONTROL_SOCKET = 396, // "control-socket" + TOKEN_SOCKET_TYPE = 397, // "socket-type" + TOKEN_SOCKET_NAME = 398, // "socket-name" + TOKEN_DHCP_QUEUE_CONTROL = 399, // "dhcp-queue-control" + TOKEN_ENABLE_QUEUE = 400, // "enable-queue" + TOKEN_QUEUE_TYPE = 401, // "queue-type" + TOKEN_CAPACITY = 402, // "capacity" + TOKEN_DHCP_DDNS = 403, // "dhcp-ddns" + TOKEN_ENABLE_UPDATES = 404, // "enable-updates" + TOKEN_QUALIFYING_SUFFIX = 405, // "qualifying-suffix" + TOKEN_SERVER_IP = 406, // "server-ip" + TOKEN_SERVER_PORT = 407, // "server-port" + TOKEN_SENDER_IP = 408, // "sender-ip" + TOKEN_SENDER_PORT = 409, // "sender-port" + TOKEN_MAX_QUEUE_SIZE = 410, // "max-queue-size" + TOKEN_NCR_PROTOCOL = 411, // "ncr-protocol" + TOKEN_NCR_FORMAT = 412, // "ncr-format" + TOKEN_OVERRIDE_NO_UPDATE = 413, // "override-no-update" + TOKEN_OVERRIDE_CLIENT_UPDATE = 414, // "override-client-update" + TOKEN_REPLACE_CLIENT_NAME = 415, // "replace-client-name" + TOKEN_GENERATED_PREFIX = 416, // "generated-prefix" + TOKEN_UDP = 417, // "UDP" + TOKEN_TCP = 418, // "TCP" + TOKEN_JSON = 419, // "JSON" + TOKEN_WHEN_PRESENT = 420, // "when-present" + TOKEN_NEVER = 421, // "never" + TOKEN_ALWAYS = 422, // "always" + TOKEN_WHEN_NOT_PRESENT = 423, // "when-not-present" + TOKEN_HOSTNAME_CHAR_SET = 424, // "hostname-char-set" + TOKEN_HOSTNAME_CHAR_REPLACEMENT = 425, // "hostname-char-replacement" + TOKEN_LOGGING = 426, // "Logging" + TOKEN_LOGGERS = 427, // "loggers" + TOKEN_OUTPUT_OPTIONS = 428, // "output_options" + TOKEN_OUTPUT = 429, // "output" + TOKEN_DEBUGLEVEL = 430, // "debuglevel" + TOKEN_SEVERITY = 431, // "severity" + TOKEN_FLUSH = 432, // "flush" + TOKEN_MAXSIZE = 433, // "maxsize" + TOKEN_MAXVER = 434, // "maxver" + TOKEN_PATTERN = 435, // "pattern" + TOKEN_DHCP4 = 436, // "Dhcp4" + TOKEN_DHCPDDNS = 437, // "DhcpDdns" + TOKEN_CONTROL_AGENT = 438, // "Control-agent" + TOKEN_TOPLEVEL_JSON = 439, // TOPLEVEL_JSON + TOKEN_TOPLEVEL_DHCP6 = 440, // TOPLEVEL_DHCP6 + TOKEN_SUB_DHCP6 = 441, // SUB_DHCP6 + TOKEN_SUB_INTERFACES6 = 442, // SUB_INTERFACES6 + TOKEN_SUB_SUBNET6 = 443, // SUB_SUBNET6 + TOKEN_SUB_POOL6 = 444, // SUB_POOL6 + TOKEN_SUB_PD_POOL = 445, // SUB_PD_POOL + TOKEN_SUB_RESERVATION = 446, // SUB_RESERVATION + TOKEN_SUB_OPTION_DEFS = 447, // SUB_OPTION_DEFS + TOKEN_SUB_OPTION_DEF = 448, // SUB_OPTION_DEF + TOKEN_SUB_OPTION_DATA = 449, // SUB_OPTION_DATA + TOKEN_SUB_HOOKS_LIBRARY = 450, // SUB_HOOKS_LIBRARY + TOKEN_SUB_DHCP_DDNS = 451, // SUB_DHCP_DDNS + TOKEN_SUB_LOGGING = 452, // SUB_LOGGING + TOKEN_SUB_CONFIG_CONTROL = 453, // SUB_CONFIG_CONTROL + TOKEN_STRING = 454, // "constant string" + TOKEN_INTEGER = 455, // "integer" + TOKEN_FLOAT = 456, // "floating point" + TOKEN_BOOLEAN = 457 // "boolean" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 203, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_COMMA = 3, // "," + S_COLON = 4, // ":" + S_LSQUARE_BRACKET = 5, // "[" + S_RSQUARE_BRACKET = 6, // "]" + S_LCURLY_BRACKET = 7, // "{" + S_RCURLY_BRACKET = 8, // "}" + S_NULL_TYPE = 9, // "null" + S_DHCP6 = 10, // "Dhcp6" + S_DATA_DIRECTORY = 11, // "data-directory" + S_CONFIG_CONTROL = 12, // "config-control" + S_CONFIG_DATABASES = 13, // "config-databases" + S_CONFIG_FETCH_WAIT_TIME = 14, // "config-fetch-wait-time" + S_INTERFACES_CONFIG = 15, // "interfaces-config" + S_INTERFACES = 16, // "interfaces" + S_RE_DETECT = 17, // "re-detect" + S_LEASE_DATABASE = 18, // "lease-database" + S_HOSTS_DATABASE = 19, // "hosts-database" + S_HOSTS_DATABASES = 20, // "hosts-databases" + S_TYPE = 21, // "type" + S_MEMFILE = 22, // "memfile" + S_MYSQL = 23, // "mysql" + S_POSTGRESQL = 24, // "postgresql" + S_CQL = 25, // "cql" + S_USER = 26, // "user" + S_PASSWORD = 27, // "password" + S_HOST = 28, // "host" + S_PORT = 29, // "port" + S_PERSIST = 30, // "persist" + S_LFC_INTERVAL = 31, // "lfc-interval" + S_READONLY = 32, // "readonly" + S_CONNECT_TIMEOUT = 33, // "connect-timeout" + S_CONTACT_POINTS = 34, // "contact-points" + S_MAX_RECONNECT_TRIES = 35, // "max-reconnect-tries" + S_RECONNECT_WAIT_TIME = 36, // "reconnect-wait-time" + S_KEYSPACE = 37, // "keyspace" + S_CONSISTENCY = 38, // "consistency" + S_SERIAL_CONSISTENCY = 39, // "serial-consistency" + S_REQUEST_TIMEOUT = 40, // "request-timeout" + S_TCP_KEEPALIVE = 41, // "tcp-keepalive" + S_TCP_NODELAY = 42, // "tcp-nodelay" + S_MAX_ROW_ERRORS = 43, // "max-row-errors" + S_PREFERRED_LIFETIME = 44, // "preferred-lifetime" + S_MIN_PREFERRED_LIFETIME = 45, // "min-preferred-lifetime" + S_MAX_PREFERRED_LIFETIME = 46, // "max-preferred-lifetime" + S_VALID_LIFETIME = 47, // "valid-lifetime" + S_MIN_VALID_LIFETIME = 48, // "min-valid-lifetime" + S_MAX_VALID_LIFETIME = 49, // "max-valid-lifetime" + S_RENEW_TIMER = 50, // "renew-timer" + S_REBIND_TIMER = 51, // "rebind-timer" + S_CALCULATE_TEE_TIMES = 52, // "calculate-tee-times" + S_T1_PERCENT = 53, // "t1-percent" + S_T2_PERCENT = 54, // "t2-percent" + S_DECLINE_PROBATION_PERIOD = 55, // "decline-probation-period" + S_SERVER_TAG = 56, // "server-tag" + S_STATISTIC_DEFAULT_SAMPLE_COUNT = 57, // "statistic-default-sample-count" + S_STATISTIC_DEFAULT_SAMPLE_AGE = 58, // "statistic-default-sample-age" + S_DDNS_SEND_UPDATES = 59, // "ddns-send-updates" + S_DDNS_OVERRIDE_NO_UPDATE = 60, // "ddns-override-no-update" + S_DDNS_OVERRIDE_CLIENT_UPDATE = 61, // "ddns-override-client-update" + S_DDNS_REPLACE_CLIENT_NAME = 62, // "ddns-replace-client-name" + S_DDNS_GENERATED_PREFIX = 63, // "ddns-generated-prefix" + S_DDNS_QUALIFYING_SUFFIX = 64, // "ddns-qualifying-suffix" + S_STORE_EXTENDED_INFO = 65, // "store-extended-info" + S_SUBNET6 = 66, // "subnet6" + S_OPTION_DEF = 67, // "option-def" + S_OPTION_DATA = 68, // "option-data" + S_NAME = 69, // "name" + S_DATA = 70, // "data" + S_CODE = 71, // "code" + S_SPACE = 72, // "space" + S_CSV_FORMAT = 73, // "csv-format" + S_ALWAYS_SEND = 74, // "always-send" + S_RECORD_TYPES = 75, // "record-types" + S_ENCAPSULATE = 76, // "encapsulate" + S_ARRAY = 77, // "array" + S_POOLS = 78, // "pools" + S_POOL = 79, // "pool" + S_PD_POOLS = 80, // "pd-pools" + S_PREFIX = 81, // "prefix" + S_PREFIX_LEN = 82, // "prefix-len" + S_EXCLUDED_PREFIX = 83, // "excluded-prefix" + S_EXCLUDED_PREFIX_LEN = 84, // "excluded-prefix-len" + S_DELEGATED_LEN = 85, // "delegated-len" + S_USER_CONTEXT = 86, // "user-context" + S_COMMENT = 87, // "comment" + S_SUBNET = 88, // "subnet" + S_INTERFACE = 89, // "interface" + S_INTERFACE_ID = 90, // "interface-id" + S_ID = 91, // "id" + S_RAPID_COMMIT = 92, // "rapid-commit" + S_RESERVATION_MODE = 93, // "reservation-mode" + S_DISABLED = 94, // "disabled" + S_OUT_OF_POOL = 95, // "out-of-pool" + S_GLOBAL = 96, // "global" + S_ALL = 97, // "all" + S_SHARED_NETWORKS = 98, // "shared-networks" + S_MAC_SOURCES = 99, // "mac-sources" + S_RELAY_SUPPLIED_OPTIONS = 100, // "relay-supplied-options" + S_HOST_RESERVATION_IDENTIFIERS = 101, // "host-reservation-identifiers" + S_SANITY_CHECKS = 102, // "sanity-checks" + S_LEASE_CHECKS = 103, // "lease-checks" + S_CLIENT_CLASSES = 104, // "client-classes" + S_REQUIRE_CLIENT_CLASSES = 105, // "require-client-classes" + S_TEST = 106, // "test" + S_ONLY_IF_REQUIRED = 107, // "only-if-required" + S_CLIENT_CLASS = 108, // "client-class" + S_RESERVATIONS = 109, // "reservations" + S_IP_ADDRESSES = 110, // "ip-addresses" + S_PREFIXES = 111, // "prefixes" + S_DUID = 112, // "duid" + S_HW_ADDRESS = 113, // "hw-address" + S_HOSTNAME = 114, // "hostname" + S_FLEX_ID = 115, // "flex-id" + S_RELAY = 116, // "relay" + S_IP_ADDRESS = 117, // "ip-address" + S_HOOKS_LIBRARIES = 118, // "hooks-libraries" + S_LIBRARY = 119, // "library" + S_PARAMETERS = 120, // "parameters" + S_EXPIRED_LEASES_PROCESSING = 121, // "expired-leases-processing" + S_RECLAIM_TIMER_WAIT_TIME = 122, // "reclaim-timer-wait-time" + S_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 123, // "flush-reclaimed-timer-wait-time" + S_HOLD_RECLAIMED_TIME = 124, // "hold-reclaimed-time" + S_MAX_RECLAIM_LEASES = 125, // "max-reclaim-leases" + S_MAX_RECLAIM_TIME = 126, // "max-reclaim-time" + S_UNWARNED_RECLAIM_CYCLES = 127, // "unwarned-reclaim-cycles" + S_SERVER_ID = 128, // "server-id" + S_LLT = 129, // "LLT" + S_EN = 130, // "EN" + S_LL = 131, // "LL" + S_IDENTIFIER = 132, // "identifier" + S_HTYPE = 133, // "htype" + S_TIME = 134, // "time" + S_ENTERPRISE_ID = 135, // "enterprise-id" + S_DHCP4O6_PORT = 136, // "dhcp4o6-port" + S_DHCP_MULTI_THREADING = 137, // "multi-threading" + S_ENABLE_MULTI_THREADING = 138, // "enable-multi-threading" + S_THREAD_POOL_SIZE = 139, // "thread-pool-size" + S_PACKET_QUEUE_SIZE = 140, // "packet-queue-size" + S_CONTROL_SOCKET = 141, // "control-socket" + S_SOCKET_TYPE = 142, // "socket-type" + S_SOCKET_NAME = 143, // "socket-name" + S_DHCP_QUEUE_CONTROL = 144, // "dhcp-queue-control" + S_ENABLE_QUEUE = 145, // "enable-queue" + S_QUEUE_TYPE = 146, // "queue-type" + S_CAPACITY = 147, // "capacity" + S_DHCP_DDNS = 148, // "dhcp-ddns" + S_ENABLE_UPDATES = 149, // "enable-updates" + S_QUALIFYING_SUFFIX = 150, // "qualifying-suffix" + S_SERVER_IP = 151, // "server-ip" + S_SERVER_PORT = 152, // "server-port" + S_SENDER_IP = 153, // "sender-ip" + S_SENDER_PORT = 154, // "sender-port" + S_MAX_QUEUE_SIZE = 155, // "max-queue-size" + S_NCR_PROTOCOL = 156, // "ncr-protocol" + S_NCR_FORMAT = 157, // "ncr-format" + S_OVERRIDE_NO_UPDATE = 158, // "override-no-update" + S_OVERRIDE_CLIENT_UPDATE = 159, // "override-client-update" + S_REPLACE_CLIENT_NAME = 160, // "replace-client-name" + S_GENERATED_PREFIX = 161, // "generated-prefix" + S_UDP = 162, // "UDP" + S_TCP = 163, // "TCP" + S_JSON = 164, // "JSON" + S_WHEN_PRESENT = 165, // "when-present" + S_NEVER = 166, // "never" + S_ALWAYS = 167, // "always" + S_WHEN_NOT_PRESENT = 168, // "when-not-present" + S_HOSTNAME_CHAR_SET = 169, // "hostname-char-set" + S_HOSTNAME_CHAR_REPLACEMENT = 170, // "hostname-char-replacement" + S_LOGGING = 171, // "Logging" + S_LOGGERS = 172, // "loggers" + S_OUTPUT_OPTIONS = 173, // "output_options" + S_OUTPUT = 174, // "output" + S_DEBUGLEVEL = 175, // "debuglevel" + S_SEVERITY = 176, // "severity" + S_FLUSH = 177, // "flush" + S_MAXSIZE = 178, // "maxsize" + S_MAXVER = 179, // "maxver" + S_PATTERN = 180, // "pattern" + S_DHCP4 = 181, // "Dhcp4" + S_DHCPDDNS = 182, // "DhcpDdns" + S_CONTROL_AGENT = 183, // "Control-agent" + S_TOPLEVEL_JSON = 184, // TOPLEVEL_JSON + S_TOPLEVEL_DHCP6 = 185, // TOPLEVEL_DHCP6 + S_SUB_DHCP6 = 186, // SUB_DHCP6 + S_SUB_INTERFACES6 = 187, // SUB_INTERFACES6 + S_SUB_SUBNET6 = 188, // SUB_SUBNET6 + S_SUB_POOL6 = 189, // SUB_POOL6 + S_SUB_PD_POOL = 190, // SUB_PD_POOL + S_SUB_RESERVATION = 191, // SUB_RESERVATION + S_SUB_OPTION_DEFS = 192, // SUB_OPTION_DEFS + S_SUB_OPTION_DEF = 193, // SUB_OPTION_DEF + S_SUB_OPTION_DATA = 194, // SUB_OPTION_DATA + S_SUB_HOOKS_LIBRARY = 195, // SUB_HOOKS_LIBRARY + S_SUB_DHCP_DDNS = 196, // SUB_DHCP_DDNS + S_SUB_LOGGING = 197, // SUB_LOGGING + S_SUB_CONFIG_CONTROL = 198, // SUB_CONFIG_CONTROL + S_STRING = 199, // "constant string" + S_INTEGER = 200, // "integer" + S_FLOAT = 201, // "floating point" + S_BOOLEAN = 202, // "boolean" + S_YYACCEPT = 203, // $accept + S_start = 204, // start + S_205_1 = 205, // $@1 + S_206_2 = 206, // $@2 + S_207_3 = 207, // $@3 + S_208_4 = 208, // $@4 + S_209_5 = 209, // $@5 + S_210_6 = 210, // $@6 + S_211_7 = 211, // $@7 + S_212_8 = 212, // $@8 + S_213_9 = 213, // $@9 + S_214_10 = 214, // $@10 + S_215_11 = 215, // $@11 + S_216_12 = 216, // $@12 + S_217_13 = 217, // $@13 + S_218_14 = 218, // $@14 + S_219_15 = 219, // $@15 + S_value = 220, // value + S_sub_json = 221, // sub_json + S_map2 = 222, // map2 + S_223_16 = 223, // $@16 + S_map_value = 224, // map_value + S_map_content = 225, // map_content + S_not_empty_map = 226, // not_empty_map + S_list_generic = 227, // list_generic + S_228_17 = 228, // $@17 + S_list_content = 229, // list_content + S_not_empty_list = 230, // not_empty_list + S_list_strings = 231, // list_strings + S_232_18 = 232, // $@18 + S_list_strings_content = 233, // list_strings_content + S_not_empty_list_strings = 234, // not_empty_list_strings + S_unknown_map_entry = 235, // unknown_map_entry + S_syntax_map = 236, // syntax_map + S_237_19 = 237, // $@19 + S_global_objects = 238, // global_objects + S_global_object = 239, // global_object + S_dhcp6_object = 240, // dhcp6_object + S_241_20 = 241, // $@20 + S_sub_dhcp6 = 242, // sub_dhcp6 + S_243_21 = 243, // $@21 + S_global_params = 244, // global_params + S_global_param = 245, // global_param + S_data_directory = 246, // data_directory + S_247_22 = 247, // $@22 + S_preferred_lifetime = 248, // preferred_lifetime + S_min_preferred_lifetime = 249, // min_preferred_lifetime + S_max_preferred_lifetime = 250, // max_preferred_lifetime + S_valid_lifetime = 251, // valid_lifetime + S_min_valid_lifetime = 252, // min_valid_lifetime + S_max_valid_lifetime = 253, // max_valid_lifetime + S_renew_timer = 254, // renew_timer + S_rebind_timer = 255, // rebind_timer + S_calculate_tee_times = 256, // calculate_tee_times + S_t1_percent = 257, // t1_percent + S_t2_percent = 258, // t2_percent + S_decline_probation_period = 259, // decline_probation_period + S_ddns_send_updates = 260, // ddns_send_updates + S_ddns_override_no_update = 261, // ddns_override_no_update + S_ddns_override_client_update = 262, // ddns_override_client_update + S_ddns_replace_client_name = 263, // ddns_replace_client_name + S_264_23 = 264, // $@23 + S_ddns_replace_client_name_value = 265, // ddns_replace_client_name_value + S_ddns_generated_prefix = 266, // ddns_generated_prefix + S_267_24 = 267, // $@24 + S_ddns_qualifying_suffix = 268, // ddns_qualifying_suffix + S_269_25 = 269, // $@25 + S_hostname_char_set = 270, // hostname_char_set + S_271_26 = 271, // $@26 + S_hostname_char_replacement = 272, // hostname_char_replacement + S_273_27 = 273, // $@27 + S_store_extended_info = 274, // store_extended_info + S_statistic_default_sample_count = 275, // statistic_default_sample_count + S_statistic_default_sample_age = 276, // statistic_default_sample_age + S_server_tag = 277, // server_tag + S_278_28 = 278, // $@28 + S_interfaces_config = 279, // interfaces_config + S_280_29 = 280, // $@29 + S_sub_interfaces6 = 281, // sub_interfaces6 + S_282_30 = 282, // $@30 + S_interfaces_config_params = 283, // interfaces_config_params + S_interfaces_config_param = 284, // interfaces_config_param + S_interfaces_list = 285, // interfaces_list + S_286_31 = 286, // $@31 + S_re_detect = 287, // re_detect + S_lease_database = 288, // lease_database + S_289_32 = 289, // $@32 + S_hosts_database = 290, // hosts_database + S_291_33 = 291, // $@33 + S_hosts_databases = 292, // hosts_databases + S_293_34 = 293, // $@34 + S_database_list = 294, // database_list + S_not_empty_database_list = 295, // not_empty_database_list + S_database = 296, // database + S_297_35 = 297, // $@35 + S_database_map_params = 298, // database_map_params + S_database_map_param = 299, // database_map_param + S_database_type = 300, // database_type + S_301_36 = 301, // $@36 + S_db_type = 302, // db_type + S_user = 303, // user + S_304_37 = 304, // $@37 + S_password = 305, // password + S_306_38 = 306, // $@38 + S_host = 307, // host + S_308_39 = 308, // $@39 + S_port = 309, // port + S_name = 310, // name + S_311_40 = 311, // $@40 + S_persist = 312, // persist + S_lfc_interval = 313, // lfc_interval + S_readonly = 314, // readonly + S_connect_timeout = 315, // connect_timeout + S_reconnect_wait_time = 316, // reconnect_wait_time + S_max_row_errors = 317, // max_row_errors + S_request_timeout = 318, // request_timeout + S_tcp_keepalive = 319, // tcp_keepalive + S_tcp_nodelay = 320, // tcp_nodelay + S_contact_points = 321, // contact_points + S_322_41 = 322, // $@41 + S_max_reconnect_tries = 323, // max_reconnect_tries + S_keyspace = 324, // keyspace + S_325_42 = 325, // $@42 + S_consistency = 326, // consistency + S_327_43 = 327, // $@43 + S_serial_consistency = 328, // serial_consistency + S_329_44 = 329, // $@44 + S_sanity_checks = 330, // sanity_checks + S_331_45 = 331, // $@45 + S_sanity_checks_params = 332, // sanity_checks_params + S_sanity_checks_param = 333, // sanity_checks_param + S_lease_checks = 334, // lease_checks + S_335_46 = 335, // $@46 + S_mac_sources = 336, // mac_sources + S_337_47 = 337, // $@47 + S_mac_sources_list = 338, // mac_sources_list + S_mac_sources_value = 339, // mac_sources_value + S_duid_id = 340, // duid_id + S_string_id = 341, // string_id + S_host_reservation_identifiers = 342, // host_reservation_identifiers + S_343_48 = 343, // $@48 + S_host_reservation_identifiers_list = 344, // host_reservation_identifiers_list + S_host_reservation_identifier = 345, // host_reservation_identifier + S_hw_address_id = 346, // hw_address_id + S_flex_id = 347, // flex_id + S_relay_supplied_options = 348, // relay_supplied_options + S_349_49 = 349, // $@49 + S_dhcp_multi_threading = 350, // dhcp_multi_threading + S_351_50 = 351, // $@50 + S_multi_threading_params = 352, // multi_threading_params + S_multi_threading_param = 353, // multi_threading_param + S_enable_multi_threading = 354, // enable_multi_threading + S_thread_pool_size = 355, // thread_pool_size + S_packet_queue_size = 356, // packet_queue_size + S_hooks_libraries = 357, // hooks_libraries + S_358_51 = 358, // $@51 + S_hooks_libraries_list = 359, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 360, // not_empty_hooks_libraries_list + S_hooks_library = 361, // hooks_library + S_362_52 = 362, // $@52 + S_sub_hooks_library = 363, // sub_hooks_library + S_364_53 = 364, // $@53 + S_hooks_params = 365, // hooks_params + S_hooks_param = 366, // hooks_param + S_library = 367, // library + S_368_54 = 368, // $@54 + S_parameters = 369, // parameters + S_370_55 = 370, // $@55 + S_expired_leases_processing = 371, // expired_leases_processing + S_372_56 = 372, // $@56 + S_expired_leases_params = 373, // expired_leases_params + S_expired_leases_param = 374, // expired_leases_param + S_reclaim_timer_wait_time = 375, // reclaim_timer_wait_time + S_flush_reclaimed_timer_wait_time = 376, // flush_reclaimed_timer_wait_time + S_hold_reclaimed_time = 377, // hold_reclaimed_time + S_max_reclaim_leases = 378, // max_reclaim_leases + S_max_reclaim_time = 379, // max_reclaim_time + S_unwarned_reclaim_cycles = 380, // unwarned_reclaim_cycles + S_subnet6_list = 381, // subnet6_list + S_382_57 = 382, // $@57 + S_subnet6_list_content = 383, // subnet6_list_content + S_not_empty_subnet6_list = 384, // not_empty_subnet6_list + S_subnet6 = 385, // subnet6 + S_386_58 = 386, // $@58 + S_sub_subnet6 = 387, // sub_subnet6 + S_388_59 = 388, // $@59 + S_subnet6_params = 389, // subnet6_params + S_subnet6_param = 390, // subnet6_param + S_subnet = 391, // subnet + S_392_60 = 392, // $@60 + S_interface = 393, // interface + S_394_61 = 394, // $@61 + S_interface_id = 395, // interface_id + S_396_62 = 396, // $@62 + S_client_class = 397, // client_class + S_398_63 = 398, // $@63 + S_require_client_classes = 399, // require_client_classes + S_400_64 = 400, // $@64 + S_reservation_mode = 401, // reservation_mode + S_402_65 = 402, // $@65 + S_hr_mode = 403, // hr_mode + S_id = 404, // id + S_rapid_commit = 405, // rapid_commit + S_shared_networks = 406, // shared_networks + S_407_66 = 407, // $@66 + S_shared_networks_content = 408, // shared_networks_content + S_shared_networks_list = 409, // shared_networks_list + S_shared_network = 410, // shared_network + S_411_67 = 411, // $@67 + S_shared_network_params = 412, // shared_network_params + S_shared_network_param = 413, // shared_network_param + S_option_def_list = 414, // option_def_list + S_415_68 = 415, // $@68 + S_sub_option_def_list = 416, // sub_option_def_list + S_417_69 = 417, // $@69 + S_option_def_list_content = 418, // option_def_list_content + S_not_empty_option_def_list = 419, // not_empty_option_def_list + S_option_def_entry = 420, // option_def_entry + S_421_70 = 421, // $@70 + S_sub_option_def = 422, // sub_option_def + S_423_71 = 423, // $@71 + S_option_def_params = 424, // option_def_params + S_not_empty_option_def_params = 425, // not_empty_option_def_params + S_option_def_param = 426, // option_def_param + S_option_def_name = 427, // option_def_name + S_code = 428, // code + S_option_def_code = 429, // option_def_code + S_option_def_type = 430, // option_def_type + S_431_72 = 431, // $@72 + S_option_def_record_types = 432, // option_def_record_types + S_433_73 = 433, // $@73 + S_space = 434, // space + S_435_74 = 435, // $@74 + S_option_def_space = 436, // option_def_space + S_option_def_encapsulate = 437, // option_def_encapsulate + S_438_75 = 438, // $@75 + S_option_def_array = 439, // option_def_array + S_option_data_list = 440, // option_data_list + S_441_76 = 441, // $@76 + S_option_data_list_content = 442, // option_data_list_content + S_not_empty_option_data_list = 443, // not_empty_option_data_list + S_option_data_entry = 444, // option_data_entry + S_445_77 = 445, // $@77 + S_sub_option_data = 446, // sub_option_data + S_447_78 = 447, // $@78 + S_option_data_params = 448, // option_data_params + S_not_empty_option_data_params = 449, // not_empty_option_data_params + S_option_data_param = 450, // option_data_param + S_option_data_name = 451, // option_data_name + S_option_data_data = 452, // option_data_data + S_453_79 = 453, // $@79 + S_option_data_code = 454, // option_data_code + S_option_data_space = 455, // option_data_space + S_option_data_csv_format = 456, // option_data_csv_format + S_option_data_always_send = 457, // option_data_always_send + S_pools_list = 458, // pools_list + S_459_80 = 459, // $@80 + S_pools_list_content = 460, // pools_list_content + S_not_empty_pools_list = 461, // not_empty_pools_list + S_pool_list_entry = 462, // pool_list_entry + S_463_81 = 463, // $@81 + S_sub_pool6 = 464, // sub_pool6 + S_465_82 = 465, // $@82 + S_pool_params = 466, // pool_params + S_pool_param = 467, // pool_param + S_pool_entry = 468, // pool_entry + S_469_83 = 469, // $@83 + S_user_context = 470, // user_context + S_471_84 = 471, // $@84 + S_comment = 472, // comment + S_473_85 = 473, // $@85 + S_pd_pools_list = 474, // pd_pools_list + S_475_86 = 475, // $@86 + S_pd_pools_list_content = 476, // pd_pools_list_content + S_not_empty_pd_pools_list = 477, // not_empty_pd_pools_list + S_pd_pool_entry = 478, // pd_pool_entry + S_479_87 = 479, // $@87 + S_sub_pd_pool = 480, // sub_pd_pool + S_481_88 = 481, // $@88 + S_pd_pool_params = 482, // pd_pool_params + S_pd_pool_param = 483, // pd_pool_param + S_pd_prefix = 484, // pd_prefix + S_485_89 = 485, // $@89 + S_pd_prefix_len = 486, // pd_prefix_len + S_excluded_prefix = 487, // excluded_prefix + S_488_90 = 488, // $@90 + S_excluded_prefix_len = 489, // excluded_prefix_len + S_pd_delegated_len = 490, // pd_delegated_len + S_reservations = 491, // reservations + S_492_91 = 492, // $@91 + S_reservations_list = 493, // reservations_list + S_not_empty_reservations_list = 494, // not_empty_reservations_list + S_reservation = 495, // reservation + S_496_92 = 496, // $@92 + S_sub_reservation = 497, // sub_reservation + S_498_93 = 498, // $@93 + S_reservation_params = 499, // reservation_params + S_not_empty_reservation_params = 500, // not_empty_reservation_params + S_reservation_param = 501, // reservation_param + S_ip_addresses = 502, // ip_addresses + S_503_94 = 503, // $@94 + S_prefixes = 504, // prefixes + S_505_95 = 505, // $@95 + S_duid = 506, // duid + S_507_96 = 507, // $@96 + S_hw_address = 508, // hw_address + S_509_97 = 509, // $@97 + S_hostname = 510, // hostname + S_511_98 = 511, // $@98 + S_flex_id_value = 512, // flex_id_value + S_513_99 = 513, // $@99 + S_reservation_client_classes = 514, // reservation_client_classes + S_515_100 = 515, // $@100 + S_relay = 516, // relay + S_517_101 = 517, // $@101 + S_relay_map = 518, // relay_map + S_ip_address = 519, // ip_address + S_520_102 = 520, // $@102 + S_client_classes = 521, // client_classes + S_522_103 = 522, // $@103 + S_client_classes_list = 523, // client_classes_list + S_client_class_entry = 524, // client_class_entry + S_525_104 = 525, // $@104 + S_client_class_params = 526, // client_class_params + S_not_empty_client_class_params = 527, // not_empty_client_class_params + S_client_class_param = 528, // client_class_param + S_client_class_name = 529, // client_class_name + S_client_class_test = 530, // client_class_test + S_531_105 = 531, // $@105 + S_only_if_required = 532, // only_if_required + S_server_id = 533, // server_id + S_534_106 = 534, // $@106 + S_server_id_params = 535, // server_id_params + S_server_id_param = 536, // server_id_param + S_server_id_type = 537, // server_id_type + S_538_107 = 538, // $@107 + S_duid_type = 539, // duid_type + S_htype = 540, // htype + S_identifier = 541, // identifier + S_542_108 = 542, // $@108 + S_time = 543, // time + S_enterprise_id = 544, // enterprise_id + S_dhcp4o6_port = 545, // dhcp4o6_port + S_control_socket = 546, // control_socket + S_547_109 = 547, // $@109 + S_control_socket_params = 548, // control_socket_params + S_control_socket_param = 549, // control_socket_param + S_socket_type = 550, // socket_type + S_551_110 = 551, // $@110 + S_socket_name = 552, // socket_name + S_553_111 = 553, // $@111 + S_dhcp_queue_control = 554, // dhcp_queue_control + S_555_112 = 555, // $@112 + S_queue_control_params = 556, // queue_control_params + S_queue_control_param = 557, // queue_control_param + S_enable_queue = 558, // enable_queue + S_queue_type = 559, // queue_type + S_560_113 = 560, // $@113 + S_capacity = 561, // capacity + S_arbitrary_map_entry = 562, // arbitrary_map_entry + S_563_114 = 563, // $@114 + S_dhcp_ddns = 564, // dhcp_ddns + S_565_115 = 565, // $@115 + S_sub_dhcp_ddns = 566, // sub_dhcp_ddns + S_567_116 = 567, // $@116 + S_dhcp_ddns_params = 568, // dhcp_ddns_params + S_dhcp_ddns_param = 569, // dhcp_ddns_param + S_enable_updates = 570, // enable_updates + S_qualifying_suffix = 571, // qualifying_suffix + S_572_117 = 572, // $@117 + S_server_ip = 573, // server_ip + S_574_118 = 574, // $@118 + S_server_port = 575, // server_port + S_sender_ip = 576, // sender_ip + S_577_119 = 577, // $@119 + S_sender_port = 578, // sender_port + S_max_queue_size = 579, // max_queue_size + S_ncr_protocol = 580, // ncr_protocol + S_581_120 = 581, // $@120 + S_ncr_protocol_value = 582, // ncr_protocol_value + S_ncr_format = 583, // ncr_format + S_584_121 = 584, // $@121 + S_dep_override_no_update = 585, // dep_override_no_update + S_dep_override_client_update = 586, // dep_override_client_update + S_dep_replace_client_name = 587, // dep_replace_client_name + S_588_122 = 588, // $@122 + S_dep_generated_prefix = 589, // dep_generated_prefix + S_590_123 = 590, // $@123 + S_dep_hostname_char_set = 591, // dep_hostname_char_set + S_592_124 = 592, // $@124 + S_dep_hostname_char_replacement = 593, // dep_hostname_char_replacement + S_594_125 = 594, // $@125 + S_dhcp4_json_object = 595, // dhcp4_json_object + S_596_126 = 596, // $@126 + S_dhcpddns_json_object = 597, // dhcpddns_json_object + S_598_127 = 598, // $@127 + S_control_agent_json_object = 599, // control_agent_json_object + S_600_128 = 600, // $@128 + S_config_control = 601, // config_control + S_602_129 = 602, // $@129 + S_sub_config_control = 603, // sub_config_control + S_604_130 = 604, // $@130 + S_config_control_params = 605, // config_control_params + S_config_control_param = 606, // config_control_param + S_config_databases = 607, // config_databases + S_608_131 = 608, // $@131 + S_config_fetch_wait_time = 609, // config_fetch_wait_time + S_logging_object = 610, // logging_object + S_611_132 = 611, // $@132 + S_sub_logging = 612, // sub_logging + S_613_133 = 613, // $@133 + S_logging_params = 614, // logging_params + S_logging_param = 615, // logging_param + S_loggers = 616, // loggers + S_617_134 = 617, // $@134 + S_loggers_entries = 618, // loggers_entries + S_logger_entry = 619, // logger_entry + S_620_135 = 620, // $@135 + S_logger_params = 621, // logger_params + S_logger_param = 622, // logger_param + S_debuglevel = 623, // debuglevel + S_severity = 624, // severity + S_625_136 = 625, // $@136 + S_output_options_list = 626, // output_options_list + S_627_137 = 627, // $@137 + S_output_options_list_content = 628, // output_options_list_content + S_output_entry = 629, // output_entry + S_630_138 = 630, // $@138 + S_output_params_list = 631, // output_params_list + S_output_params = 632, // output_params + S_output = 633, // output + S_634_139 = 634, // $@139 + S_flush = 635, // flush + S_maxsize = 636, // maxsize + S_maxver = 637, // maxver + S_pattern = 638, // pattern + S_639_140 = 639 // $@140 + }; + }; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef unsigned char token_number_type; + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -706,7 +1372,44 @@ namespace isc { namespace dhcp { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 220: // value + case 224: // map_value + case 265: // ddns_replace_client_name_value + case 302: // db_type + case 403: // hr_mode + case 539: // duid_type + case 582: // ncr_protocol_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case 202: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case 201: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case 200: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case 199: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -800,17 +1503,17 @@ namespace isc { namespace dhcp { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 220: // value case 224: // map_value @@ -845,6 +1548,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return Dhcp6Parser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -865,46 +1577,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -914,13 +1631,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DATA_DIRECTORY || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_MIN_PREFERRED_LIFETIME || tok == token::TOKEN_MAX_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_PARSER6_error || tok == token::TOKEN_PARSER6_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DATA_DIRECTORY || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_MIN_PREFERRED_LIFETIME || tok == token::TOKEN_MAX_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DATA_DIRECTORY || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_MIN_PREFERRED_LIFETIME || tok == token::TOKEN_MAX_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_PARSER6_error || tok == token::TOKEN_PARSER6_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DATA_DIRECTORY || tok == token::TOKEN_CONFIG_CONTROL || tok == token::TOKEN_CONFIG_DATABASES || tok == token::TOKEN_CONFIG_FETCH_WAIT_TIME || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_CONSISTENCY || tok == token::TOKEN_SERIAL_CONSISTENCY || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_MIN_PREFERRED_LIFETIME || tok == token::TOKEN_MAX_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_MIN_VALID_LIFETIME || tok == token::TOKEN_MAX_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_CALCULATE_TEE_TIMES || tok == token::TOKEN_T1_PERCENT || tok == token::TOKEN_T2_PERCENT || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SERVER_TAG || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT || tok == token::TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE || tok == token::TOKEN_DDNS_SEND_UPDATES || tok == token::TOKEN_DDNS_OVERRIDE_NO_UPDATE || tok == token::TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_DDNS_REPLACE_CLIENT_NAME || tok == token::TOKEN_DDNS_GENERATED_PREFIX || tok == token::TOKEN_DDNS_QUALIFYING_SUFFIX || tok == token::TOKEN_STORE_EXTENDED_INFO || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_GLOBAL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_SANITY_CHECKS || tok == token::TOKEN_LEASE_CHECKS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_DHCP_MULTI_THREADING || tok == token::TOKEN_ENABLE_MULTI_THREADING || tok == token::TOKEN_THREAD_POOL_SIZE || tok == token::TOKEN_PACKET_QUEUE_SIZE || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_QUEUE_CONTROL || tok == token::TOKEN_ENABLE_QUEUE || tok == token::TOKEN_QUEUE_TYPE || tok == token::TOKEN_CAPACITY || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_HOSTNAME_CHAR_SET || tok == token::TOKEN_HOSTNAME_CHAR_REPLACEMENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING || tok == token::TOKEN_SUB_CONFIG_CONTROL); } #endif #if 201103L <= YY_CPLUSPLUS @@ -981,6 +1698,13 @@ switch (yytype) Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg); virtual ~Dhcp6Parser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + Dhcp6Parser (const Dhcp6Parser&) = delete; + /// Non copyable. + Dhcp6Parser& operator= (const Dhcp6Parser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -1011,6 +1735,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -1027,6 +1755,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARSER6_error (location_type l) + { + return symbol_type (token::TOKEN_PARSER6_error, std::move (l)); + } +#else + static + symbol_type + make_PARSER6_error (const location_type& l) + { + return symbol_type (token::TOKEN_PARSER6_error, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARSER6_UNDEF (location_type l) + { + return symbol_type (token::TOKEN_PARSER6_UNDEF, std::move (l)); + } +#else + static + symbol_type + make_PARSER6_UNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_PARSER6_UNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -4029,20 +4787,43 @@ switch (yytype) #endif + class context + { + public: + context (const Dhcp6Parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const Dhcp6Parser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. Dhcp6Parser (const Dhcp6Parser&); + /// Non copyable. Dhcp6Parser& operator= (const Dhcp6Parser&); +#endif + /// Stored state numbers (used for stacks). typedef short state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -4059,65 +4840,66 @@ switch (yytype) static const short yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const short yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const short yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const short yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if PARSER6_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -4138,7 +4920,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -4150,12 +4932,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -4194,8 +4976,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -4203,6 +4985,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -4253,24 +5042,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -4294,8 +5077,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -4325,33 +5112,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 1254, ///< Last index in yytable_. yynnts_ = 437, ///< Number of nonterminal symbols. - yyfinal_ = 32, ///< Termination state number. - yyntokens_ = 203 ///< Number of tokens. + yyfinal_ = 32 ///< Termination state number. }; // User arguments. isc::dhcp::Parser6Context& ctx; + }; inline - Dhcp6Parser::token_number_type + Dhcp6Parser::symbol_kind_type Dhcp6Parser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const unsigned char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -4404,63 +5186,21 @@ switch (yytype) const int user_token_number_max_ = 457; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - Dhcp6Parser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 220: // value - case 224: // map_value - case 265: // ddns_replace_client_name_value - case 302: // db_type - case 403: // hr_mode - case 539: // duid_type - case 582: // ncr_protocol_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 202: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 201: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 200: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 199: // "constant string" - value.move< std::string > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template Dhcp6Parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 220: // value case 224: // map_value @@ -4496,11 +5236,18 @@ switch (yytype) + template + Dhcp6Parser::symbol_kind_type + Dhcp6Parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool Dhcp6Parser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -4508,7 +5255,7 @@ switch (yytype) Dhcp6Parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 220: // value case 224: // map_value @@ -4543,56 +5290,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - Dhcp6Parser::by_type::by_type () - : type (empty_symbol) + Dhcp6Parser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - Dhcp6Parser::by_type::by_type (by_type&& that) - : type (that.type) + Dhcp6Parser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - Dhcp6Parser::by_type::by_type (const by_type& that) - : type (that.type) + Dhcp6Parser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - Dhcp6Parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + Dhcp6Parser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - Dhcp6Parser::by_type::clear () + Dhcp6Parser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - Dhcp6Parser::by_type::move (by_type& that) + Dhcp6Parser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - Dhcp6Parser::by_type::type_get () const YY_NOEXCEPT + Dhcp6Parser::symbol_kind_type + Dhcp6Parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + Dhcp6Parser::symbol_kind_type + Dhcp6Parser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 4596 "dhcp6_parser.h" +#line 5350 "dhcp6_parser.h" diff --git a/src/bin/dhcp6/location.hh b/src/bin/dhcp6/location.hh index fd8b306216..68aa8cdc47 100644 --- a/src/bin/dhcp6/location.hh +++ b/src/bin/dhcp6/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/bin/dhcp6/position.hh b/src/bin/dhcp6/position.hh index 8395a65672..384596b595 100644 --- a/src/bin/dhcp6/position.hh +++ b/src/bin/dhcp6/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/dhcp6/stack.hh b/src/bin/dhcp6/stack.hh index 1540faa869..8e491d3cf2 100644 --- a/src/bin/dhcp6/stack.hh +++ b/src/bin/dhcp6/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/netconf/location.hh b/src/bin/netconf/location.hh index 02d96cbb44..282d38726d 100644 --- a/src/bin/netconf/location.hh +++ b/src/bin/netconf/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/bin/netconf/netconf_parser.cc b/src/bin/netconf/netconf_parser.cc index e05b6c0a9b..9e10894f77 100644 --- a/src/bin/netconf/netconf_parser.cc +++ b/src/bin/netconf/netconf_parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ #include -#line 51 "netconf_parser.cc" +#line 52 "netconf_parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !NETCONF_DEBUG @@ -139,49 +141,7 @@ #line 14 "netconf_parser.yy" namespace isc { namespace netconf { -#line 143 "netconf_parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - NetconfParser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "netconf_parser.cc" /// Build a parser object. NetconfParser::NetconfParser (isc::netconf::ParserContext& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace netconf { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace netconf { : state (s) {} - NetconfParser::symbol_number_type - NetconfParser::by_state::type_get () const YY_NOEXCEPT + NetconfParser::symbol_kind_type + NetconfParser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } NetconfParser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace netconf { NetconfParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 58: // value case 61: // map_value @@ -284,7 +244,7 @@ namespace isc { namespace netconf { NetconfParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 58: // value case 61: // map_value @@ -313,7 +273,7 @@ namespace isc { namespace netconf { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -321,7 +281,7 @@ namespace isc { namespace netconf { NetconfParser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 58: // value case 61: // map_value @@ -357,7 +317,7 @@ namespace isc { namespace netconf { NetconfParser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 58: // value case 61: // map_value @@ -403,69 +363,67 @@ namespace isc { namespace netconf { #if NETCONF_DEBUG template void - NetconfParser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + NetconfParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 46: // "constant string" #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 427 "netconf_parser.cc" +#line 384 "netconf_parser.cc" break; case 47: // "integer" #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < int64_t > (); } -#line 433 "netconf_parser.cc" +#line 390 "netconf_parser.cc" break; case 48: // "floating point" #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < double > (); } -#line 439 "netconf_parser.cc" +#line 396 "netconf_parser.cc" break; case 49: // "boolean" #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < bool > (); } -#line 445 "netconf_parser.cc" +#line 402 "netconf_parser.cc" break; case 58: // value #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 451 "netconf_parser.cc" +#line 408 "netconf_parser.cc" break; case 61: // map_value #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 457 "netconf_parser.cc" +#line 414 "netconf_parser.cc" break; case 120: // socket_type_value #line 108 "netconf_parser.yy" { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 463 "netconf_parser.cc" +#line 420 "netconf_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -524,11 +482,11 @@ namespace isc { namespace netconf { NetconfParser::state_type NetconfParser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -588,6 +546,7 @@ namespace isc { namespace netconf { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -608,7 +567,7 @@ namespace isc { namespace netconf { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -627,10 +586,20 @@ namespace isc { namespace netconf { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -722,19 +691,19 @@ namespace isc { namespace netconf { case 2: #line 119 "netconf_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORDS; } -#line 726 "netconf_parser.cc" +#line 695 "netconf_parser.cc" break; case 4: #line 120 "netconf_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 732 "netconf_parser.cc" +#line 701 "netconf_parser.cc" break; case 6: #line 121 "netconf_parser.yy" { ctx.ctx_ = ctx.NETCONF; } -#line 738 "netconf_parser.cc" +#line 707 "netconf_parser.cc" break; case 8: @@ -744,7 +713,7 @@ namespace isc { namespace netconf { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 748 "netconf_parser.cc" +#line 717 "netconf_parser.cc" break; case 9: @@ -752,7 +721,7 @@ namespace isc { namespace netconf { { // parsing completed } -#line 756 "netconf_parser.cc" +#line 725 "netconf_parser.cc" break; case 10: @@ -761,49 +730,49 @@ namespace isc { namespace netconf { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 765 "netconf_parser.cc" +#line 734 "netconf_parser.cc" break; case 11: #line 146 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 771 "netconf_parser.cc" +#line 740 "netconf_parser.cc" break; case 12: #line 147 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 777 "netconf_parser.cc" +#line 746 "netconf_parser.cc" break; case 13: #line 148 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 783 "netconf_parser.cc" +#line 752 "netconf_parser.cc" break; case 14: #line 149 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 789 "netconf_parser.cc" +#line 758 "netconf_parser.cc" break; case 15: #line 150 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 795 "netconf_parser.cc" +#line 764 "netconf_parser.cc" break; case 16: #line 151 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 801 "netconf_parser.cc" +#line 770 "netconf_parser.cc" break; case 17: #line 152 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 807 "netconf_parser.cc" +#line 776 "netconf_parser.cc" break; case 18: @@ -814,7 +783,7 @@ namespace isc { namespace netconf { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 818 "netconf_parser.cc" +#line 787 "netconf_parser.cc" break; case 19: @@ -824,13 +793,13 @@ namespace isc { namespace netconf { // (maybe some sanity checking), this would be the best place // for it. } -#line 828 "netconf_parser.cc" +#line 797 "netconf_parser.cc" break; case 20: #line 167 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 834 "netconf_parser.cc" +#line 803 "netconf_parser.cc" break; case 23: @@ -839,7 +808,7 @@ namespace isc { namespace netconf { // map containing a single entry ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 843 "netconf_parser.cc" +#line 812 "netconf_parser.cc" break; case 24: @@ -849,7 +818,7 @@ namespace isc { namespace netconf { // comma and string:value ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 853 "netconf_parser.cc" +#line 822 "netconf_parser.cc" break; case 25: @@ -858,14 +827,14 @@ namespace isc { namespace netconf { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 862 "netconf_parser.cc" +#line 831 "netconf_parser.cc" break; case 26: #line 195 "netconf_parser.yy" { } -#line 869 "netconf_parser.cc" +#line 838 "netconf_parser.cc" break; case 29: @@ -874,7 +843,7 @@ namespace isc { namespace netconf { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 878 "netconf_parser.cc" +#line 847 "netconf_parser.cc" break; case 30: @@ -883,7 +852,7 @@ namespace isc { namespace netconf { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 887 "netconf_parser.cc" +#line 856 "netconf_parser.cc" break; case 31: @@ -894,7 +863,7 @@ namespace isc { namespace netconf { error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 898 "netconf_parser.cc" +#line 867 "netconf_parser.cc" break; case 32: @@ -905,7 +874,7 @@ namespace isc { namespace netconf { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 909 "netconf_parser.cc" +#line 878 "netconf_parser.cc" break; case 33: @@ -915,7 +884,7 @@ namespace isc { namespace netconf { // (maybe some sanity checking), this would be the best place // for it. } -#line 919 "netconf_parser.cc" +#line 888 "netconf_parser.cc" break; case 38: @@ -931,7 +900,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.NETCONF); } -#line 935 "netconf_parser.cc" +#line 904 "netconf_parser.cc" break; case 39: @@ -942,7 +911,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 946 "netconf_parser.cc" +#line 915 "netconf_parser.cc" break; case 53: @@ -951,7 +920,7 @@ namespace isc { namespace netconf { ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("boot-update", flag); } -#line 955 "netconf_parser.cc" +#line 924 "netconf_parser.cc" break; case 54: @@ -960,7 +929,7 @@ namespace isc { namespace netconf { ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subscribe-changes", flag); } -#line 964 "netconf_parser.cc" +#line 933 "netconf_parser.cc" break; case 55: @@ -969,7 +938,7 @@ namespace isc { namespace netconf { ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("validate-changes", flag); } -#line 973 "netconf_parser.cc" +#line 942 "netconf_parser.cc" break; case 56: @@ -977,7 +946,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 981 "netconf_parser.cc" +#line 950 "netconf_parser.cc" break; case 57: @@ -1004,7 +973,7 @@ namespace isc { namespace netconf { parent->set("user-context", user_context); ctx.leave(); } -#line 1008 "netconf_parser.cc" +#line 977 "netconf_parser.cc" break; case 58: @@ -1012,7 +981,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1016 "netconf_parser.cc" +#line 985 "netconf_parser.cc" break; case 59: @@ -1041,7 +1010,7 @@ namespace isc { namespace netconf { parent->set("user-context", user_context); ctx.leave(); } -#line 1045 "netconf_parser.cc" +#line 1014 "netconf_parser.cc" break; case 60: @@ -1052,7 +1021,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 1056 "netconf_parser.cc" +#line 1025 "netconf_parser.cc" break; case 61: @@ -1061,7 +1030,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1065 "netconf_parser.cc" +#line 1034 "netconf_parser.cc" break; case 66: @@ -1071,7 +1040,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1075 "netconf_parser.cc" +#line 1044 "netconf_parser.cc" break; case 67: @@ -1079,7 +1048,7 @@ namespace isc { namespace netconf { { ctx.stack_.pop_back(); } -#line 1083 "netconf_parser.cc" +#line 1052 "netconf_parser.cc" break; case 73: @@ -1087,7 +1056,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1091 "netconf_parser.cc" +#line 1060 "netconf_parser.cc" break; case 74: @@ -1097,7 +1066,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 1101 "netconf_parser.cc" +#line 1070 "netconf_parser.cc" break; case 75: @@ -1105,7 +1074,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1109 "netconf_parser.cc" +#line 1078 "netconf_parser.cc" break; case 76: @@ -1114,7 +1083,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1118 "netconf_parser.cc" +#line 1087 "netconf_parser.cc" break; case 77: @@ -1125,7 +1094,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.MANAGED_SERVERS); } -#line 1129 "netconf_parser.cc" +#line 1098 "netconf_parser.cc" break; case 78: @@ -1134,7 +1103,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1138 "netconf_parser.cc" +#line 1107 "netconf_parser.cc" break; case 88: @@ -1145,7 +1114,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1149 "netconf_parser.cc" +#line 1118 "netconf_parser.cc" break; case 89: @@ -1154,7 +1123,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1158 "netconf_parser.cc" +#line 1127 "netconf_parser.cc" break; case 90: @@ -1165,7 +1134,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1169 "netconf_parser.cc" +#line 1138 "netconf_parser.cc" break; case 91: @@ -1174,7 +1143,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1178 "netconf_parser.cc" +#line 1147 "netconf_parser.cc" break; case 92: @@ -1185,7 +1154,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1189 "netconf_parser.cc" +#line 1158 "netconf_parser.cc" break; case 93: @@ -1194,7 +1163,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1198 "netconf_parser.cc" +#line 1167 "netconf_parser.cc" break; case 94: @@ -1205,7 +1174,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1209 "netconf_parser.cc" +#line 1178 "netconf_parser.cc" break; case 95: @@ -1214,7 +1183,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1218 "netconf_parser.cc" +#line 1187 "netconf_parser.cc" break; case 106: @@ -1222,7 +1191,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1226 "netconf_parser.cc" +#line 1195 "netconf_parser.cc" break; case 107: @@ -1232,7 +1201,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("model", model); ctx.leave(); } -#line 1236 "netconf_parser.cc" +#line 1205 "netconf_parser.cc" break; case 108: @@ -1243,7 +1212,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 1247 "netconf_parser.cc" +#line 1216 "netconf_parser.cc" break; case 109: @@ -1252,7 +1221,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1256 "netconf_parser.cc" +#line 1225 "netconf_parser.cc" break; case 118: @@ -1260,7 +1229,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.SOCKET_TYPE); } -#line 1264 "netconf_parser.cc" +#line 1233 "netconf_parser.cc" break; case 119: @@ -1269,25 +1238,25 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1273 "netconf_parser.cc" +#line 1242 "netconf_parser.cc" break; case 120: #line 537 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); } -#line 1279 "netconf_parser.cc" +#line 1248 "netconf_parser.cc" break; case 121: #line 538 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); } -#line 1285 "netconf_parser.cc" +#line 1254 "netconf_parser.cc" break; case 122: #line 539 "netconf_parser.yy" { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stdout", ctx.loc2pos(yystack_[0].location))); } -#line 1291 "netconf_parser.cc" +#line 1260 "netconf_parser.cc" break; case 123: @@ -1295,7 +1264,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1299 "netconf_parser.cc" +#line 1268 "netconf_parser.cc" break; case 124: @@ -1305,7 +1274,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 1309 "netconf_parser.cc" +#line 1278 "netconf_parser.cc" break; case 125: @@ -1313,7 +1282,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1317 "netconf_parser.cc" +#line 1286 "netconf_parser.cc" break; case 126: @@ -1323,7 +1292,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("socket-url", url); ctx.leave(); } -#line 1327 "netconf_parser.cc" +#line 1296 "netconf_parser.cc" break; case 127: @@ -1334,7 +1303,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 1338 "netconf_parser.cc" +#line 1307 "netconf_parser.cc" break; case 128: @@ -1343,7 +1312,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1347 "netconf_parser.cc" +#line 1316 "netconf_parser.cc" break; case 132: @@ -1354,7 +1323,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 1358 "netconf_parser.cc" +#line 1327 "netconf_parser.cc" break; case 133: @@ -1363,7 +1332,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1367 "netconf_parser.cc" +#line 1336 "netconf_parser.cc" break; case 136: @@ -1373,7 +1342,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 1377 "netconf_parser.cc" +#line 1346 "netconf_parser.cc" break; case 137: @@ -1381,7 +1350,7 @@ namespace isc { namespace netconf { { ctx.stack_.pop_back(); } -#line 1385 "netconf_parser.cc" +#line 1354 "netconf_parser.cc" break; case 147: @@ -1389,7 +1358,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1393 "netconf_parser.cc" +#line 1362 "netconf_parser.cc" break; case 148: @@ -1399,7 +1368,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1403 "netconf_parser.cc" +#line 1372 "netconf_parser.cc" break; case 149: @@ -1408,7 +1377,7 @@ namespace isc { namespace netconf { ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 1412 "netconf_parser.cc" +#line 1381 "netconf_parser.cc" break; case 150: @@ -1416,7 +1385,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1420 "netconf_parser.cc" +#line 1389 "netconf_parser.cc" break; case 151: @@ -1426,7 +1395,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 1430 "netconf_parser.cc" +#line 1399 "netconf_parser.cc" break; case 152: @@ -1437,7 +1406,7 @@ namespace isc { namespace netconf { ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 1441 "netconf_parser.cc" +#line 1410 "netconf_parser.cc" break; case 153: @@ -1446,7 +1415,7 @@ namespace isc { namespace netconf { ctx.stack_.pop_back(); ctx.leave(); } -#line 1450 "netconf_parser.cc" +#line 1419 "netconf_parser.cc" break; case 156: @@ -1456,7 +1425,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1460 "netconf_parser.cc" +#line 1429 "netconf_parser.cc" break; case 157: @@ -1464,7 +1433,7 @@ namespace isc { namespace netconf { { ctx.stack_.pop_back(); } -#line 1468 "netconf_parser.cc" +#line 1437 "netconf_parser.cc" break; case 165: @@ -1472,7 +1441,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1476 "netconf_parser.cc" +#line 1445 "netconf_parser.cc" break; case 166: @@ -1482,7 +1451,7 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 1486 "netconf_parser.cc" +#line 1455 "netconf_parser.cc" break; case 167: @@ -1491,7 +1460,7 @@ namespace isc { namespace netconf { ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 1495 "netconf_parser.cc" +#line 1464 "netconf_parser.cc" break; case 168: @@ -1500,7 +1469,7 @@ namespace isc { namespace netconf { ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 1504 "netconf_parser.cc" +#line 1473 "netconf_parser.cc" break; case 169: @@ -1509,7 +1478,7 @@ namespace isc { namespace netconf { ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 1513 "netconf_parser.cc" +#line 1482 "netconf_parser.cc" break; case 170: @@ -1517,7 +1486,7 @@ namespace isc { namespace netconf { { ctx.enter(ctx.NO_KEYWORDS); } -#line 1521 "netconf_parser.cc" +#line 1490 "netconf_parser.cc" break; case 171: @@ -1527,11 +1496,11 @@ namespace isc { namespace netconf { ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 1531 "netconf_parser.cc" +#line 1500 "netconf_parser.cc" break; -#line 1535 "netconf_parser.cc" +#line 1504 "netconf_parser.cc" default: break; @@ -1548,7 +1517,6 @@ namespace isc { namespace netconf { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -1564,7 +1532,9 @@ namespace isc { namespace netconf { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -1575,7 +1545,7 @@ namespace isc { namespace netconf { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -1601,6 +1571,7 @@ namespace isc { namespace netconf { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -1609,31 +1580,33 @@ namespace isc { namespace netconf { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -1671,6 +1644,7 @@ namespace isc { namespace netconf { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -1704,18 +1678,100 @@ namespace isc { namespace netconf { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - NetconfParser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + NetconfParser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + std::string + NetconfParser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // NetconfParser::context. + NetconfParser::context::context (const NetconfParser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + NetconfParser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + int + NetconfParser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1740,35 +1796,26 @@ namespace isc { namespace netconf { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + NetconfParser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -1793,7 +1840,7 @@ namespace isc { namespace netconf { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -2045,38 +2092,39 @@ namespace isc { namespace netconf { }; - +#if NETCONF_DEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const NetconfParser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\",\"", "\":\"", "\"[\"", - "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Netconf\"", "\"user-context\"", - "\"comment\"", "\"boot-update\"", "\"subscribe-changes\"", - "\"validate-changes\"", "\"managed-servers\"", "\"dhcp4\"", "\"dhcp6\"", - "\"d2\"", "\"ca\"", "\"model\"", "\"control-socket\"", "\"socket-type\"", - "\"unix\"", "\"http\"", "\"stdout\"", "\"socket-name\"", - "\"socket-url\"", "\"hooks-libraries\"", "\"library\"", "\"parameters\"", - "\"Logging\"", "\"loggers\"", "\"name\"", "\"output_options\"", - "\"output\"", "\"debuglevel\"", "\"severity\"", "\"flush\"", - "\"maxsize\"", "\"maxver\"", "\"pattern\"", "START_JSON", - "START_NETCONF", "START_SUB_NETCONF", "\"constant string\"", - "\"integer\"", "\"floating point\"", "\"boolean\"", "$accept", "start", - "$@1", "$@2", "$@3", "sub_netconf", "$@4", "json", "value", "map", "$@5", - "map_value", "map_content", "not_empty_map", "list_generic", "$@6", - "list_content", "not_empty_list", "unknown_map_entry", - "netconf_syntax_map", "$@7", "global_objects", "global_object", - "netconf_object", "$@8", "global_params", "not_empty_global_params", - "global_param", "boot_update", "subscribe_changes", "validate_changes", - "user_context", "$@9", "comment", "$@10", "hooks_libraries", "$@11", - "hooks_libraries_list", "not_empty_hooks_libraries_list", - "hooks_library", "$@12", "hooks_params", "hooks_param", "library", - "$@13", "parameters", "$@14", "managed_servers", "$@15", - "servers_entries", "not_empty_servers_entries", "server_entry", - "dhcp4_server", "$@16", "dhcp6_server", "$@17", "d2_server", "$@18", - "ca_server", "$@19", "managed_server_params", "managed_server_param", - "model", "$@20", "control_socket", "$@21", "control_socket_params", + "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\":\"", + "\"[\"", "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Netconf\"", + "\"user-context\"", "\"comment\"", "\"boot-update\"", + "\"subscribe-changes\"", "\"validate-changes\"", "\"managed-servers\"", + "\"dhcp4\"", "\"dhcp6\"", "\"d2\"", "\"ca\"", "\"model\"", + "\"control-socket\"", "\"socket-type\"", "\"unix\"", "\"http\"", + "\"stdout\"", "\"socket-name\"", "\"socket-url\"", "\"hooks-libraries\"", + "\"library\"", "\"parameters\"", "\"Logging\"", "\"loggers\"", + "\"name\"", "\"output_options\"", "\"output\"", "\"debuglevel\"", + "\"severity\"", "\"flush\"", "\"maxsize\"", "\"maxver\"", "\"pattern\"", + "START_JSON", "START_NETCONF", "START_SUB_NETCONF", + "\"constant string\"", "\"integer\"", "\"floating point\"", + "\"boolean\"", "$accept", "start", "$@1", "$@2", "$@3", "sub_netconf", + "$@4", "json", "value", "map", "$@5", "map_value", "map_content", + "not_empty_map", "list_generic", "$@6", "list_content", "not_empty_list", + "unknown_map_entry", "netconf_syntax_map", "$@7", "global_objects", + "global_object", "netconf_object", "$@8", "global_params", + "not_empty_global_params", "global_param", "boot_update", + "subscribe_changes", "validate_changes", "user_context", "$@9", + "comment", "$@10", "hooks_libraries", "$@11", "hooks_libraries_list", + "not_empty_hooks_libraries_list", "hooks_library", "$@12", + "hooks_params", "hooks_param", "library", "$@13", "parameters", "$@14", + "managed_servers", "$@15", "servers_entries", + "not_empty_servers_entries", "server_entry", "dhcp4_server", "$@16", + "dhcp6_server", "$@17", "d2_server", "$@18", "ca_server", "$@19", + "managed_server_params", "managed_server_param", "model", "$@20", + "control_socket", "$@21", "control_socket_params", "control_socket_param", "socket_type", "$@22", "socket_type_value", "socket_name", "$@23", "socket_url", "$@24", "logging_object", "$@25", "logging_params", "logging_param", "loggers", "$@26", "loggers_entries", @@ -2086,6 +2134,8 @@ namespace isc { namespace netconf { "output_params_list", "output_params", "output", "$@32", "flush", "maxsize", "maxver", "pattern", "$@33", YY_NULLPTR }; +#endif + #if NETCONF_DEBUG const short @@ -2111,9 +2161,8 @@ namespace isc { namespace netconf { 703, 703 }; - // Print the state stack on the debug stream. void - NetconfParser::yystack_print_ () + NetconfParser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -2124,9 +2173,8 @@ namespace isc { namespace netconf { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - NetconfParser::yy_reduce_print_ (int yyrule) + NetconfParser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -2143,7 +2191,7 @@ namespace isc { namespace netconf { #line 14 "netconf_parser.yy" } } // isc::netconf -#line 2147 "netconf_parser.cc" +#line 2195 "netconf_parser.cc" #line 711 "netconf_parser.yy" diff --git a/src/bin/netconf/netconf_parser.h b/src/bin/netconf/netconf_parser.h index 4f817150af..9d92a12f7c 100644 --- a/src/bin/netconf/netconf_parser.h +++ b/src/bin/netconf/netconf_parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_NETCONF_NETCONF_PARSER_H_INCLUDED # define YY_NETCONF_NETCONF_PARSER_H_INCLUDED @@ -55,7 +56,7 @@ using namespace isc::netconf; using namespace isc::data; using namespace std; -#line 59 "netconf_parser.h" +#line 60 "netconf_parser.h" # include # include // std::abort @@ -198,7 +199,7 @@ using namespace std; #line 14 "netconf_parser.yy" namespace isc { namespace netconf { -#line 202 "netconf_parser.h" +#line 203 "netconf_parser.h" @@ -234,6 +235,13 @@ namespace isc { namespace netconf { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -377,9 +385,12 @@ namespace isc { namespace netconf { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -460,78 +471,248 @@ namespace isc { namespace netconf { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_COMMA = 258, - TOKEN_COLON = 259, - TOKEN_LSQUARE_BRACKET = 260, - TOKEN_RSQUARE_BRACKET = 261, - TOKEN_LCURLY_BRACKET = 262, - TOKEN_RCURLY_BRACKET = 263, - TOKEN_NULL_TYPE = 264, - TOKEN_NETCONF = 265, - TOKEN_USER_CONTEXT = 266, - TOKEN_COMMENT = 267, - TOKEN_BOOT_UPDATE = 268, - TOKEN_SUBSCRIBE_CHANGES = 269, - TOKEN_VALIDATE_CHANGES = 270, - TOKEN_MANAGED_SERVERS = 271, - TOKEN_DHCP4_SERVER = 272, - TOKEN_DHCP6_SERVER = 273, - TOKEN_D2_SERVER = 274, - TOKEN_CA_SERVER = 275, - TOKEN_MODEL = 276, - TOKEN_CONTROL_SOCKET = 277, - TOKEN_SOCKET_TYPE = 278, - TOKEN_UNIX = 279, - TOKEN_HTTP = 280, - TOKEN_STDOUT = 281, - TOKEN_SOCKET_NAME = 282, - TOKEN_SOCKET_URL = 283, - TOKEN_HOOKS_LIBRARIES = 284, - TOKEN_LIBRARY = 285, - TOKEN_PARAMETERS = 286, - TOKEN_LOGGING = 287, - TOKEN_LOGGERS = 288, - TOKEN_NAME = 289, - TOKEN_OUTPUT_OPTIONS = 290, - TOKEN_OUTPUT = 291, - TOKEN_DEBUGLEVEL = 292, - TOKEN_SEVERITY = 293, - TOKEN_FLUSH = 294, - TOKEN_MAXSIZE = 295, - TOKEN_MAXVER = 296, - TOKEN_PATTERN = 297, - TOKEN_START_JSON = 298, - TOKEN_START_NETCONF = 299, - TOKEN_START_SUB_NETCONF = 300, - TOKEN_STRING = 301, - TOKEN_INTEGER = 302, - TOKEN_FLOAT = 303, - TOKEN_BOOLEAN = 304 + enum token_kind_type + { + TOKEN_NETCONF_EMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_NETCONF_error = 256, // error + TOKEN_NETCONF_UNDEF = 257, // "invalid token" + TOKEN_COMMA = 258, // "," + TOKEN_COLON = 259, // ":" + TOKEN_LSQUARE_BRACKET = 260, // "[" + TOKEN_RSQUARE_BRACKET = 261, // "]" + TOKEN_LCURLY_BRACKET = 262, // "{" + TOKEN_RCURLY_BRACKET = 263, // "}" + TOKEN_NULL_TYPE = 264, // "null" + TOKEN_NETCONF = 265, // "Netconf" + TOKEN_USER_CONTEXT = 266, // "user-context" + TOKEN_COMMENT = 267, // "comment" + TOKEN_BOOT_UPDATE = 268, // "boot-update" + TOKEN_SUBSCRIBE_CHANGES = 269, // "subscribe-changes" + TOKEN_VALIDATE_CHANGES = 270, // "validate-changes" + TOKEN_MANAGED_SERVERS = 271, // "managed-servers" + TOKEN_DHCP4_SERVER = 272, // "dhcp4" + TOKEN_DHCP6_SERVER = 273, // "dhcp6" + TOKEN_D2_SERVER = 274, // "d2" + TOKEN_CA_SERVER = 275, // "ca" + TOKEN_MODEL = 276, // "model" + TOKEN_CONTROL_SOCKET = 277, // "control-socket" + TOKEN_SOCKET_TYPE = 278, // "socket-type" + TOKEN_UNIX = 279, // "unix" + TOKEN_HTTP = 280, // "http" + TOKEN_STDOUT = 281, // "stdout" + TOKEN_SOCKET_NAME = 282, // "socket-name" + TOKEN_SOCKET_URL = 283, // "socket-url" + TOKEN_HOOKS_LIBRARIES = 284, // "hooks-libraries" + TOKEN_LIBRARY = 285, // "library" + TOKEN_PARAMETERS = 286, // "parameters" + TOKEN_LOGGING = 287, // "Logging" + TOKEN_LOGGERS = 288, // "loggers" + TOKEN_NAME = 289, // "name" + TOKEN_OUTPUT_OPTIONS = 290, // "output_options" + TOKEN_OUTPUT = 291, // "output" + TOKEN_DEBUGLEVEL = 292, // "debuglevel" + TOKEN_SEVERITY = 293, // "severity" + TOKEN_FLUSH = 294, // "flush" + TOKEN_MAXSIZE = 295, // "maxsize" + TOKEN_MAXVER = 296, // "maxver" + TOKEN_PATTERN = 297, // "pattern" + TOKEN_START_JSON = 298, // START_JSON + TOKEN_START_NETCONF = 299, // START_NETCONF + TOKEN_START_SUB_NETCONF = 300, // START_SUB_NETCONF + TOKEN_STRING = 301, // "constant string" + TOKEN_INTEGER = 302, // "integer" + TOKEN_FLOAT = 303, // "floating point" + TOKEN_BOOLEAN = 304 // "boolean" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 50, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_COMMA = 3, // "," + S_COLON = 4, // ":" + S_LSQUARE_BRACKET = 5, // "[" + S_RSQUARE_BRACKET = 6, // "]" + S_LCURLY_BRACKET = 7, // "{" + S_RCURLY_BRACKET = 8, // "}" + S_NULL_TYPE = 9, // "null" + S_NETCONF = 10, // "Netconf" + S_USER_CONTEXT = 11, // "user-context" + S_COMMENT = 12, // "comment" + S_BOOT_UPDATE = 13, // "boot-update" + S_SUBSCRIBE_CHANGES = 14, // "subscribe-changes" + S_VALIDATE_CHANGES = 15, // "validate-changes" + S_MANAGED_SERVERS = 16, // "managed-servers" + S_DHCP4_SERVER = 17, // "dhcp4" + S_DHCP6_SERVER = 18, // "dhcp6" + S_D2_SERVER = 19, // "d2" + S_CA_SERVER = 20, // "ca" + S_MODEL = 21, // "model" + S_CONTROL_SOCKET = 22, // "control-socket" + S_SOCKET_TYPE = 23, // "socket-type" + S_UNIX = 24, // "unix" + S_HTTP = 25, // "http" + S_STDOUT = 26, // "stdout" + S_SOCKET_NAME = 27, // "socket-name" + S_SOCKET_URL = 28, // "socket-url" + S_HOOKS_LIBRARIES = 29, // "hooks-libraries" + S_LIBRARY = 30, // "library" + S_PARAMETERS = 31, // "parameters" + S_LOGGING = 32, // "Logging" + S_LOGGERS = 33, // "loggers" + S_NAME = 34, // "name" + S_OUTPUT_OPTIONS = 35, // "output_options" + S_OUTPUT = 36, // "output" + S_DEBUGLEVEL = 37, // "debuglevel" + S_SEVERITY = 38, // "severity" + S_FLUSH = 39, // "flush" + S_MAXSIZE = 40, // "maxsize" + S_MAXVER = 41, // "maxver" + S_PATTERN = 42, // "pattern" + S_START_JSON = 43, // START_JSON + S_START_NETCONF = 44, // START_NETCONF + S_START_SUB_NETCONF = 45, // START_SUB_NETCONF + S_STRING = 46, // "constant string" + S_INTEGER = 47, // "integer" + S_FLOAT = 48, // "floating point" + S_BOOLEAN = 49, // "boolean" + S_YYACCEPT = 50, // $accept + S_start = 51, // start + S_52_1 = 52, // $@1 + S_53_2 = 53, // $@2 + S_54_3 = 54, // $@3 + S_sub_netconf = 55, // sub_netconf + S_56_4 = 56, // $@4 + S_json = 57, // json + S_value = 58, // value + S_map = 59, // map + S_60_5 = 60, // $@5 + S_map_value = 61, // map_value + S_map_content = 62, // map_content + S_not_empty_map = 63, // not_empty_map + S_list_generic = 64, // list_generic + S_65_6 = 65, // $@6 + S_list_content = 66, // list_content + S_not_empty_list = 67, // not_empty_list + S_unknown_map_entry = 68, // unknown_map_entry + S_netconf_syntax_map = 69, // netconf_syntax_map + S_70_7 = 70, // $@7 + S_global_objects = 71, // global_objects + S_global_object = 72, // global_object + S_netconf_object = 73, // netconf_object + S_74_8 = 74, // $@8 + S_global_params = 75, // global_params + S_not_empty_global_params = 76, // not_empty_global_params + S_global_param = 77, // global_param + S_boot_update = 78, // boot_update + S_subscribe_changes = 79, // subscribe_changes + S_validate_changes = 80, // validate_changes + S_user_context = 81, // user_context + S_82_9 = 82, // $@9 + S_comment = 83, // comment + S_84_10 = 84, // $@10 + S_hooks_libraries = 85, // hooks_libraries + S_86_11 = 86, // $@11 + S_hooks_libraries_list = 87, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 88, // not_empty_hooks_libraries_list + S_hooks_library = 89, // hooks_library + S_90_12 = 90, // $@12 + S_hooks_params = 91, // hooks_params + S_hooks_param = 92, // hooks_param + S_library = 93, // library + S_94_13 = 94, // $@13 + S_parameters = 95, // parameters + S_96_14 = 96, // $@14 + S_managed_servers = 97, // managed_servers + S_98_15 = 98, // $@15 + S_servers_entries = 99, // servers_entries + S_not_empty_servers_entries = 100, // not_empty_servers_entries + S_server_entry = 101, // server_entry + S_dhcp4_server = 102, // dhcp4_server + S_103_16 = 103, // $@16 + S_dhcp6_server = 104, // dhcp6_server + S_105_17 = 105, // $@17 + S_d2_server = 106, // d2_server + S_107_18 = 107, // $@18 + S_ca_server = 108, // ca_server + S_109_19 = 109, // $@19 + S_managed_server_params = 110, // managed_server_params + S_managed_server_param = 111, // managed_server_param + S_model = 112, // model + S_113_20 = 113, // $@20 + S_control_socket = 114, // control_socket + S_115_21 = 115, // $@21 + S_control_socket_params = 116, // control_socket_params + S_control_socket_param = 117, // control_socket_param + S_socket_type = 118, // socket_type + S_119_22 = 119, // $@22 + S_socket_type_value = 120, // socket_type_value + S_socket_name = 121, // socket_name + S_122_23 = 122, // $@23 + S_socket_url = 123, // socket_url + S_124_24 = 124, // $@24 + S_logging_object = 125, // logging_object + S_126_25 = 126, // $@25 + S_logging_params = 127, // logging_params + S_logging_param = 128, // logging_param + S_loggers = 129, // loggers + S_130_26 = 130, // $@26 + S_loggers_entries = 131, // loggers_entries + S_logger_entry = 132, // logger_entry + S_133_27 = 133, // $@27 + S_logger_params = 134, // logger_params + S_logger_param = 135, // logger_param + S_name = 136, // name + S_137_28 = 137, // $@28 + S_debuglevel = 138, // debuglevel + S_severity = 139, // severity + S_140_29 = 140, // $@29 + S_output_options_list = 141, // output_options_list + S_142_30 = 142, // $@30 + S_output_options_list_content = 143, // output_options_list_content + S_output_entry = 144, // output_entry + S_145_31 = 145, // $@31 + S_output_params_list = 146, // output_params_list + S_output_params = 147, // output_params + S_output = 148, // output + S_149_32 = 149, // $@32 + S_flush = 150, // flush + S_maxsize = 151, // maxsize + S_maxver = 152, // maxver + S_pattern = 153, // pattern + S_154_33 = 154 // $@33 + }; + }; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef signed char token_number_type; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -548,7 +729,40 @@ namespace isc { namespace netconf { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 58: // value + case 61: // map_value + case 120: // socket_type_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case 49: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case 48: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case 47: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case 46: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -642,17 +856,17 @@ namespace isc { namespace netconf { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 58: // value case 61: // map_value @@ -683,6 +897,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return NetconfParser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -703,46 +926,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -752,13 +980,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_NETCONF_error || tok == token::TOKEN_NETCONF_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_NETCONF_error || tok == token::TOKEN_NETCONF_UNDEF || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF); } #endif #if 201103L <= YY_CPLUSPLUS @@ -819,6 +1047,13 @@ switch (yytype) NetconfParser (isc::netconf::ParserContext& ctx_yyarg); virtual ~NetconfParser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + NetconfParser (const NetconfParser&) = delete; + /// Non copyable. + NetconfParser& operator= (const NetconfParser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -849,6 +1084,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -865,6 +1104,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NETCONF_error (location_type l) + { + return symbol_type (token::TOKEN_NETCONF_error, std::move (l)); + } +#else + static + symbol_type + make_NETCONF_error (const location_type& l) + { + return symbol_type (token::TOKEN_NETCONF_error, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NETCONF_UNDEF (location_type l) + { + return symbol_type (token::TOKEN_NETCONF_UNDEF, std::move (l)); + } +#else + static + symbol_type + make_NETCONF_UNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_NETCONF_UNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -1572,20 +1841,43 @@ switch (yytype) #endif + class context + { + public: + context (const NetconfParser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const NetconfParser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. NetconfParser (const NetconfParser&); + /// Non copyable. NetconfParser& operator= (const NetconfParser&); +#endif + /// Stored state numbers (used for stacks). typedef short state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -1602,65 +1894,66 @@ switch (yytype) static const signed char yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const unsigned char yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const signed char yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const unsigned char yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const unsigned char yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if NETCONF_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -1681,7 +1974,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -1693,12 +1986,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -1737,8 +2030,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -1746,6 +2039,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -1796,24 +2096,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -1837,8 +2131,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -1868,33 +2166,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 234, ///< Last index in yytable_. yynnts_ = 105, ///< Number of nonterminal symbols. - yyfinal_ = 8, ///< Termination state number. - yyntokens_ = 50 ///< Number of tokens. + yyfinal_ = 8 ///< Termination state number. }; // User arguments. isc::netconf::ParserContext& ctx; + }; inline - NetconfParser::token_number_type + NetconfParser::symbol_kind_type NetconfParser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const signed char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1932,59 +2225,21 @@ switch (yytype) const int user_token_number_max_ = 304; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - NetconfParser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 58: // value - case 61: // map_value - case 120: // socket_type_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 49: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 48: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 47: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 46: // "constant string" - value.move< std::string > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template NetconfParser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 58: // value case 61: // map_value @@ -2016,11 +2271,18 @@ switch (yytype) + template + NetconfParser::symbol_kind_type + NetconfParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool NetconfParser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -2028,7 +2290,7 @@ switch (yytype) NetconfParser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 58: // value case 61: // map_value @@ -2059,56 +2321,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - NetconfParser::by_type::by_type () - : type (empty_symbol) + NetconfParser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - NetconfParser::by_type::by_type (by_type&& that) - : type (that.type) + NetconfParser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - NetconfParser::by_type::by_type (const by_type& that) - : type (that.type) + NetconfParser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - NetconfParser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + NetconfParser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - NetconfParser::by_type::clear () + NetconfParser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - NetconfParser::by_type::move (by_type& that) + NetconfParser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - NetconfParser::by_type::type_get () const YY_NOEXCEPT + NetconfParser::symbol_kind_type + NetconfParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + NetconfParser::symbol_kind_type + NetconfParser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "netconf_parser.yy" } } // isc::netconf -#line 2112 "netconf_parser.h" +#line 2381 "netconf_parser.h" diff --git a/src/bin/netconf/position.hh b/src/bin/netconf/position.hh index 8395a65672..384596b595 100644 --- a/src/bin/netconf/position.hh +++ b/src/bin/netconf/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/netconf/stack.hh b/src/bin/netconf/stack.hh index 1540faa869..8e491d3cf2 100644 --- a/src/bin/netconf/stack.hh +++ b/src/bin/netconf/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241256 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190718 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/lib/eval/location.hh b/src/lib/eval/location.hh index 530f9a7733..9d29cdefe1 100644 --- a/src/lib/eval/location.hh +++ b/src/lib/eval/location.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Locations for Bison parsers in C++ diff --git a/src/lib/eval/parser.cc b/src/lib/eval/parser.cc index 7658f35761..6aa3bd2def 100644 --- a/src/lib/eval/parser.cc +++ b/src/lib/eval/parser.cc @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton implementation for Bison LALR(1) parsers in C++ @@ -30,8 +30,9 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. // Take the name prefix into account. @@ -47,7 +48,7 @@ # include "eval_context.h" -#line 51 "parser.cc" +#line 52 "parser.cc" #ifndef YY_ @@ -62,6 +63,7 @@ # endif #endif + // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS @@ -117,7 +119,7 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !EVALDEBUG @@ -139,49 +141,7 @@ #line 14 "parser.yy" namespace isc { namespace eval { -#line 143 "parser.cc" - - - /* Return YYSTR after stripping away unnecessary quotes and - backslashes, so that it's suitable for yyerror. The heuristic is - that double-quoting is unnecessary unless the string contains an - apostrophe, a comma, or backslash (other than backslash-backslash). - YYSTR is taken from yytname. */ - std::string - EvalParser::yytnamerr_ (const char *yystr) - { - if (*yystr == '"') - { - std::string yyr; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - yyr += *yyp; - break; - - case '"': - return yyr; - } - do_not_strip_quotes: ; - } - - return yystr; - } - +#line 145 "parser.cc" /// Build a parser object. EvalParser::EvalParser (EvalContext& ctx_yyarg) @@ -201,7 +161,7 @@ namespace isc { namespace eval { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -232,13 +192,13 @@ namespace isc { namespace eval { : state (s) {} - EvalParser::symbol_number_type - EvalParser::by_state::type_get () const YY_NOEXCEPT + EvalParser::symbol_kind_type + EvalParser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) - return empty_symbol; + return symbol_kind::S_YYEMPTY; else - return yystos_[+state]; + return YY_CAST (symbol_kind_type, yystos_[+state]); } EvalParser::stack_symbol_type::stack_symbol_type () @@ -247,7 +207,7 @@ namespace isc { namespace eval { EvalParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 63: // option_repr_type value.YY_MOVE_OR_COPY< TokenOption::RepresentationType > (YY_MOVE (that.value)); @@ -304,7 +264,7 @@ namespace isc { namespace eval { EvalParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.kind ()) { case 63: // option_repr_type value.move< TokenOption::RepresentationType > (YY_MOVE (that.value)); @@ -353,7 +313,7 @@ namespace isc { namespace eval { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L @@ -361,7 +321,7 @@ namespace isc { namespace eval { EvalParser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 63: // option_repr_type value.copy< TokenOption::RepresentationType > (that.value); @@ -417,7 +377,7 @@ namespace isc { namespace eval { EvalParser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.kind ()) { case 63: // option_repr_type value.move< TokenOption::RepresentationType > (that.value); @@ -483,117 +443,115 @@ namespace isc { namespace eval { #if EVALDEBUG template void - EvalParser::yy_print_ (std::ostream& yyo, - const basic_symbol& yysym) const + EvalParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); - symbol_number_type yytype = yysym.type_get (); -#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 - // Avoid a (spurious) G++ 4.8 warning about "array subscript is - // below array bounds". if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) { case 50: // "constant string" #line 112 "parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 507 "parser.cc" +#line 464 "parser.cc" break; case 51: // "integer" #line 112 "parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 513 "parser.cc" +#line 470 "parser.cc" break; case 52: // "constant hexstring" #line 112 "parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 519 "parser.cc" +#line 476 "parser.cc" break; case 53: // "option name" #line 112 "parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 525 "parser.cc" +#line 482 "parser.cc" break; case 54: // "ip address" #line 112 "parser.yy" { yyoutput << yysym.value.template as < std::string > (); } -#line 531 "parser.cc" +#line 488 "parser.cc" break; case 60: // integer_expr #line 112 "parser.yy" { yyoutput << yysym.value.template as < uint32_t > (); } -#line 537 "parser.cc" +#line 494 "parser.cc" break; case 61: // option_code #line 112 "parser.yy" { yyoutput << yysym.value.template as < uint16_t > (); } -#line 543 "parser.cc" +#line 500 "parser.cc" break; case 62: // sub_option_code #line 112 "parser.yy" { yyoutput << yysym.value.template as < uint16_t > (); } -#line 549 "parser.cc" +#line 506 "parser.cc" break; case 63: // option_repr_type #line 112 "parser.yy" { yyoutput << yysym.value.template as < TokenOption::RepresentationType > (); } -#line 555 "parser.cc" +#line 512 "parser.cc" break; case 64: // nest_level #line 112 "parser.yy" { yyoutput << yysym.value.template as < int8_t > (); } -#line 561 "parser.cc" +#line 518 "parser.cc" break; case 65: // pkt_metadata #line 112 "parser.yy" { yyoutput << yysym.value.template as < TokenPkt::MetadataType > (); } -#line 567 "parser.cc" +#line 524 "parser.cc" break; case 66: // enterprise_id #line 112 "parser.yy" { yyoutput << yysym.value.template as < uint32_t > (); } -#line 573 "parser.cc" +#line 530 "parser.cc" break; case 67: // pkt4_field #line 112 "parser.yy" { yyoutput << yysym.value.template as < TokenPkt4::FieldType > (); } -#line 579 "parser.cc" +#line 536 "parser.cc" break; case 68: // pkt6_field #line 112 "parser.yy" { yyoutput << yysym.value.template as < TokenPkt6::FieldType > (); } -#line 585 "parser.cc" +#line 542 "parser.cc" break; case 69: // relay6_field #line 112 "parser.yy" { yyoutput << yysym.value.template as < TokenRelay6Field::FieldType > (); } -#line 591 "parser.cc" +#line 548 "parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -652,11 +610,11 @@ namespace isc { namespace eval { EvalParser::state_type EvalParser::yy_lr_goto_state_ (state_type yystate, int yysym) { - int yyr = yypgoto_[yysym - yyntokens_] + yystate; + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else - return yydefgoto_[yysym - yyntokens_]; + return yydefgoto_[yysym - YYNTOKENS]; } bool @@ -716,6 +674,7 @@ namespace isc { namespace eval { `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -736,7 +695,7 @@ namespace isc { namespace eval { // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -755,10 +714,20 @@ namespace isc { namespace eval { } YY_SYMBOL_PRINT ("Next token is", yyla); + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ - yyn += yyla.type_get (); - if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ()) + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } @@ -873,7 +842,7 @@ namespace isc { namespace eval { TokenPtr neg(new TokenNot()); ctx.expression.push_back(neg); } -#line 877 "parser.cc" +#line 846 "parser.cc" break; case 7: @@ -882,7 +851,7 @@ namespace isc { namespace eval { TokenPtr neg(new TokenAnd()); ctx.expression.push_back(neg); } -#line 886 "parser.cc" +#line 855 "parser.cc" break; case 8: @@ -891,7 +860,7 @@ namespace isc { namespace eval { TokenPtr neg(new TokenOr()); ctx.expression.push_back(neg); } -#line 895 "parser.cc" +#line 864 "parser.cc" break; case 9: @@ -900,7 +869,7 @@ namespace isc { namespace eval { TokenPtr eq(new TokenEqual()); ctx.expression.push_back(eq); } -#line 904 "parser.cc" +#line 873 "parser.cc" break; case 10: @@ -909,7 +878,7 @@ namespace isc { namespace eval { TokenPtr opt(new TokenOption(yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS)); ctx.expression.push_back(opt); } -#line 913 "parser.cc" +#line 882 "parser.cc" break; case 11: @@ -918,7 +887,7 @@ namespace isc { namespace eval { TokenPtr opt(new TokenSubOption(yystack_[8].value.as < uint16_t > (), yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS)); ctx.expression.push_back(opt); } -#line 922 "parser.cc" +#line 891 "parser.cc" break; case 12: @@ -942,7 +911,7 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay4 can only be used in DHCPv4."); } } -#line 946 "parser.cc" +#line 915 "parser.cc" break; case 13: @@ -960,7 +929,7 @@ namespace isc { namespace eval { error(yystack_[10].location, "relay6 can only be used in DHCPv6."); } } -#line 964 "parser.cc" +#line 933 "parser.cc" break; case 14: @@ -973,7 +942,7 @@ namespace isc { namespace eval { TokenPtr exist(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as < uint32_t > (), TokenOption::EXISTS)); ctx.expression.push_back(exist); } -#line 977 "parser.cc" +#line 946 "parser.cc" break; case 15: @@ -986,7 +955,7 @@ namespace isc { namespace eval { TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[3].value.as < uint32_t > (), TokenOption::EXISTS)); ctx.expression.push_back(exist); } -#line 990 "parser.cc" +#line 959 "parser.cc" break; case 16: @@ -1000,7 +969,7 @@ namespace isc { namespace eval { TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as < uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as < uint16_t > ())); ctx.expression.push_back(exist); } -#line 1004 "parser.cc" +#line 973 "parser.cc" break; case 17: @@ -1019,7 +988,7 @@ namespace isc { namespace eval { TokenPtr member(new TokenMember(cc)); ctx.expression.push_back(member); } -#line 1023 "parser.cc" +#line 992 "parser.cc" break; case 18: @@ -1028,7 +997,7 @@ namespace isc { namespace eval { TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 1032 "parser.cc" +#line 1001 "parser.cc" break; case 19: @@ -1037,7 +1006,7 @@ namespace isc { namespace eval { TokenPtr hex(new TokenHexString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(hex); } -#line 1041 "parser.cc" +#line 1010 "parser.cc" break; case 20: @@ -1046,7 +1015,7 @@ namespace isc { namespace eval { TokenPtr ip(new TokenIpAddress(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(ip); } -#line 1050 "parser.cc" +#line 1019 "parser.cc" break; case 21: @@ -1055,7 +1024,7 @@ namespace isc { namespace eval { TokenPtr opt(new TokenOption(yystack_[3].value.as < uint16_t > (), yystack_[0].value.as < TokenOption::RepresentationType > ())); ctx.expression.push_back(opt); } -#line 1059 "parser.cc" +#line 1028 "parser.cc" break; case 22: @@ -1064,7 +1033,7 @@ namespace isc { namespace eval { TokenPtr opt(new TokenSubOption(yystack_[8].value.as < uint16_t > (), yystack_[3].value.as < uint16_t > (), yystack_[0].value.as < TokenOption::RepresentationType > ())); ctx.expression.push_back(opt); } -#line 1068 "parser.cc" +#line 1037 "parser.cc" break; case 23: @@ -1088,7 +1057,7 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay4 can only be used in DHCPv4."); } } -#line 1092 "parser.cc" +#line 1061 "parser.cc" break; case 24: @@ -1106,7 +1075,7 @@ namespace isc { namespace eval { error(yystack_[10].location, "relay6 can only be used in DHCPv6."); } } -#line 1110 "parser.cc" +#line 1079 "parser.cc" break; case 25: @@ -1115,7 +1084,7 @@ namespace isc { namespace eval { TokenPtr pkt_metadata(new TokenPkt(yystack_[0].value.as < TokenPkt::MetadataType > ())); ctx.expression.push_back(pkt_metadata); } -#line 1119 "parser.cc" +#line 1088 "parser.cc" break; case 26: @@ -1133,7 +1102,7 @@ namespace isc { namespace eval { error(yystack_[2].location, "pkt4 can only be used in DHCPv4."); } } -#line 1137 "parser.cc" +#line 1106 "parser.cc" break; case 27: @@ -1151,7 +1120,7 @@ namespace isc { namespace eval { error(yystack_[2].location, "pkt6 can only be used in DHCPv6."); } } -#line 1155 "parser.cc" +#line 1124 "parser.cc" break; case 28: @@ -1169,7 +1138,7 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay6 can only be used in DHCPv6."); } } -#line 1173 "parser.cc" +#line 1142 "parser.cc" break; case 29: @@ -1178,7 +1147,7 @@ namespace isc { namespace eval { TokenPtr sub(new TokenSubstring()); ctx.expression.push_back(sub); } -#line 1182 "parser.cc" +#line 1151 "parser.cc" break; case 30: @@ -1187,7 +1156,7 @@ namespace isc { namespace eval { TokenPtr conc(new TokenConcat()); ctx.expression.push_back(conc); } -#line 1191 "parser.cc" +#line 1160 "parser.cc" break; case 31: @@ -1196,7 +1165,7 @@ namespace isc { namespace eval { TokenPtr cond(new TokenIfElse()); ctx.expression.push_back(cond); } -#line 1200 "parser.cc" +#line 1169 "parser.cc" break; case 32: @@ -1205,7 +1174,7 @@ namespace isc { namespace eval { TokenPtr tohex(new TokenToHexString()); ctx.expression.push_back(tohex); } -#line 1209 "parser.cc" +#line 1178 "parser.cc" break; case 33: @@ -1218,7 +1187,7 @@ namespace isc { namespace eval { TokenPtr vendor(new TokenVendor(ctx.getUniverse(), 0, TokenVendor::ENTERPRISE_ID)); ctx.expression.push_back(vendor); } -#line 1222 "parser.cc" +#line 1191 "parser.cc" break; case 34: @@ -1232,7 +1201,7 @@ namespace isc { namespace eval { TokenVendor::ENTERPRISE_ID)); ctx.expression.push_back(vendor); } -#line 1236 "parser.cc" +#line 1205 "parser.cc" break; case 35: @@ -1245,7 +1214,7 @@ namespace isc { namespace eval { TokenPtr opt(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as < uint32_t > (), yystack_[0].value.as < TokenOption::RepresentationType > (), yystack_[3].value.as < uint16_t > ())); ctx.expression.push_back(opt); } -#line 1249 "parser.cc" +#line 1218 "parser.cc" break; case 36: @@ -1262,7 +1231,7 @@ namespace isc { namespace eval { TokenVendor::DATA, 0)); ctx.expression.push_back(vendor_class); } -#line 1266 "parser.cc" +#line 1235 "parser.cc" break; case 37: @@ -1279,7 +1248,7 @@ namespace isc { namespace eval { TokenVendor::DATA, index)); ctx.expression.push_back(vendor_class); } -#line 1283 "parser.cc" +#line 1252 "parser.cc" break; case 38: @@ -1288,7 +1257,7 @@ namespace isc { namespace eval { TokenPtr integer(new TokenInteger(yystack_[0].value.as < uint32_t > ())); ctx.expression.push_back(integer); } -#line 1292 "parser.cc" +#line 1261 "parser.cc" break; case 39: @@ -1296,7 +1265,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint32_t > () = ctx.convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1300 "parser.cc" +#line 1269 "parser.cc" break; case 40: @@ -1304,7 +1273,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1308 "parser.cc" +#line 1277 "parser.cc" break; case 41: @@ -1312,7 +1281,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint16_t > () = ctx.convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1316 "parser.cc" +#line 1285 "parser.cc" break; case 42: @@ -1320,7 +1289,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1324 "parser.cc" +#line 1293 "parser.cc" break; case 43: @@ -1328,7 +1297,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenOption::RepresentationType > () = TokenOption::TEXTUAL; } -#line 1332 "parser.cc" +#line 1301 "parser.cc" break; case 44: @@ -1336,7 +1305,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenOption::RepresentationType > () = TokenOption::HEXADECIMAL; } -#line 1340 "parser.cc" +#line 1309 "parser.cc" break; case 45: @@ -1344,7 +1313,7 @@ namespace isc { namespace eval { { yylhs.value.as < int8_t > () = ctx.convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1348 "parser.cc" +#line 1317 "parser.cc" break; case 46: @@ -1352,7 +1321,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::IFACE; } -#line 1356 "parser.cc" +#line 1325 "parser.cc" break; case 47: @@ -1360,7 +1329,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::SRC; } -#line 1364 "parser.cc" +#line 1333 "parser.cc" break; case 48: @@ -1368,7 +1337,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::DST; } -#line 1372 "parser.cc" +#line 1341 "parser.cc" break; case 49: @@ -1376,7 +1345,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::LEN; } -#line 1380 "parser.cc" +#line 1349 "parser.cc" break; case 50: @@ -1384,7 +1353,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint32_t > () = ctx.convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1388 "parser.cc" +#line 1357 "parser.cc" break; case 51: @@ -1392,7 +1361,7 @@ namespace isc { namespace eval { { yylhs.value.as < uint32_t > () = 0; } -#line 1396 "parser.cc" +#line 1365 "parser.cc" break; case 52: @@ -1400,7 +1369,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::CHADDR; } -#line 1404 "parser.cc" +#line 1373 "parser.cc" break; case 53: @@ -1408,7 +1377,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::HLEN; } -#line 1412 "parser.cc" +#line 1381 "parser.cc" break; case 54: @@ -1416,7 +1385,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::HTYPE; } -#line 1420 "parser.cc" +#line 1389 "parser.cc" break; case 55: @@ -1424,7 +1393,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::CIADDR; } -#line 1428 "parser.cc" +#line 1397 "parser.cc" break; case 56: @@ -1432,7 +1401,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::GIADDR; } -#line 1436 "parser.cc" +#line 1405 "parser.cc" break; case 57: @@ -1440,7 +1409,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::YIADDR; } -#line 1444 "parser.cc" +#line 1413 "parser.cc" break; case 58: @@ -1448,7 +1417,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::SIADDR; } -#line 1452 "parser.cc" +#line 1421 "parser.cc" break; case 59: @@ -1456,7 +1425,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::MSGTYPE; } -#line 1460 "parser.cc" +#line 1429 "parser.cc" break; case 60: @@ -1464,7 +1433,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::TRANSID; } -#line 1468 "parser.cc" +#line 1437 "parser.cc" break; case 61: @@ -1472,7 +1441,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt6::FieldType > () = TokenPkt6::MSGTYPE; } -#line 1476 "parser.cc" +#line 1445 "parser.cc" break; case 62: @@ -1480,7 +1449,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenPkt6::FieldType > () = TokenPkt6::TRANSID; } -#line 1484 "parser.cc" +#line 1453 "parser.cc" break; case 63: @@ -1488,7 +1457,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenRelay6Field::FieldType > () = TokenRelay6Field::PEERADDR; } -#line 1492 "parser.cc" +#line 1461 "parser.cc" break; case 64: @@ -1496,7 +1465,7 @@ namespace isc { namespace eval { { yylhs.value.as < TokenRelay6Field::FieldType > () = TokenRelay6Field::LINKADDR; } -#line 1500 "parser.cc" +#line 1469 "parser.cc" break; case 65: @@ -1505,7 +1474,7 @@ namespace isc { namespace eval { TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 1509 "parser.cc" +#line 1478 "parser.cc" break; case 66: @@ -1514,7 +1483,7 @@ namespace isc { namespace eval { TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 1518 "parser.cc" +#line 1487 "parser.cc" break; case 67: @@ -1523,11 +1492,11 @@ namespace isc { namespace eval { TokenPtr str(new TokenString("all")); ctx.expression.push_back(str); } -#line 1527 "parser.cc" +#line 1496 "parser.cc" break; -#line 1531 "parser.cc" +#line 1500 "parser.cc" default: break; @@ -1544,7 +1513,6 @@ namespace isc { namespace eval { YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; - YY_STACK_PRINT (); // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); @@ -1560,7 +1528,9 @@ namespace isc { namespace eval { if (!yyerrstatus_) { ++yynerrs_; - error (yyla.location, yysyntax_error_ (yystack_[0].state, yyla)); + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); } @@ -1571,7 +1541,7 @@ namespace isc { namespace eval { error, discard it. */ // Return failure if at end of input. - if (yyla.type_get () == yyeof_) + if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { @@ -1597,6 +1567,7 @@ namespace isc { namespace eval { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -1605,31 +1576,33 @@ namespace isc { namespace eval { `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. - { - stack_symbol_type error_token; - for (;;) - { - yyn = yypact_[+yystack_[0].state]; - if (!yy_pact_value_is_default_ (yyn)) - { - yyn += yy_error_token_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yy_error_token_) - { - yyn = yytable_[yyn]; - if (0 < yyn) - break; - } - } + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } - // Pop the current state because it cannot handle the error token. - if (yystack_.size () == 1) - YYABORT; + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; - yyerror_range[1].location = yystack_[0].location; - yy_destroy_ ("Error: popping", yystack_[0]); - yypop_ (); - YY_STACK_PRINT (); - } + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); @@ -1667,6 +1640,7 @@ namespace isc { namespace eval { /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); + YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); @@ -1700,18 +1674,100 @@ namespace isc { namespace eval { error (yyexc.location, yyexc.what ()); } - // Generate an error message. + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ std::string - EvalParser::yysyntax_error_ (state_type yystate, const symbol_type& yyla) const + EvalParser::yytnamerr_ (const char *yystr) { - // Number of reported tokens (one for the "unexpected", one per - // "expected"). - std::ptrdiff_t yycount = 0; - // Its maximum. - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - // Arguments of yyformat. - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + EvalParser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + // EvalParser::context. + EvalParser::context::context (const EvalParser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + EvalParser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + + int yyn = yypact_[+yyparser_.yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + // Stay within bounds of both yycheck and yytname. + int yychecklim = yylast_ - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + for (int yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror + && !yy_table_value_is_error_ (yytable_[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); + } + } + + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + + int + EvalParser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1736,35 +1792,26 @@ namespace isc { namespace eval { one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (!yyla.empty ()) - { - symbol_number_type yytoken = yyla.type_get (); - yyarg[yycount++] = yytname_[yytoken]; - int yyn = yypact_[+yystate]; - if (!yy_pact_value_is_default_ (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - // Stay within bounds of both yycheck and yytname. - int yychecklim = yylast_ - yyn + 1; - int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_; - for (int yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck_[yyx + yyn] == yyx && yyx != yy_error_token_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; } + return 0; + } + + // Generate an error message. + std::string + EvalParser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) @@ -1789,7 +1836,7 @@ namespace isc { namespace eval { for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { - yyres += yytnamerr_ (yyarg[yyi++]); + yyres += symbol_name (yyarg[yyi++]); ++yyp; } else @@ -1970,21 +2017,21 @@ namespace isc { namespace eval { }; - +#if EVALDEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - // First, the terminals, then, starting at \a yyntokens_, nonterminals. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const EvalParser::yytname_[] = { - "\"end of file\"", "error", "$undefined", "\"(\"", "\")\"", "\"not\"", - "\"and\"", "\"or\"", "\"==\"", "\"option\"", "\"relay4\"", "\"relay6\"", - "\"member\"", "\"peeraddr\"", "\"linkaddr\"", "\"[\"", "\"]\"", "\".\"", - "\"text\"", "\"hex\"", "\"exists\"", "\"pkt\"", "\"iface\"", "\"src\"", - "\"dst\"", "\"len\"", "\"pkt4\"", "\"mac\"", "\"hlen\"", "\"htype\"", - "\"ciaddr\"", "\"giaddr\"", "\"yiaddr\"", "\"siaddr\"", "\"substring\"", - "\"all\"", "\",\"", "\"concat\"", "\"ifelse\"", "\"hexstring\"", - "\"pkt6\"", "\"msgtype\"", "\"transid\"", "\"vendor-class\"", - "\"vendor\"", "\"*\"", "\"data\"", "\"enterprise\"", + "\"end of file\"", "error", "\"invalid token\"", "\"(\"", "\")\"", + "\"not\"", "\"and\"", "\"or\"", "\"==\"", "\"option\"", "\"relay4\"", + "\"relay6\"", "\"member\"", "\"peeraddr\"", "\"linkaddr\"", "\"[\"", + "\"]\"", "\".\"", "\"text\"", "\"hex\"", "\"exists\"", "\"pkt\"", + "\"iface\"", "\"src\"", "\"dst\"", "\"len\"", "\"pkt4\"", "\"mac\"", + "\"hlen\"", "\"htype\"", "\"ciaddr\"", "\"giaddr\"", "\"yiaddr\"", + "\"siaddr\"", "\"substring\"", "\"all\"", "\",\"", "\"concat\"", + "\"ifelse\"", "\"hexstring\"", "\"pkt6\"", "\"msgtype\"", "\"transid\"", + "\"vendor-class\"", "\"vendor\"", "\"*\"", "\"data\"", "\"enterprise\"", "\"top-level bool\"", "\"top-level string\"", "\"constant string\"", "\"integer\"", "\"constant hexstring\"", "\"option name\"", "\"ip address\"", "$accept", "start", "expression", "bool_expr", @@ -1992,6 +2039,8 @@ namespace isc { namespace eval { "option_repr_type", "nest_level", "pkt_metadata", "enterprise_id", "pkt4_field", "pkt6_field", "relay6_field", "start_expr", "length_expr", YY_NULLPTR }; +#endif + #if EVALDEBUG const short @@ -2006,9 +2055,8 @@ namespace isc { namespace eval { 531, 537, 541, 547, 551, 557, 564, 569 }; - // Print the state stack on the debug stream. void - EvalParser::yystack_print_ () + EvalParser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator @@ -2019,9 +2067,8 @@ namespace isc { namespace eval { *yycdebug_ << '\n'; } - // Report on the debug stream that the rule \a yyrule is going to be reduced. void - EvalParser::yy_reduce_print_ (int yyrule) + EvalParser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; @@ -2038,7 +2085,7 @@ namespace isc { namespace eval { #line 14 "parser.yy" } } // isc::eval -#line 2042 "parser.cc" +#line 2089 "parser.cc" #line 576 "parser.yy" diff --git a/src/lib/eval/parser.h b/src/lib/eval/parser.h index 794669a6ff..d5e1a0a7e9 100644 --- a/src/lib/eval/parser.h +++ b/src/lib/eval/parser.h @@ -1,4 +1,4 @@ -// A Bison parser, made by GNU Bison 3.5.4. +// A Bison parser, made by GNU Bison 3.6.2. // Skeleton interface for Bison LALR(1) parsers in C++ @@ -38,8 +38,9 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. -// Undocumented macros, especially those whose name start with YY_, -// are private implementation details. Do not rely on them. +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. #ifndef YY_EVAL_PARSER_H_INCLUDED # define YY_EVAL_PARSER_H_INCLUDED @@ -55,7 +56,7 @@ using namespace isc::dhcp; using namespace isc::eval; -#line 59 "parser.h" +#line 60 "parser.h" # include # include // std::abort @@ -198,7 +199,7 @@ using namespace isc::eval; #line 14 "parser.yy" namespace isc { namespace eval { -#line 202 "parser.h" +#line 203 "parser.h" @@ -234,6 +235,13 @@ namespace isc { namespace eval { new (yyas_ ()) T (YY_MOVE (t)); } +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { @@ -377,9 +385,12 @@ namespace isc { namespace eval { } private: - /// Prohibit blind copies. - self_type& operator= (const self_type&); +#if YY_CPLUSPLUS < 201103L + /// Non copyable. semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif /// Accessor to raw memory as \a T. template @@ -476,83 +487,170 @@ namespace isc { namespace eval { location_type location; }; - /// Tokens. + /// Token kinds. struct token { - enum yytokentype - { - TOKEN_END = 0, - TOKEN_LPAREN = 258, - TOKEN_RPAREN = 259, - TOKEN_NOT = 260, - TOKEN_AND = 261, - TOKEN_OR = 262, - TOKEN_EQUAL = 263, - TOKEN_OPTION = 264, - TOKEN_RELAY4 = 265, - TOKEN_RELAY6 = 266, - TOKEN_MEMBER = 267, - TOKEN_PEERADDR = 268, - TOKEN_LINKADDR = 269, - TOKEN_LBRACKET = 270, - TOKEN_RBRACKET = 271, - TOKEN_DOT = 272, - TOKEN_TEXT = 273, - TOKEN_HEX = 274, - TOKEN_EXISTS = 275, - TOKEN_PKT = 276, - TOKEN_IFACE = 277, - TOKEN_SRC = 278, - TOKEN_DST = 279, - TOKEN_LEN = 280, - TOKEN_PKT4 = 281, - TOKEN_CHADDR = 282, - TOKEN_HLEN = 283, - TOKEN_HTYPE = 284, - TOKEN_CIADDR = 285, - TOKEN_GIADDR = 286, - TOKEN_YIADDR = 287, - TOKEN_SIADDR = 288, - TOKEN_SUBSTRING = 289, - TOKEN_ALL = 290, - TOKEN_COMA = 291, - TOKEN_CONCAT = 292, - TOKEN_IFELSE = 293, - TOKEN_TOHEXSTRING = 294, - TOKEN_PKT6 = 295, - TOKEN_MSGTYPE = 296, - TOKEN_TRANSID = 297, - TOKEN_VENDOR_CLASS = 298, - TOKEN_VENDOR = 299, - TOKEN_ANY = 300, - TOKEN_DATA = 301, - TOKEN_ENTERPRISE = 302, - TOKEN_TOPLEVEL_BOOL = 303, - TOKEN_TOPLEVEL_STRING = 304, - TOKEN_STRING = 305, - TOKEN_INTEGER = 306, - TOKEN_HEXSTRING = 307, - TOKEN_OPTION_NAME = 308, - TOKEN_IP_ADDRESS = 309 + enum token_kind_type + { + TOKEN_EVALEMPTY = -2, + TOKEN_END = 0, // "end of file" + TOKEN_EVALerror = 256, // error + TOKEN_EVALUNDEF = 257, // "invalid token" + TOKEN_LPAREN = 258, // "(" + TOKEN_RPAREN = 259, // ")" + TOKEN_NOT = 260, // "not" + TOKEN_AND = 261, // "and" + TOKEN_OR = 262, // "or" + TOKEN_EQUAL = 263, // "==" + TOKEN_OPTION = 264, // "option" + TOKEN_RELAY4 = 265, // "relay4" + TOKEN_RELAY6 = 266, // "relay6" + TOKEN_MEMBER = 267, // "member" + TOKEN_PEERADDR = 268, // "peeraddr" + TOKEN_LINKADDR = 269, // "linkaddr" + TOKEN_LBRACKET = 270, // "[" + TOKEN_RBRACKET = 271, // "]" + TOKEN_DOT = 272, // "." + TOKEN_TEXT = 273, // "text" + TOKEN_HEX = 274, // "hex" + TOKEN_EXISTS = 275, // "exists" + TOKEN_PKT = 276, // "pkt" + TOKEN_IFACE = 277, // "iface" + TOKEN_SRC = 278, // "src" + TOKEN_DST = 279, // "dst" + TOKEN_LEN = 280, // "len" + TOKEN_PKT4 = 281, // "pkt4" + TOKEN_CHADDR = 282, // "mac" + TOKEN_HLEN = 283, // "hlen" + TOKEN_HTYPE = 284, // "htype" + TOKEN_CIADDR = 285, // "ciaddr" + TOKEN_GIADDR = 286, // "giaddr" + TOKEN_YIADDR = 287, // "yiaddr" + TOKEN_SIADDR = 288, // "siaddr" + TOKEN_SUBSTRING = 289, // "substring" + TOKEN_ALL = 290, // "all" + TOKEN_COMA = 291, // "," + TOKEN_CONCAT = 292, // "concat" + TOKEN_IFELSE = 293, // "ifelse" + TOKEN_TOHEXSTRING = 294, // "hexstring" + TOKEN_PKT6 = 295, // "pkt6" + TOKEN_MSGTYPE = 296, // "msgtype" + TOKEN_TRANSID = 297, // "transid" + TOKEN_VENDOR_CLASS = 298, // "vendor-class" + TOKEN_VENDOR = 299, // "vendor" + TOKEN_ANY = 300, // "*" + TOKEN_DATA = 301, // "data" + TOKEN_ENTERPRISE = 302, // "enterprise" + TOKEN_TOPLEVEL_BOOL = 303, // "top-level bool" + TOKEN_TOPLEVEL_STRING = 304, // "top-level string" + TOKEN_STRING = 305, // "constant string" + TOKEN_INTEGER = 306, // "integer" + TOKEN_HEXSTRING = 307, // "constant hexstring" + TOKEN_OPTION_NAME = 308, // "option name" + TOKEN_IP_ADDRESS = 309 // "ip address" }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; }; - /// (External) token type, as returned by yylex. - typedef token::yytokentype token_type; + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; - /// Symbol type: an internal symbol number. - typedef int symbol_number_type; + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 55, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_LPAREN = 3, // "(" + S_RPAREN = 4, // ")" + S_NOT = 5, // "not" + S_AND = 6, // "and" + S_OR = 7, // "or" + S_EQUAL = 8, // "==" + S_OPTION = 9, // "option" + S_RELAY4 = 10, // "relay4" + S_RELAY6 = 11, // "relay6" + S_MEMBER = 12, // "member" + S_PEERADDR = 13, // "peeraddr" + S_LINKADDR = 14, // "linkaddr" + S_LBRACKET = 15, // "[" + S_RBRACKET = 16, // "]" + S_DOT = 17, // "." + S_TEXT = 18, // "text" + S_HEX = 19, // "hex" + S_EXISTS = 20, // "exists" + S_PKT = 21, // "pkt" + S_IFACE = 22, // "iface" + S_SRC = 23, // "src" + S_DST = 24, // "dst" + S_LEN = 25, // "len" + S_PKT4 = 26, // "pkt4" + S_CHADDR = 27, // "mac" + S_HLEN = 28, // "hlen" + S_HTYPE = 29, // "htype" + S_CIADDR = 30, // "ciaddr" + S_GIADDR = 31, // "giaddr" + S_YIADDR = 32, // "yiaddr" + S_SIADDR = 33, // "siaddr" + S_SUBSTRING = 34, // "substring" + S_ALL = 35, // "all" + S_COMA = 36, // "," + S_CONCAT = 37, // "concat" + S_IFELSE = 38, // "ifelse" + S_TOHEXSTRING = 39, // "hexstring" + S_PKT6 = 40, // "pkt6" + S_MSGTYPE = 41, // "msgtype" + S_TRANSID = 42, // "transid" + S_VENDOR_CLASS = 43, // "vendor-class" + S_VENDOR = 44, // "vendor" + S_ANY = 45, // "*" + S_DATA = 46, // "data" + S_ENTERPRISE = 47, // "enterprise" + S_TOPLEVEL_BOOL = 48, // "top-level bool" + S_TOPLEVEL_STRING = 49, // "top-level string" + S_STRING = 50, // "constant string" + S_INTEGER = 51, // "integer" + S_HEXSTRING = 52, // "constant hexstring" + S_OPTION_NAME = 53, // "option name" + S_IP_ADDRESS = 54, // "ip address" + S_YYACCEPT = 55, // $accept + S_start = 56, // start + S_expression = 57, // expression + S_bool_expr = 58, // bool_expr + S_string_expr = 59, // string_expr + S_integer_expr = 60, // integer_expr + S_option_code = 61, // option_code + S_sub_option_code = 62, // sub_option_code + S_option_repr_type = 63, // option_repr_type + S_nest_level = 64, // nest_level + S_pkt_metadata = 65, // pkt_metadata + S_enterprise_id = 66, // enterprise_id + S_pkt4_field = 67, // pkt4_field + S_pkt6_field = 68, // pkt6_field + S_relay6_field = 69, // relay6_field + S_start_expr = 70, // start_expr + S_length_expr = 71 // length_expr + }; + }; - /// The symbol type number to denote an empty symbol. - enum { empty_symbol = -2 }; + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; - /// Internal symbol number for tokens (subsumed by symbol_number_type). - typedef signed char token_number_type; + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// - /// Expects its Base type to provide access to the symbol type - /// via type_get (). + /// Expects its Base type to provide access to the symbol kind + /// via kind (). /// /// Provide access to semantic value and location. template @@ -569,7 +667,60 @@ namespace isc { namespace eval { #if 201103L <= YY_CPLUSPLUS /// Move constructor. - basic_symbol (basic_symbol&& that); + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case 63: // option_repr_type + value.move< TokenOption::RepresentationType > (std::move (that.value)); + break; + + case 67: // pkt4_field + value.move< TokenPkt4::FieldType > (std::move (that.value)); + break; + + case 68: // pkt6_field + value.move< TokenPkt6::FieldType > (std::move (that.value)); + break; + + case 65: // pkt_metadata + value.move< TokenPkt::MetadataType > (std::move (that.value)); + break; + + case 69: // relay6_field + value.move< TokenRelay6Field::FieldType > (std::move (that.value)); + break; + + case 64: // nest_level + value.move< int8_t > (std::move (that.value)); + break; + + case 50: // "constant string" + case 51: // "integer" + case 52: // "constant hexstring" + case 53: // "option name" + case 54: // "ip address" + value.move< std::string > (std::move (that.value)); + break; + + case 61: // option_code + case 62: // sub_option_code + value.move< uint16_t > (std::move (that.value)); + break; + + case 60: // integer_expr + case 66: // enterprise_id + value.move< uint32_t > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. @@ -715,17 +866,17 @@ namespace isc { namespace eval { void clear () { // User destructor. - symbol_number_type yytype = this->type_get (); + symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; - switch (yytype) + switch (yykind) { default: break; } - // Type destructor. -switch (yytype) + // Value type destructor. +switch (yykind) { case 63: // option_repr_type value.template destroy< TokenOption::RepresentationType > (); @@ -776,6 +927,15 @@ switch (yytype) Base::clear (); } + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return EvalParser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + /// Whether empty. bool empty () const YY_NOEXCEPT; @@ -796,46 +956,51 @@ switch (yytype) }; /// Type access provider for token (enum) based symbols. - struct by_type + struct by_kind { /// Default constructor. - by_type (); + by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. - by_type (by_type&& that); + by_kind (by_kind&& that); #endif /// Copy constructor. - by_type (const by_type& that); + by_kind (const by_kind& that); - /// The symbol type as needed by the constructor. - typedef token_type kind_type; + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; /// Constructor from (external) token numbers. - by_type (kind_type t); + by_kind (kind_type t); /// Record that this symbol is empty. void clear (); - /// Steal the symbol type from \a that. - void move (by_type& that); + /// Steal the symbol kind from \a that. + void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; - /// The symbol type. - /// \a empty_symbol when empty. - /// An int, not token_number_type, to be able to store empty_symbol. - int type; + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; }; + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + /// "External" symbols: returned by the scanner. - struct symbol_type : basic_symbol + struct symbol_type : basic_symbol { /// Superclass. - typedef basic_symbol super_type; + typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} @@ -845,13 +1010,13 @@ switch (yytype) symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_TOHEXSTRING || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_EVALerror || tok == token::TOKEN_EVALUNDEF || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_TOHEXSTRING || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { - YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_TOHEXSTRING || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); + YY_ASSERT (tok == token::TOKEN_END || tok == token::TOKEN_EVALerror || tok == token::TOKEN_EVALUNDEF || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_TOHEXSTRING || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); } #endif #if 201103L <= YY_CPLUSPLUS @@ -873,6 +1038,13 @@ switch (yytype) EvalParser (EvalContext& ctx_yyarg); virtual ~EvalParser (); +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + EvalParser (const EvalParser&) = delete; + /// Non copyable. + EvalParser& operator= (const EvalParser&) = delete; +#endif + /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); @@ -903,6 +1075,10 @@ switch (yytype) /// Report a syntax error. void error (const syntax_error& err); + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static @@ -919,6 +1095,36 @@ switch (yytype) return symbol_type (token::TOKEN_END, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EVALerror (location_type l) + { + return symbol_type (token::TOKEN_EVALerror, std::move (l)); + } +#else + static + symbol_type + make_EVALerror (const location_type& l) + { + return symbol_type (token::TOKEN_EVALerror, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EVALUNDEF (location_type l) + { + return symbol_type (token::TOKEN_EVALUNDEF, std::move (l)); + } +#else + static + symbol_type + make_EVALUNDEF (const location_type& l) + { + return symbol_type (token::TOKEN_EVALUNDEF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -1701,20 +1907,43 @@ switch (yytype) #endif + class context + { + public: + context (const EvalParser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const EvalParser& yyparser_; + const symbol_type& yyla_; + }; + private: - /// This class is not copyable. +#if YY_CPLUSPLUS < 201103L + /// Non copyable. EvalParser (const EvalParser&); + /// Non copyable. EvalParser& operator= (const EvalParser&); +#endif + /// Stored state numbers (used for stacks). typedef unsigned char state_type; - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack @@ -1731,65 +1960,66 @@ switch (yytype) static const signed char yypact_ninf_; static const signed char yytable_ninf_; - /// Convert a scanner token number \a t to a symbol number. - /// In theory \a t should be a token_type, but character literals + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. - static token_number_type yytranslate_ (int t); + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const signed char yydefact_[]; - // YYPGOTO[NTERM-NUM]. + // YYPGOTONTERM-NUM. static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. + // YYDEFGOTONTERM-NUM. static const short yydefgoto_[]; - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const unsigned char yytable_[]; static const short yycheck_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // YYSTOSSTATE-NUM -- The (internal number of the) accessing // symbol of state STATE-NUM. static const signed char yystos_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + // YYR1YYN -- Symbol number of symbol that rule YYN derives. static const signed char yyr1_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + // YYR2YYN -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; #if EVALDEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. + // YYRLINEYYN -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); + virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. - virtual void yystack_print_ (); + virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; - /// \brief Display a symbol type, value and location. + /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template @@ -1810,7 +2040,7 @@ switch (yytype) /// Default constructor. by_state () YY_NOEXCEPT; - /// The symbol type as needed by the constructor. + /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. @@ -1822,12 +2052,12 @@ switch (yytype) /// Record that this symbol is empty. void clear () YY_NOEXCEPT; - /// Steal the symbol type from \a that. + /// Steal the symbol kind from \a that. void move (by_state& that); - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const YY_NOEXCEPT; + /// The symbol kind (corresponding to \a state). + /// \a S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. @@ -1866,8 +2096,8 @@ switch (yytype) { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -1875,6 +2105,13 @@ switch (yytype) : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -1925,24 +2162,18 @@ switch (yytype) return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -1966,8 +2197,12 @@ switch (yytype) }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -1997,33 +2232,28 @@ switch (yytype) /// Pop \a n symbols from the stack. void yypop_ (int n = 1); - /// Some specific tokens. - static const token_number_type yy_error_token_ = 1; - static const token_number_type yy_undef_token_ = 2; - /// Constants. enum { - yyeof_ = 0, yylast_ = 217, ///< Last index in yytable_. yynnts_ = 17, ///< Number of nonterminal symbols. - yyfinal_ = 33, ///< Termination state number. - yyntokens_ = 55 ///< Number of tokens. + yyfinal_ = 33 ///< Termination state number. }; // User arguments. EvalContext& ctx; + }; inline - EvalParser::token_number_type + EvalParser::symbol_kind_type EvalParser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static - const token_number_type + const signed char translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -2061,79 +2291,21 @@ switch (yytype) const int user_token_number_max_ = 309; if (t <= 0) - return yyeof_; + return symbol_kind::S_YYEOF; else if (t <= user_token_number_max_) - return translate_table[t]; + return YY_CAST (symbol_kind_type, translate_table[t]); else - return yy_undef_token_; + return symbol_kind::S_YYUNDEF; } // basic_symbol. -#if 201103L <= YY_CPLUSPLUS - template - EvalParser::basic_symbol::basic_symbol (basic_symbol&& that) - : Base (std::move (that)) - , value () - , location (std::move (that.location)) - { - switch (this->type_get ()) - { - case 63: // option_repr_type - value.move< TokenOption::RepresentationType > (std::move (that.value)); - break; - - case 67: // pkt4_field - value.move< TokenPkt4::FieldType > (std::move (that.value)); - break; - - case 68: // pkt6_field - value.move< TokenPkt6::FieldType > (std::move (that.value)); - break; - - case 65: // pkt_metadata - value.move< TokenPkt::MetadataType > (std::move (that.value)); - break; - - case 69: // relay6_field - value.move< TokenRelay6Field::FieldType > (std::move (that.value)); - break; - - case 64: // nest_level - value.move< int8_t > (std::move (that.value)); - break; - - case 50: // "constant string" - case 51: // "integer" - case 52: // "constant hexstring" - case 53: // "option name" - case 54: // "ip address" - value.move< std::string > (std::move (that.value)); - break; - - case 61: // option_code - case 62: // sub_option_code - value.move< uint16_t > (std::move (that.value)); - break; - - case 60: // integer_expr - case 66: // enterprise_id - value.move< uint32_t > (std::move (that.value)); - break; - - default: - break; - } - - } -#endif - template EvalParser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { - switch (this->type_get ()) + switch (this->kind ()) { case 63: // option_repr_type value.copy< TokenOption::RepresentationType > (YY_MOVE (that.value)); @@ -2185,11 +2357,18 @@ switch (yytype) + template + EvalParser::symbol_kind_type + EvalParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + template bool EvalParser::basic_symbol::empty () const YY_NOEXCEPT { - return Base::type_get () == empty_symbol; + return this->kind () == symbol_kind::S_YYEMPTY; } template @@ -2197,7 +2376,7 @@ switch (yytype) EvalParser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { case 63: // option_repr_type value.move< TokenOption::RepresentationType > (YY_MOVE (s.value)); @@ -2248,56 +2427,63 @@ switch (yytype) location = YY_MOVE (s.location); } - // by_type. + // by_kind. inline - EvalParser::by_type::by_type () - : type (empty_symbol) + EvalParser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline - EvalParser::by_type::by_type (by_type&& that) - : type (that.type) + EvalParser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) { that.clear (); } #endif inline - EvalParser::by_type::by_type (const by_type& that) - : type (that.type) + EvalParser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) {} inline - EvalParser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) + EvalParser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) {} inline void - EvalParser::by_type::clear () + EvalParser::by_kind::clear () { - type = empty_symbol; + kind_ = symbol_kind::S_YYEMPTY; } inline void - EvalParser::by_type::move (by_type& that) + EvalParser::by_kind::move (by_kind& that) { - type = that.type; + kind_ = that.kind_; that.clear (); } inline - int - EvalParser::by_type::type_get () const YY_NOEXCEPT + EvalParser::symbol_kind_type + EvalParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + EvalParser::symbol_kind_type + EvalParser::by_kind::type_get () const YY_NOEXCEPT { - return type; + return this->kind (); } #line 14 "parser.yy" } } // isc::eval -#line 2301 "parser.h" +#line 2487 "parser.h" diff --git a/src/lib/eval/position.hh b/src/lib/eval/position.hh index add5b83242..fc6b0c4b80 100644 --- a/src/lib/eval/position.hh +++ b/src/lib/eval/position.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/lib/eval/stack.hh b/src/lib/eval/stack.hh index 5c5e60931b..6147536e45 100644 --- a/src/lib/eval/stack.hh +++ b/src/lib/eval/stack.hh @@ -1,5 +1,5 @@ -// Generated 202004241255 -// A Bison parser, made by GNU Bison 3.5.4. +// Generated 202005190717 +// A Bison parser, made by GNU Bison 3.6.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself.