From: Wlodek Wencel Date: Mon, 27 Sep 2021 06:29:37 +0000 (-0700) Subject: [#2107] parsers regen for release X-Git-Tag: Kea-2.0.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc3d40d7ad4b2a79caafa014a063ce64d527bc91;p=thirdparty%2Fkea.git [#2107] parsers regen for release --- diff --git a/src/bin/dhcp4/dhcp4_parser.cc b/src/bin/dhcp4/dhcp4_parser.cc index fc33fdc5e7..ed7da91781 100644 --- a/src/bin/dhcp4/dhcp4_parser.cc +++ b/src/bin/dhcp4/dhcp4_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -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. @@ -43,11 +44,11 @@ // Unqualified %code blocks. -#line 34 "dhcp4_parser.yy" // lalr1.cc:435 +#line 34 "dhcp4_parser.yy" #include -#line 51 "dhcp4_parser.cc" // lalr1.cc:435 +#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 @@ -92,9 +94,6 @@ # endif -// Suppress unused-variable warnings by "using" E. -#define YYUSE(E) ((void) (E)) - // Enable debugging if requested. #if PARSER4_DEBUG @@ -120,13 +119,13 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !PARSER4_DEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) # define YY_REDUCE_PRINT(Rule) static_cast (0) # define YY_STACK_PRINT() static_cast (0) @@ -140,57 +139,17 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "dhcp4_parser.yy" // lalr1.cc:510 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 146 "dhcp4_parser.cc" // lalr1.cc:510 - - /* 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) - : #if PARSER4_DEBUG - yydebug_ (false), + : yydebug_ (false), yycdebug_ (&std::cerr), +#else + : #endif ctx (ctx_yyarg) {} @@ -202,7 +161,7 @@ namespace isc { namespace dhcp { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -233,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 () @@ -248,33 +207,33 @@ 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 ()) - { - case 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value)); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value)); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -291,33 +250,33 @@ 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 ()) - { - case 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (YY_MOVE (that.value)); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (YY_MOVE (that.value)); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (YY_MOVE (that.value)); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (YY_MOVE (that.value)); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (YY_MOVE (that.value)); break; @@ -326,41 +285,83 @@ namespace isc { namespace dhcp { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L + Dhcp4Parser::stack_symbol_type& + Dhcp4Parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value + value.copy< ElementPtr > (that.value); + break; + + case symbol_kind::S_BOOLEAN: // "boolean" + value.copy< bool > (that.value); + break; + + case symbol_kind::S_FLOAT: // "floating point" + value.copy< double > (that.value); + break; + + case symbol_kind::S_INTEGER: // "integer" + value.copy< int64_t > (that.value); + break; + + case symbol_kind::S_STRING: // "constant string" + value.copy< std::string > (that.value); + break; + + default: + break; + } + + location = that.location; + return *this; + } + Dhcp4Parser::stack_symbol_type& Dhcp4Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) - { - case 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (that.value); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (that.value); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (that.value); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (that.value); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (that.value); break; @@ -386,105 +387,103 @@ 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". + YY_USE (yyoutput); if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) - { - case 201: // "constant string" -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < std::string > (); } -#line 410 "dhcp4_parser.cc" // lalr1.cc:676 + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) + { + case symbol_kind::S_STRING: // "constant string" +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 408 "dhcp4_parser.cc" break; - case 202: // "integer" -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < int64_t > (); } -#line 416 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_INTEGER: // "integer" +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 414 "dhcp4_parser.cc" break; - case 203: // "floating point" -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < double > (); } -#line 422 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_FLOAT: // "floating point" +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 420 "dhcp4_parser.cc" break; - case 204: // "boolean" -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < bool > (); } -#line 428 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_BOOLEAN: // "boolean" +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 426 "dhcp4_parser.cc" break; - case 220: // value -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 434 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_value: // value +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 432 "dhcp4_parser.cc" break; - case 224: // map_value -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 440 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_map_value: // map_value +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 438 "dhcp4_parser.cc" break; - case 266: // ddns_replace_client_name_value -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 446 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 444 "dhcp4_parser.cc" break; - case 291: // socket_type -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 452 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_socket_type: // socket_type +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 450 "dhcp4_parser.cc" break; - case 294: // outbound_interface_value -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 458 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_outbound_interface_value: // outbound_interface_value +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 456 "dhcp4_parser.cc" break; - case 316: // db_type -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 464 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_db_type: // db_type +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 462 "dhcp4_parser.cc" break; - case 345: // on_fail_mode -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 470 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_on_fail_mode: // on_fail_mode +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 468 "dhcp4_parser.cc" break; - case 416: // hr_mode -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 476 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_hr_mode: // hr_mode +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 474 "dhcp4_parser.cc" break; - case 571: // ncr_protocol_value -#line 285 "dhcp4_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 482 "dhcp4_parser.cc" // lalr1.cc:676 + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value +#line 285 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 480 "dhcp4_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -543,11 +542,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 @@ -571,7 +570,6 @@ namespace isc { namespace dhcp { int Dhcp4Parser::parse () { - // State. int yyn; /// Length of the RHS of the rule being reduced. int yylen = 0; @@ -607,7 +605,8 @@ namespace isc { namespace dhcp { | yynewstate -- push a new symbol on the stack. | `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -621,14 +620,14 @@ namespace isc { namespace dhcp { `-----------*/ yybackup: // Try to take a decision without lookahead. - yyn = yypact_[yystack_[0].state]; + yyn = yypact_[+yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) goto yydefault; // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -647,11 +646,23 @@ 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 ()) - goto yydefault; + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } // Reduce or error. yyn = yytable_[yyn]; @@ -668,7 +679,7 @@ namespace isc { namespace dhcp { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, YY_MOVE (yyla)); + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); goto yynewstate; @@ -676,7 +687,7 @@ namespace isc { namespace dhcp { | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: - yyn = yydefact_[yystack_[0].state]; + yyn = yydefact_[+yystack_[0].state]; if (yyn == 0) goto yyerrlab; goto yyreduce; @@ -695,31 +706,31 @@ namespace isc { namespace dhcp { when using variants. */ switch (yyr1_[yyn]) { - case 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value yylhs.value.emplace< ElementPtr > (); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" yylhs.value.emplace< bool > (); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" yylhs.value.emplace< double > (); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< int64_t > (); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" yylhs.value.emplace< std::string > (); break; @@ -743,278 +754,278 @@ namespace isc { namespace dhcp { { switch (yyn) { - case 2: -#line 294 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 750 "dhcp4_parser.cc" // lalr1.cc:919 + case 2: // $@1: %empty +#line 294 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.NO_KEYWORD; } +#line 761 "dhcp4_parser.cc" break; - case 4: -#line 295 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.CONFIG; } -#line 756 "dhcp4_parser.cc" // lalr1.cc:919 + case 4: // $@2: %empty +#line 295 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.CONFIG; } +#line 767 "dhcp4_parser.cc" break; - case 6: -#line 296 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP4; } -#line 762 "dhcp4_parser.cc" // lalr1.cc:919 + case 6: // $@3: %empty +#line 296 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.DHCP4; } +#line 773 "dhcp4_parser.cc" break; - case 8: -#line 297 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 768 "dhcp4_parser.cc" // lalr1.cc:919 + case 8: // $@4: %empty +#line 297 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.INTERFACES_CONFIG; } +#line 779 "dhcp4_parser.cc" break; - case 10: -#line 298 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.SUBNET4; } -#line 774 "dhcp4_parser.cc" // lalr1.cc:919 + case 10: // $@5: %empty +#line 298 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.SUBNET4; } +#line 785 "dhcp4_parser.cc" break; - case 12: -#line 299 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.POOLS; } -#line 780 "dhcp4_parser.cc" // lalr1.cc:919 + case 12: // $@6: %empty +#line 299 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.POOLS; } +#line 791 "dhcp4_parser.cc" break; - case 14: -#line 300 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.RESERVATIONS; } -#line 786 "dhcp4_parser.cc" // lalr1.cc:919 + case 14: // $@7: %empty +#line 300 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.RESERVATIONS; } +#line 797 "dhcp4_parser.cc" break; - case 16: -#line 301 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP4; } -#line 792 "dhcp4_parser.cc" // lalr1.cc:919 + case 16: // $@8: %empty +#line 301 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.DHCP4; } +#line 803 "dhcp4_parser.cc" break; - case 18: -#line 302 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.OPTION_DEF; } -#line 798 "dhcp4_parser.cc" // lalr1.cc:919 + case 18: // $@9: %empty +#line 302 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.OPTION_DEF; } +#line 809 "dhcp4_parser.cc" break; - case 20: -#line 303 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.OPTION_DATA; } -#line 804 "dhcp4_parser.cc" // lalr1.cc:919 + case 20: // $@10: %empty +#line 303 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.OPTION_DATA; } +#line 815 "dhcp4_parser.cc" break; - case 22: -#line 304 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 810 "dhcp4_parser.cc" // lalr1.cc:919 + case 22: // $@11: %empty +#line 304 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } +#line 821 "dhcp4_parser.cc" break; - case 24: -#line 305 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 816 "dhcp4_parser.cc" // lalr1.cc:919 + case 24: // $@12: %empty +#line 305 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.DHCP_DDNS; } +#line 827 "dhcp4_parser.cc" break; - case 26: -#line 306 "dhcp4_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.CONFIG_CONTROL; } -#line 822 "dhcp4_parser.cc" // lalr1.cc:919 + case 26: // $@13: %empty +#line 306 "dhcp4_parser.yy" + { ctx.ctx_ = ctx.CONFIG_CONTROL; } +#line 833 "dhcp4_parser.cc" break; - case 28: -#line 314 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 828 "dhcp4_parser.cc" // lalr1.cc:919 + case 28: // value: "integer" +#line 314 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 839 "dhcp4_parser.cc" break; - case 29: -#line 315 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 834 "dhcp4_parser.cc" // lalr1.cc:919 + case 29: // value: "floating point" +#line 315 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 845 "dhcp4_parser.cc" break; - case 30: -#line 316 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 840 "dhcp4_parser.cc" // lalr1.cc:919 + case 30: // value: "boolean" +#line 316 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 851 "dhcp4_parser.cc" break; - case 31: -#line 317 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 846 "dhcp4_parser.cc" // lalr1.cc:919 + case 31: // value: "constant string" +#line 317 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 857 "dhcp4_parser.cc" break; - case 32: -#line 318 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 852 "dhcp4_parser.cc" // lalr1.cc:919 + case 32: // value: "null" +#line 318 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 863 "dhcp4_parser.cc" break; - case 33: -#line 319 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 858 "dhcp4_parser.cc" // lalr1.cc:919 + case 33: // value: map2 +#line 319 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 869 "dhcp4_parser.cc" break; - case 34: -#line 320 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 864 "dhcp4_parser.cc" // lalr1.cc:919 + case 34: // value: list_generic +#line 320 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 875 "dhcp4_parser.cc" break; - case 35: -#line 323 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 35: // sub_json: value +#line 323 "dhcp4_parser.yy" + { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 873 "dhcp4_parser.cc" // lalr1.cc:919 +#line 884 "dhcp4_parser.cc" break; - case 36: -#line 328 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 36: // $@14: %empty +#line 328 "dhcp4_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 884 "dhcp4_parser.cc" // lalr1.cc:919 +#line 895 "dhcp4_parser.cc" break; - case 37: -#line 333 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 37: // map2: "{" $@14 map_content "}" +#line 333 "dhcp4_parser.yy" + { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 894 "dhcp4_parser.cc" // lalr1.cc:919 +#line 905 "dhcp4_parser.cc" break; - case 38: -#line 339 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 900 "dhcp4_parser.cc" // lalr1.cc:919 + case 38: // map_value: map2 +#line 339 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 911 "dhcp4_parser.cc" break; - case 41: -#line 346 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 41: // not_empty_map: "constant string" ":" value +#line 346 "dhcp4_parser.yy" + { // map containing a single entry ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location)); ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 910 "dhcp4_parser.cc" // lalr1.cc:919 +#line 921 "dhcp4_parser.cc" break; - case 42: -#line 351 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 42: // not_empty_map: not_empty_map "," "constant string" ":" value +#line 351 "dhcp4_parser.yy" + { // map consisting of a shorter map followed by // comma and string:value ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location)); ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 921 "dhcp4_parser.cc" // lalr1.cc:919 +#line 932 "dhcp4_parser.cc" break; - case 43: -#line 359 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 43: // $@15: %empty +#line 359 "dhcp4_parser.yy" + { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 930 "dhcp4_parser.cc" // lalr1.cc:919 +#line 941 "dhcp4_parser.cc" break; - case 44: -#line 362 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 44: // list_generic: "[" $@15 list_content "]" +#line 362 "dhcp4_parser.yy" + { // list parsing complete. Put any sanity checking here } -#line 938 "dhcp4_parser.cc" // lalr1.cc:919 +#line 949 "dhcp4_parser.cc" break; - case 47: -#line 370 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 47: // not_empty_list: value +#line 370 "dhcp4_parser.yy" + { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 947 "dhcp4_parser.cc" // lalr1.cc:919 +#line 958 "dhcp4_parser.cc" break; - case 48: -#line 374 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 48: // not_empty_list: not_empty_list "," value +#line 374 "dhcp4_parser.yy" + { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 956 "dhcp4_parser.cc" // lalr1.cc:919 +#line 967 "dhcp4_parser.cc" break; - case 49: -#line 381 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 49: // $@16: %empty +#line 381 "dhcp4_parser.yy" + { // List parsing about to start } -#line 964 "dhcp4_parser.cc" // lalr1.cc:919 +#line 975 "dhcp4_parser.cc" break; - case 50: -#line 383 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 50: // list_strings: "[" $@16 list_strings_content "]" +#line 383 "dhcp4_parser.yy" + { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 973 "dhcp4_parser.cc" // lalr1.cc:919 +#line 984 "dhcp4_parser.cc" break; - case 53: -#line 392 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 53: // not_empty_list_strings: "constant string" +#line 392 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 982 "dhcp4_parser.cc" // lalr1.cc:919 +#line 993 "dhcp4_parser.cc" break; - case 54: -#line 396 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 54: // not_empty_list_strings: not_empty_list_strings "," "constant string" +#line 396 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 991 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1002 "dhcp4_parser.cc" break; - case 55: -#line 407 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 55: // unknown_map_entry: "constant string" ":" +#line 407 "dhcp4_parser.yy" + { const std::string& where = ctx.contextName(); const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 1002 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1013 "dhcp4_parser.cc" break; - case 56: -#line 416 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 56: // $@17: %empty +#line 416 "dhcp4_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1013 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1024 "dhcp4_parser.cc" break; - case 57: -#line 421 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 57: // syntax_map: "{" $@17 global_object "}" +#line 421 "dhcp4_parser.yy" + { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. @@ -1022,12 +1033,12 @@ namespace isc { namespace dhcp { // Dhcp4 is required ctx.require("Dhcp4", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1026 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1037 "dhcp4_parser.cc" break; - case 58: -#line 431 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 58: // $@18: %empty +#line 431 "dhcp4_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map // Prevent against duplicate. @@ -1037,624 +1048,624 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP4); } -#line 1041 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1052 "dhcp4_parser.cc" break; - case 59: -#line 440 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 59: // global_object: "Dhcp4" $@18 ":" "{" global_params "}" +#line 440 "dhcp4_parser.yy" + { // No global parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1051 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1062 "dhcp4_parser.cc" break; - case 60: -#line 448 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 60: // $@19: %empty +#line 448 "dhcp4_parser.yy" + { // Parse the Dhcp4 map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1061 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1072 "dhcp4_parser.cc" break; - case 61: -#line 452 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 61: // sub_dhcp4: "{" $@19 global_params "}" +#line 452 "dhcp4_parser.yy" + { // No global parameter is required // parsing completed } -#line 1070 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1081 "dhcp4_parser.cc" break; - case 126: -#line 527 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 126: // valid_lifetime: "valid-lifetime" ":" "integer" +#line 527 "dhcp4_parser.yy" + { ctx.unique("valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1080 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1091 "dhcp4_parser.cc" break; - case 127: -#line 533 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 127: // min_valid_lifetime: "min-valid-lifetime" ":" "integer" +#line 533 "dhcp4_parser.yy" + { ctx.unique("min-valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-valid-lifetime", prf); } -#line 1090 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1101 "dhcp4_parser.cc" break; - case 128: -#line 539 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 128: // max_valid_lifetime: "max-valid-lifetime" ":" "integer" +#line 539 "dhcp4_parser.yy" + { ctx.unique("max-valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-valid-lifetime", prf); } -#line 1100 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1111 "dhcp4_parser.cc" break; - case 129: -#line 545 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 129: // renew_timer: "renew-timer" ":" "integer" +#line 545 "dhcp4_parser.yy" + { ctx.unique("renew-timer", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1110 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1121 "dhcp4_parser.cc" break; - case 130: -#line 551 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 130: // rebind_timer: "rebind-timer" ":" "integer" +#line 551 "dhcp4_parser.yy" + { ctx.unique("rebind-timer", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1120 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1131 "dhcp4_parser.cc" break; - case 131: -#line 557 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 131: // calculate_tee_times: "calculate-tee-times" ":" "boolean" +#line 557 "dhcp4_parser.yy" + { ctx.unique("calculate-tee-times", ctx.loc2pos(yystack_[2].location)); ElementPtr ctt(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("calculate-tee-times", ctt); } -#line 1130 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1141 "dhcp4_parser.cc" break; - case 132: -#line 563 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 132: // t1_percent: "t1-percent" ":" "floating point" +#line 563 "dhcp4_parser.yy" + { ctx.unique("t1-percent", ctx.loc2pos(yystack_[2].location)); ElementPtr t1(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t1-percent", t1); } -#line 1140 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1151 "dhcp4_parser.cc" break; - case 133: -#line 569 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 133: // t2_percent: "t2-percent" ":" "floating point" +#line 569 "dhcp4_parser.yy" + { ctx.unique("t2-percent", ctx.loc2pos(yystack_[2].location)); ElementPtr t2(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t2-percent", t2); } -#line 1150 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1161 "dhcp4_parser.cc" break; - case 134: -#line 575 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 134: // cache_threshold: "cache-threshold" ":" "floating point" +#line 575 "dhcp4_parser.yy" + { ctx.unique("cache-threshold", ctx.loc2pos(yystack_[2].location)); ElementPtr ct(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("cache-threshold", ct); } -#line 1160 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1171 "dhcp4_parser.cc" break; - case 135: -#line 581 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 135: // cache_max_age: "cache-max-age" ":" "integer" +#line 581 "dhcp4_parser.yy" + { ctx.unique("cache-max-age", ctx.loc2pos(yystack_[2].location)); ElementPtr cm(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("cache-max-age", cm); } -#line 1170 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1181 "dhcp4_parser.cc" break; - case 136: -#line 587 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 136: // decline_probation_period: "decline-probation-period" ":" "integer" +#line 587 "dhcp4_parser.yy" + { ctx.unique("decline-probation-period", ctx.loc2pos(yystack_[2].location)); ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1180 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1191 "dhcp4_parser.cc" break; - case 137: -#line 593 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 137: // $@20: %empty +#line 593 "dhcp4_parser.yy" + { ctx.unique("server-tag", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1189 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1200 "dhcp4_parser.cc" break; - case 138: -#line 596 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 138: // server_tag: "server-tag" $@20 ":" "constant string" +#line 596 "dhcp4_parser.yy" + { ElementPtr stag(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-tag", stag); ctx.leave(); } -#line 1199 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1210 "dhcp4_parser.cc" break; - case 139: -#line 602 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 139: // parked_packet_limit: "parked-packet-limit" ":" "integer" +#line 602 "dhcp4_parser.yy" + { ctx.unique("parked-packet-limit", ctx.loc2pos(yystack_[2].location)); ElementPtr ppl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("parked-packet-limit", ppl); } -#line 1209 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1220 "dhcp4_parser.cc" break; - case 140: -#line 608 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 140: // echo_client_id: "echo-client-id" ":" "boolean" +#line 608 "dhcp4_parser.yy" + { ctx.unique("echo-client-id", ctx.loc2pos(yystack_[2].location)); ElementPtr echo(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("echo-client-id", echo); } -#line 1219 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1230 "dhcp4_parser.cc" break; - case 141: -#line 614 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 141: // match_client_id: "match-client-id" ":" "boolean" +#line 614 "dhcp4_parser.yy" + { ctx.unique("match-client-id", ctx.loc2pos(yystack_[2].location)); ElementPtr match(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("match-client-id", match); } -#line 1229 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1240 "dhcp4_parser.cc" break; - case 142: -#line 620 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 142: // authoritative: "authoritative" ":" "boolean" +#line 620 "dhcp4_parser.yy" + { ctx.unique("authoritative", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("authoritative", prf); } -#line 1239 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1250 "dhcp4_parser.cc" break; - case 143: -#line 626 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 143: // ddns_send_updates: "ddns-send-updates" ":" "boolean" +#line 626 "dhcp4_parser.yy" + { ctx.unique("ddns-send-updates", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-send-updates", b); } -#line 1249 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1260 "dhcp4_parser.cc" break; - case 144: -#line 632 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 144: // ddns_override_no_update: "ddns-override-no-update" ":" "boolean" +#line 632 "dhcp4_parser.yy" + { ctx.unique("ddns-override-no-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-no-update", b); } -#line 1259 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1270 "dhcp4_parser.cc" break; - case 145: -#line 638 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 145: // ddns_override_client_update: "ddns-override-client-update" ":" "boolean" +#line 638 "dhcp4_parser.yy" + { ctx.unique("ddns-override-client-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-client-update", b); } -#line 1269 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1280 "dhcp4_parser.cc" break; - case 146: -#line 644 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 146: // $@21: %empty +#line 644 "dhcp4_parser.yy" + { ctx.enter(ctx.REPLACE_CLIENT_NAME); ctx.unique("ddns-replace-client-name", ctx.loc2pos(yystack_[0].location)); } -#line 1278 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1289 "dhcp4_parser.cc" break; - case 147: -#line 647 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 147: // ddns_replace_client_name: "ddns-replace-client-name" $@21 ":" ddns_replace_client_name_value +#line 647 "dhcp4_parser.yy" + { ctx.stack_.back()->set("ddns-replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1287 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1298 "dhcp4_parser.cc" break; - case 148: -#line 653 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 148: // ddns_replace_client_name_value: "when-present" +#line 653 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 1295 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1306 "dhcp4_parser.cc" break; - case 149: -#line 656 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 149: // ddns_replace_client_name_value: "never" +#line 656 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 1303 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1314 "dhcp4_parser.cc" break; - case 150: -#line 659 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 150: // ddns_replace_client_name_value: "always" +#line 659 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 1311 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1322 "dhcp4_parser.cc" break; - case 151: -#line 662 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 151: // ddns_replace_client_name_value: "when-not-present" +#line 662 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 1319 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1330 "dhcp4_parser.cc" break; - case 152: -#line 665 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 152: // ddns_replace_client_name_value: "boolean" +#line 665 "dhcp4_parser.yy" + { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 1328 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1339 "dhcp4_parser.cc" break; - case 153: -#line 671 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 153: // $@22: %empty +#line 671 "dhcp4_parser.yy" + { ctx.unique("ddns-generated-prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1337 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1348 "dhcp4_parser.cc" break; - case 154: -#line 674 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 154: // ddns_generated_prefix: "ddns-generated-prefix" $@22 ":" "constant string" +#line 674 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-generated-prefix", s); ctx.leave(); } -#line 1347 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1358 "dhcp4_parser.cc" break; - case 155: -#line 680 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 155: // $@23: %empty +#line 680 "dhcp4_parser.yy" + { ctx.unique("ddns-qualifying-suffix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1356 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1367 "dhcp4_parser.cc" break; - case 156: -#line 683 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 156: // ddns_qualifying_suffix: "ddns-qualifying-suffix" $@23 ":" "constant string" +#line 683 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-qualifying-suffix", s); ctx.leave(); } -#line 1366 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1377 "dhcp4_parser.cc" break; - case 157: -#line 689 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 157: // ddns_update_on_renew: "ddns-update-on-renew" ":" "boolean" +#line 689 "dhcp4_parser.yy" + { ctx.unique("ddns-update-on-renew", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-update-on-renew", b); } -#line 1376 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1387 "dhcp4_parser.cc" break; - case 158: -#line 695 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 158: // ddns_use_conflict_resolution: "ddns-use-conflict-resolution" ":" "boolean" +#line 695 "dhcp4_parser.yy" + { ctx.unique("ddns-use-conflict-resolution", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-use-conflict-resolution", b); } -#line 1386 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1397 "dhcp4_parser.cc" break; - case 159: -#line 701 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 159: // $@24: %empty +#line 701 "dhcp4_parser.yy" + { ctx.unique("hostname-char-set", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1395 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1406 "dhcp4_parser.cc" break; - case 160: -#line 704 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 160: // hostname_char_set: "hostname-char-set" $@24 ":" "constant string" +#line 704 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 1405 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1416 "dhcp4_parser.cc" break; - case 161: -#line 710 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 161: // $@25: %empty +#line 710 "dhcp4_parser.yy" + { ctx.unique("hostname-char-replacement", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1414 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1425 "dhcp4_parser.cc" break; - case 162: -#line 713 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 162: // hostname_char_replacement: "hostname-char-replacement" $@25 ":" "constant string" +#line 713 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 1424 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1435 "dhcp4_parser.cc" break; - case 163: -#line 719 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 163: // store_extended_info: "store-extended-info" ":" "boolean" +#line 719 "dhcp4_parser.yy" + { ctx.unique("store-extended-info", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("store-extended-info", b); } -#line 1434 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1445 "dhcp4_parser.cc" break; - case 164: -#line 725 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 164: // statistic_default_sample_count: "statistic-default-sample-count" ":" "integer" +#line 725 "dhcp4_parser.yy" + { ctx.unique("statistic-default-sample-count", ctx.loc2pos(yystack_[2].location)); 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 1444 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1455 "dhcp4_parser.cc" break; - case 165: -#line 731 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 165: // statistic_default_sample_age: "statistic-default-sample-age" ":" "integer" +#line 731 "dhcp4_parser.yy" + { ctx.unique("statistic-default-sample-age", ctx.loc2pos(yystack_[2].location)); 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 1454 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1465 "dhcp4_parser.cc" break; - case 166: -#line 737 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 166: // ip_reservations_unique: "ip-reservations-unique" ":" "boolean" +#line 737 "dhcp4_parser.yy" + { ctx.unique("ip-reservations-unique", ctx.loc2pos(yystack_[2].location)); ElementPtr unique(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-reservations-unique", unique); } -#line 1464 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1475 "dhcp4_parser.cc" break; - case 167: -#line 743 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 167: // $@26: %empty +#line 743 "dhcp4_parser.yy" + { ctx.unique("interfaces-config", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces-config", i); ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1476 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1487 "dhcp4_parser.cc" break; - case 168: -#line 749 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 168: // interfaces_config: "interfaces-config" $@26 ":" "{" interfaces_config_params "}" +#line 749 "dhcp4_parser.yy" + { // No interfaces config param is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1486 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1497 "dhcp4_parser.cc" break; - case 178: -#line 768 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 178: // $@27: %empty +#line 768 "dhcp4_parser.yy" + { // Parse the interfaces-config map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1496 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1507 "dhcp4_parser.cc" break; - case 179: -#line 772 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 179: // sub_interfaces4: "{" $@27 interfaces_config_params "}" +#line 772 "dhcp4_parser.yy" + { // No interfaces config param is required // parsing completed } -#line 1505 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1516 "dhcp4_parser.cc" break; - case 180: -#line 777 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 180: // $@28: %empty +#line 777 "dhcp4_parser.yy" + { ctx.unique("interfaces", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1517 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1528 "dhcp4_parser.cc" break; - case 181: -#line 783 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 181: // interfaces_list: "interfaces" $@28 ":" list_strings +#line 783 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1526 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1537 "dhcp4_parser.cc" break; - case 182: -#line 788 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 182: // $@29: %empty +#line 788 "dhcp4_parser.yy" + { ctx.unique("dhcp-socket-type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DHCP_SOCKET_TYPE); } -#line 1535 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1546 "dhcp4_parser.cc" break; - case 183: -#line 791 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 183: // dhcp_socket_type: "dhcp-socket-type" $@29 ":" socket_type +#line 791 "dhcp4_parser.yy" + { ctx.stack_.back()->set("dhcp-socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1544 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1555 "dhcp4_parser.cc" break; - case 184: -#line 796 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); } -#line 1550 "dhcp4_parser.cc" // lalr1.cc:919 + case 184: // socket_type: "raw" +#line 796 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); } +#line 1561 "dhcp4_parser.cc" break; - case 185: -#line 797 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); } -#line 1556 "dhcp4_parser.cc" // lalr1.cc:919 + case 185: // socket_type: "udp" +#line 797 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); } +#line 1567 "dhcp4_parser.cc" break; - case 186: -#line 800 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 186: // $@30: %empty +#line 800 "dhcp4_parser.yy" + { ctx.unique("outbound-interface", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.OUTBOUND_INTERFACE); } -#line 1565 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1576 "dhcp4_parser.cc" break; - case 187: -#line 803 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 187: // outbound_interface: "outbound-interface" $@30 ":" outbound_interface_value +#line 803 "dhcp4_parser.yy" + { ctx.stack_.back()->set("outbound-interface", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1574 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1585 "dhcp4_parser.cc" break; - case 188: -#line 808 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 188: // outbound_interface_value: "same-as-inbound" +#line 808 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("same-as-inbound", ctx.loc2pos(yystack_[0].location))); } -#line 1582 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1593 "dhcp4_parser.cc" break; - case 189: -#line 810 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 189: // outbound_interface_value: "use-routing" +#line 810 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("use-routing", ctx.loc2pos(yystack_[0].location))); } -#line 1590 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1601 "dhcp4_parser.cc" break; - case 190: -#line 814 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 190: // re_detect: "re-detect" ":" "boolean" +#line 814 "dhcp4_parser.yy" + { ctx.unique("re-detect", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1600 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1611 "dhcp4_parser.cc" break; - case 191: -#line 821 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 191: // $@31: %empty +#line 821 "dhcp4_parser.yy" + { ctx.unique("lease-database", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lease-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1612 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1623 "dhcp4_parser.cc" break; - case 192: -#line 827 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 192: // lease_database: "lease-database" $@31 ":" "{" database_map_params "}" +#line 827 "dhcp4_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1623 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1634 "dhcp4_parser.cc" break; - case 193: -#line 834 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 193: // $@32: %empty +#line 834 "dhcp4_parser.yy" + { ctx.unique("sanity-checks", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sanity-checks", m); ctx.stack_.push_back(m); ctx.enter(ctx.SANITY_CHECKS); } -#line 1635 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1646 "dhcp4_parser.cc" break; - case 194: -#line 840 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 194: // sanity_checks: "sanity-checks" $@32 ":" "{" sanity_checks_params "}" +#line 840 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1644 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1655 "dhcp4_parser.cc" break; - case 198: -#line 850 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 198: // $@33: %empty +#line 850 "dhcp4_parser.yy" + { ctx.unique("lease-checks", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1653 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1664 "dhcp4_parser.cc" break; - case 199: -#line 853 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 199: // lease_checks: "lease-checks" $@33 ":" "constant string" +#line 853 "dhcp4_parser.yy" + { if ( (string(yystack_[0].value.as < std::string > ()) == "none") || (string(yystack_[0].value.as < std::string > ()) == "warn") || @@ -1669,746 +1680,746 @@ namespace isc { namespace dhcp { ", supported values are: none, warn, fix, fix-del, del"); } } -#line 1673 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1684 "dhcp4_parser.cc" break; - case 200: -#line 869 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 200: // $@34: %empty +#line 869 "dhcp4_parser.yy" + { ctx.unique("hosts-database", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1685 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1696 "dhcp4_parser.cc" break; - case 201: -#line 875 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 201: // hosts_database: "hosts-database" $@34 ":" "{" database_map_params "}" +#line 875 "dhcp4_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1696 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1707 "dhcp4_parser.cc" break; - case 202: -#line 882 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 202: // $@35: %empty +#line 882 "dhcp4_parser.yy" + { ctx.unique("hosts-databases", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1708 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1719 "dhcp4_parser.cc" break; - case 203: -#line 888 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 203: // hosts_databases: "hosts-databases" $@35 ":" "[" database_list "]" +#line 888 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1717 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1728 "dhcp4_parser.cc" break; - case 208: -#line 901 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 208: // $@36: %empty +#line 901 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1727 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1738 "dhcp4_parser.cc" break; - case 209: -#line 905 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 209: // database: "{" $@36 database_map_params "}" +#line 905 "dhcp4_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1737 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1748 "dhcp4_parser.cc" break; - case 234: -#line 939 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 234: // $@37: %empty +#line 939 "dhcp4_parser.yy" + { ctx.unique("type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DATABASE_TYPE); } -#line 1746 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1757 "dhcp4_parser.cc" break; - case 235: -#line 942 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 235: // database_type: "type" $@37 ":" db_type +#line 942 "dhcp4_parser.yy" + { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1755 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1766 "dhcp4_parser.cc" break; - case 236: -#line 947 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1761 "dhcp4_parser.cc" // lalr1.cc:919 + case 236: // db_type: "memfile" +#line 947 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } +#line 1772 "dhcp4_parser.cc" break; - case 237: -#line 948 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1767 "dhcp4_parser.cc" // lalr1.cc:919 + case 237: // db_type: "mysql" +#line 948 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } +#line 1778 "dhcp4_parser.cc" break; - case 238: -#line 949 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1773 "dhcp4_parser.cc" // lalr1.cc:919 + case 238: // db_type: "postgresql" +#line 949 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } +#line 1784 "dhcp4_parser.cc" break; - case 239: -#line 950 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1779 "dhcp4_parser.cc" // lalr1.cc:919 + case 239: // db_type: "cql" +#line 950 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } +#line 1790 "dhcp4_parser.cc" break; - case 240: -#line 953 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 240: // $@38: %empty +#line 953 "dhcp4_parser.yy" + { ctx.unique("user", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1788 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1799 "dhcp4_parser.cc" break; - case 241: -#line 956 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 241: // user: "user" $@38 ":" "constant string" +#line 956 "dhcp4_parser.yy" + { ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1798 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1809 "dhcp4_parser.cc" break; - case 242: -#line 962 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 242: // $@39: %empty +#line 962 "dhcp4_parser.yy" + { ctx.unique("password", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1807 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1818 "dhcp4_parser.cc" break; - case 243: -#line 965 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 243: // password: "password" $@39 ":" "constant string" +#line 965 "dhcp4_parser.yy" + { ElementPtr pwd(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1817 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1828 "dhcp4_parser.cc" break; - case 244: -#line 971 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 244: // $@40: %empty +#line 971 "dhcp4_parser.yy" + { ctx.unique("host", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1826 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1837 "dhcp4_parser.cc" break; - case 245: -#line 974 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 245: // host: "host" $@40 ":" "constant string" +#line 974 "dhcp4_parser.yy" + { ElementPtr h(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1836 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1847 "dhcp4_parser.cc" break; - case 246: -#line 980 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 246: // port: "port" ":" "integer" +#line 980 "dhcp4_parser.yy" + { ctx.unique("port", ctx.loc2pos(yystack_[2].location)); ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1846 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1857 "dhcp4_parser.cc" break; - case 247: -#line 986 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 247: // $@41: %empty +#line 986 "dhcp4_parser.yy" + { ctx.unique("name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1855 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1866 "dhcp4_parser.cc" break; - case 248: -#line 989 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 248: // name: "name" $@41 ":" "constant string" +#line 989 "dhcp4_parser.yy" + { ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1865 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1876 "dhcp4_parser.cc" break; - case 249: -#line 995 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 249: // persist: "persist" ":" "boolean" +#line 995 "dhcp4_parser.yy" + { ctx.unique("persist", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1875 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1886 "dhcp4_parser.cc" break; - case 250: -#line 1001 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 250: // lfc_interval: "lfc-interval" ":" "integer" +#line 1001 "dhcp4_parser.yy" + { ctx.unique("lfc-interval", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1885 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1896 "dhcp4_parser.cc" break; - case 251: -#line 1007 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 251: // readonly: "readonly" ":" "boolean" +#line 1007 "dhcp4_parser.yy" + { ctx.unique("readonly", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1895 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1906 "dhcp4_parser.cc" break; - case 252: -#line 1013 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 252: // connect_timeout: "connect-timeout" ":" "integer" +#line 1013 "dhcp4_parser.yy" + { ctx.unique("connect-timeout", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1905 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1916 "dhcp4_parser.cc" break; - case 253: -#line 1019 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 253: // request_timeout: "request-timeout" ":" "integer" +#line 1019 "dhcp4_parser.yy" + { ctx.unique("request-timeout", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1915 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1926 "dhcp4_parser.cc" break; - case 254: -#line 1025 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 254: // tcp_keepalive: "tcp-keepalive" ":" "integer" +#line 1025 "dhcp4_parser.yy" + { ctx.unique("tcp-keepalive", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1925 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1936 "dhcp4_parser.cc" break; - case 255: -#line 1031 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 255: // tcp_nodelay: "tcp-nodelay" ":" "boolean" +#line 1031 "dhcp4_parser.yy" + { ctx.unique("tcp-nodelay", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1935 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1946 "dhcp4_parser.cc" break; - case 256: -#line 1037 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 256: // $@42: %empty +#line 1037 "dhcp4_parser.yy" + { ctx.unique("contact-points", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1944 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1955 "dhcp4_parser.cc" break; - case 257: -#line 1040 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 257: // contact_points: "contact-points" $@42 ":" "constant string" +#line 1040 "dhcp4_parser.yy" + { ElementPtr cp(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1954 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1965 "dhcp4_parser.cc" break; - case 258: -#line 1046 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 258: // $@43: %empty +#line 1046 "dhcp4_parser.yy" + { ctx.unique("keyspace", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1963 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1974 "dhcp4_parser.cc" break; - case 259: -#line 1049 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 259: // keyspace: "keyspace" $@43 ":" "constant string" +#line 1049 "dhcp4_parser.yy" + { ElementPtr ks(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1973 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1984 "dhcp4_parser.cc" break; - case 260: -#line 1055 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 260: // $@44: %empty +#line 1055 "dhcp4_parser.yy" + { ctx.unique("consistency", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1982 "dhcp4_parser.cc" // lalr1.cc:919 +#line 1993 "dhcp4_parser.cc" break; - case 261: -#line 1058 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 261: // consistency: "consistency" $@44 ":" "constant string" +#line 1058 "dhcp4_parser.yy" + { ElementPtr c(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("consistency", c); ctx.leave(); } -#line 1992 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2003 "dhcp4_parser.cc" break; - case 262: -#line 1064 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 262: // $@45: %empty +#line 1064 "dhcp4_parser.yy" + { ctx.unique("serial-consistency", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2001 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2012 "dhcp4_parser.cc" break; - case 263: -#line 1067 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 263: // serial_consistency: "serial-consistency" $@45 ":" "constant string" +#line 1067 "dhcp4_parser.yy" + { ElementPtr c(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("serial-consistency", c); ctx.leave(); } -#line 2011 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2022 "dhcp4_parser.cc" break; - case 264: -#line 1073 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 264: // max_reconnect_tries: "max-reconnect-tries" ":" "integer" +#line 1073 "dhcp4_parser.yy" + { ctx.unique("max-reconnect-tries", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 2021 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2032 "dhcp4_parser.cc" break; - case 265: -#line 1079 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 265: // reconnect_wait_time: "reconnect-wait-time" ":" "integer" +#line 1079 "dhcp4_parser.yy" + { ctx.unique("reconnect-wait-time", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 2031 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2042 "dhcp4_parser.cc" break; - case 266: -#line 1085 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 266: // $@46: %empty +#line 1085 "dhcp4_parser.yy" + { ctx.unique("on-fail", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DATABASE_ON_FAIL); } -#line 2040 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2051 "dhcp4_parser.cc" break; - case 267: -#line 1088 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 267: // on_fail: "on-fail" $@46 ":" on_fail_mode +#line 1088 "dhcp4_parser.yy" + { ctx.stack_.back()->set("on-fail", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2049 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2060 "dhcp4_parser.cc" break; - case 268: -#line 1093 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stop-retry-exit", ctx.loc2pos(yystack_[0].location))); } -#line 2055 "dhcp4_parser.cc" // lalr1.cc:919 + case 268: // on_fail_mode: "stop-retry-exit" +#line 1093 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stop-retry-exit", ctx.loc2pos(yystack_[0].location))); } +#line 2066 "dhcp4_parser.cc" break; - case 269: -#line 1094 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-exit", ctx.loc2pos(yystack_[0].location))); } -#line 2061 "dhcp4_parser.cc" // lalr1.cc:919 + case 269: // on_fail_mode: "serve-retry-exit" +#line 1094 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-exit", ctx.loc2pos(yystack_[0].location))); } +#line 2072 "dhcp4_parser.cc" break; - case 270: -#line 1095 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-continue", ctx.loc2pos(yystack_[0].location))); } -#line 2067 "dhcp4_parser.cc" // lalr1.cc:919 + case 270: // on_fail_mode: "serve-retry-continue" +#line 1095 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-continue", ctx.loc2pos(yystack_[0].location))); } +#line 2078 "dhcp4_parser.cc" break; - case 271: -#line 1098 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 271: // max_row_errors: "max-row-errors" ":" "integer" +#line 1098 "dhcp4_parser.yy" + { ctx.unique("max-row-errors", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 2077 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2088 "dhcp4_parser.cc" break; - case 272: -#line 1105 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 272: // $@47: %empty +#line 1105 "dhcp4_parser.yy" + { ctx.unique("host-reservation-identifiers", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host-reservation-identifiers", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 2089 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2100 "dhcp4_parser.cc" break; - case 273: -#line 1111 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 273: // host_reservation_identifiers: "host-reservation-identifiers" $@47 ":" "[" host_reservation_identifiers_list "]" +#line 1111 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2098 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2109 "dhcp4_parser.cc" break; - case 281: -#line 1127 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 281: // duid_id: "duid" +#line 1127 "dhcp4_parser.yy" + { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 2107 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2118 "dhcp4_parser.cc" break; - case 282: -#line 1132 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 282: // hw_address_id: "hw-address" +#line 1132 "dhcp4_parser.yy" + { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 2116 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2127 "dhcp4_parser.cc" break; - case 283: -#line 1137 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 283: // circuit_id: "circuit-id" +#line 1137 "dhcp4_parser.yy" + { ElementPtr circuit(new StringElement("circuit-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(circuit); } -#line 2125 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2136 "dhcp4_parser.cc" break; - case 284: -#line 1142 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 284: // client_id: "client-id" +#line 1142 "dhcp4_parser.yy" + { ElementPtr client(new StringElement("client-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(client); } -#line 2134 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2145 "dhcp4_parser.cc" break; - case 285: -#line 1147 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 285: // flex_id: "flex-id" +#line 1147 "dhcp4_parser.yy" + { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 2143 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2154 "dhcp4_parser.cc" break; - case 286: -#line 1154 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 286: // $@48: %empty +#line 1154 "dhcp4_parser.yy" + { ctx.unique("multi-threading", ctx.loc2pos(yystack_[0].location)); ElementPtr mt(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("multi-threading", mt); ctx.stack_.push_back(mt); ctx.enter(ctx.DHCP_MULTI_THREADING); } -#line 2155 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2166 "dhcp4_parser.cc" break; - case 287: -#line 1160 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 287: // dhcp_multi_threading: "multi-threading" $@48 ":" "{" multi_threading_params "}" +#line 1160 "dhcp4_parser.yy" + { // The enable parameter is required. ctx.require("enable-multi-threading", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 2166 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2177 "dhcp4_parser.cc" break; - case 296: -#line 1179 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 296: // enable_multi_threading: "enable-multi-threading" ":" "boolean" +#line 1179 "dhcp4_parser.yy" + { ctx.unique("enable-multi-threading", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-multi-threading", b); } -#line 2176 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2187 "dhcp4_parser.cc" break; - case 297: -#line 1185 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 297: // thread_pool_size: "thread-pool-size" ":" "integer" +#line 1185 "dhcp4_parser.yy" + { ctx.unique("thread-pool-size", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("thread-pool-size", prf); } -#line 2186 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2197 "dhcp4_parser.cc" break; - case 298: -#line 1191 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 298: // packet_queue_size: "packet-queue-size" ":" "integer" +#line 1191 "dhcp4_parser.yy" + { ctx.unique("packet-queue-size", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("packet-queue-size", prf); } -#line 2196 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2207 "dhcp4_parser.cc" break; - case 299: -#line 1197 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 299: // $@49: %empty +#line 1197 "dhcp4_parser.yy" + { ctx.unique("hooks-libraries", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 2208 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2219 "dhcp4_parser.cc" break; - case 300: -#line 1203 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 300: // hooks_libraries: "hooks-libraries" $@49 ":" "[" hooks_libraries_list "]" +#line 1203 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2217 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2228 "dhcp4_parser.cc" break; - case 305: -#line 1216 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 305: // $@50: %empty +#line 1216 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2227 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2238 "dhcp4_parser.cc" break; - case 306: -#line 1220 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 306: // hooks_library: "{" $@50 hooks_params "}" +#line 1220 "dhcp4_parser.yy" + { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2237 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2248 "dhcp4_parser.cc" break; - case 307: -#line 1226 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 307: // $@51: %empty +#line 1226 "dhcp4_parser.yy" + { // Parse the hooks-libraries list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2247 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2258 "dhcp4_parser.cc" break; - case 308: -#line 1230 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 308: // sub_hooks_library: "{" $@51 hooks_params "}" +#line 1230 "dhcp4_parser.yy" + { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2257 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2268 "dhcp4_parser.cc" break; - case 314: -#line 1245 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 314: // $@52: %empty +#line 1245 "dhcp4_parser.yy" + { ctx.unique("library", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2266 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2277 "dhcp4_parser.cc" break; - case 315: -#line 1248 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 315: // library: "library" $@52 ":" "constant string" +#line 1248 "dhcp4_parser.yy" + { ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 2276 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2287 "dhcp4_parser.cc" break; - case 316: -#line 1254 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 316: // $@53: %empty +#line 1254 "dhcp4_parser.yy" + { ctx.unique("parameters", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2285 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2296 "dhcp4_parser.cc" break; - case 317: -#line 1257 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 317: // parameters: "parameters" $@53 ":" map_value +#line 1257 "dhcp4_parser.yy" + { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2294 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2305 "dhcp4_parser.cc" break; - case 318: -#line 1263 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 318: // $@54: %empty +#line 1263 "dhcp4_parser.yy" + { ctx.unique("expired-leases-processing", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("expired-leases-processing", m); ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 2306 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2317 "dhcp4_parser.cc" break; - case 319: -#line 1269 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 319: // expired_leases_processing: "expired-leases-processing" $@54 ":" "{" expired_leases_params "}" +#line 1269 "dhcp4_parser.yy" + { // No expired lease parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 2316 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2327 "dhcp4_parser.cc" break; - case 328: -#line 1287 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 328: // reclaim_timer_wait_time: "reclaim-timer-wait-time" ":" "integer" +#line 1287 "dhcp4_parser.yy" + { ctx.unique("reclaim-timer-wait-time", ctx.loc2pos(yystack_[2].location)); 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 2326 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2337 "dhcp4_parser.cc" break; - case 329: -#line 1293 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 329: // flush_reclaimed_timer_wait_time: "flush-reclaimed-timer-wait-time" ":" "integer" +#line 1293 "dhcp4_parser.yy" + { ctx.unique("flush-reclaimed-timer-wait-time", ctx.loc2pos(yystack_[2].location)); 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 2336 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2347 "dhcp4_parser.cc" break; - case 330: -#line 1299 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 330: // hold_reclaimed_time: "hold-reclaimed-time" ":" "integer" +#line 1299 "dhcp4_parser.yy" + { ctx.unique("hold-reclaimed-time", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 2346 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2357 "dhcp4_parser.cc" break; - case 331: -#line 1305 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 331: // max_reclaim_leases: "max-reclaim-leases" ":" "integer" +#line 1305 "dhcp4_parser.yy" + { ctx.unique("max-reclaim-leases", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 2356 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2367 "dhcp4_parser.cc" break; - case 332: -#line 1311 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 332: // max_reclaim_time: "max-reclaim-time" ":" "integer" +#line 1311 "dhcp4_parser.yy" + { ctx.unique("max-reclaim-time", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 2366 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2377 "dhcp4_parser.cc" break; - case 333: -#line 1317 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 333: // unwarned_reclaim_cycles: "unwarned-reclaim-cycles" ":" "integer" +#line 1317 "dhcp4_parser.yy" + { ctx.unique("unwarned-reclaim-cycles", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 2376 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2387 "dhcp4_parser.cc" break; - case 334: -#line 1326 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 334: // $@55: %empty +#line 1326 "dhcp4_parser.yy" + { ctx.unique("subnet4", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet4", l); ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET4); } -#line 2388 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2399 "dhcp4_parser.cc" break; - case 335: -#line 1332 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 335: // subnet4_list: "subnet4" $@55 ":" "[" subnet4_list_content "]" +#line 1332 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2397 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2408 "dhcp4_parser.cc" break; - case 340: -#line 1352 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 340: // $@56: %empty +#line 1352 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2407 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2418 "dhcp4_parser.cc" break; - case 341: -#line 1356 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 341: // subnet4: "{" $@56 subnet4_params "}" +#line 1356 "dhcp4_parser.yy" + { // Once we reached this place, the subnet parsing is now complete. // If we want to, we can implement default values here. // In particular we can do things like this: @@ -2429,652 +2440,652 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2433 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2444 "dhcp4_parser.cc" break; - case 342: -#line 1378 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 342: // $@57: %empty +#line 1378 "dhcp4_parser.yy" + { // Parse the subnet4 list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2443 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2454 "dhcp4_parser.cc" break; - case 343: -#line 1382 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 343: // sub_subnet4: "{" $@57 subnet4_params "}" +#line 1382 "dhcp4_parser.yy" + { // The subnet subnet4 parameter is required ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2453 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2464 "dhcp4_parser.cc" break; - case 391: -#line 1441 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 391: // $@58: %empty +#line 1441 "dhcp4_parser.yy" + { ctx.unique("subnet", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2462 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2473 "dhcp4_parser.cc" break; - case 392: -#line 1444 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 392: // subnet: "subnet" $@58 ":" "constant string" +#line 1444 "dhcp4_parser.yy" + { ElementPtr subnet(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 2472 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2483 "dhcp4_parser.cc" break; - case 393: -#line 1450 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 393: // $@59: %empty +#line 1450 "dhcp4_parser.yy" + { ctx.unique("4o6-interface", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2481 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2492 "dhcp4_parser.cc" break; - case 394: -#line 1453 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 394: // subnet_4o6_interface: "4o6-interface" $@59 ":" "constant string" +#line 1453 "dhcp4_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-interface", iface); ctx.leave(); } -#line 2491 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2502 "dhcp4_parser.cc" break; - case 395: -#line 1459 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 395: // $@60: %empty +#line 1459 "dhcp4_parser.yy" + { ctx.unique("4o6-interface-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2500 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2511 "dhcp4_parser.cc" break; - case 396: -#line 1462 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 396: // subnet_4o6_interface_id: "4o6-interface-id" $@60 ":" "constant string" +#line 1462 "dhcp4_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-interface-id", iface); ctx.leave(); } -#line 2510 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2521 "dhcp4_parser.cc" break; - case 397: -#line 1468 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 397: // $@61: %empty +#line 1468 "dhcp4_parser.yy" + { ctx.unique("4o6-subnet", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2519 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2530 "dhcp4_parser.cc" break; - case 398: -#line 1471 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 398: // subnet_4o6_subnet: "4o6-subnet" $@61 ":" "constant string" +#line 1471 "dhcp4_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-subnet", iface); ctx.leave(); } -#line 2529 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2540 "dhcp4_parser.cc" break; - case 399: -#line 1477 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 399: // $@62: %empty +#line 1477 "dhcp4_parser.yy" + { ctx.unique("interface", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2538 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2549 "dhcp4_parser.cc" break; - case 400: -#line 1480 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 400: // interface: "interface" $@62 ":" "constant string" +#line 1480 "dhcp4_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 2548 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2559 "dhcp4_parser.cc" break; - case 401: -#line 1486 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 401: // $@63: %empty +#line 1486 "dhcp4_parser.yy" + { ctx.unique("client-class", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2557 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2568 "dhcp4_parser.cc" break; - case 402: -#line 1489 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 402: // client_class: "client-class" $@63 ":" "constant string" +#line 1489 "dhcp4_parser.yy" + { ElementPtr cls(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 2567 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2578 "dhcp4_parser.cc" break; - case 403: -#line 1495 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 403: // $@64: %empty +#line 1495 "dhcp4_parser.yy" + { ctx.unique("require-client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("require-client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2579 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2590 "dhcp4_parser.cc" break; - case 404: -#line 1501 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 404: // require_client_classes: "require-client-classes" $@64 ":" list_strings +#line 1501 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2588 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2599 "dhcp4_parser.cc" break; - case 405: -#line 1506 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 405: // reservations_global: "reservations-global" ":" "boolean" +#line 1506 "dhcp4_parser.yy" + { ctx.unique("reservations-global", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-global", b); } -#line 2598 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2609 "dhcp4_parser.cc" break; - case 406: -#line 1512 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 406: // reservations_in_subnet: "reservations-in-subnet" ":" "boolean" +#line 1512 "dhcp4_parser.yy" + { ctx.unique("reservations-in-subnet", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-in-subnet", b); } -#line 2608 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2619 "dhcp4_parser.cc" break; - case 407: -#line 1518 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 407: // reservations_out_of_pool: "reservations-out-of-pool" ":" "boolean" +#line 1518 "dhcp4_parser.yy" + { ctx.unique("reservations-out-of-pool", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-out-of-pool", b); } -#line 2618 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2629 "dhcp4_parser.cc" break; - case 408: -#line 1524 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 408: // $@65: %empty +#line 1524 "dhcp4_parser.yy" + { ctx.unique("reservation-mode", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.RESERVATION_MODE); } -#line 2627 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2638 "dhcp4_parser.cc" break; - case 409: -#line 1527 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 409: // reservation_mode: "reservation-mode" $@65 ":" hr_mode +#line 1527 "dhcp4_parser.yy" + { ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2636 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2647 "dhcp4_parser.cc" break; - case 410: -#line 1532 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 2642 "dhcp4_parser.cc" // lalr1.cc:919 + case 410: // hr_mode: "disabled" +#line 1532 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } +#line 2653 "dhcp4_parser.cc" break; - case 411: -#line 1533 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 2648 "dhcp4_parser.cc" // lalr1.cc:919 + case 411: // hr_mode: "out-of-pool" +#line 1533 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } +#line 2659 "dhcp4_parser.cc" break; - case 412: -#line 1534 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } -#line 2654 "dhcp4_parser.cc" // lalr1.cc:919 + case 412: // hr_mode: "global" +#line 1534 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } +#line 2665 "dhcp4_parser.cc" break; - case 413: -#line 1535 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 2660 "dhcp4_parser.cc" // lalr1.cc:919 + case 413: // hr_mode: "all" +#line 1535 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } +#line 2671 "dhcp4_parser.cc" break; - case 414: -#line 1538 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 414: // id: "id" ":" "integer" +#line 1538 "dhcp4_parser.yy" + { ctx.unique("id", ctx.loc2pos(yystack_[2].location)); ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 2670 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2681 "dhcp4_parser.cc" break; - case 415: -#line 1546 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 415: // $@66: %empty +#line 1546 "dhcp4_parser.yy" + { ctx.unique("shared-networks", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("shared-networks", l); ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 2682 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2693 "dhcp4_parser.cc" break; - case 416: -#line 1552 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 416: // shared_networks: "shared-networks" $@66 ":" "[" shared_networks_content "]" +#line 1552 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2691 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2702 "dhcp4_parser.cc" break; - case 421: -#line 1567 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 421: // $@67: %empty +#line 1567 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2701 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2712 "dhcp4_parser.cc" break; - case 422: -#line 1571 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 422: // shared_network: "{" $@67 shared_network_params "}" +#line 1571 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); } -#line 2709 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2720 "dhcp4_parser.cc" break; - case 465: -#line 1625 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 465: // $@68: %empty +#line 1625 "dhcp4_parser.yy" + { ctx.unique("option-def", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-def", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2721 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2732 "dhcp4_parser.cc" break; - case 466: -#line 1631 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 466: // option_def_list: "option-def" $@68 ":" "[" option_def_list_content "]" +#line 1631 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2730 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2741 "dhcp4_parser.cc" break; - case 467: -#line 1639 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 467: // $@69: %empty +#line 1639 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2739 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2750 "dhcp4_parser.cc" break; - case 468: -#line 1642 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 468: // sub_option_def_list: "{" $@69 option_def_list "}" +#line 1642 "dhcp4_parser.yy" + { // parsing completed } -#line 2747 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2758 "dhcp4_parser.cc" break; - case 473: -#line 1658 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 473: // $@70: %empty +#line 1658 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2757 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2768 "dhcp4_parser.cc" break; - case 474: -#line 1662 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 474: // option_def_entry: "{" $@70 option_def_params "}" +#line 1662 "dhcp4_parser.yy" + { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2769 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2780 "dhcp4_parser.cc" break; - case 475: -#line 1673 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 475: // $@71: %empty +#line 1673 "dhcp4_parser.yy" + { // Parse the option-def list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2779 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2790 "dhcp4_parser.cc" break; - case 476: -#line 1677 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 476: // sub_option_def: "{" $@71 option_def_params "}" +#line 1677 "dhcp4_parser.yy" + { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2791 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2802 "dhcp4_parser.cc" break; - case 492: -#line 1709 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 492: // code: "code" ":" "integer" +#line 1709 "dhcp4_parser.yy" + { ctx.unique("code", ctx.loc2pos(yystack_[2].location)); ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2801 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2812 "dhcp4_parser.cc" break; - case 494: -#line 1717 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 494: // $@72: %empty +#line 1717 "dhcp4_parser.yy" + { ctx.unique("type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2810 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2821 "dhcp4_parser.cc" break; - case 495: -#line 1720 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 495: // option_def_type: "type" $@72 ":" "constant string" +#line 1720 "dhcp4_parser.yy" + { ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2820 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2831 "dhcp4_parser.cc" break; - case 496: -#line 1726 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 496: // $@73: %empty +#line 1726 "dhcp4_parser.yy" + { ctx.unique("record-types", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2829 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2840 "dhcp4_parser.cc" break; - case 497: -#line 1729 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 497: // option_def_record_types: "record-types" $@73 ":" "constant string" +#line 1729 "dhcp4_parser.yy" + { ElementPtr rtypes(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2839 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2850 "dhcp4_parser.cc" break; - case 498: -#line 1735 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 498: // $@74: %empty +#line 1735 "dhcp4_parser.yy" + { ctx.unique("space", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2848 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2859 "dhcp4_parser.cc" break; - case 499: -#line 1738 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 499: // space: "space" $@74 ":" "constant string" +#line 1738 "dhcp4_parser.yy" + { ElementPtr space(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2858 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2869 "dhcp4_parser.cc" break; - case 501: -#line 1746 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 501: // $@75: %empty +#line 1746 "dhcp4_parser.yy" + { ctx.unique("encapsulate", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2867 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2878 "dhcp4_parser.cc" break; - case 502: -#line 1749 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 502: // option_def_encapsulate: "encapsulate" $@75 ":" "constant string" +#line 1749 "dhcp4_parser.yy" + { ElementPtr encap(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2877 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2888 "dhcp4_parser.cc" break; - case 503: -#line 1755 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 503: // option_def_array: "array" ":" "boolean" +#line 1755 "dhcp4_parser.yy" + { ctx.unique("array", ctx.loc2pos(yystack_[2].location)); ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2887 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2898 "dhcp4_parser.cc" break; - case 504: -#line 1765 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 504: // $@76: %empty +#line 1765 "dhcp4_parser.yy" + { ctx.unique("option-data", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-data", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2899 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2910 "dhcp4_parser.cc" break; - case 505: -#line 1771 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 505: // option_data_list: "option-data" $@76 ":" "[" option_data_list_content "]" +#line 1771 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2908 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2919 "dhcp4_parser.cc" break; - case 510: -#line 1790 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 510: // $@77: %empty +#line 1790 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2918 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2929 "dhcp4_parser.cc" break; - case 511: -#line 1794 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 511: // option_data_entry: "{" $@77 option_data_params "}" +#line 1794 "dhcp4_parser.yy" + { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2927 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2938 "dhcp4_parser.cc" break; - case 512: -#line 1802 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 512: // $@78: %empty +#line 1802 "dhcp4_parser.yy" + { // Parse the option-data list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2937 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2948 "dhcp4_parser.cc" break; - case 513: -#line 1806 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 513: // sub_option_data: "{" $@78 option_data_params "}" +#line 1806 "dhcp4_parser.yy" + { /// @todo: the code or name parameters are required. // parsing completed } -#line 2946 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2957 "dhcp4_parser.cc" break; - case 528: -#line 1839 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 528: // $@79: %empty +#line 1839 "dhcp4_parser.yy" + { ctx.unique("data", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2955 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2966 "dhcp4_parser.cc" break; - case 529: -#line 1842 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 529: // option_data_data: "data" $@79 ":" "constant string" +#line 1842 "dhcp4_parser.yy" + { ElementPtr data(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2965 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2976 "dhcp4_parser.cc" break; - case 532: -#line 1852 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 532: // option_data_csv_format: "csv-format" ":" "boolean" +#line 1852 "dhcp4_parser.yy" + { ctx.unique("csv-format", ctx.loc2pos(yystack_[2].location)); ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2975 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2986 "dhcp4_parser.cc" break; - case 533: -#line 1858 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 533: // option_data_always_send: "always-send" ":" "boolean" +#line 1858 "dhcp4_parser.yy" + { ctx.unique("always-send", ctx.loc2pos(yystack_[2].location)); ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2985 "dhcp4_parser.cc" // lalr1.cc:919 +#line 2996 "dhcp4_parser.cc" break; - case 534: -#line 1867 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 534: // $@80: %empty +#line 1867 "dhcp4_parser.yy" + { ctx.unique("pools", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2997 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3008 "dhcp4_parser.cc" break; - case 535: -#line 1873 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 535: // pools_list: "pools" $@80 ":" "[" pools_list_content "]" +#line 1873 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3006 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3017 "dhcp4_parser.cc" break; - case 540: -#line 1888 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 540: // $@81: %empty +#line 1888 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3016 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3027 "dhcp4_parser.cc" break; - case 541: -#line 1892 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 541: // pool_list_entry: "{" $@81 pool_params "}" +#line 1892 "dhcp4_parser.yy" + { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3026 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3037 "dhcp4_parser.cc" break; - case 542: -#line 1898 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 542: // $@82: %empty +#line 1898 "dhcp4_parser.yy" + { // Parse the pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3036 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3047 "dhcp4_parser.cc" break; - case 543: -#line 1902 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 543: // sub_pool4: "{" $@82 pool_params "}" +#line 1902 "dhcp4_parser.yy" + { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3046 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3057 "dhcp4_parser.cc" break; - case 553: -#line 1921 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 553: // $@83: %empty +#line 1921 "dhcp4_parser.yy" + { ctx.unique("pool", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3055 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3066 "dhcp4_parser.cc" break; - case 554: -#line 1924 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 554: // pool_entry: "pool" $@83 ":" "constant string" +#line 1924 "dhcp4_parser.yy" + { ElementPtr pool(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 3065 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3076 "dhcp4_parser.cc" break; - case 555: -#line 1930 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 555: // $@84: %empty +#line 1930 "dhcp4_parser.yy" + { ctx.enter(ctx.NO_KEYWORD); } -#line 3073 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3084 "dhcp4_parser.cc" break; - case 556: -#line 1932 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 556: // user_context: "user-context" $@84 ":" map_value +#line 1932 "dhcp4_parser.yy" + { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); @@ -3096,20 +3107,20 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 3100 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3111 "dhcp4_parser.cc" break; - case 557: -#line 1955 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 557: // $@85: %empty +#line 1955 "dhcp4_parser.yy" + { ctx.enter(ctx.NO_KEYWORD); } -#line 3108 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3119 "dhcp4_parser.cc" break; - case 558: -#line 1957 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 558: // comment: "comment" $@85 ":" "constant string" +#line 1957 "dhcp4_parser.yy" + { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); @@ -3133,1104 +3144,1105 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 3137 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3148 "dhcp4_parser.cc" break; - case 559: -#line 1985 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 559: // $@86: %empty +#line 1985 "dhcp4_parser.yy" + { ctx.unique("reservations", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations", l); ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 3149 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3160 "dhcp4_parser.cc" break; - case 560: -#line 1991 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 560: // reservations: "reservations" $@86 ":" "[" reservations_list "]" +#line 1991 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3158 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3169 "dhcp4_parser.cc" break; - case 565: -#line 2004 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 565: // $@87: %empty +#line 2004 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3168 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3179 "dhcp4_parser.cc" break; - case 566: -#line 2008 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 566: // reservation: "{" $@87 reservation_params "}" +#line 2008 "dhcp4_parser.yy" + { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 3177 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3188 "dhcp4_parser.cc" break; - case 567: -#line 2013 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 567: // $@88: %empty +#line 2013 "dhcp4_parser.yy" + { // Parse the reservations list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3187 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3198 "dhcp4_parser.cc" break; - case 568: -#line 2017 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 568: // sub_reservation: "{" $@88 reservation_params "}" +#line 2017 "dhcp4_parser.yy" + { /// @todo: an identifier parameter is required. // parsing completed } -#line 3196 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3207 "dhcp4_parser.cc" break; - case 588: -#line 2048 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 588: // $@89: %empty +#line 2048 "dhcp4_parser.yy" + { ctx.unique("next-server", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3205 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3216 "dhcp4_parser.cc" break; - case 589: -#line 2051 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 589: // next_server: "next-server" $@89 ":" "constant string" +#line 2051 "dhcp4_parser.yy" + { ElementPtr next_server(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("next-server", next_server); ctx.leave(); } -#line 3215 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3226 "dhcp4_parser.cc" break; - case 590: -#line 2057 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 590: // $@90: %empty +#line 2057 "dhcp4_parser.yy" + { ctx.unique("server-hostname", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3224 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3235 "dhcp4_parser.cc" break; - case 591: -#line 2060 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 591: // server_hostname: "server-hostname" $@90 ":" "constant string" +#line 2060 "dhcp4_parser.yy" + { ElementPtr srv(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-hostname", srv); ctx.leave(); } -#line 3234 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3245 "dhcp4_parser.cc" break; - case 592: -#line 2066 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 592: // $@91: %empty +#line 2066 "dhcp4_parser.yy" + { ctx.unique("boot-file-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3243 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3254 "dhcp4_parser.cc" break; - case 593: -#line 2069 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 593: // boot_file_name: "boot-file-name" $@91 ":" "constant string" +#line 2069 "dhcp4_parser.yy" + { ElementPtr bootfile(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("boot-file-name", bootfile); ctx.leave(); } -#line 3253 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3264 "dhcp4_parser.cc" break; - case 594: -#line 2075 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 594: // $@92: %empty +#line 2075 "dhcp4_parser.yy" + { ctx.unique("ip-address", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3262 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3273 "dhcp4_parser.cc" break; - case 595: -#line 2078 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 595: // ip_address: "ip-address" $@92 ":" "constant string" +#line 2078 "dhcp4_parser.yy" + { ElementPtr addr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 3272 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3283 "dhcp4_parser.cc" break; - case 596: -#line 2084 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 596: // $@93: %empty +#line 2084 "dhcp4_parser.yy" + { ctx.unique("ip-addresses", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-addresses", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3284 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3295 "dhcp4_parser.cc" break; - case 597: -#line 2090 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 597: // ip_addresses: "ip-addresses" $@93 ":" list_strings +#line 2090 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3293 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3304 "dhcp4_parser.cc" break; - case 598: -#line 2095 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 598: // $@94: %empty +#line 2095 "dhcp4_parser.yy" + { ctx.unique("duid", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3302 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3313 "dhcp4_parser.cc" break; - case 599: -#line 2098 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 599: // duid: "duid" $@94 ":" "constant string" +#line 2098 "dhcp4_parser.yy" + { ElementPtr d(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 3312 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3323 "dhcp4_parser.cc" break; - case 600: -#line 2104 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 600: // $@95: %empty +#line 2104 "dhcp4_parser.yy" + { ctx.unique("hw-address", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3321 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3332 "dhcp4_parser.cc" break; - case 601: -#line 2107 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 601: // hw_address: "hw-address" $@95 ":" "constant string" +#line 2107 "dhcp4_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 3331 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3342 "dhcp4_parser.cc" break; - case 602: -#line 2113 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 602: // $@96: %empty +#line 2113 "dhcp4_parser.yy" + { ctx.unique("client-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3340 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3351 "dhcp4_parser.cc" break; - case 603: -#line 2116 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 603: // client_id_value: "client-id" $@96 ":" "constant string" +#line 2116 "dhcp4_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-id", hw); ctx.leave(); } -#line 3350 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3361 "dhcp4_parser.cc" break; - case 604: -#line 2122 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 604: // $@97: %empty +#line 2122 "dhcp4_parser.yy" + { ctx.unique("circuit-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3359 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3370 "dhcp4_parser.cc" break; - case 605: -#line 2125 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 605: // circuit_id_value: "circuit-id" $@97 ":" "constant string" +#line 2125 "dhcp4_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("circuit-id", hw); ctx.leave(); } -#line 3369 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3380 "dhcp4_parser.cc" break; - case 606: -#line 2131 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 606: // $@98: %empty +#line 2131 "dhcp4_parser.yy" + { ctx.unique("flex-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3378 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3389 "dhcp4_parser.cc" break; - case 607: -#line 2134 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 607: // flex_id_value: "flex-id" $@98 ":" "constant string" +#line 2134 "dhcp4_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 3388 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3399 "dhcp4_parser.cc" break; - case 608: -#line 2140 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 608: // $@99: %empty +#line 2140 "dhcp4_parser.yy" + { ctx.unique("hostname", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3397 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3408 "dhcp4_parser.cc" break; - case 609: -#line 2143 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 609: // hostname: "hostname" $@99 ":" "constant string" +#line 2143 "dhcp4_parser.yy" + { ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 3407 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3418 "dhcp4_parser.cc" break; - case 610: -#line 2149 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 610: // $@100: %empty +#line 2149 "dhcp4_parser.yy" + { ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 3419 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3430 "dhcp4_parser.cc" break; - case 611: -#line 2155 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 611: // reservation_client_classes: "client-classes" $@100 ":" list_strings +#line 2155 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3428 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3439 "dhcp4_parser.cc" break; - case 612: -#line 2163 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 612: // $@101: %empty +#line 2163 "dhcp4_parser.yy" + { ctx.unique("relay", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay", m); ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 3440 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3451 "dhcp4_parser.cc" break; - case 613: -#line 2169 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 613: // relay: "relay" $@101 ":" "{" relay_map "}" +#line 2169 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3449 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3460 "dhcp4_parser.cc" break; - case 616: -#line 2181 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 616: // $@102: %empty +#line 2181 "dhcp4_parser.yy" + { ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", l); ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 3461 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3472 "dhcp4_parser.cc" break; - case 617: -#line 2187 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 617: // client_classes: "client-classes" $@102 ":" "[" client_classes_list "]" +#line 2187 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3470 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3481 "dhcp4_parser.cc" break; - case 620: -#line 2196 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 620: // $@103: %empty +#line 2196 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3480 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3491 "dhcp4_parser.cc" break; - case 621: -#line 2200 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 621: // client_class_entry: "{" $@103 client_class_params "}" +#line 2200 "dhcp4_parser.yy" + { // The name client class parameter is required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3490 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3501 "dhcp4_parser.cc" break; - case 641: -#line 2232 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 641: // $@104: %empty +#line 2232 "dhcp4_parser.yy" + { ctx.unique("test", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3499 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3510 "dhcp4_parser.cc" break; - case 642: -#line 2235 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 642: // client_class_test: "test" $@104 ":" "constant string" +#line 2235 "dhcp4_parser.yy" + { ElementPtr test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 3509 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3520 "dhcp4_parser.cc" break; - case 643: -#line 2241 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 643: // only_if_required: "only-if-required" ":" "boolean" +#line 2241 "dhcp4_parser.yy" + { ctx.unique("only-if-required", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 3519 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3530 "dhcp4_parser.cc" break; - case 644: -#line 2249 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 644: // dhcp4o6_port: "dhcp4o6-port" ":" "integer" +#line 2249 "dhcp4_parser.yy" + { ctx.unique("dhcp4o6-port", ctx.loc2pos(yystack_[2].location)); ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 3529 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3540 "dhcp4_parser.cc" break; - case 645: -#line 2257 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 645: // $@105: %empty +#line 2257 "dhcp4_parser.yy" + { ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("control-socket", m); ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 3541 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3552 "dhcp4_parser.cc" break; - case 646: -#line 2263 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 646: // control_socket: "control-socket" $@105 ":" "{" control_socket_params "}" +#line 2263 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3550 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3561 "dhcp4_parser.cc" break; - case 654: -#line 2279 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 654: // $@106: %empty +#line 2279 "dhcp4_parser.yy" + { ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3559 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3570 "dhcp4_parser.cc" break; - case 655: -#line 2282 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 655: // control_socket_type: "socket-type" $@106 ":" "constant string" +#line 2282 "dhcp4_parser.yy" + { ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 3569 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3580 "dhcp4_parser.cc" break; - case 656: -#line 2288 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 656: // $@107: %empty +#line 2288 "dhcp4_parser.yy" + { ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3578 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3589 "dhcp4_parser.cc" break; - case 657: -#line 2291 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 657: // control_socket_name: "socket-name" $@107 ":" "constant string" +#line 2291 "dhcp4_parser.yy" + { ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 3588 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3599 "dhcp4_parser.cc" break; - case 658: -#line 2300 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 658: // $@108: %empty +#line 2300 "dhcp4_parser.yy" + { ctx.unique("dhcp-queue-control", ctx.loc2pos(yystack_[0].location)); ElementPtr qc(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-queue-control", qc); ctx.stack_.push_back(qc); ctx.enter(ctx.DHCP_QUEUE_CONTROL); } -#line 3600 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3611 "dhcp4_parser.cc" break; - case 659: -#line 2306 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 659: // dhcp_queue_control: "dhcp-queue-control" $@108 ":" "{" queue_control_params "}" +#line 2306 "dhcp4_parser.yy" + { // The enable queue parameter is required. ctx.require("enable-queue", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3611 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3622 "dhcp4_parser.cc" break; - case 668: -#line 2325 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 668: // enable_queue: "enable-queue" ":" "boolean" +#line 2325 "dhcp4_parser.yy" + { ctx.unique("enable-queue", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-queue", b); } -#line 3621 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3632 "dhcp4_parser.cc" break; - case 669: -#line 2331 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 669: // $@109: %empty +#line 2331 "dhcp4_parser.yy" + { ctx.unique("queue-type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3630 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3641 "dhcp4_parser.cc" break; - case 670: -#line 2334 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 670: // queue_type: "queue-type" $@109 ":" "constant string" +#line 2334 "dhcp4_parser.yy" + { ElementPtr qt(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("queue-type", qt); ctx.leave(); } -#line 3640 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3651 "dhcp4_parser.cc" break; - case 671: -#line 2340 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 671: // capacity: "capacity" ":" "integer" +#line 2340 "dhcp4_parser.yy" + { ctx.unique("capacity", ctx.loc2pos(yystack_[2].location)); ElementPtr c(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("capacity", c); } -#line 3650 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3661 "dhcp4_parser.cc" break; - case 672: -#line 2346 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 672: // $@110: %empty +#line 2346 "dhcp4_parser.yy" + { ctx.unique(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3659 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3670 "dhcp4_parser.cc" break; - case 673: -#line 2349 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 673: // arbitrary_map_entry: "constant string" $@110 ":" value +#line 2349 "dhcp4_parser.yy" + { ctx.stack_.back()->set(yystack_[3].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3668 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3679 "dhcp4_parser.cc" break; - case 674: -#line 2356 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 674: // $@111: %empty +#line 2356 "dhcp4_parser.yy" + { ctx.unique("dhcp-ddns", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 3680 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3691 "dhcp4_parser.cc" break; - case 675: -#line 2362 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 675: // dhcp_ddns: "dhcp-ddns" $@111 ":" "{" dhcp_ddns_params "}" +#line 2362 "dhcp4_parser.yy" + { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3691 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3702 "dhcp4_parser.cc" break; - case 676: -#line 2369 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 676: // $@112: %empty +#line 2369 "dhcp4_parser.yy" + { // Parse the dhcp-ddns map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3701 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3712 "dhcp4_parser.cc" break; - case 677: -#line 2373 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 677: // sub_dhcp_ddns: "{" $@112 dhcp_ddns_params "}" +#line 2373 "dhcp4_parser.yy" + { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3711 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3722 "dhcp4_parser.cc" break; - case 698: -#line 2403 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 698: // enable_updates: "enable-updates" ":" "boolean" +#line 2403 "dhcp4_parser.yy" + { ctx.unique("enable-updates", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3721 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3732 "dhcp4_parser.cc" break; - case 699: -#line 2409 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 699: // $@113: %empty +#line 2409 "dhcp4_parser.yy" + { ctx.unique("server-ip", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3730 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3741 "dhcp4_parser.cc" break; - case 700: -#line 2412 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 700: // server_ip: "server-ip" $@113 ":" "constant string" +#line 2412 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3740 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3751 "dhcp4_parser.cc" break; - case 701: -#line 2418 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 701: // server_port: "server-port" ":" "integer" +#line 2418 "dhcp4_parser.yy" + { ctx.unique("server-port", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3750 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3761 "dhcp4_parser.cc" break; - case 702: -#line 2424 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 702: // $@114: %empty +#line 2424 "dhcp4_parser.yy" + { ctx.unique("sender-ip", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3759 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3770 "dhcp4_parser.cc" break; - case 703: -#line 2427 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 703: // sender_ip: "sender-ip" $@114 ":" "constant string" +#line 2427 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3769 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3780 "dhcp4_parser.cc" break; - case 704: -#line 2433 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 704: // sender_port: "sender-port" ":" "integer" +#line 2433 "dhcp4_parser.yy" + { ctx.unique("sender-port", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3779 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3790 "dhcp4_parser.cc" break; - case 705: -#line 2439 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 705: // max_queue_size: "max-queue-size" ":" "integer" +#line 2439 "dhcp4_parser.yy" + { ctx.unique("max-queue-size", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3789 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3800 "dhcp4_parser.cc" break; - case 706: -#line 2445 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 706: // $@115: %empty +#line 2445 "dhcp4_parser.yy" + { ctx.unique("ncr-protocol", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NCR_PROTOCOL); } -#line 3798 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3809 "dhcp4_parser.cc" break; - case 707: -#line 2448 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 707: // ncr_protocol: "ncr-protocol" $@115 ":" ncr_protocol_value +#line 2448 "dhcp4_parser.yy" + { ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3807 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3818 "dhcp4_parser.cc" break; - case 708: -#line 2454 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3813 "dhcp4_parser.cc" // lalr1.cc:919 + case 708: // ncr_protocol_value: "udp" +#line 2454 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } +#line 3824 "dhcp4_parser.cc" break; - case 709: -#line 2455 "dhcp4_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3819 "dhcp4_parser.cc" // lalr1.cc:919 + case 709: // ncr_protocol_value: "tcp" +#line 2455 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } +#line 3830 "dhcp4_parser.cc" break; - case 710: -#line 2458 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 710: // $@116: %empty +#line 2458 "dhcp4_parser.yy" + { ctx.unique("ncr-format", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NCR_FORMAT); } -#line 3828 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3839 "dhcp4_parser.cc" break; - case 711: -#line 2461 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 711: // ncr_format: "ncr-format" $@116 ":" "JSON" +#line 2461 "dhcp4_parser.yy" + { ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3838 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3849 "dhcp4_parser.cc" break; - case 712: -#line 2468 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 712: // $@117: %empty +#line 2468 "dhcp4_parser.yy" + { ctx.unique("qualifying-suffix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3847 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3858 "dhcp4_parser.cc" break; - case 713: -#line 2471 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 713: // dep_qualifying_suffix: "qualifying-suffix" $@117 ":" "constant string" +#line 2471 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3857 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3868 "dhcp4_parser.cc" break; - case 714: -#line 2478 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 714: // dep_override_no_update: "override-no-update" ":" "boolean" +#line 2478 "dhcp4_parser.yy" + { ctx.unique("override-no-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3867 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3878 "dhcp4_parser.cc" break; - case 715: -#line 2485 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 715: // dep_override_client_update: "override-client-update" ":" "boolean" +#line 2485 "dhcp4_parser.yy" + { ctx.unique("override-client-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 3877 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3888 "dhcp4_parser.cc" break; - case 716: -#line 2492 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 716: // $@118: %empty +#line 2492 "dhcp4_parser.yy" + { ctx.unique("replace-client-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 3886 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3897 "dhcp4_parser.cc" break; - case 717: -#line 2495 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 717: // dep_replace_client_name: "replace-client-name" $@118 ":" ddns_replace_client_name_value +#line 2495 "dhcp4_parser.yy" + { ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3895 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3906 "dhcp4_parser.cc" break; - case 718: -#line 2501 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 718: // $@119: %empty +#line 2501 "dhcp4_parser.yy" + { ctx.unique("generated-prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3904 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3915 "dhcp4_parser.cc" break; - case 719: -#line 2504 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 719: // dep_generated_prefix: "generated-prefix" $@119 ":" "constant string" +#line 2504 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 3914 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3925 "dhcp4_parser.cc" break; - case 720: -#line 2511 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 720: // $@120: %empty +#line 2511 "dhcp4_parser.yy" + { ctx.unique("hostname-char-set", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3923 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3934 "dhcp4_parser.cc" break; - case 721: -#line 2514 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 721: // dep_hostname_char_set: "hostname-char-set" $@120 ":" "constant string" +#line 2514 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 3933 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3944 "dhcp4_parser.cc" break; - case 722: -#line 2521 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 722: // $@121: %empty +#line 2521 "dhcp4_parser.yy" + { ctx.unique("hostname-char-replacement", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3942 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3953 "dhcp4_parser.cc" break; - case 723: -#line 2524 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 723: // dep_hostname_char_replacement: "hostname-char-replacement" $@121 ":" "constant string" +#line 2524 "dhcp4_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 3952 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3963 "dhcp4_parser.cc" break; - case 724: -#line 2533 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 724: // $@122: %empty +#line 2533 "dhcp4_parser.yy" + { ctx.unique("config-control", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-control", i); ctx.stack_.push_back(i); ctx.enter(ctx.CONFIG_CONTROL); } -#line 3964 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3975 "dhcp4_parser.cc" break; - case 725: -#line 2539 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 725: // config_control: "config-control" $@122 ":" "{" config_control_params "}" +#line 2539 "dhcp4_parser.yy" + { // No config control params are required ctx.stack_.pop_back(); ctx.leave(); } -#line 3974 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3985 "dhcp4_parser.cc" break; - case 726: -#line 2545 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 726: // $@123: %empty +#line 2545 "dhcp4_parser.yy" + { // Parse the config-control map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3984 "dhcp4_parser.cc" // lalr1.cc:919 +#line 3995 "dhcp4_parser.cc" break; - case 727: -#line 2549 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 727: // sub_config_control: "{" $@123 config_control_params "}" +#line 2549 "dhcp4_parser.yy" + { // No config_control params are required // parsing completed } -#line 3993 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4004 "dhcp4_parser.cc" break; - case 732: -#line 2564 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 732: // $@124: %empty +#line 2564 "dhcp4_parser.yy" + { ctx.unique("config-databases", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.CONFIG_DATABASE); } -#line 4005 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4016 "dhcp4_parser.cc" break; - case 733: -#line 2570 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 733: // config_databases: "config-databases" $@124 ":" "[" database_list "]" +#line 2570 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4014 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4025 "dhcp4_parser.cc" break; - case 734: -#line 2575 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 734: // config_fetch_wait_time: "config-fetch-wait-time" ":" "integer" +#line 2575 "dhcp4_parser.yy" + { ctx.unique("config-fetch-wait-time", ctx.loc2pos(yystack_[2].location)); 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 4024 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4035 "dhcp4_parser.cc" break; - case 735: -#line 2583 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 735: // $@125: %empty +#line 2583 "dhcp4_parser.yy" + { ctx.unique("loggers", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 4036 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4047 "dhcp4_parser.cc" break; - case 736: -#line 2589 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 736: // loggers: "loggers" $@125 ":" "[" loggers_entries "]" +#line 2589 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4045 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4056 "dhcp4_parser.cc" break; - case 739: -#line 2601 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 739: // $@126: %empty +#line 2601 "dhcp4_parser.yy" + { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 4055 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4066 "dhcp4_parser.cc" break; - case 740: -#line 2605 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 740: // logger_entry: "{" $@126 logger_params "}" +#line 2605 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); } -#line 4063 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4074 "dhcp4_parser.cc" break; - case 750: -#line 2622 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 750: // debuglevel: "debuglevel" ":" "integer" +#line 2622 "dhcp4_parser.yy" + { ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location)); ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 4073 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4084 "dhcp4_parser.cc" break; - case 751: -#line 2628 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 751: // $@127: %empty +#line 2628 "dhcp4_parser.yy" + { ctx.unique("severity", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4082 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4093 "dhcp4_parser.cc" break; - case 752: -#line 2631 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 752: // severity: "severity" $@127 ":" "constant string" +#line 2631 "dhcp4_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 4092 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4103 "dhcp4_parser.cc" break; - case 753: -#line 2637 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 753: // $@128: %empty +#line 2637 "dhcp4_parser.yy" + { ctx.unique("output_options", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 4104 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4115 "dhcp4_parser.cc" break; - case 754: -#line 2643 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 754: // output_options_list: "output_options" $@128 ":" "[" output_options_list_content "]" +#line 2643 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4113 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4124 "dhcp4_parser.cc" break; - case 757: -#line 2652 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 757: // $@129: %empty +#line 2652 "dhcp4_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 4123 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4134 "dhcp4_parser.cc" break; - case 758: -#line 2656 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 758: // output_entry: "{" $@129 output_params_list "}" +#line 2656 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); } -#line 4131 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4142 "dhcp4_parser.cc" break; - case 766: -#line 2671 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 766: // $@130: %empty +#line 2671 "dhcp4_parser.yy" + { ctx.unique("output", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4140 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4151 "dhcp4_parser.cc" break; - case 767: -#line 2674 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 767: // output: "output" $@130 ":" "constant string" +#line 2674 "dhcp4_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 4150 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4161 "dhcp4_parser.cc" break; - case 768: -#line 2680 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 768: // flush: "flush" ":" "boolean" +#line 2680 "dhcp4_parser.yy" + { ctx.unique("flush", ctx.loc2pos(yystack_[2].location)); ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 4160 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4171 "dhcp4_parser.cc" break; - case 769: -#line 2686 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 769: // maxsize: "maxsize" ":" "integer" +#line 2686 "dhcp4_parser.yy" + { ctx.unique("maxsize", ctx.loc2pos(yystack_[2].location)); ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 4170 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4181 "dhcp4_parser.cc" break; - case 770: -#line 2692 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 770: // maxver: "maxver" ":" "integer" +#line 2692 "dhcp4_parser.yy" + { ctx.unique("maxver", ctx.loc2pos(yystack_[2].location)); ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 4180 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4191 "dhcp4_parser.cc" break; - case 771: -#line 2698 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 771: // $@131: %empty +#line 2698 "dhcp4_parser.yy" + { ctx.unique("pattern", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4189 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4200 "dhcp4_parser.cc" break; - case 772: -#line 2701 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 772: // pattern: "pattern" $@131 ":" "constant string" +#line 2701 "dhcp4_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 4199 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4210 "dhcp4_parser.cc" break; - case 773: -#line 2707 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 773: // $@132: %empty +#line 2707 "dhcp4_parser.yy" + { ctx.unique("compatibility", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("compatibility", i); ctx.stack_.push_back(i); ctx.enter(ctx.COMPATIBILITY); } -#line 4211 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4222 "dhcp4_parser.cc" break; - case 774: -#line 2713 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 774: // compatibility: "compatibility" $@132 ":" "{" compatibility_params "}" +#line 2713 "dhcp4_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4220 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4231 "dhcp4_parser.cc" break; - case 779: -#line 2726 "dhcp4_parser.yy" // lalr1.cc:919 - { + case 779: // lenient_option_parsing: "lenient-option-parsing" ":" "boolean" +#line 2726 "dhcp4_parser.yy" + { ctx.unique("lenient-option-parsing", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lenient-option-parsing", b); } -#line 4230 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4241 "dhcp4_parser.cc" break; -#line 4234 "dhcp4_parser.cc" // lalr1.cc:919 +#line 4245 "dhcp4_parser.cc" + default: break; } @@ -4246,7 +4258,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)); @@ -4262,7 +4273,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)); } @@ -4273,7 +4286,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 ()) { @@ -4299,6 +4312,7 @@ namespace isc { namespace dhcp { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -4307,37 +4321,39 @@ 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 += yyterror_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) - { - 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); // Shift the error token. - error_token.state = yyn; + error_token.state = state_type (yyn); yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; @@ -4369,6 +4385,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]); @@ -4402,18 +4419,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"). - size_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 @@ -4432,41 +4531,32 @@ namespace isc { namespace dhcp { - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state - merging (from LALR or IELR) and default reductions corrupt the - expected token list. However, the list is correct for - canonical LR with one exception: it will still contain any - token that will not be accepted due to an error action in a - later state. + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + 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 ()) + + if (!yyctx.lookahead ().empty ()) { - int 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 != yyterror_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + 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) @@ -4487,11 +4577,11 @@ namespace isc { namespace dhcp { std::string yyres; // Argument number. - size_t yyi = 0; + std::ptrdiff_t yyi = 0; 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 @@ -4634,7 +4724,7 @@ namespace isc { namespace dhcp { 767, -958, -958, -958, 768, -958, -958, -958 }; - const unsigned short + const short Dhcp4Parser::yydefact_[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, @@ -4814,7 +4904,7 @@ namespace isc { namespace dhcp { const short Dhcp4Parser::yydefgoto_[] = { - -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 36, 37, 38, 65, 702, 82, 83, 39, 64, 79, 80, 723, 919, 1015, 1016, 796, 41, 66, 85, 413, 43, 67, 149, 150, 151, @@ -4858,7 +4948,7 @@ namespace isc { namespace dhcp { 1229, 1230, 1231, 1237, 211, 475, 916, 917, 918 }; - const unsigned short + const short Dhcp4Parser::yytable_[] = { 148, 216, 235, 283, 300, 284, 326, 345, 362, 382, @@ -5154,7 +5244,7 @@ namespace isc { namespace dhcp { -1, -1, -1, -1, -1, -1, -1, -1, -1, 201 }; - const unsigned short + const short Dhcp4Parser::yystos_[] = { 0, 188, 189, 190, 191, 192, 193, 194, 195, 196, @@ -5284,7 +5374,7 @@ namespace isc { namespace dhcp { 4, 204, 202, 202, 4, 611, 201, 201 }; - const unsigned short + const short Dhcp4Parser::yyr1_[] = { 0, 205, 207, 206, 208, 206, 209, 206, 210, 206, @@ -5367,7 +5457,7 @@ namespace isc { namespace dhcp { 616, 618, 617, 620, 619, 621, 621, 622, 622, 623 }; - const unsigned char + const signed char Dhcp4Parser::yyr2_[] = { 0, 2, 0, 3, 0, 3, 0, 3, 0, 3, @@ -5451,33 +5541,33 @@ 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\"", "\"on-fail\"", "\"stop-retry-exit\"", - "\"serve-retry-exit\"", "\"serve-retry-continue\"", - "\"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\"", - "\"cache-threshold\"", "\"cache-max-age\"", + "\"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\"", "\"on-fail\"", + "\"stop-retry-exit\"", "\"serve-retry-exit\"", + "\"serve-retry-continue\"", "\"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\"", "\"cache-threshold\"", "\"cache-max-age\"", "\"decline-probation-period\"", "\"server-tag\"", "\"statistic-default-sample-count\"", "\"statistic-default-sample-age\"", "\"ddns-send-updates\"", "\"ddns-override-no-update\"", @@ -5626,9 +5716,11 @@ namespace isc { namespace dhcp { "maxsize", "maxver", "pattern", "$@131", "compatibility", "$@132", "compatibility_params", "compatibility_param", "lenient_option_parsing", YY_NULLPTR }; +#endif + #if PARSER4_DEBUG - const unsigned short + const short Dhcp4Parser::yyrline_[] = { 0, 294, 294, 294, 295, 295, 296, 296, 297, 297, @@ -5711,24 +5803,22 @@ namespace isc { namespace dhcp { 2692, 2698, 2698, 2707, 2707, 2718, 2719, 2722, 2723, 2726 }; - // 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 i = yystack_.begin (), i_end = yystack_.end (); i != i_end; ++i) - *yycdebug_ << ' ' << i->state; + *yycdebug_ << ' ' << int (i->state); *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 { - unsigned yylno = yyrline_[yyrule]; + int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 @@ -5741,10 +5831,11 @@ namespace isc { namespace dhcp { #endif // PARSER4_DEBUG -#line 14 "dhcp4_parser.yy" // lalr1.cc:1242 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 5747 "dhcp4_parser.cc" // lalr1.cc:1242 -#line 2732 "dhcp4_parser.yy" // lalr1.cc:1243 +#line 5837 "dhcp4_parser.cc" + +#line 2732 "dhcp4_parser.yy" void diff --git a/src/bin/dhcp4/dhcp4_parser.h b/src/bin/dhcp4/dhcp4_parser.h index 4f773f7455..4a94efbe71 100644 --- a/src/bin/dhcp4/dhcp4_parser.h +++ b/src/bin/dhcp4/dhcp4_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -38,13 +38,14 @@ // 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 -// // "%code requires" blocks. -#line 17 "dhcp4_parser.yy" // lalr1.cc:401 +// "%code requires" blocks. +#line 17 "dhcp4_parser.yy" #include #include @@ -56,7 +57,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp4_parser.h" // lalr1.cc:401 +#line 61 "dhcp4_parser.h" # include # include // std::abort @@ -103,44 +104,42 @@ using namespace std; #endif # include "location.hh" #include -#ifndef YYASSERT +#ifndef PARSER4__ASSERT # include -# define YYASSERT assert +# define PARSER4__ASSERT assert #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define YY_ATTRIBUTE(Spec) /* empty */ +# define YY_ATTRIBUTE_PURE # endif #endif -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -153,6 +152,27 @@ using namespace std; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -178,9 +198,10 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined PARSER4_DEBUG */ -#line 14 "dhcp4_parser.yy" // lalr1.cc:401 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 184 "dhcp4_parser.h" // lalr1.cc:401 +#line 204 "dhcp4_parser.h" + @@ -211,14 +232,21 @@ namespace isc { namespace dhcp { semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (sizeof (T) <= size); 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 { - YYASSERT (!yytypeid_); + PARSER4__ASSERT (!yytypeid_); } # if 201103L <= YY_CPLUSPLUS @@ -227,8 +255,8 @@ namespace isc { namespace dhcp { T& emplace (U&&... u) { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (!yytypeid_); + PARSER4__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (std::forward (u)...); } @@ -238,8 +266,8 @@ namespace isc { namespace dhcp { T& emplace () { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (!yytypeid_); + PARSER4__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (); } @@ -249,8 +277,8 @@ namespace isc { namespace dhcp { T& emplace (const T& t) { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (!yytypeid_); + PARSER4__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } @@ -279,9 +307,9 @@ namespace isc { namespace dhcp { T& as () YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (yytypeid_); + PARSER4__ASSERT (*yytypeid_ == typeid (T)); + PARSER4__ASSERT (sizeof (T) <= size); return *yyas_ (); } @@ -290,9 +318,9 @@ namespace isc { namespace dhcp { const T& as () const YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size); + PARSER4__ASSERT (yytypeid_); + PARSER4__ASSERT (*yytypeid_ == typeid (T)); + PARSER4__ASSERT (sizeof (T) <= size); return *yyas_ (); } @@ -308,8 +336,8 @@ namespace isc { namespace dhcp { void swap (self_type& that) YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *that.yytypeid_); + PARSER4__ASSERT (yytypeid_); + PARSER4__ASSERT (*yytypeid_ == *that.yytypeid_); std::swap (as (), that.as ()); } @@ -358,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 @@ -447,233 +478,872 @@ 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_ON_FAIL = 308, - TOKEN_STOP_RETRY_EXIT = 309, - TOKEN_SERVE_RETRY_EXIT = 310, - TOKEN_SERVE_RETRY_CONTINUE = 311, - TOKEN_REQUEST_TIMEOUT = 312, - TOKEN_TCP_KEEPALIVE = 313, - TOKEN_TCP_NODELAY = 314, - TOKEN_MAX_ROW_ERRORS = 315, - TOKEN_VALID_LIFETIME = 316, - TOKEN_MIN_VALID_LIFETIME = 317, - TOKEN_MAX_VALID_LIFETIME = 318, - TOKEN_RENEW_TIMER = 319, - TOKEN_REBIND_TIMER = 320, - TOKEN_CALCULATE_TEE_TIMES = 321, - TOKEN_T1_PERCENT = 322, - TOKEN_T2_PERCENT = 323, - TOKEN_CACHE_THRESHOLD = 324, - TOKEN_CACHE_MAX_AGE = 325, - TOKEN_DECLINE_PROBATION_PERIOD = 326, - TOKEN_SERVER_TAG = 327, - TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 328, - TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 329, - TOKEN_DDNS_SEND_UPDATES = 330, - TOKEN_DDNS_OVERRIDE_NO_UPDATE = 331, - TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 332, - TOKEN_DDNS_REPLACE_CLIENT_NAME = 333, - TOKEN_DDNS_GENERATED_PREFIX = 334, - TOKEN_DDNS_QUALIFYING_SUFFIX = 335, - TOKEN_DDNS_UPDATE_ON_RENEW = 336, - TOKEN_DDNS_USE_CONFLICT_RESOLUTION = 337, - TOKEN_STORE_EXTENDED_INFO = 338, - TOKEN_SUBNET4 = 339, - TOKEN_SUBNET_4O6_INTERFACE = 340, - TOKEN_SUBNET_4O6_INTERFACE_ID = 341, - TOKEN_SUBNET_4O6_SUBNET = 342, - TOKEN_OPTION_DEF = 343, - TOKEN_OPTION_DATA = 344, - TOKEN_NAME = 345, - TOKEN_DATA = 346, - TOKEN_CODE = 347, - TOKEN_SPACE = 348, - TOKEN_CSV_FORMAT = 349, - TOKEN_ALWAYS_SEND = 350, - TOKEN_RECORD_TYPES = 351, - TOKEN_ENCAPSULATE = 352, - TOKEN_ARRAY = 353, - TOKEN_PARKED_PACKET_LIMIT = 354, - TOKEN_SHARED_NETWORKS = 355, - TOKEN_POOLS = 356, - TOKEN_POOL = 357, - TOKEN_USER_CONTEXT = 358, - TOKEN_COMMENT = 359, - TOKEN_SUBNET = 360, - TOKEN_INTERFACE = 361, - TOKEN_ID = 362, - TOKEN_RESERVATION_MODE = 363, - TOKEN_DISABLED = 364, - TOKEN_OUT_OF_POOL = 365, - TOKEN_GLOBAL = 366, - TOKEN_ALL = 367, - TOKEN_RESERVATIONS_GLOBAL = 368, - TOKEN_RESERVATIONS_IN_SUBNET = 369, - TOKEN_RESERVATIONS_OUT_OF_POOL = 370, - TOKEN_HOST_RESERVATION_IDENTIFIERS = 371, - TOKEN_CLIENT_CLASSES = 372, - TOKEN_REQUIRE_CLIENT_CLASSES = 373, - TOKEN_TEST = 374, - TOKEN_ONLY_IF_REQUIRED = 375, - TOKEN_CLIENT_CLASS = 376, - TOKEN_RESERVATIONS = 377, - TOKEN_DUID = 378, - TOKEN_HW_ADDRESS = 379, - TOKEN_CIRCUIT_ID = 380, - TOKEN_CLIENT_ID = 381, - TOKEN_HOSTNAME = 382, - TOKEN_FLEX_ID = 383, - TOKEN_RELAY = 384, - TOKEN_IP_ADDRESS = 385, - TOKEN_IP_ADDRESSES = 386, - TOKEN_HOOKS_LIBRARIES = 387, - TOKEN_LIBRARY = 388, - TOKEN_PARAMETERS = 389, - TOKEN_EXPIRED_LEASES_PROCESSING = 390, - TOKEN_RECLAIM_TIMER_WAIT_TIME = 391, - TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 392, - TOKEN_HOLD_RECLAIMED_TIME = 393, - TOKEN_MAX_RECLAIM_LEASES = 394, - TOKEN_MAX_RECLAIM_TIME = 395, - TOKEN_UNWARNED_RECLAIM_CYCLES = 396, - TOKEN_DHCP4O6_PORT = 397, - TOKEN_DHCP_MULTI_THREADING = 398, - TOKEN_ENABLE_MULTI_THREADING = 399, - TOKEN_THREAD_POOL_SIZE = 400, - TOKEN_PACKET_QUEUE_SIZE = 401, - TOKEN_CONTROL_SOCKET = 402, - TOKEN_SOCKET_TYPE = 403, - TOKEN_SOCKET_NAME = 404, - TOKEN_DHCP_QUEUE_CONTROL = 405, - TOKEN_ENABLE_QUEUE = 406, - TOKEN_QUEUE_TYPE = 407, - TOKEN_CAPACITY = 408, - TOKEN_DHCP_DDNS = 409, - TOKEN_ENABLE_UPDATES = 410, - TOKEN_QUALIFYING_SUFFIX = 411, - TOKEN_SERVER_IP = 412, - TOKEN_SERVER_PORT = 413, - TOKEN_SENDER_IP = 414, - TOKEN_SENDER_PORT = 415, - TOKEN_MAX_QUEUE_SIZE = 416, - TOKEN_NCR_PROTOCOL = 417, - TOKEN_NCR_FORMAT = 418, - TOKEN_OVERRIDE_NO_UPDATE = 419, - TOKEN_OVERRIDE_CLIENT_UPDATE = 420, - TOKEN_REPLACE_CLIENT_NAME = 421, - TOKEN_GENERATED_PREFIX = 422, - TOKEN_TCP = 423, - TOKEN_JSON = 424, - TOKEN_WHEN_PRESENT = 425, - TOKEN_NEVER = 426, - TOKEN_ALWAYS = 427, - TOKEN_WHEN_NOT_PRESENT = 428, - TOKEN_HOSTNAME_CHAR_SET = 429, - TOKEN_HOSTNAME_CHAR_REPLACEMENT = 430, - TOKEN_IP_RESERVATIONS_UNIQUE = 431, - TOKEN_LOGGERS = 432, - TOKEN_OUTPUT_OPTIONS = 433, - TOKEN_OUTPUT = 434, - TOKEN_DEBUGLEVEL = 435, - TOKEN_SEVERITY = 436, - TOKEN_FLUSH = 437, - TOKEN_MAXSIZE = 438, - TOKEN_MAXVER = 439, - TOKEN_PATTERN = 440, - TOKEN_COMPATIBILITY = 441, - TOKEN_LENIENT_OPTION_PARSING = 442, - TOKEN_TOPLEVEL_JSON = 443, - TOKEN_TOPLEVEL_DHCP4 = 444, - TOKEN_SUB_DHCP4 = 445, - TOKEN_SUB_INTERFACES4 = 446, - TOKEN_SUB_SUBNET4 = 447, - TOKEN_SUB_POOL4 = 448, - TOKEN_SUB_RESERVATION = 449, - TOKEN_SUB_OPTION_DEFS = 450, - TOKEN_SUB_OPTION_DEF = 451, - TOKEN_SUB_OPTION_DATA = 452, - TOKEN_SUB_HOOKS_LIBRARY = 453, - TOKEN_SUB_DHCP_DDNS = 454, - TOKEN_SUB_CONFIG_CONTROL = 455, - TOKEN_STRING = 456, - TOKEN_INTEGER = 457, - TOKEN_FLOAT = 458, - TOKEN_BOOLEAN = 459 + 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_ON_FAIL = 308, // "on-fail" + TOKEN_STOP_RETRY_EXIT = 309, // "stop-retry-exit" + TOKEN_SERVE_RETRY_EXIT = 310, // "serve-retry-exit" + TOKEN_SERVE_RETRY_CONTINUE = 311, // "serve-retry-continue" + TOKEN_REQUEST_TIMEOUT = 312, // "request-timeout" + TOKEN_TCP_KEEPALIVE = 313, // "tcp-keepalive" + TOKEN_TCP_NODELAY = 314, // "tcp-nodelay" + TOKEN_MAX_ROW_ERRORS = 315, // "max-row-errors" + TOKEN_VALID_LIFETIME = 316, // "valid-lifetime" + TOKEN_MIN_VALID_LIFETIME = 317, // "min-valid-lifetime" + TOKEN_MAX_VALID_LIFETIME = 318, // "max-valid-lifetime" + TOKEN_RENEW_TIMER = 319, // "renew-timer" + TOKEN_REBIND_TIMER = 320, // "rebind-timer" + TOKEN_CALCULATE_TEE_TIMES = 321, // "calculate-tee-times" + TOKEN_T1_PERCENT = 322, // "t1-percent" + TOKEN_T2_PERCENT = 323, // "t2-percent" + TOKEN_CACHE_THRESHOLD = 324, // "cache-threshold" + TOKEN_CACHE_MAX_AGE = 325, // "cache-max-age" + TOKEN_DECLINE_PROBATION_PERIOD = 326, // "decline-probation-period" + TOKEN_SERVER_TAG = 327, // "server-tag" + TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 328, // "statistic-default-sample-count" + TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 329, // "statistic-default-sample-age" + TOKEN_DDNS_SEND_UPDATES = 330, // "ddns-send-updates" + TOKEN_DDNS_OVERRIDE_NO_UPDATE = 331, // "ddns-override-no-update" + TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 332, // "ddns-override-client-update" + TOKEN_DDNS_REPLACE_CLIENT_NAME = 333, // "ddns-replace-client-name" + TOKEN_DDNS_GENERATED_PREFIX = 334, // "ddns-generated-prefix" + TOKEN_DDNS_QUALIFYING_SUFFIX = 335, // "ddns-qualifying-suffix" + TOKEN_DDNS_UPDATE_ON_RENEW = 336, // "ddns-update-on-renew" + TOKEN_DDNS_USE_CONFLICT_RESOLUTION = 337, // "ddns-use-conflict-resolution" + TOKEN_STORE_EXTENDED_INFO = 338, // "store-extended-info" + TOKEN_SUBNET4 = 339, // "subnet4" + TOKEN_SUBNET_4O6_INTERFACE = 340, // "4o6-interface" + TOKEN_SUBNET_4O6_INTERFACE_ID = 341, // "4o6-interface-id" + TOKEN_SUBNET_4O6_SUBNET = 342, // "4o6-subnet" + TOKEN_OPTION_DEF = 343, // "option-def" + TOKEN_OPTION_DATA = 344, // "option-data" + TOKEN_NAME = 345, // "name" + TOKEN_DATA = 346, // "data" + TOKEN_CODE = 347, // "code" + TOKEN_SPACE = 348, // "space" + TOKEN_CSV_FORMAT = 349, // "csv-format" + TOKEN_ALWAYS_SEND = 350, // "always-send" + TOKEN_RECORD_TYPES = 351, // "record-types" + TOKEN_ENCAPSULATE = 352, // "encapsulate" + TOKEN_ARRAY = 353, // "array" + TOKEN_PARKED_PACKET_LIMIT = 354, // "parked-packet-limit" + TOKEN_SHARED_NETWORKS = 355, // "shared-networks" + TOKEN_POOLS = 356, // "pools" + TOKEN_POOL = 357, // "pool" + TOKEN_USER_CONTEXT = 358, // "user-context" + TOKEN_COMMENT = 359, // "comment" + TOKEN_SUBNET = 360, // "subnet" + TOKEN_INTERFACE = 361, // "interface" + TOKEN_ID = 362, // "id" + TOKEN_RESERVATION_MODE = 363, // "reservation-mode" + TOKEN_DISABLED = 364, // "disabled" + TOKEN_OUT_OF_POOL = 365, // "out-of-pool" + TOKEN_GLOBAL = 366, // "global" + TOKEN_ALL = 367, // "all" + TOKEN_RESERVATIONS_GLOBAL = 368, // "reservations-global" + TOKEN_RESERVATIONS_IN_SUBNET = 369, // "reservations-in-subnet" + TOKEN_RESERVATIONS_OUT_OF_POOL = 370, // "reservations-out-of-pool" + TOKEN_HOST_RESERVATION_IDENTIFIERS = 371, // "host-reservation-identifiers" + TOKEN_CLIENT_CLASSES = 372, // "client-classes" + TOKEN_REQUIRE_CLIENT_CLASSES = 373, // "require-client-classes" + TOKEN_TEST = 374, // "test" + TOKEN_ONLY_IF_REQUIRED = 375, // "only-if-required" + TOKEN_CLIENT_CLASS = 376, // "client-class" + TOKEN_RESERVATIONS = 377, // "reservations" + TOKEN_DUID = 378, // "duid" + TOKEN_HW_ADDRESS = 379, // "hw-address" + TOKEN_CIRCUIT_ID = 380, // "circuit-id" + TOKEN_CLIENT_ID = 381, // "client-id" + TOKEN_HOSTNAME = 382, // "hostname" + TOKEN_FLEX_ID = 383, // "flex-id" + TOKEN_RELAY = 384, // "relay" + TOKEN_IP_ADDRESS = 385, // "ip-address" + TOKEN_IP_ADDRESSES = 386, // "ip-addresses" + TOKEN_HOOKS_LIBRARIES = 387, // "hooks-libraries" + TOKEN_LIBRARY = 388, // "library" + TOKEN_PARAMETERS = 389, // "parameters" + TOKEN_EXPIRED_LEASES_PROCESSING = 390, // "expired-leases-processing" + TOKEN_RECLAIM_TIMER_WAIT_TIME = 391, // "reclaim-timer-wait-time" + TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 392, // "flush-reclaimed-timer-wait-time" + TOKEN_HOLD_RECLAIMED_TIME = 393, // "hold-reclaimed-time" + TOKEN_MAX_RECLAIM_LEASES = 394, // "max-reclaim-leases" + TOKEN_MAX_RECLAIM_TIME = 395, // "max-reclaim-time" + TOKEN_UNWARNED_RECLAIM_CYCLES = 396, // "unwarned-reclaim-cycles" + TOKEN_DHCP4O6_PORT = 397, // "dhcp4o6-port" + TOKEN_DHCP_MULTI_THREADING = 398, // "multi-threading" + TOKEN_ENABLE_MULTI_THREADING = 399, // "enable-multi-threading" + TOKEN_THREAD_POOL_SIZE = 400, // "thread-pool-size" + TOKEN_PACKET_QUEUE_SIZE = 401, // "packet-queue-size" + TOKEN_CONTROL_SOCKET = 402, // "control-socket" + TOKEN_SOCKET_TYPE = 403, // "socket-type" + TOKEN_SOCKET_NAME = 404, // "socket-name" + TOKEN_DHCP_QUEUE_CONTROL = 405, // "dhcp-queue-control" + TOKEN_ENABLE_QUEUE = 406, // "enable-queue" + TOKEN_QUEUE_TYPE = 407, // "queue-type" + TOKEN_CAPACITY = 408, // "capacity" + TOKEN_DHCP_DDNS = 409, // "dhcp-ddns" + TOKEN_ENABLE_UPDATES = 410, // "enable-updates" + TOKEN_QUALIFYING_SUFFIX = 411, // "qualifying-suffix" + TOKEN_SERVER_IP = 412, // "server-ip" + TOKEN_SERVER_PORT = 413, // "server-port" + TOKEN_SENDER_IP = 414, // "sender-ip" + TOKEN_SENDER_PORT = 415, // "sender-port" + TOKEN_MAX_QUEUE_SIZE = 416, // "max-queue-size" + TOKEN_NCR_PROTOCOL = 417, // "ncr-protocol" + TOKEN_NCR_FORMAT = 418, // "ncr-format" + TOKEN_OVERRIDE_NO_UPDATE = 419, // "override-no-update" + TOKEN_OVERRIDE_CLIENT_UPDATE = 420, // "override-client-update" + TOKEN_REPLACE_CLIENT_NAME = 421, // "replace-client-name" + TOKEN_GENERATED_PREFIX = 422, // "generated-prefix" + TOKEN_TCP = 423, // "tcp" + TOKEN_JSON = 424, // "JSON" + TOKEN_WHEN_PRESENT = 425, // "when-present" + TOKEN_NEVER = 426, // "never" + TOKEN_ALWAYS = 427, // "always" + TOKEN_WHEN_NOT_PRESENT = 428, // "when-not-present" + TOKEN_HOSTNAME_CHAR_SET = 429, // "hostname-char-set" + TOKEN_HOSTNAME_CHAR_REPLACEMENT = 430, // "hostname-char-replacement" + TOKEN_IP_RESERVATIONS_UNIQUE = 431, // "ip-reservations-unique" + TOKEN_LOGGERS = 432, // "loggers" + TOKEN_OUTPUT_OPTIONS = 433, // "output_options" + TOKEN_OUTPUT = 434, // "output" + TOKEN_DEBUGLEVEL = 435, // "debuglevel" + TOKEN_SEVERITY = 436, // "severity" + TOKEN_FLUSH = 437, // "flush" + TOKEN_MAXSIZE = 438, // "maxsize" + TOKEN_MAXVER = 439, // "maxver" + TOKEN_PATTERN = 440, // "pattern" + TOKEN_COMPATIBILITY = 441, // "compatibility" + TOKEN_LENIENT_OPTION_PARSING = 442, // "lenient-option-parsing" + TOKEN_TOPLEVEL_JSON = 443, // TOPLEVEL_JSON + TOKEN_TOPLEVEL_DHCP4 = 444, // TOPLEVEL_DHCP4 + TOKEN_SUB_DHCP4 = 445, // SUB_DHCP4 + TOKEN_SUB_INTERFACES4 = 446, // SUB_INTERFACES4 + TOKEN_SUB_SUBNET4 = 447, // SUB_SUBNET4 + TOKEN_SUB_POOL4 = 448, // SUB_POOL4 + TOKEN_SUB_RESERVATION = 449, // SUB_RESERVATION + TOKEN_SUB_OPTION_DEFS = 450, // SUB_OPTION_DEFS + TOKEN_SUB_OPTION_DEF = 451, // SUB_OPTION_DEF + TOKEN_SUB_OPTION_DATA = 452, // SUB_OPTION_DATA + TOKEN_SUB_HOOKS_LIBRARY = 453, // SUB_HOOKS_LIBRARY + TOKEN_SUB_DHCP_DDNS = 454, // SUB_DHCP_DDNS + TOKEN_SUB_CONFIG_CONTROL = 455, // SUB_CONFIG_CONTROL + TOKEN_STRING = 456, // "constant string" + TOKEN_INTEGER = 457, // "integer" + TOKEN_FLOAT = 458, // "floating point" + TOKEN_BOOLEAN = 459 // "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; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 205, ///< 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_ON_FAIL = 53, // "on-fail" + S_STOP_RETRY_EXIT = 54, // "stop-retry-exit" + S_SERVE_RETRY_EXIT = 55, // "serve-retry-exit" + S_SERVE_RETRY_CONTINUE = 56, // "serve-retry-continue" + S_REQUEST_TIMEOUT = 57, // "request-timeout" + S_TCP_KEEPALIVE = 58, // "tcp-keepalive" + S_TCP_NODELAY = 59, // "tcp-nodelay" + S_MAX_ROW_ERRORS = 60, // "max-row-errors" + S_VALID_LIFETIME = 61, // "valid-lifetime" + S_MIN_VALID_LIFETIME = 62, // "min-valid-lifetime" + S_MAX_VALID_LIFETIME = 63, // "max-valid-lifetime" + S_RENEW_TIMER = 64, // "renew-timer" + S_REBIND_TIMER = 65, // "rebind-timer" + S_CALCULATE_TEE_TIMES = 66, // "calculate-tee-times" + S_T1_PERCENT = 67, // "t1-percent" + S_T2_PERCENT = 68, // "t2-percent" + S_CACHE_THRESHOLD = 69, // "cache-threshold" + S_CACHE_MAX_AGE = 70, // "cache-max-age" + S_DECLINE_PROBATION_PERIOD = 71, // "decline-probation-period" + S_SERVER_TAG = 72, // "server-tag" + S_STATISTIC_DEFAULT_SAMPLE_COUNT = 73, // "statistic-default-sample-count" + S_STATISTIC_DEFAULT_SAMPLE_AGE = 74, // "statistic-default-sample-age" + S_DDNS_SEND_UPDATES = 75, // "ddns-send-updates" + S_DDNS_OVERRIDE_NO_UPDATE = 76, // "ddns-override-no-update" + S_DDNS_OVERRIDE_CLIENT_UPDATE = 77, // "ddns-override-client-update" + S_DDNS_REPLACE_CLIENT_NAME = 78, // "ddns-replace-client-name" + S_DDNS_GENERATED_PREFIX = 79, // "ddns-generated-prefix" + S_DDNS_QUALIFYING_SUFFIX = 80, // "ddns-qualifying-suffix" + S_DDNS_UPDATE_ON_RENEW = 81, // "ddns-update-on-renew" + S_DDNS_USE_CONFLICT_RESOLUTION = 82, // "ddns-use-conflict-resolution" + S_STORE_EXTENDED_INFO = 83, // "store-extended-info" + S_SUBNET4 = 84, // "subnet4" + S_SUBNET_4O6_INTERFACE = 85, // "4o6-interface" + S_SUBNET_4O6_INTERFACE_ID = 86, // "4o6-interface-id" + S_SUBNET_4O6_SUBNET = 87, // "4o6-subnet" + S_OPTION_DEF = 88, // "option-def" + S_OPTION_DATA = 89, // "option-data" + S_NAME = 90, // "name" + S_DATA = 91, // "data" + S_CODE = 92, // "code" + S_SPACE = 93, // "space" + S_CSV_FORMAT = 94, // "csv-format" + S_ALWAYS_SEND = 95, // "always-send" + S_RECORD_TYPES = 96, // "record-types" + S_ENCAPSULATE = 97, // "encapsulate" + S_ARRAY = 98, // "array" + S_PARKED_PACKET_LIMIT = 99, // "parked-packet-limit" + S_SHARED_NETWORKS = 100, // "shared-networks" + S_POOLS = 101, // "pools" + S_POOL = 102, // "pool" + S_USER_CONTEXT = 103, // "user-context" + S_COMMENT = 104, // "comment" + S_SUBNET = 105, // "subnet" + S_INTERFACE = 106, // "interface" + S_ID = 107, // "id" + S_RESERVATION_MODE = 108, // "reservation-mode" + S_DISABLED = 109, // "disabled" + S_OUT_OF_POOL = 110, // "out-of-pool" + S_GLOBAL = 111, // "global" + S_ALL = 112, // "all" + S_RESERVATIONS_GLOBAL = 113, // "reservations-global" + S_RESERVATIONS_IN_SUBNET = 114, // "reservations-in-subnet" + S_RESERVATIONS_OUT_OF_POOL = 115, // "reservations-out-of-pool" + S_HOST_RESERVATION_IDENTIFIERS = 116, // "host-reservation-identifiers" + S_CLIENT_CLASSES = 117, // "client-classes" + S_REQUIRE_CLIENT_CLASSES = 118, // "require-client-classes" + S_TEST = 119, // "test" + S_ONLY_IF_REQUIRED = 120, // "only-if-required" + S_CLIENT_CLASS = 121, // "client-class" + S_RESERVATIONS = 122, // "reservations" + S_DUID = 123, // "duid" + S_HW_ADDRESS = 124, // "hw-address" + S_CIRCUIT_ID = 125, // "circuit-id" + S_CLIENT_ID = 126, // "client-id" + S_HOSTNAME = 127, // "hostname" + S_FLEX_ID = 128, // "flex-id" + S_RELAY = 129, // "relay" + S_IP_ADDRESS = 130, // "ip-address" + S_IP_ADDRESSES = 131, // "ip-addresses" + S_HOOKS_LIBRARIES = 132, // "hooks-libraries" + S_LIBRARY = 133, // "library" + S_PARAMETERS = 134, // "parameters" + S_EXPIRED_LEASES_PROCESSING = 135, // "expired-leases-processing" + S_RECLAIM_TIMER_WAIT_TIME = 136, // "reclaim-timer-wait-time" + S_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 137, // "flush-reclaimed-timer-wait-time" + S_HOLD_RECLAIMED_TIME = 138, // "hold-reclaimed-time" + S_MAX_RECLAIM_LEASES = 139, // "max-reclaim-leases" + S_MAX_RECLAIM_TIME = 140, // "max-reclaim-time" + S_UNWARNED_RECLAIM_CYCLES = 141, // "unwarned-reclaim-cycles" + S_DHCP4O6_PORT = 142, // "dhcp4o6-port" + S_DHCP_MULTI_THREADING = 143, // "multi-threading" + S_ENABLE_MULTI_THREADING = 144, // "enable-multi-threading" + S_THREAD_POOL_SIZE = 145, // "thread-pool-size" + S_PACKET_QUEUE_SIZE = 146, // "packet-queue-size" + S_CONTROL_SOCKET = 147, // "control-socket" + S_SOCKET_TYPE = 148, // "socket-type" + S_SOCKET_NAME = 149, // "socket-name" + S_DHCP_QUEUE_CONTROL = 150, // "dhcp-queue-control" + S_ENABLE_QUEUE = 151, // "enable-queue" + S_QUEUE_TYPE = 152, // "queue-type" + S_CAPACITY = 153, // "capacity" + S_DHCP_DDNS = 154, // "dhcp-ddns" + S_ENABLE_UPDATES = 155, // "enable-updates" + S_QUALIFYING_SUFFIX = 156, // "qualifying-suffix" + S_SERVER_IP = 157, // "server-ip" + S_SERVER_PORT = 158, // "server-port" + S_SENDER_IP = 159, // "sender-ip" + S_SENDER_PORT = 160, // "sender-port" + S_MAX_QUEUE_SIZE = 161, // "max-queue-size" + S_NCR_PROTOCOL = 162, // "ncr-protocol" + S_NCR_FORMAT = 163, // "ncr-format" + S_OVERRIDE_NO_UPDATE = 164, // "override-no-update" + S_OVERRIDE_CLIENT_UPDATE = 165, // "override-client-update" + S_REPLACE_CLIENT_NAME = 166, // "replace-client-name" + S_GENERATED_PREFIX = 167, // "generated-prefix" + S_TCP = 168, // "tcp" + S_JSON = 169, // "JSON" + S_WHEN_PRESENT = 170, // "when-present" + S_NEVER = 171, // "never" + S_ALWAYS = 172, // "always" + S_WHEN_NOT_PRESENT = 173, // "when-not-present" + S_HOSTNAME_CHAR_SET = 174, // "hostname-char-set" + S_HOSTNAME_CHAR_REPLACEMENT = 175, // "hostname-char-replacement" + S_IP_RESERVATIONS_UNIQUE = 176, // "ip-reservations-unique" + S_LOGGERS = 177, // "loggers" + S_OUTPUT_OPTIONS = 178, // "output_options" + S_OUTPUT = 179, // "output" + S_DEBUGLEVEL = 180, // "debuglevel" + S_SEVERITY = 181, // "severity" + S_FLUSH = 182, // "flush" + S_MAXSIZE = 183, // "maxsize" + S_MAXVER = 184, // "maxver" + S_PATTERN = 185, // "pattern" + S_COMPATIBILITY = 186, // "compatibility" + S_LENIENT_OPTION_PARSING = 187, // "lenient-option-parsing" + S_TOPLEVEL_JSON = 188, // TOPLEVEL_JSON + S_TOPLEVEL_DHCP4 = 189, // TOPLEVEL_DHCP4 + S_SUB_DHCP4 = 190, // SUB_DHCP4 + S_SUB_INTERFACES4 = 191, // SUB_INTERFACES4 + S_SUB_SUBNET4 = 192, // SUB_SUBNET4 + S_SUB_POOL4 = 193, // SUB_POOL4 + S_SUB_RESERVATION = 194, // SUB_RESERVATION + S_SUB_OPTION_DEFS = 195, // SUB_OPTION_DEFS + S_SUB_OPTION_DEF = 196, // SUB_OPTION_DEF + S_SUB_OPTION_DATA = 197, // SUB_OPTION_DATA + S_SUB_HOOKS_LIBRARY = 198, // SUB_HOOKS_LIBRARY + S_SUB_DHCP_DDNS = 199, // SUB_DHCP_DDNS + S_SUB_CONFIG_CONTROL = 200, // SUB_CONFIG_CONTROL + S_STRING = 201, // "constant string" + S_INTEGER = 202, // "integer" + S_FLOAT = 203, // "floating point" + S_BOOLEAN = 204, // "boolean" + S_YYACCEPT = 205, // $accept + S_start = 206, // start + S_207_1 = 207, // $@1 + S_208_2 = 208, // $@2 + S_209_3 = 209, // $@3 + S_210_4 = 210, // $@4 + S_211_5 = 211, // $@5 + S_212_6 = 212, // $@6 + S_213_7 = 213, // $@7 + S_214_8 = 214, // $@8 + S_215_9 = 215, // $@9 + S_216_10 = 216, // $@10 + S_217_11 = 217, // $@11 + S_218_12 = 218, // $@12 + S_219_13 = 219, // $@13 + S_value = 220, // value + S_sub_json = 221, // sub_json + S_map2 = 222, // map2 + S_223_14 = 223, // $@14 + 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_15 = 228, // $@15 + S_list_content = 229, // list_content + S_not_empty_list = 230, // not_empty_list + S_list_strings = 231, // list_strings + S_232_16 = 232, // $@16 + 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_17 = 237, // $@17 + S_global_object = 238, // global_object + S_239_18 = 239, // $@18 + S_sub_dhcp4 = 240, // sub_dhcp4 + S_241_19 = 241, // $@19 + S_global_params = 242, // global_params + S_global_param = 243, // global_param + S_valid_lifetime = 244, // valid_lifetime + S_min_valid_lifetime = 245, // min_valid_lifetime + S_max_valid_lifetime = 246, // max_valid_lifetime + S_renew_timer = 247, // renew_timer + S_rebind_timer = 248, // rebind_timer + S_calculate_tee_times = 249, // calculate_tee_times + S_t1_percent = 250, // t1_percent + S_t2_percent = 251, // t2_percent + S_cache_threshold = 252, // cache_threshold + S_cache_max_age = 253, // cache_max_age + S_decline_probation_period = 254, // decline_probation_period + S_server_tag = 255, // server_tag + S_256_20 = 256, // $@20 + S_parked_packet_limit = 257, // parked_packet_limit + S_echo_client_id = 258, // echo_client_id + S_match_client_id = 259, // match_client_id + S_authoritative = 260, // authoritative + S_ddns_send_updates = 261, // ddns_send_updates + S_ddns_override_no_update = 262, // ddns_override_no_update + S_ddns_override_client_update = 263, // ddns_override_client_update + S_ddns_replace_client_name = 264, // ddns_replace_client_name + S_265_21 = 265, // $@21 + S_ddns_replace_client_name_value = 266, // ddns_replace_client_name_value + S_ddns_generated_prefix = 267, // ddns_generated_prefix + S_268_22 = 268, // $@22 + S_ddns_qualifying_suffix = 269, // ddns_qualifying_suffix + S_270_23 = 270, // $@23 + S_ddns_update_on_renew = 271, // ddns_update_on_renew + S_ddns_use_conflict_resolution = 272, // ddns_use_conflict_resolution + S_hostname_char_set = 273, // hostname_char_set + S_274_24 = 274, // $@24 + S_hostname_char_replacement = 275, // hostname_char_replacement + S_276_25 = 276, // $@25 + S_store_extended_info = 277, // store_extended_info + S_statistic_default_sample_count = 278, // statistic_default_sample_count + S_statistic_default_sample_age = 279, // statistic_default_sample_age + S_ip_reservations_unique = 280, // ip_reservations_unique + S_interfaces_config = 281, // interfaces_config + S_282_26 = 282, // $@26 + S_interfaces_config_params = 283, // interfaces_config_params + S_interfaces_config_param = 284, // interfaces_config_param + S_sub_interfaces4 = 285, // sub_interfaces4 + S_286_27 = 286, // $@27 + S_interfaces_list = 287, // interfaces_list + S_288_28 = 288, // $@28 + S_dhcp_socket_type = 289, // dhcp_socket_type + S_290_29 = 290, // $@29 + S_socket_type = 291, // socket_type + S_outbound_interface = 292, // outbound_interface + S_293_30 = 293, // $@30 + S_outbound_interface_value = 294, // outbound_interface_value + S_re_detect = 295, // re_detect + S_lease_database = 296, // lease_database + S_297_31 = 297, // $@31 + S_sanity_checks = 298, // sanity_checks + S_299_32 = 299, // $@32 + S_sanity_checks_params = 300, // sanity_checks_params + S_sanity_checks_param = 301, // sanity_checks_param + S_lease_checks = 302, // lease_checks + S_303_33 = 303, // $@33 + S_hosts_database = 304, // hosts_database + S_305_34 = 305, // $@34 + S_hosts_databases = 306, // hosts_databases + S_307_35 = 307, // $@35 + S_database_list = 308, // database_list + S_not_empty_database_list = 309, // not_empty_database_list + S_database = 310, // database + S_311_36 = 311, // $@36 + S_database_map_params = 312, // database_map_params + S_database_map_param = 313, // database_map_param + S_database_type = 314, // database_type + S_315_37 = 315, // $@37 + S_db_type = 316, // db_type + S_user = 317, // user + S_318_38 = 318, // $@38 + S_password = 319, // password + S_320_39 = 320, // $@39 + S_host = 321, // host + S_322_40 = 322, // $@40 + S_port = 323, // port + S_name = 324, // name + S_325_41 = 325, // $@41 + S_persist = 326, // persist + S_lfc_interval = 327, // lfc_interval + S_readonly = 328, // readonly + S_connect_timeout = 329, // connect_timeout + S_request_timeout = 330, // request_timeout + S_tcp_keepalive = 331, // tcp_keepalive + S_tcp_nodelay = 332, // tcp_nodelay + S_contact_points = 333, // contact_points + S_334_42 = 334, // $@42 + S_keyspace = 335, // keyspace + S_336_43 = 336, // $@43 + S_consistency = 337, // consistency + S_338_44 = 338, // $@44 + S_serial_consistency = 339, // serial_consistency + S_340_45 = 340, // $@45 + S_max_reconnect_tries = 341, // max_reconnect_tries + S_reconnect_wait_time = 342, // reconnect_wait_time + S_on_fail = 343, // on_fail + S_344_46 = 344, // $@46 + S_on_fail_mode = 345, // on_fail_mode + S_max_row_errors = 346, // max_row_errors + S_host_reservation_identifiers = 347, // host_reservation_identifiers + S_348_47 = 348, // $@47 + S_host_reservation_identifiers_list = 349, // host_reservation_identifiers_list + S_host_reservation_identifier = 350, // host_reservation_identifier + S_duid_id = 351, // duid_id + S_hw_address_id = 352, // hw_address_id + S_circuit_id = 353, // circuit_id + S_client_id = 354, // client_id + S_flex_id = 355, // flex_id + S_dhcp_multi_threading = 356, // dhcp_multi_threading + S_357_48 = 357, // $@48 + S_multi_threading_params = 358, // multi_threading_params + S_multi_threading_param = 359, // multi_threading_param + S_enable_multi_threading = 360, // enable_multi_threading + S_thread_pool_size = 361, // thread_pool_size + S_packet_queue_size = 362, // packet_queue_size + S_hooks_libraries = 363, // hooks_libraries + S_364_49 = 364, // $@49 + S_hooks_libraries_list = 365, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 366, // not_empty_hooks_libraries_list + S_hooks_library = 367, // hooks_library + S_368_50 = 368, // $@50 + S_sub_hooks_library = 369, // sub_hooks_library + S_370_51 = 370, // $@51 + S_hooks_params = 371, // hooks_params + S_hooks_param = 372, // hooks_param + S_library = 373, // library + S_374_52 = 374, // $@52 + S_parameters = 375, // parameters + S_376_53 = 376, // $@53 + S_expired_leases_processing = 377, // expired_leases_processing + S_378_54 = 378, // $@54 + S_expired_leases_params = 379, // expired_leases_params + S_expired_leases_param = 380, // expired_leases_param + S_reclaim_timer_wait_time = 381, // reclaim_timer_wait_time + S_flush_reclaimed_timer_wait_time = 382, // flush_reclaimed_timer_wait_time + S_hold_reclaimed_time = 383, // hold_reclaimed_time + S_max_reclaim_leases = 384, // max_reclaim_leases + S_max_reclaim_time = 385, // max_reclaim_time + S_unwarned_reclaim_cycles = 386, // unwarned_reclaim_cycles + S_subnet4_list = 387, // subnet4_list + S_388_55 = 388, // $@55 + S_subnet4_list_content = 389, // subnet4_list_content + S_not_empty_subnet4_list = 390, // not_empty_subnet4_list + S_subnet4 = 391, // subnet4 + S_392_56 = 392, // $@56 + S_sub_subnet4 = 393, // sub_subnet4 + S_394_57 = 394, // $@57 + S_subnet4_params = 395, // subnet4_params + S_subnet4_param = 396, // subnet4_param + S_subnet = 397, // subnet + S_398_58 = 398, // $@58 + S_subnet_4o6_interface = 399, // subnet_4o6_interface + S_400_59 = 400, // $@59 + S_subnet_4o6_interface_id = 401, // subnet_4o6_interface_id + S_402_60 = 402, // $@60 + S_subnet_4o6_subnet = 403, // subnet_4o6_subnet + S_404_61 = 404, // $@61 + S_interface = 405, // interface + S_406_62 = 406, // $@62 + S_client_class = 407, // client_class + S_408_63 = 408, // $@63 + S_require_client_classes = 409, // require_client_classes + S_410_64 = 410, // $@64 + S_reservations_global = 411, // reservations_global + S_reservations_in_subnet = 412, // reservations_in_subnet + S_reservations_out_of_pool = 413, // reservations_out_of_pool + S_reservation_mode = 414, // reservation_mode + S_415_65 = 415, // $@65 + S_hr_mode = 416, // hr_mode + S_id = 417, // id + S_shared_networks = 418, // shared_networks + S_419_66 = 419, // $@66 + S_shared_networks_content = 420, // shared_networks_content + S_shared_networks_list = 421, // shared_networks_list + S_shared_network = 422, // shared_network + S_423_67 = 423, // $@67 + S_shared_network_params = 424, // shared_network_params + S_shared_network_param = 425, // shared_network_param + S_option_def_list = 426, // option_def_list + S_427_68 = 427, // $@68 + S_sub_option_def_list = 428, // sub_option_def_list + S_429_69 = 429, // $@69 + S_option_def_list_content = 430, // option_def_list_content + S_not_empty_option_def_list = 431, // not_empty_option_def_list + S_option_def_entry = 432, // option_def_entry + S_433_70 = 433, // $@70 + S_sub_option_def = 434, // sub_option_def + S_435_71 = 435, // $@71 + S_option_def_params = 436, // option_def_params + S_not_empty_option_def_params = 437, // not_empty_option_def_params + S_option_def_param = 438, // option_def_param + S_option_def_name = 439, // option_def_name + S_code = 440, // code + S_option_def_code = 441, // option_def_code + S_option_def_type = 442, // option_def_type + S_443_72 = 443, // $@72 + S_option_def_record_types = 444, // option_def_record_types + S_445_73 = 445, // $@73 + S_space = 446, // space + S_447_74 = 447, // $@74 + S_option_def_space = 448, // option_def_space + S_option_def_encapsulate = 449, // option_def_encapsulate + S_450_75 = 450, // $@75 + S_option_def_array = 451, // option_def_array + S_option_data_list = 452, // option_data_list + S_453_76 = 453, // $@76 + S_option_data_list_content = 454, // option_data_list_content + S_not_empty_option_data_list = 455, // not_empty_option_data_list + S_option_data_entry = 456, // option_data_entry + S_457_77 = 457, // $@77 + S_sub_option_data = 458, // sub_option_data + S_459_78 = 459, // $@78 + S_option_data_params = 460, // option_data_params + S_not_empty_option_data_params = 461, // not_empty_option_data_params + S_option_data_param = 462, // option_data_param + S_option_data_name = 463, // option_data_name + S_option_data_data = 464, // option_data_data + S_465_79 = 465, // $@79 + S_option_data_code = 466, // option_data_code + S_option_data_space = 467, // option_data_space + S_option_data_csv_format = 468, // option_data_csv_format + S_option_data_always_send = 469, // option_data_always_send + S_pools_list = 470, // pools_list + S_471_80 = 471, // $@80 + S_pools_list_content = 472, // pools_list_content + S_not_empty_pools_list = 473, // not_empty_pools_list + S_pool_list_entry = 474, // pool_list_entry + S_475_81 = 475, // $@81 + S_sub_pool4 = 476, // sub_pool4 + S_477_82 = 477, // $@82 + S_pool_params = 478, // pool_params + S_pool_param = 479, // pool_param + S_pool_entry = 480, // pool_entry + S_481_83 = 481, // $@83 + S_user_context = 482, // user_context + S_483_84 = 483, // $@84 + S_comment = 484, // comment + S_485_85 = 485, // $@85 + S_reservations = 486, // reservations + S_487_86 = 487, // $@86 + S_reservations_list = 488, // reservations_list + S_not_empty_reservations_list = 489, // not_empty_reservations_list + S_reservation = 490, // reservation + S_491_87 = 491, // $@87 + S_sub_reservation = 492, // sub_reservation + S_493_88 = 493, // $@88 + S_reservation_params = 494, // reservation_params + S_not_empty_reservation_params = 495, // not_empty_reservation_params + S_reservation_param = 496, // reservation_param + S_next_server = 497, // next_server + S_498_89 = 498, // $@89 + S_server_hostname = 499, // server_hostname + S_500_90 = 500, // $@90 + S_boot_file_name = 501, // boot_file_name + S_502_91 = 502, // $@91 + S_ip_address = 503, // ip_address + S_504_92 = 504, // $@92 + S_ip_addresses = 505, // ip_addresses + S_506_93 = 506, // $@93 + S_duid = 507, // duid + S_508_94 = 508, // $@94 + S_hw_address = 509, // hw_address + S_510_95 = 510, // $@95 + S_client_id_value = 511, // client_id_value + S_512_96 = 512, // $@96 + S_circuit_id_value = 513, // circuit_id_value + S_514_97 = 514, // $@97 + S_flex_id_value = 515, // flex_id_value + S_516_98 = 516, // $@98 + S_hostname = 517, // hostname + S_518_99 = 518, // $@99 + S_reservation_client_classes = 519, // reservation_client_classes + S_520_100 = 520, // $@100 + S_relay = 521, // relay + S_522_101 = 522, // $@101 + S_relay_map = 523, // relay_map + S_client_classes = 524, // client_classes + S_525_102 = 525, // $@102 + S_client_classes_list = 526, // client_classes_list + S_client_class_entry = 527, // client_class_entry + S_528_103 = 528, // $@103 + S_client_class_params = 529, // client_class_params + S_not_empty_client_class_params = 530, // not_empty_client_class_params + S_client_class_param = 531, // client_class_param + S_client_class_name = 532, // client_class_name + S_client_class_test = 533, // client_class_test + S_534_104 = 534, // $@104 + S_only_if_required = 535, // only_if_required + S_dhcp4o6_port = 536, // dhcp4o6_port + S_control_socket = 537, // control_socket + S_538_105 = 538, // $@105 + S_control_socket_params = 539, // control_socket_params + S_control_socket_param = 540, // control_socket_param + S_control_socket_type = 541, // control_socket_type + S_542_106 = 542, // $@106 + S_control_socket_name = 543, // control_socket_name + S_544_107 = 544, // $@107 + S_dhcp_queue_control = 545, // dhcp_queue_control + S_546_108 = 546, // $@108 + S_queue_control_params = 547, // queue_control_params + S_queue_control_param = 548, // queue_control_param + S_enable_queue = 549, // enable_queue + S_queue_type = 550, // queue_type + S_551_109 = 551, // $@109 + S_capacity = 552, // capacity + S_arbitrary_map_entry = 553, // arbitrary_map_entry + S_554_110 = 554, // $@110 + S_dhcp_ddns = 555, // dhcp_ddns + S_556_111 = 556, // $@111 + S_sub_dhcp_ddns = 557, // sub_dhcp_ddns + S_558_112 = 558, // $@112 + S_dhcp_ddns_params = 559, // dhcp_ddns_params + S_dhcp_ddns_param = 560, // dhcp_ddns_param + S_enable_updates = 561, // enable_updates + S_server_ip = 562, // server_ip + S_563_113 = 563, // $@113 + S_server_port = 564, // server_port + S_sender_ip = 565, // sender_ip + S_566_114 = 566, // $@114 + S_sender_port = 567, // sender_port + S_max_queue_size = 568, // max_queue_size + S_ncr_protocol = 569, // ncr_protocol + S_570_115 = 570, // $@115 + S_ncr_protocol_value = 571, // ncr_protocol_value + S_ncr_format = 572, // ncr_format + S_573_116 = 573, // $@116 + S_dep_qualifying_suffix = 574, // dep_qualifying_suffix + S_575_117 = 575, // $@117 + S_dep_override_no_update = 576, // dep_override_no_update + S_dep_override_client_update = 577, // dep_override_client_update + S_dep_replace_client_name = 578, // dep_replace_client_name + S_579_118 = 579, // $@118 + S_dep_generated_prefix = 580, // dep_generated_prefix + S_581_119 = 581, // $@119 + S_dep_hostname_char_set = 582, // dep_hostname_char_set + S_583_120 = 583, // $@120 + S_dep_hostname_char_replacement = 584, // dep_hostname_char_replacement + S_585_121 = 585, // $@121 + S_config_control = 586, // config_control + S_587_122 = 587, // $@122 + S_sub_config_control = 588, // sub_config_control + S_589_123 = 589, // $@123 + S_config_control_params = 590, // config_control_params + S_config_control_param = 591, // config_control_param + S_config_databases = 592, // config_databases + S_593_124 = 593, // $@124 + S_config_fetch_wait_time = 594, // config_fetch_wait_time + S_loggers = 595, // loggers + S_596_125 = 596, // $@125 + S_loggers_entries = 597, // loggers_entries + S_logger_entry = 598, // logger_entry + S_599_126 = 599, // $@126 + S_logger_params = 600, // logger_params + S_logger_param = 601, // logger_param + S_debuglevel = 602, // debuglevel + S_severity = 603, // severity + S_604_127 = 604, // $@127 + S_output_options_list = 605, // output_options_list + S_606_128 = 606, // $@128 + S_output_options_list_content = 607, // output_options_list_content + S_output_entry = 608, // output_entry + S_609_129 = 609, // $@129 + S_output_params_list = 610, // output_params_list + S_output_params = 611, // output_params + S_output = 612, // output + S_613_130 = 613, // $@130 + S_flush = 614, // flush + S_maxsize = 615, // maxsize + S_maxver = 616, // maxver + S_pattern = 617, // pattern + S_618_131 = 618, // $@131 + S_compatibility = 619, // compatibility + S_620_132 = 620, // $@132 + S_compatibility_params = 621, // compatibility_params + S_compatibility_param = 622, // compatibility_param + S_lenient_option_parsing = 623 // lenient_option_parsing + }; + }; - /// 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 @@ -690,13 +1360,52 @@ 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 symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case symbol_kind::S_BOOLEAN: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case symbol_kind::S_FLOAT: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case symbol_kind::S_INTEGER: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case symbol_kind::S_STRING: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. basic_symbol (const basic_symbol& that); - /// Constructor for valueless symbols, and symbols from each type. + /// Constructors for typed symbols. #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) @@ -708,6 +1417,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) @@ -721,6 +1431,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) @@ -734,6 +1445,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) : Base (t) @@ -747,6 +1459,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) : Base (t) @@ -760,6 +1473,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) : Base (t) @@ -781,46 +1495,46 @@ namespace isc { namespace dhcp { } /// Destroy contents, and record that is empty. - void clear () + void clear () YY_NOEXCEPT { // 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 - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.template destroy< ElementPtr > (); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.template destroy< bool > (); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.template destroy< double > (); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< int64_t > (); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.template destroy< std::string > (); break; @@ -831,6 +1545,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; @@ -851,49 +1574,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 (); + void clear () YY_NOEXCEPT; - /// 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; - /// The token. - token_type token () 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 () {} @@ -902,74 +1627,67 @@ switch (yytype) #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) - { - YYASSERT (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_ON_FAIL || tok == token::TOKEN_STOP_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_CONTINUE || 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_CACHE_THRESHOLD || tok == token::TOKEN_CACHE_MAX_AGE || 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_DDNS_UPDATE_ON_RENEW || tok == token::TOKEN_DDNS_USE_CONFLICT_RESOLUTION || 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_PARKED_PACKET_LIMIT || 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_RESERVATIONS_GLOBAL || tok == token::TOKEN_RESERVATIONS_IN_SUBNET || tok == token::TOKEN_RESERVATIONS_OUT_OF_POOL || 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_IP_RESERVATIONS_UNIQUE || 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_COMPATIBILITY || tok == token::TOKEN_LENIENT_OPTION_PARSING || 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_CONFIG_CONTROL); - } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) +#endif { - YYASSERT (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_ON_FAIL || tok == token::TOKEN_STOP_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_CONTINUE || 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_CACHE_THRESHOLD || tok == token::TOKEN_CACHE_MAX_AGE || 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_DDNS_UPDATE_ON_RENEW || tok == token::TOKEN_DDNS_USE_CONFLICT_RESOLUTION || 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_PARKED_PACKET_LIMIT || 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_RESERVATIONS_GLOBAL || tok == token::TOKEN_RESERVATIONS_IN_SUBNET || tok == token::TOKEN_RESERVATIONS_OUT_OF_POOL || 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_IP_RESERVATIONS_UNIQUE || 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_COMPATIBILITY || tok == token::TOKEN_LENIENT_OPTION_PARSING || 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_CONFIG_CONTROL); + PARSER4__ASSERT (tok == token::TOKEN_END + || (token::TOKEN_PARSER4_error <= tok && tok <= token::TOKEN_SUB_CONFIG_CONTROL)); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, bool v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_BOOLEAN); - } #else symbol_type (int tok, const bool& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_BOOLEAN); + PARSER4__ASSERT (tok == token::TOKEN_BOOLEAN); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, double v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_FLOAT); - } #else symbol_type (int tok, const double& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_FLOAT); + PARSER4__ASSERT (tok == token::TOKEN_FLOAT); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, int64_t v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_INTEGER); - } #else symbol_type (int tok, const int64_t& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_INTEGER); + PARSER4__ASSERT (tok == token::TOKEN_INTEGER); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, std::string v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_STRING); - } #else symbol_type (int tok, const std::string& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_STRING); + PARSER4__ASSERT (tok == token::TOKEN_STRING); } -#endif }; /// Build a parser object. 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() (); @@ -1000,6 +1718,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 @@ -1016,6 +1738,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 @@ -4048,24 +4800,47 @@ switch (yytype) #endif + class context + { + public: + context (const Dhcp4Parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; } + symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); } + const location_type& location () const YY_NOEXCEPT { 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 - /// State numbers. - typedef int 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; + /// Stored state numbers (used for stacks). + typedef short state_type; + + /// 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 - state_type yy_lr_goto_state_ (state_type yystate, int yysym); + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); /// Whether the given \c yypact_ value indicates a defaulted state. /// \param yyvalue the value to check @@ -4078,63 +4853,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. - static token_number_type yytranslate_ (token_type t); + /// 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 symbol_kind_type yytranslate_ (int t); - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const short yypact_[]; + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); - // YYDEFACT[STATE-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 short yydefact_[]; + /// For a symbol, its name in clear. + static const char* const yytname_[]; - // YYPGOTO[NTERM-NUM]. - static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. - static const short yydefgoto_[]; + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; - // YYTABLE[YYPACT[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 short yytable_[]; + // YYDEFACT[STATE-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_[]; - static const short yycheck_[]; + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing - // symbol of state STATE-NUM. - static const unsigned short yystos_[]; + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. - static const unsigned short yyr1_[]; + // YYTABLE[YYPACT[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_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. - static const unsigned char yyr2_[]; + static const short yycheck_[]; + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const short yystos_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); + // YYR1[YYN] -- 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. + static const signed char yyr2_[]; - /// 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. - static const unsigned short yyrline_[]; + // YYRLINE[YYN] -- 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 @@ -4155,7 +4933,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. @@ -4167,15 +4945,16 @@ 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 symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. - enum { empty_state = -1 }; + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; /// The state. /// \a empty when empty. @@ -4197,6 +4976,10 @@ switch (yytype) /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; @@ -4206,48 +4989,38 @@ 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; stack (size_type n = 200) : seq_ (n) {} - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (size_type i) - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (int i) - { - return operator[] (size_type (i)); - } +#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. const T& - operator[] (size_type i) const + operator[] (index_type i) const { - return seq_[size () - 1 - i]; + return seq_[size_type (size () - 1 - i)]; } /// Random access. /// /// Index 0 returns the topmost element. - const T& - operator[] (int i) const + T& + operator[] (index_type i) { - return operator[] (size_type (i)); + return seq_[size_type (size () - 1 - i)]; } /// Steal the contents of \a t. @@ -4262,7 +5035,7 @@ switch (yytype) /// Pop elements from the stack. void - pop (int n = 1) YY_NOEXCEPT + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT { for (; 0 < n; --n) seq_.pop_back (); @@ -4276,49 +5049,53 @@ switch (yytype) } /// Number of elements on the stack. - size_type + index_type size () const YY_NOEXCEPT { - return seq_.size (); + return index_type (seq_.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. class slice { public: - slice (const stack& stack, int range) + slice (const stack& stack, index_type range) : stack_ (stack) , range_ (range) {} const T& - operator[] (int i) const + operator[] (index_type i) const { return stack_[range_ - i]; } private: const stack& stack_; - int range_; + index_type range_; }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -4351,28 +5128,25 @@ switch (yytype) /// Constants. enum { - yyeof_ = 0, yylast_ = 1429, ///< Last index in yytable_. yynnts_ = 419, ///< Number of nonterminal symbols. - yyfinal_ = 28, ///< Termination state number. - yyterror_ = 1, - yyerrcode_ = 256, - yyntokens_ = 205 ///< Number of tokens. + yyfinal_ = 28 ///< Termination state number. }; // User arguments. isc::dhcp::Parser4Context& ctx; + }; inline - Dhcp4Parser::token_number_type - Dhcp4Parser::yytranslate_ (token_type t) + 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, @@ -4422,95 +5196,51 @@ switch (yytype) 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204 }; - const unsigned user_token_number_max_ = 459; - const token_number_type undef_token_ = 2; + // Last valid token kind. + const int code_max = 459; - if (static_cast (t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return YY_CAST (symbol_kind_type, translate_table[t]); else - return 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 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 204: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 203: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 202: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 201: // "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 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.copy< ElementPtr > (YY_MOVE (that.value)); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.copy< bool > (YY_MOVE (that.value)); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.copy< double > (YY_MOVE (that.value)); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.copy< int64_t > (YY_MOVE (that.value)); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -4522,11 +5252,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 @@ -4534,33 +5271,33 @@ switch (yytype) Dhcp4Parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { - case 220: // value - case 224: // map_value - case 266: // ddns_replace_client_name_value - case 291: // socket_type - case 294: // outbound_interface_value - case 316: // db_type - case 345: // on_fail_mode - case 416: // hr_mode - case 571: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_socket_type: // socket_type + case symbol_kind::S_outbound_interface_value: // outbound_interface_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (YY_MOVE (s.value)); break; - case 204: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (YY_MOVE (s.value)); break; - case 203: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (YY_MOVE (s.value)); break; - case 202: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (YY_MOVE (s.value)); break; - case 201: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (YY_MOVE (s.value)); break; @@ -4571,91 +5308,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 () YY_NOEXCEPT { - 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 type; + return kind_; } inline - Dhcp4Parser::token_type - Dhcp4Parser::by_type::token () const YY_NOEXCEPT + Dhcp4Parser::symbol_kind_type + Dhcp4Parser::by_kind::type_get () const YY_NOEXCEPT { - // YYTOKNUM[NUM] -- (External) token number corresponding to the - // (internal) symbol number NUM (which must be that of a token). */ - static - const unsigned short - yytoken_number_[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459 - }; - return token_type (yytoken_number_[type]); + return this->kind (); } -#line 14 "dhcp4_parser.yy" // lalr1.cc:401 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 4659 "dhcp4_parser.h" // lalr1.cc:401 +#line 5368 "dhcp4_parser.h" diff --git a/src/bin/dhcp4/location.hh b/src/bin/dhcp4/location.hh index 42bb34703f..3c542905df 100644 --- a/src/bin/dhcp4/location.hh +++ b/src/bin/dhcp4/location.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -38,7 +38,6 @@ #ifndef YY_PARSER4_LOCATION_HH_INCLUDED # define YY_PARSER4_LOCATION_HH_INCLUDED -# include // std::max # include # include @@ -54,17 +53,23 @@ # endif # endif -#line 14 "dhcp4_parser.yy" // location.cc:339 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 60 "location.hh" // location.cc:339 +#line 59 "location.hh" + /// A point in a source file. class position { public: + /// Type for file name. + typedef const std::string filename_type; + /// Type for line and column numbers. + typedef int counter_type; + /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + explicit position (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) : filename (f) , line (l) , column (c) @@ -72,9 +77,9 @@ namespace isc { namespace dhcp { /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* fn = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { filename = fn; line = l; @@ -84,41 +89,40 @@ namespace isc { namespace dhcp { /** \name Line and Column related manipulators ** \{ */ /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { if (count) { - column = 1u; + column = 1; line = add_ (line, count, 1); } } /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { column = add_ (column, count, 1); } /** \} */ /// File name to which this position refers. - std::string* filename; + filename_type* filename; /// Current line number. - unsigned line; + counter_type line; /// Current column number. - unsigned column; + counter_type column; private: /// Compute max (min, lhs+rhs). - static unsigned add_ (unsigned lhs, int rhs, int min) + static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min) { - return static_cast (std::max (min, - static_cast (lhs) + rhs)); + return lhs + rhs < min ? min : lhs + rhs; } }; /// Add \a width columns, in place. inline position& - operator+= (position& res, int width) + operator+= (position& res, position::counter_type width) { res.columns (width); return res; @@ -126,43 +130,25 @@ namespace isc { namespace dhcp { /// Add \a width columns. inline position - operator+ (position res, int width) + operator+ (position res, position::counter_type width) { return res += width; } /// Subtract \a width columns, in place. inline position& - operator-= (position& res, int width) + operator-= (position& res, position::counter_type width) { return res += -width; } /// Subtract \a width columns. inline position - operator- (position res, int width) + operator- (position res, position::counter_type width) { return res -= width; } - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param pos a reference to the position to redirect @@ -180,6 +166,10 @@ namespace isc { namespace dhcp { class location { public: + /// Type for file name. + typedef position::filename_type filename_type; + /// Type for line and column numbers. + typedef position::counter_type counter_type; /// Construct a location from \a b to \a e. location (const position& b, const position& e) @@ -194,18 +184,18 @@ namespace isc { namespace dhcp { {} /// Construct a 0-width location in \a f, \a l, \a c. - explicit location (std::string* f, - unsigned l = 1u, - unsigned c = 1u) + explicit location (filename_type* f, + counter_type l = 1, + counter_type c = 1) : begin (f, l, c) , end (f, l, c) {} /// Initialization. - void initialize (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { begin.initialize (f, l, c); end = begin; @@ -221,13 +211,13 @@ namespace isc { namespace dhcp { } /// Extend the current location to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { end += count; } /// Extend the current location to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { end.lines (count); } @@ -242,57 +232,49 @@ namespace isc { namespace dhcp { }; /// Join two locations, in place. - inline location& operator+= (location& res, const location& end) + inline location& + operator+= (location& res, const location& end) { res.end = end.end; return res; } /// Join two locations. - inline location operator+ (location res, const location& end) + inline location + operator+ (location res, const location& end) { return res += end; } /// Add \a width columns to the end position, in place. - inline location& operator+= (location& res, int width) + inline location& + operator+= (location& res, location::counter_type width) { res.columns (width); return res; } /// Add \a width columns to the end position. - inline location operator+ (location res, int width) + inline location + operator+ (location res, location::counter_type width) { return res += width; } /// Subtract \a width columns to the end position, in place. - inline location& operator-= (location& res, int width) + inline location& + operator-= (location& res, location::counter_type width) { return res += -width; } /// Subtract \a width columns to the end position. - inline location operator- (location res, int width) + inline location + operator- (location res, location::counter_type width) { return res -= width; } - /// Compare two location objects. - inline bool - operator== (const location& loc1, const location& loc2) - { - return loc1.begin == loc2.begin && loc1.end == loc2.end; - } - - /// Compare two location objects. - inline bool - operator!= (const location& loc1, const location& loc2) - { - return !(loc1 == loc2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param loc a reference to the location to redirect @@ -303,7 +285,8 @@ namespace isc { namespace dhcp { std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + location::counter_type end_col + = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -316,7 +299,8 @@ namespace isc { namespace dhcp { return ostr; } -#line 14 "dhcp4_parser.yy" // location.cc:339 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 322 "location.hh" // location.cc:339 +#line 305 "location.hh" + #endif // !YY_PARSER4_LOCATION_HH_INCLUDED diff --git a/src/bin/dhcp6/dhcp6_parser.cc b/src/bin/dhcp6/dhcp6_parser.cc index b3eb0ee03d..97600cf9c1 100644 --- a/src/bin/dhcp6/dhcp6_parser.cc +++ b/src/bin/dhcp6/dhcp6_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -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. @@ -43,11 +44,11 @@ // Unqualified %code blocks. -#line 34 "dhcp6_parser.yy" // lalr1.cc:435 +#line 34 "dhcp6_parser.yy" #include -#line 51 "dhcp6_parser.cc" // lalr1.cc:435 +#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 @@ -92,9 +94,6 @@ # endif -// Suppress unused-variable warnings by "using" E. -#define YYUSE(E) ((void) (E)) - // Enable debugging if requested. #if PARSER6_DEBUG @@ -120,13 +119,13 @@ # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ - yystack_print_ (); \ + yy_stack_print_ (); \ } while (false) #else // !PARSER6_DEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) # define YY_REDUCE_PRINT(Rule) static_cast (0) # define YY_STACK_PRINT() static_cast (0) @@ -140,57 +139,17 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "dhcp6_parser.yy" // lalr1.cc:510 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 146 "dhcp6_parser.cc" // lalr1.cc:510 - - /* 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) - : #if PARSER6_DEBUG - yydebug_ (false), + : yydebug_ (false), yycdebug_ (&std::cerr), +#else + : #endif ctx (ctx_yyarg) {} @@ -202,7 +161,7 @@ namespace isc { namespace dhcp { {} /*---------------. - | Symbol types. | + | symbol kinds. | `---------------*/ @@ -233,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 () @@ -248,32 +207,32 @@ 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 ()) - { - case 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value)); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value)); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -290,32 +249,32 @@ 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 ()) - { - case 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (YY_MOVE (that.value)); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (YY_MOVE (that.value)); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (YY_MOVE (that.value)); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (YY_MOVE (that.value)); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (YY_MOVE (that.value)); break; @@ -324,40 +283,81 @@ namespace isc { namespace dhcp { } // that is emptied. - that.type = empty_symbol; + that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L + Dhcp6Parser::stack_symbol_type& + Dhcp6Parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value + value.copy< ElementPtr > (that.value); + break; + + case symbol_kind::S_BOOLEAN: // "boolean" + value.copy< bool > (that.value); + break; + + case symbol_kind::S_FLOAT: // "floating point" + value.copy< double > (that.value); + break; + + case symbol_kind::S_INTEGER: // "integer" + value.copy< int64_t > (that.value); + break; + + case symbol_kind::S_STRING: // "constant string" + value.copy< std::string > (that.value); + break; + + default: + break; + } + + location = that.location; + return *this; + } + Dhcp6Parser::stack_symbol_type& Dhcp6Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) - { - case 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + switch (that.kind ()) + { + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (that.value); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (that.value); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (that.value); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (that.value); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (that.value); break; @@ -383,99 +383,97 @@ 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". + YY_USE (yyoutput); if (yysym.empty ()) - std::abort (); -#endif - yyo << (yytype < yyntokens_ ? "token" : "nterm") - << ' ' << yytname_[yytype] << " (" - << yysym.location << ": "; - switch (yytype) - { - case 209: // "constant string" -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < std::string > (); } -#line 407 "dhcp6_parser.cc" // lalr1.cc:676 + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) + { + case symbol_kind::S_STRING: // "constant string" +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 404 "dhcp6_parser.cc" break; - case 210: // "integer" -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < int64_t > (); } -#line 413 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_INTEGER: // "integer" +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 410 "dhcp6_parser.cc" break; - case 211: // "floating point" -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < double > (); } -#line 419 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_FLOAT: // "floating point" +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 416 "dhcp6_parser.cc" break; - case 212: // "boolean" -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < bool > (); } -#line 425 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_BOOLEAN: // "boolean" +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 422 "dhcp6_parser.cc" break; - case 229: // value -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 431 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_value: // value +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 428 "dhcp6_parser.cc" break; - case 233: // map_value -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 437 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_map_value: // map_value +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 434 "dhcp6_parser.cc" break; - case 274: // ddns_replace_client_name_value -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 443 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 440 "dhcp6_parser.cc" break; - case 315: // db_type -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 449 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_db_type: // db_type +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 446 "dhcp6_parser.cc" break; - case 332: // on_fail_mode -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 455 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_on_fail_mode: // on_fail_mode +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 452 "dhcp6_parser.cc" break; - case 422: // hr_mode -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 461 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_hr_mode: // hr_mode +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 458 "dhcp6_parser.cc" break; - case 558: // duid_type -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 467 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_duid_type: // duid_type +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 464 "dhcp6_parser.cc" break; - case 601: // ncr_protocol_value -#line 292 "dhcp6_parser.yy" // lalr1.cc:676 - { yyoutput << yysym.value.template as < ElementPtr > (); } -#line 473 "dhcp6_parser.cc" // lalr1.cc:676 + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value +#line 292 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 470 "dhcp6_parser.cc" break; default: break; } - yyo << ')'; + yyo << ')'; + } } #endif @@ -534,11 +532,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 @@ -562,7 +560,6 @@ namespace isc { namespace dhcp { int Dhcp6Parser::parse () { - // State. int yyn; /// Length of the RHS of the rule being reduced. int yylen = 0; @@ -598,7 +595,8 @@ namespace isc { namespace dhcp { | yynewstate -- push a new symbol on the stack. | `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) @@ -612,14 +610,14 @@ namespace isc { namespace dhcp { `-----------*/ yybackup: // Try to take a decision without lookahead. - yyn = yypact_[yystack_[0].state]; + yyn = yypact_[+yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) goto yydefault; // Read a lookahead token. if (yyla.empty ()) { - YYCDEBUG << "Reading a token: "; + YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS @@ -638,11 +636,23 @@ 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 ()) - goto yydefault; + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } // Reduce or error. yyn = yytable_[yyn]; @@ -659,7 +669,7 @@ namespace isc { namespace dhcp { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, YY_MOVE (yyla)); + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); goto yynewstate; @@ -667,7 +677,7 @@ namespace isc { namespace dhcp { | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: - yyn = yydefact_[yystack_[0].state]; + yyn = yydefact_[+yystack_[0].state]; if (yyn == 0) goto yyerrlab; goto yyreduce; @@ -686,30 +696,30 @@ namespace isc { namespace dhcp { when using variants. */ switch (yyr1_[yyn]) { - case 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value yylhs.value.emplace< ElementPtr > (); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" yylhs.value.emplace< bool > (); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" yylhs.value.emplace< double > (); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< int64_t > (); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" yylhs.value.emplace< std::string > (); break; @@ -733,284 +743,284 @@ namespace isc { namespace dhcp { { switch (yyn) { - case 2: -#line 301 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 740 "dhcp6_parser.cc" // lalr1.cc:919 + case 2: // $@1: %empty +#line 301 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.NO_KEYWORD; } +#line 750 "dhcp6_parser.cc" break; - case 4: -#line 302 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.CONFIG; } -#line 746 "dhcp6_parser.cc" // lalr1.cc:919 + case 4: // $@2: %empty +#line 302 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.CONFIG; } +#line 756 "dhcp6_parser.cc" break; - case 6: -#line 303 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP6; } -#line 752 "dhcp6_parser.cc" // lalr1.cc:919 + case 6: // $@3: %empty +#line 303 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.DHCP6; } +#line 762 "dhcp6_parser.cc" break; - case 8: -#line 304 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 758 "dhcp6_parser.cc" // lalr1.cc:919 + case 8: // $@4: %empty +#line 304 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.INTERFACES_CONFIG; } +#line 768 "dhcp6_parser.cc" break; - case 10: -#line 305 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.SUBNET6; } -#line 764 "dhcp6_parser.cc" // lalr1.cc:919 + case 10: // $@5: %empty +#line 305 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.SUBNET6; } +#line 774 "dhcp6_parser.cc" break; - case 12: -#line 306 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.POOLS; } -#line 770 "dhcp6_parser.cc" // lalr1.cc:919 + case 12: // $@6: %empty +#line 306 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.POOLS; } +#line 780 "dhcp6_parser.cc" break; - case 14: -#line 307 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.PD_POOLS; } -#line 776 "dhcp6_parser.cc" // lalr1.cc:919 + case 14: // $@7: %empty +#line 307 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.PD_POOLS; } +#line 786 "dhcp6_parser.cc" break; - case 16: -#line 308 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.RESERVATIONS; } -#line 782 "dhcp6_parser.cc" // lalr1.cc:919 + case 16: // $@8: %empty +#line 308 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.RESERVATIONS; } +#line 792 "dhcp6_parser.cc" break; - case 18: -#line 309 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP6; } -#line 788 "dhcp6_parser.cc" // lalr1.cc:919 + case 18: // $@9: %empty +#line 309 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.DHCP6; } +#line 798 "dhcp6_parser.cc" break; - case 20: -#line 310 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.OPTION_DEF; } -#line 794 "dhcp6_parser.cc" // lalr1.cc:919 + case 20: // $@10: %empty +#line 310 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.OPTION_DEF; } +#line 804 "dhcp6_parser.cc" break; - case 22: -#line 311 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.OPTION_DATA; } -#line 800 "dhcp6_parser.cc" // lalr1.cc:919 + case 22: // $@11: %empty +#line 311 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.OPTION_DATA; } +#line 810 "dhcp6_parser.cc" break; - case 24: -#line 312 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 806 "dhcp6_parser.cc" // lalr1.cc:919 + case 24: // $@12: %empty +#line 312 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } +#line 816 "dhcp6_parser.cc" break; - case 26: -#line 313 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 812 "dhcp6_parser.cc" // lalr1.cc:919 + case 26: // $@13: %empty +#line 313 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.DHCP_DDNS; } +#line 822 "dhcp6_parser.cc" break; - case 28: -#line 314 "dhcp6_parser.yy" // lalr1.cc:919 - { ctx.ctx_ = ctx.CONFIG_CONTROL; } -#line 818 "dhcp6_parser.cc" // lalr1.cc:919 + case 28: // $@14: %empty +#line 314 "dhcp6_parser.yy" + { ctx.ctx_ = ctx.CONFIG_CONTROL; } +#line 828 "dhcp6_parser.cc" break; - case 30: -#line 322 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 824 "dhcp6_parser.cc" // lalr1.cc:919 + case 30: // value: "integer" +#line 322 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 834 "dhcp6_parser.cc" break; - case 31: -#line 323 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } -#line 830 "dhcp6_parser.cc" // lalr1.cc:919 + case 31: // value: "floating point" +#line 323 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 840 "dhcp6_parser.cc" break; - case 32: -#line 324 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 836 "dhcp6_parser.cc" // lalr1.cc:919 + case 32: // value: "boolean" +#line 324 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 846 "dhcp6_parser.cc" break; - case 33: -#line 325 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 842 "dhcp6_parser.cc" // lalr1.cc:919 + case 33: // value: "constant string" +#line 325 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 852 "dhcp6_parser.cc" break; - case 34: -#line 326 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 848 "dhcp6_parser.cc" // lalr1.cc:919 + case 34: // value: "null" +#line 326 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 858 "dhcp6_parser.cc" break; - case 35: -#line 327 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 854 "dhcp6_parser.cc" // lalr1.cc:919 + case 35: // value: map2 +#line 327 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 864 "dhcp6_parser.cc" break; - case 36: -#line 328 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 860 "dhcp6_parser.cc" // lalr1.cc:919 + case 36: // value: list_generic +#line 328 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 870 "dhcp6_parser.cc" break; - case 37: -#line 331 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 37: // sub_json: value +#line 331 "dhcp6_parser.yy" + { // Push back the JSON value on the stack ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 869 "dhcp6_parser.cc" // lalr1.cc:919 +#line 879 "dhcp6_parser.cc" break; - case 38: -#line 336 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 38: // $@15: %empty +#line 336 "dhcp6_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 880 "dhcp6_parser.cc" // lalr1.cc:919 +#line 890 "dhcp6_parser.cc" break; - case 39: -#line 341 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 39: // map2: "{" $@15 map_content "}" +#line 341 "dhcp6_parser.yy" + { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 890 "dhcp6_parser.cc" // lalr1.cc:919 +#line 900 "dhcp6_parser.cc" break; - case 40: -#line 347 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 896 "dhcp6_parser.cc" // lalr1.cc:919 + case 40: // map_value: map2 +#line 347 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 906 "dhcp6_parser.cc" break; - case 43: -#line 354 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 43: // not_empty_map: "constant string" ":" value +#line 354 "dhcp6_parser.yy" + { // map containing a single entry ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location)); ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 906 "dhcp6_parser.cc" // lalr1.cc:919 +#line 916 "dhcp6_parser.cc" break; - case 44: -#line 359 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 44: // not_empty_map: not_empty_map "," "constant string" ":" value +#line 359 "dhcp6_parser.yy" + { // map consisting of a shorter map followed by // comma and string:value ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location)); ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 917 "dhcp6_parser.cc" // lalr1.cc:919 +#line 927 "dhcp6_parser.cc" break; - case 45: -#line 367 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 45: // $@16: %empty +#line 367 "dhcp6_parser.yy" + { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 926 "dhcp6_parser.cc" // lalr1.cc:919 +#line 936 "dhcp6_parser.cc" break; - case 46: -#line 370 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 46: // list_generic: "[" $@16 list_content "]" +#line 370 "dhcp6_parser.yy" + { // list parsing complete. Put any sanity checking here } -#line 934 "dhcp6_parser.cc" // lalr1.cc:919 +#line 944 "dhcp6_parser.cc" break; - case 49: -#line 378 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 49: // not_empty_list: value +#line 378 "dhcp6_parser.yy" + { // List consisting of a single element. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 943 "dhcp6_parser.cc" // lalr1.cc:919 +#line 953 "dhcp6_parser.cc" break; - case 50: -#line 382 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 50: // not_empty_list: not_empty_list "," value +#line 382 "dhcp6_parser.yy" + { // List ending with , and a value. ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 952 "dhcp6_parser.cc" // lalr1.cc:919 +#line 962 "dhcp6_parser.cc" break; - case 51: -#line 389 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 51: // $@17: %empty +#line 389 "dhcp6_parser.yy" + { // List parsing about to start } -#line 960 "dhcp6_parser.cc" // lalr1.cc:919 +#line 970 "dhcp6_parser.cc" break; - case 52: -#line 391 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 52: // list_strings: "[" $@17 list_strings_content "]" +#line 391 "dhcp6_parser.yy" + { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 969 "dhcp6_parser.cc" // lalr1.cc:919 +#line 979 "dhcp6_parser.cc" break; - case 55: -#line 400 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 55: // not_empty_list_strings: "constant string" +#line 400 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 978 "dhcp6_parser.cc" // lalr1.cc:919 +#line 988 "dhcp6_parser.cc" break; - case 56: -#line 404 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 56: // not_empty_list_strings: not_empty_list_strings "," "constant string" +#line 404 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 987 "dhcp6_parser.cc" // lalr1.cc:919 +#line 997 "dhcp6_parser.cc" break; - case 57: -#line 415 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 57: // unknown_map_entry: "constant string" ":" +#line 415 "dhcp6_parser.yy" + { const std::string& where = ctx.contextName(); const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 998 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1008 "dhcp6_parser.cc" break; - case 58: -#line 424 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 58: // $@18: %empty +#line 424 "dhcp6_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1009 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1019 "dhcp6_parser.cc" break; - case 59: -#line 429 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 59: // syntax_map: "{" $@18 global_object "}" +#line 429 "dhcp6_parser.yy" + { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. @@ -1018,12 +1028,12 @@ namespace isc { namespace dhcp { // Dhcp6 is required ctx.require("Dhcp6", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1022 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1032 "dhcp6_parser.cc" break; - case 60: -#line 439 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 60: // $@19: %empty +#line 439 "dhcp6_parser.yy" + { // This code is executed when we're about to start parsing // the content of the map // Prevent against duplicate. @@ -1033,983 +1043,983 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP6); } -#line 1037 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1047 "dhcp6_parser.cc" break; - case 61: -#line 448 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 61: // global_object: "Dhcp6" $@19 ":" "{" global_params "}" +#line 448 "dhcp6_parser.yy" + { // No global parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1047 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1057 "dhcp6_parser.cc" break; - case 62: -#line 456 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 62: // $@20: %empty +#line 456 "dhcp6_parser.yy" + { // Parse the Dhcp6 map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1057 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1067 "dhcp6_parser.cc" break; - case 63: -#line 460 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 63: // sub_dhcp6: "{" $@20 global_params "}" +#line 460 "dhcp6_parser.yy" + { // No global parameter is required // parsing completed } -#line 1066 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1076 "dhcp6_parser.cc" break; - case 129: -#line 536 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 129: // $@21: %empty +#line 536 "dhcp6_parser.yy" + { ctx.unique("data-directory", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1075 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1085 "dhcp6_parser.cc" break; - case 130: -#line 539 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 130: // data_directory: "data-directory" $@21 ":" "constant string" +#line 539 "dhcp6_parser.yy" + { ElementPtr datadir(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("data-directory", datadir); ctx.leave(); } -#line 1085 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1095 "dhcp6_parser.cc" break; - case 131: -#line 545 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 131: // preferred_lifetime: "preferred-lifetime" ":" "integer" +#line 545 "dhcp6_parser.yy" + { ctx.unique("preferred-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("preferred-lifetime", prf); } -#line 1095 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1105 "dhcp6_parser.cc" break; - case 132: -#line 551 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 132: // min_preferred_lifetime: "min-preferred-lifetime" ":" "integer" +#line 551 "dhcp6_parser.yy" + { ctx.unique("min-preferred-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-preferred-lifetime", prf); } -#line 1105 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1115 "dhcp6_parser.cc" break; - case 133: -#line 557 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 133: // max_preferred_lifetime: "max-preferred-lifetime" ":" "integer" +#line 557 "dhcp6_parser.yy" + { ctx.unique("max-preferred-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-preferred-lifetime", prf); } -#line 1115 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1125 "dhcp6_parser.cc" break; - case 134: -#line 563 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 134: // valid_lifetime: "valid-lifetime" ":" "integer" +#line 563 "dhcp6_parser.yy" + { ctx.unique("valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1125 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1135 "dhcp6_parser.cc" break; - case 135: -#line 569 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 135: // min_valid_lifetime: "min-valid-lifetime" ":" "integer" +#line 569 "dhcp6_parser.yy" + { ctx.unique("min-valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("min-valid-lifetime", prf); } -#line 1135 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1145 "dhcp6_parser.cc" break; - case 136: -#line 575 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 136: // max_valid_lifetime: "max-valid-lifetime" ":" "integer" +#line 575 "dhcp6_parser.yy" + { ctx.unique("max-valid-lifetime", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-valid-lifetime", prf); } -#line 1145 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1155 "dhcp6_parser.cc" break; - case 137: -#line 581 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 137: // renew_timer: "renew-timer" ":" "integer" +#line 581 "dhcp6_parser.yy" + { ctx.unique("renew-timer", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1155 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1165 "dhcp6_parser.cc" break; - case 138: -#line 587 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 138: // rebind_timer: "rebind-timer" ":" "integer" +#line 587 "dhcp6_parser.yy" + { ctx.unique("rebind-timer", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1165 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1175 "dhcp6_parser.cc" break; - case 139: -#line 593 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 139: // calculate_tee_times: "calculate-tee-times" ":" "boolean" +#line 593 "dhcp6_parser.yy" + { ctx.unique("calculate-tee-times", ctx.loc2pos(yystack_[2].location)); ElementPtr ctt(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("calculate-tee-times", ctt); } -#line 1175 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1185 "dhcp6_parser.cc" break; - case 140: -#line 599 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 140: // t1_percent: "t1-percent" ":" "floating point" +#line 599 "dhcp6_parser.yy" + { ctx.unique("t1-percent", ctx.loc2pos(yystack_[2].location)); ElementPtr t1(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t1-percent", t1); } -#line 1185 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1195 "dhcp6_parser.cc" break; - case 141: -#line 605 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 141: // t2_percent: "t2-percent" ":" "floating point" +#line 605 "dhcp6_parser.yy" + { ctx.unique("t2-percent", ctx.loc2pos(yystack_[2].location)); ElementPtr t2(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("t2-percent", t2); } -#line 1195 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1205 "dhcp6_parser.cc" break; - case 142: -#line 611 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 142: // cache_threshold: "cache-threshold" ":" "floating point" +#line 611 "dhcp6_parser.yy" + { ctx.unique("cache-threshold", ctx.loc2pos(yystack_[2].location)); ElementPtr ct(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("cache-threshold", ct); } -#line 1205 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1215 "dhcp6_parser.cc" break; - case 143: -#line 617 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 143: // cache_max_age: "cache-max-age" ":" "integer" +#line 617 "dhcp6_parser.yy" + { ctx.unique("cache-max-age", ctx.loc2pos(yystack_[2].location)); ElementPtr cm(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("cache-max-age", cm); } -#line 1215 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1225 "dhcp6_parser.cc" break; - case 144: -#line 623 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 144: // decline_probation_period: "decline-probation-period" ":" "integer" +#line 623 "dhcp6_parser.yy" + { ctx.unique("decline-probation-period", ctx.loc2pos(yystack_[2].location)); ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1225 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1235 "dhcp6_parser.cc" break; - case 145: -#line 629 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 145: // ddns_send_updates: "ddns-send-updates" ":" "boolean" +#line 629 "dhcp6_parser.yy" + { ctx.unique("ddns-send-updates", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-send-updates", b); } -#line 1235 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1245 "dhcp6_parser.cc" break; - case 146: -#line 635 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 146: // ddns_override_no_update: "ddns-override-no-update" ":" "boolean" +#line 635 "dhcp6_parser.yy" + { ctx.unique("ddns-override-no-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-no-update", b); } -#line 1245 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1255 "dhcp6_parser.cc" break; - case 147: -#line 641 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 147: // ddns_override_client_update: "ddns-override-client-update" ":" "boolean" +#line 641 "dhcp6_parser.yy" + { ctx.unique("ddns-override-client-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-override-client-update", b); } -#line 1255 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1265 "dhcp6_parser.cc" break; - case 148: -#line 647 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 148: // $@22: %empty +#line 647 "dhcp6_parser.yy" + { ctx.unique("ddns-replace-client-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 1264 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1274 "dhcp6_parser.cc" break; - case 149: -#line 650 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 149: // ddns_replace_client_name: "ddns-replace-client-name" $@22 ":" ddns_replace_client_name_value +#line 650 "dhcp6_parser.yy" + { ctx.stack_.back()->set("ddns-replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1273 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1283 "dhcp6_parser.cc" break; - case 150: -#line 656 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 150: // ddns_replace_client_name_value: "when-present" +#line 656 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 1281 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1291 "dhcp6_parser.cc" break; - case 151: -#line 659 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 151: // ddns_replace_client_name_value: "never" +#line 659 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 1289 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1299 "dhcp6_parser.cc" break; - case 152: -#line 662 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 152: // ddns_replace_client_name_value: "always" +#line 662 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 1297 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1307 "dhcp6_parser.cc" break; - case 153: -#line 665 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 153: // ddns_replace_client_name_value: "when-not-present" +#line 665 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 1305 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1315 "dhcp6_parser.cc" break; - case 154: -#line 668 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 154: // ddns_replace_client_name_value: "boolean" +#line 668 "dhcp6_parser.yy" + { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 1314 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1324 "dhcp6_parser.cc" break; - case 155: -#line 674 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 155: // $@23: %empty +#line 674 "dhcp6_parser.yy" + { ctx.unique("ddns-generated-prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1323 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1333 "dhcp6_parser.cc" break; - case 156: -#line 677 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 156: // ddns_generated_prefix: "ddns-generated-prefix" $@23 ":" "constant string" +#line 677 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-generated-prefix", s); ctx.leave(); } -#line 1333 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1343 "dhcp6_parser.cc" break; - case 157: -#line 683 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 157: // $@24: %empty +#line 683 "dhcp6_parser.yy" + { ctx.unique("ddns-qualifying-suffix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1342 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1352 "dhcp6_parser.cc" break; - case 158: -#line 686 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 158: // ddns_qualifying_suffix: "ddns-qualifying-suffix" $@24 ":" "constant string" +#line 686 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-qualifying-suffix", s); ctx.leave(); } -#line 1352 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1362 "dhcp6_parser.cc" break; - case 159: -#line 692 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 159: // ddns_update_on_renew: "ddns-update-on-renew" ":" "boolean" +#line 692 "dhcp6_parser.yy" + { ctx.unique("ddns-update-on-renew", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-update-on-renew", b); } -#line 1362 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1372 "dhcp6_parser.cc" break; - case 160: -#line 698 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 160: // ddns_use_conflict_resolution: "ddns-use-conflict-resolution" ":" "boolean" +#line 698 "dhcp6_parser.yy" + { ctx.unique("ddns-use-conflict-resolution", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-use-conflict-resolution", b); } -#line 1372 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1382 "dhcp6_parser.cc" break; - case 161: -#line 704 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 161: // $@25: %empty +#line 704 "dhcp6_parser.yy" + { ctx.unique("hostname-char-set", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1381 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1391 "dhcp6_parser.cc" break; - case 162: -#line 707 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 162: // hostname_char_set: "hostname-char-set" $@25 ":" "constant string" +#line 707 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 1391 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1401 "dhcp6_parser.cc" break; - case 163: -#line 713 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 163: // $@26: %empty +#line 713 "dhcp6_parser.yy" + { ctx.unique("hostname-char-replacement", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1400 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1410 "dhcp6_parser.cc" break; - case 164: -#line 716 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 164: // hostname_char_replacement: "hostname-char-replacement" $@26 ":" "constant string" +#line 716 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 1410 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1420 "dhcp6_parser.cc" break; - case 165: -#line 722 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 165: // store_extended_info: "store-extended-info" ":" "boolean" +#line 722 "dhcp6_parser.yy" + { ctx.unique("store-extended-info", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("store-extended-info", b); } -#line 1420 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1430 "dhcp6_parser.cc" break; - case 166: -#line 728 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 166: // statistic_default_sample_count: "statistic-default-sample-count" ":" "integer" +#line 728 "dhcp6_parser.yy" + { ctx.unique("statistic-default-sample-count", ctx.loc2pos(yystack_[2].location)); 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 1430 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1440 "dhcp6_parser.cc" break; - case 167: -#line 734 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 167: // statistic_default_sample_age: "statistic-default-sample-age" ":" "integer" +#line 734 "dhcp6_parser.yy" + { ctx.unique("statistic-default-sample-age", ctx.loc2pos(yystack_[2].location)); 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 1440 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1450 "dhcp6_parser.cc" break; - case 168: -#line 740 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 168: // $@27: %empty +#line 740 "dhcp6_parser.yy" + { ctx.unique("server-tag", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1449 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1459 "dhcp6_parser.cc" break; - case 169: -#line 743 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 169: // server_tag: "server-tag" $@27 ":" "constant string" +#line 743 "dhcp6_parser.yy" + { ElementPtr stag(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-tag", stag); ctx.leave(); } -#line 1459 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1469 "dhcp6_parser.cc" break; - case 170: -#line 749 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 170: // parked_packet_limit: "parked-packet-limit" ":" "integer" +#line 749 "dhcp6_parser.yy" + { ctx.unique("parked-packet-limit", ctx.loc2pos(yystack_[2].location)); ElementPtr ppl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("parked-packet-limit", ppl); } -#line 1469 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1479 "dhcp6_parser.cc" break; - case 171: -#line 755 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 171: // ip_reservations_unique: "ip-reservations-unique" ":" "boolean" +#line 755 "dhcp6_parser.yy" + { ctx.unique("ip-reservations-unique", ctx.loc2pos(yystack_[2].location)); ElementPtr unique(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-reservations-unique", unique); } -#line 1479 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1489 "dhcp6_parser.cc" break; - case 172: -#line 761 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 172: // $@28: %empty +#line 761 "dhcp6_parser.yy" + { ctx.unique("interfaces-config", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces-config", i); ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1491 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1501 "dhcp6_parser.cc" break; - case 173: -#line 767 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 173: // interfaces_config: "interfaces-config" $@28 ":" "{" interfaces_config_params "}" +#line 767 "dhcp6_parser.yy" + { // No interfaces config param is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1501 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1511 "dhcp6_parser.cc" break; - case 174: -#line 773 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 174: // $@29: %empty +#line 773 "dhcp6_parser.yy" + { // Parse the interfaces-config map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1511 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1521 "dhcp6_parser.cc" break; - case 175: -#line 777 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 175: // sub_interfaces6: "{" $@29 interfaces_config_params "}" +#line 777 "dhcp6_parser.yy" + { // No interfaces config param is required // parsing completed } -#line 1520 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1530 "dhcp6_parser.cc" break; - case 183: -#line 793 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 183: // $@30: %empty +#line 793 "dhcp6_parser.yy" + { ctx.unique("interfaces", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1532 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1542 "dhcp6_parser.cc" break; - case 184: -#line 799 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 184: // interfaces_list: "interfaces" $@30 ":" list_strings +#line 799 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1541 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1551 "dhcp6_parser.cc" break; - case 185: -#line 804 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 185: // re_detect: "re-detect" ":" "boolean" +#line 804 "dhcp6_parser.yy" + { ctx.unique("re-detect", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1551 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1561 "dhcp6_parser.cc" break; - case 186: -#line 810 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 186: // $@31: %empty +#line 810 "dhcp6_parser.yy" + { ctx.unique("lease-database", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lease-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1563 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1573 "dhcp6_parser.cc" break; - case 187: -#line 816 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 187: // lease_database: "lease-database" $@31 ":" "{" database_map_params "}" +#line 816 "dhcp6_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1574 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1584 "dhcp6_parser.cc" break; - case 188: -#line 823 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 188: // $@32: %empty +#line 823 "dhcp6_parser.yy" + { ctx.unique("hosts-database", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1586 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1596 "dhcp6_parser.cc" break; - case 189: -#line 829 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 189: // hosts_database: "hosts-database" $@32 ":" "{" database_map_params "}" +#line 829 "dhcp6_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1597 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1607 "dhcp6_parser.cc" break; - case 190: -#line 836 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 190: // $@33: %empty +#line 836 "dhcp6_parser.yy" + { ctx.unique("hosts-databases", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1609 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1619 "dhcp6_parser.cc" break; - case 191: -#line 842 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 191: // hosts_databases: "hosts-databases" $@33 ":" "[" database_list "]" +#line 842 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1618 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1628 "dhcp6_parser.cc" break; - case 196: -#line 855 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 196: // $@34: %empty +#line 855 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1628 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1638 "dhcp6_parser.cc" break; - case 197: -#line 859 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 197: // database: "{" $@34 database_map_params "}" +#line 859 "dhcp6_parser.yy" + { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1638 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1648 "dhcp6_parser.cc" break; - case 222: -#line 893 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 222: // $@35: %empty +#line 893 "dhcp6_parser.yy" + { ctx.unique("type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DATABASE_TYPE); } -#line 1647 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1657 "dhcp6_parser.cc" break; - case 223: -#line 896 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 223: // database_type: "type" $@35 ":" db_type +#line 896 "dhcp6_parser.yy" + { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1656 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1666 "dhcp6_parser.cc" break; - case 224: -#line 901 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1662 "dhcp6_parser.cc" // lalr1.cc:919 + case 224: // db_type: "memfile" +#line 901 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } +#line 1672 "dhcp6_parser.cc" break; - case 225: -#line 902 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1668 "dhcp6_parser.cc" // lalr1.cc:919 + case 225: // db_type: "mysql" +#line 902 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } +#line 1678 "dhcp6_parser.cc" break; - case 226: -#line 903 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1674 "dhcp6_parser.cc" // lalr1.cc:919 + case 226: // db_type: "postgresql" +#line 903 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } +#line 1684 "dhcp6_parser.cc" break; - case 227: -#line 904 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1680 "dhcp6_parser.cc" // lalr1.cc:919 + case 227: // db_type: "cql" +#line 904 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } +#line 1690 "dhcp6_parser.cc" break; - case 228: -#line 907 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 228: // $@36: %empty +#line 907 "dhcp6_parser.yy" + { ctx.unique("user", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1689 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1699 "dhcp6_parser.cc" break; - case 229: -#line 910 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 229: // user: "user" $@36 ":" "constant string" +#line 910 "dhcp6_parser.yy" + { ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1699 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1709 "dhcp6_parser.cc" break; - case 230: -#line 916 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 230: // $@37: %empty +#line 916 "dhcp6_parser.yy" + { ctx.unique("password", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1708 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1718 "dhcp6_parser.cc" break; - case 231: -#line 919 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 231: // password: "password" $@37 ":" "constant string" +#line 919 "dhcp6_parser.yy" + { ElementPtr pwd(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1718 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1728 "dhcp6_parser.cc" break; - case 232: -#line 925 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 232: // $@38: %empty +#line 925 "dhcp6_parser.yy" + { ctx.unique("host", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1727 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1737 "dhcp6_parser.cc" break; - case 233: -#line 928 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 233: // host: "host" $@38 ":" "constant string" +#line 928 "dhcp6_parser.yy" + { ElementPtr h(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1737 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1747 "dhcp6_parser.cc" break; - case 234: -#line 934 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 234: // port: "port" ":" "integer" +#line 934 "dhcp6_parser.yy" + { ctx.unique("port", ctx.loc2pos(yystack_[2].location)); ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1747 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1757 "dhcp6_parser.cc" break; - case 235: -#line 940 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 235: // $@39: %empty +#line 940 "dhcp6_parser.yy" + { ctx.unique("name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1756 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1766 "dhcp6_parser.cc" break; - case 236: -#line 943 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 236: // name: "name" $@39 ":" "constant string" +#line 943 "dhcp6_parser.yy" + { ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1766 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1776 "dhcp6_parser.cc" break; - case 237: -#line 949 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 237: // persist: "persist" ":" "boolean" +#line 949 "dhcp6_parser.yy" + { ctx.unique("persist", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1776 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1786 "dhcp6_parser.cc" break; - case 238: -#line 955 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 238: // lfc_interval: "lfc-interval" ":" "integer" +#line 955 "dhcp6_parser.yy" + { ctx.unique("lfc-interval", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1786 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1796 "dhcp6_parser.cc" break; - case 239: -#line 961 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 239: // readonly: "readonly" ":" "boolean" +#line 961 "dhcp6_parser.yy" + { ctx.unique("readonly", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1796 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1806 "dhcp6_parser.cc" break; - case 240: -#line 967 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 240: // connect_timeout: "connect-timeout" ":" "integer" +#line 967 "dhcp6_parser.yy" + { ctx.unique("connect-timeout", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1806 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1816 "dhcp6_parser.cc" break; - case 241: -#line 973 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 241: // reconnect_wait_time: "reconnect-wait-time" ":" "integer" +#line 973 "dhcp6_parser.yy" + { ctx.unique("reconnect-wait-time", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 1816 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1826 "dhcp6_parser.cc" break; - case 242: -#line 979 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 242: // $@40: %empty +#line 979 "dhcp6_parser.yy" + { ctx.unique("on-fail", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DATABASE_ON_FAIL); } -#line 1825 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1835 "dhcp6_parser.cc" break; - case 243: -#line 982 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 243: // on_fail: "on-fail" $@40 ":" on_fail_mode +#line 982 "dhcp6_parser.yy" + { ctx.stack_.back()->set("on-fail", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1834 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1844 "dhcp6_parser.cc" break; - case 244: -#line 987 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stop-retry-exit", ctx.loc2pos(yystack_[0].location))); } -#line 1840 "dhcp6_parser.cc" // lalr1.cc:919 + case 244: // on_fail_mode: "stop-retry-exit" +#line 987 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stop-retry-exit", ctx.loc2pos(yystack_[0].location))); } +#line 1850 "dhcp6_parser.cc" break; - case 245: -#line 988 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-exit", ctx.loc2pos(yystack_[0].location))); } -#line 1846 "dhcp6_parser.cc" // lalr1.cc:919 + case 245: // on_fail_mode: "serve-retry-exit" +#line 988 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-exit", ctx.loc2pos(yystack_[0].location))); } +#line 1856 "dhcp6_parser.cc" break; - case 246: -#line 989 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-continue", ctx.loc2pos(yystack_[0].location))); } -#line 1852 "dhcp6_parser.cc" // lalr1.cc:919 + case 246: // on_fail_mode: "serve-retry-continue" +#line 989 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-continue", ctx.loc2pos(yystack_[0].location))); } +#line 1862 "dhcp6_parser.cc" break; - case 247: -#line 992 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 247: // max_row_errors: "max-row-errors" ":" "integer" +#line 992 "dhcp6_parser.yy" + { ctx.unique("max-row-errors", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 1862 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1872 "dhcp6_parser.cc" break; - case 248: -#line 998 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 248: // request_timeout: "request-timeout" ":" "integer" +#line 998 "dhcp6_parser.yy" + { ctx.unique("request-timeout", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1872 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1882 "dhcp6_parser.cc" break; - case 249: -#line 1004 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 249: // tcp_keepalive: "tcp-keepalive" ":" "integer" +#line 1004 "dhcp6_parser.yy" + { ctx.unique("tcp-keepalive", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1882 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1892 "dhcp6_parser.cc" break; - case 250: -#line 1010 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 250: // tcp_nodelay: "tcp-nodelay" ":" "boolean" +#line 1010 "dhcp6_parser.yy" + { ctx.unique("tcp-nodelay", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1892 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1902 "dhcp6_parser.cc" break; - case 251: -#line 1016 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 251: // $@41: %empty +#line 1016 "dhcp6_parser.yy" + { ctx.unique("contact-points", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1901 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1911 "dhcp6_parser.cc" break; - case 252: -#line 1019 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 252: // contact_points: "contact-points" $@41 ":" "constant string" +#line 1019 "dhcp6_parser.yy" + { ElementPtr cp(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1911 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1921 "dhcp6_parser.cc" break; - case 253: -#line 1025 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 253: // max_reconnect_tries: "max-reconnect-tries" ":" "integer" +#line 1025 "dhcp6_parser.yy" + { ctx.unique("max-reconnect-tries", ctx.loc2pos(yystack_[2].location)); ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 1921 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1931 "dhcp6_parser.cc" break; - case 254: -#line 1031 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 254: // $@42: %empty +#line 1031 "dhcp6_parser.yy" + { ctx.unique("keyspace", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1930 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1940 "dhcp6_parser.cc" break; - case 255: -#line 1034 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 255: // keyspace: "keyspace" $@42 ":" "constant string" +#line 1034 "dhcp6_parser.yy" + { ElementPtr ks(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1940 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1950 "dhcp6_parser.cc" break; - case 256: -#line 1040 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 256: // $@43: %empty +#line 1040 "dhcp6_parser.yy" + { ctx.unique("consistency", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1949 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1959 "dhcp6_parser.cc" break; - case 257: -#line 1043 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 257: // consistency: "consistency" $@43 ":" "constant string" +#line 1043 "dhcp6_parser.yy" + { ElementPtr c(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("consistency", c); ctx.leave(); } -#line 1959 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1969 "dhcp6_parser.cc" break; - case 258: -#line 1049 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 258: // $@44: %empty +#line 1049 "dhcp6_parser.yy" + { ctx.unique("serial-consistency", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 1968 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1978 "dhcp6_parser.cc" break; - case 259: -#line 1052 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 259: // serial_consistency: "serial-consistency" $@44 ":" "constant string" +#line 1052 "dhcp6_parser.yy" + { ElementPtr c(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("serial-consistency", c); ctx.leave(); } -#line 1978 "dhcp6_parser.cc" // lalr1.cc:919 +#line 1988 "dhcp6_parser.cc" break; - case 260: -#line 1058 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 260: // $@45: %empty +#line 1058 "dhcp6_parser.yy" + { ctx.unique("sanity-checks", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sanity-checks", m); ctx.stack_.push_back(m); ctx.enter(ctx.SANITY_CHECKS); } -#line 1990 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2000 "dhcp6_parser.cc" break; - case 261: -#line 1064 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 261: // sanity_checks: "sanity-checks" $@45 ":" "{" sanity_checks_params "}" +#line 1064 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 1999 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2009 "dhcp6_parser.cc" break; - case 265: -#line 1074 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 265: // $@46: %empty +#line 1074 "dhcp6_parser.yy" + { ctx.unique("lease-checks", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2008 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2018 "dhcp6_parser.cc" break; - case 266: -#line 1077 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 266: // lease_checks: "lease-checks" $@46 ":" "constant string" +#line 1077 "dhcp6_parser.yy" + { if ( (string(yystack_[0].value.as < std::string > ()) == "none") || (string(yystack_[0].value.as < std::string > ()) == "warn") || @@ -2024,375 +2034,375 @@ namespace isc { namespace dhcp { ", supported values are: none, warn, fix, fix-del, del"); } } -#line 2028 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2038 "dhcp6_parser.cc" break; - case 267: -#line 1093 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 267: // $@47: %empty +#line 1093 "dhcp6_parser.yy" + { ctx.unique("mac-sources", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("mac-sources", l); ctx.stack_.push_back(l); ctx.enter(ctx.MAC_SOURCES); } -#line 2040 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2050 "dhcp6_parser.cc" break; - case 268: -#line 1099 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 268: // mac_sources: "mac-sources" $@47 ":" "[" mac_sources_list "]" +#line 1099 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2049 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2059 "dhcp6_parser.cc" break; - case 273: -#line 1112 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 273: // duid_id: "duid" +#line 1112 "dhcp6_parser.yy" + { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 2058 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2068 "dhcp6_parser.cc" break; - case 274: -#line 1117 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 274: // string_id: "constant string" +#line 1117 "dhcp6_parser.yy" + { ElementPtr duid(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 2067 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2077 "dhcp6_parser.cc" break; - case 275: -#line 1122 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 275: // $@48: %empty +#line 1122 "dhcp6_parser.yy" + { ctx.unique("host-reservation-identifiers", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host-reservation-identifiers", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 2079 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2089 "dhcp6_parser.cc" break; - case 276: -#line 1128 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 276: // host_reservation_identifiers: "host-reservation-identifiers" $@48 ":" "[" host_reservation_identifiers_list "]" +#line 1128 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2088 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2098 "dhcp6_parser.cc" break; - case 282: -#line 1142 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 282: // hw_address_id: "hw-address" +#line 1142 "dhcp6_parser.yy" + { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 2097 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2107 "dhcp6_parser.cc" break; - case 283: -#line 1147 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 283: // flex_id: "flex-id" +#line 1147 "dhcp6_parser.yy" + { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 2106 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2116 "dhcp6_parser.cc" break; - case 284: -#line 1154 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 284: // $@49: %empty +#line 1154 "dhcp6_parser.yy" + { ctx.unique("relay-supplied-options", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay-supplied-options", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 2118 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2128 "dhcp6_parser.cc" break; - case 285: -#line 1160 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 285: // relay_supplied_options: "relay-supplied-options" $@49 ":" "[" list_content "]" +#line 1160 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2127 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2137 "dhcp6_parser.cc" break; - case 286: -#line 1167 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 286: // $@50: %empty +#line 1167 "dhcp6_parser.yy" + { ctx.unique("multi-threading", ctx.loc2pos(yystack_[0].location)); ElementPtr mt(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("multi-threading", mt); ctx.stack_.push_back(mt); ctx.enter(ctx.DHCP_MULTI_THREADING); } -#line 2139 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2149 "dhcp6_parser.cc" break; - case 287: -#line 1173 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 287: // dhcp_multi_threading: "multi-threading" $@50 ":" "{" multi_threading_params "}" +#line 1173 "dhcp6_parser.yy" + { // The enable parameter is required. ctx.require("enable-multi-threading", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 2150 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2160 "dhcp6_parser.cc" break; - case 296: -#line 1192 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 296: // enable_multi_threading: "enable-multi-threading" ":" "boolean" +#line 1192 "dhcp6_parser.yy" + { ctx.unique("enable-multi-threading", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-multi-threading", b); } -#line 2160 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2170 "dhcp6_parser.cc" break; - case 297: -#line 1198 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 297: // thread_pool_size: "thread-pool-size" ":" "integer" +#line 1198 "dhcp6_parser.yy" + { ctx.unique("thread-pool-size", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("thread-pool-size", prf); } -#line 2170 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2180 "dhcp6_parser.cc" break; - case 298: -#line 1204 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 298: // packet_queue_size: "packet-queue-size" ":" "integer" +#line 1204 "dhcp6_parser.yy" + { ctx.unique("packet-queue-size", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("packet-queue-size", prf); } -#line 2180 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2190 "dhcp6_parser.cc" break; - case 299: -#line 1210 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 299: // $@51: %empty +#line 1210 "dhcp6_parser.yy" + { ctx.unique("hooks-libraries", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 2192 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2202 "dhcp6_parser.cc" break; - case 300: -#line 1216 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 300: // hooks_libraries: "hooks-libraries" $@51 ":" "[" hooks_libraries_list "]" +#line 1216 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2201 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2211 "dhcp6_parser.cc" break; - case 305: -#line 1229 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 305: // $@52: %empty +#line 1229 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2211 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2221 "dhcp6_parser.cc" break; - case 306: -#line 1233 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 306: // hooks_library: "{" $@52 hooks_params "}" +#line 1233 "dhcp6_parser.yy" + { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2221 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2231 "dhcp6_parser.cc" break; - case 307: -#line 1239 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 307: // $@53: %empty +#line 1239 "dhcp6_parser.yy" + { // Parse the hooks-libraries list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2231 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2241 "dhcp6_parser.cc" break; - case 308: -#line 1243 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 308: // sub_hooks_library: "{" $@53 hooks_params "}" +#line 1243 "dhcp6_parser.yy" + { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2241 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2251 "dhcp6_parser.cc" break; - case 314: -#line 1258 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 314: // $@54: %empty +#line 1258 "dhcp6_parser.yy" + { ctx.unique("library", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2250 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2260 "dhcp6_parser.cc" break; - case 315: -#line 1261 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 315: // library: "library" $@54 ":" "constant string" +#line 1261 "dhcp6_parser.yy" + { ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 2260 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2270 "dhcp6_parser.cc" break; - case 316: -#line 1267 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 316: // $@55: %empty +#line 1267 "dhcp6_parser.yy" + { ctx.unique("parameters", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2269 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2279 "dhcp6_parser.cc" break; - case 317: -#line 1270 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 317: // parameters: "parameters" $@55 ":" map_value +#line 1270 "dhcp6_parser.yy" + { ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2278 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2288 "dhcp6_parser.cc" break; - case 318: -#line 1276 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 318: // $@56: %empty +#line 1276 "dhcp6_parser.yy" + { ctx.unique("expired-leases-processing", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("expired-leases-processing", m); ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 2290 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2300 "dhcp6_parser.cc" break; - case 319: -#line 1282 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 319: // expired_leases_processing: "expired-leases-processing" $@56 ":" "{" expired_leases_params "}" +#line 1282 "dhcp6_parser.yy" + { // No expired lease parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 2300 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2310 "dhcp6_parser.cc" break; - case 328: -#line 1300 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 328: // reclaim_timer_wait_time: "reclaim-timer-wait-time" ":" "integer" +#line 1300 "dhcp6_parser.yy" + { ctx.unique("reclaim-timer-wait-time", ctx.loc2pos(yystack_[2].location)); 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 2310 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2320 "dhcp6_parser.cc" break; - case 329: -#line 1306 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 329: // flush_reclaimed_timer_wait_time: "flush-reclaimed-timer-wait-time" ":" "integer" +#line 1306 "dhcp6_parser.yy" + { ctx.unique("flush-reclaimed-timer-wait-time", ctx.loc2pos(yystack_[2].location)); 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 2320 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2330 "dhcp6_parser.cc" break; - case 330: -#line 1312 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 330: // hold_reclaimed_time: "hold-reclaimed-time" ":" "integer" +#line 1312 "dhcp6_parser.yy" + { ctx.unique("hold-reclaimed-time", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 2330 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2340 "dhcp6_parser.cc" break; - case 331: -#line 1318 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 331: // max_reclaim_leases: "max-reclaim-leases" ":" "integer" +#line 1318 "dhcp6_parser.yy" + { ctx.unique("max-reclaim-leases", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 2340 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2350 "dhcp6_parser.cc" break; - case 332: -#line 1324 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 332: // max_reclaim_time: "max-reclaim-time" ":" "integer" +#line 1324 "dhcp6_parser.yy" + { ctx.unique("max-reclaim-time", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 2350 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2360 "dhcp6_parser.cc" break; - case 333: -#line 1330 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 333: // unwarned_reclaim_cycles: "unwarned-reclaim-cycles" ":" "integer" +#line 1330 "dhcp6_parser.yy" + { ctx.unique("unwarned-reclaim-cycles", ctx.loc2pos(yystack_[2].location)); ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 2360 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2370 "dhcp6_parser.cc" break; - case 334: -#line 1339 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 334: // $@57: %empty +#line 1339 "dhcp6_parser.yy" + { ctx.unique("subnet6", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet6", l); ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET6); } -#line 2372 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2382 "dhcp6_parser.cc" break; - case 335: -#line 1345 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 335: // subnet6_list: "subnet6" $@57 ":" "[" subnet6_list_content "]" +#line 1345 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2381 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2391 "dhcp6_parser.cc" break; - case 340: -#line 1365 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 340: // $@58: %empty +#line 1365 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2391 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2401 "dhcp6_parser.cc" break; - case 341: -#line 1369 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 341: // subnet6: "{" $@58 subnet6_params "}" +#line 1369 "dhcp6_parser.yy" + { // Once we reached this place, the subnet parsing is now complete. // If we want to, we can implement default values here. // In particular we can do things like this: @@ -2413,624 +2423,624 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2417 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2427 "dhcp6_parser.cc" break; - case 342: -#line 1391 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 342: // $@59: %empty +#line 1391 "dhcp6_parser.yy" + { // Parse the subnet6 list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2427 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2437 "dhcp6_parser.cc" break; - case 343: -#line 1395 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 343: // sub_subnet6: "{" $@59 subnet6_params "}" +#line 1395 "dhcp6_parser.yy" + { // The subnet subnet6 parameter is required ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2437 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2447 "dhcp6_parser.cc" break; - case 389: -#line 1452 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 389: // $@60: %empty +#line 1452 "dhcp6_parser.yy" + { ctx.unique("subnet", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2446 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2456 "dhcp6_parser.cc" break; - case 390: -#line 1455 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 390: // subnet: "subnet" $@60 ":" "constant string" +#line 1455 "dhcp6_parser.yy" + { ElementPtr subnet(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 2456 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2466 "dhcp6_parser.cc" break; - case 391: -#line 1461 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 391: // $@61: %empty +#line 1461 "dhcp6_parser.yy" + { ctx.unique("interface", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2465 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2475 "dhcp6_parser.cc" break; - case 392: -#line 1464 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 392: // interface: "interface" $@61 ":" "constant string" +#line 1464 "dhcp6_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 2475 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2485 "dhcp6_parser.cc" break; - case 393: -#line 1470 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 393: // $@62: %empty +#line 1470 "dhcp6_parser.yy" + { ctx.unique("interface-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2484 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2494 "dhcp6_parser.cc" break; - case 394: -#line 1473 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 394: // interface_id: "interface-id" $@62 ":" "constant string" +#line 1473 "dhcp6_parser.yy" + { ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface-id", iface); ctx.leave(); } -#line 2494 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2504 "dhcp6_parser.cc" break; - case 395: -#line 1479 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 395: // $@63: %empty +#line 1479 "dhcp6_parser.yy" + { ctx.unique("client-class", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2503 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2513 "dhcp6_parser.cc" break; - case 396: -#line 1482 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 396: // client_class: "client-class" $@63 ":" "constant string" +#line 1482 "dhcp6_parser.yy" + { ElementPtr cls(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 2513 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2523 "dhcp6_parser.cc" break; - case 397: -#line 1488 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 397: // $@64: %empty +#line 1488 "dhcp6_parser.yy" + { ctx.unique("require-client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("require-client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2525 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2535 "dhcp6_parser.cc" break; - case 398: -#line 1494 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 398: // require_client_classes: "require-client-classes" $@64 ":" list_strings +#line 1494 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2534 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2544 "dhcp6_parser.cc" break; - case 399: -#line 1499 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 399: // reservations_global: "reservations-global" ":" "boolean" +#line 1499 "dhcp6_parser.yy" + { ctx.unique("reservations-global", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-global", b); } -#line 2544 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2554 "dhcp6_parser.cc" break; - case 400: -#line 1505 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 400: // reservations_in_subnet: "reservations-in-subnet" ":" "boolean" +#line 1505 "dhcp6_parser.yy" + { ctx.unique("reservations-in-subnet", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-in-subnet", b); } -#line 2554 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2564 "dhcp6_parser.cc" break; - case 401: -#line 1511 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 401: // reservations_out_of_pool: "reservations-out-of-pool" ":" "boolean" +#line 1511 "dhcp6_parser.yy" + { ctx.unique("reservations-out-of-pool", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations-out-of-pool", b); } -#line 2564 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2574 "dhcp6_parser.cc" break; - case 402: -#line 1517 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 402: // $@65: %empty +#line 1517 "dhcp6_parser.yy" + { ctx.unique("reservation-mode", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.RESERVATION_MODE); } -#line 2573 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2583 "dhcp6_parser.cc" break; - case 403: -#line 1520 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 403: // reservation_mode: "reservation-mode" $@65 ":" hr_mode +#line 1520 "dhcp6_parser.yy" + { ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2582 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2592 "dhcp6_parser.cc" break; - case 404: -#line 1525 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 2588 "dhcp6_parser.cc" // lalr1.cc:919 + case 404: // hr_mode: "disabled" +#line 1525 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } +#line 2598 "dhcp6_parser.cc" break; - case 405: -#line 1526 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 2594 "dhcp6_parser.cc" // lalr1.cc:919 + case 405: // hr_mode: "out-of-pool" +#line 1526 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } +#line 2604 "dhcp6_parser.cc" break; - case 406: -#line 1527 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } -#line 2600 "dhcp6_parser.cc" // lalr1.cc:919 + case 406: // hr_mode: "global" +#line 1527 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("global", ctx.loc2pos(yystack_[0].location))); } +#line 2610 "dhcp6_parser.cc" break; - case 407: -#line 1528 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 2606 "dhcp6_parser.cc" // lalr1.cc:919 + case 407: // hr_mode: "all" +#line 1528 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } +#line 2616 "dhcp6_parser.cc" break; - case 408: -#line 1531 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 408: // id: "id" ":" "integer" +#line 1531 "dhcp6_parser.yy" + { ctx.unique("id", ctx.loc2pos(yystack_[2].location)); ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 2616 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2626 "dhcp6_parser.cc" break; - case 409: -#line 1537 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 409: // rapid_commit: "rapid-commit" ":" "boolean" +#line 1537 "dhcp6_parser.yy" + { ctx.unique("rapid-commit", ctx.loc2pos(yystack_[2].location)); ElementPtr rc(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rapid-commit", rc); } -#line 2626 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2636 "dhcp6_parser.cc" break; - case 410: -#line 1545 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 410: // $@66: %empty +#line 1545 "dhcp6_parser.yy" + { ctx.unique("shared-networks", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("shared-networks", l); ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 2638 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2648 "dhcp6_parser.cc" break; - case 411: -#line 1551 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 411: // shared_networks: "shared-networks" $@66 ":" "[" shared_networks_content "]" +#line 1551 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2647 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2657 "dhcp6_parser.cc" break; - case 416: -#line 1566 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 416: // $@67: %empty +#line 1566 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2657 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2667 "dhcp6_parser.cc" break; - case 417: -#line 1570 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 417: // shared_network: "{" $@67 shared_network_params "}" +#line 1570 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); } -#line 2665 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2675 "dhcp6_parser.cc" break; - case 460: -#line 1624 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 460: // $@68: %empty +#line 1624 "dhcp6_parser.yy" + { ctx.unique("option-def", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-def", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2677 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2687 "dhcp6_parser.cc" break; - case 461: -#line 1630 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 461: // option_def_list: "option-def" $@68 ":" "[" option_def_list_content "]" +#line 1630 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2686 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2696 "dhcp6_parser.cc" break; - case 462: -#line 1638 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 462: // $@69: %empty +#line 1638 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2695 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2705 "dhcp6_parser.cc" break; - case 463: -#line 1641 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 463: // sub_option_def_list: "{" $@69 option_def_list "}" +#line 1641 "dhcp6_parser.yy" + { // parsing completed } -#line 2703 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2713 "dhcp6_parser.cc" break; - case 468: -#line 1657 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 468: // $@70: %empty +#line 1657 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2713 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2723 "dhcp6_parser.cc" break; - case 469: -#line 1661 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 469: // option_def_entry: "{" $@70 option_def_params "}" +#line 1661 "dhcp6_parser.yy" + { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2725 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2735 "dhcp6_parser.cc" break; - case 470: -#line 1672 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 470: // $@71: %empty +#line 1672 "dhcp6_parser.yy" + { // Parse the option-def list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2735 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2745 "dhcp6_parser.cc" break; - case 471: -#line 1676 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 471: // sub_option_def: "{" $@71 option_def_params "}" +#line 1676 "dhcp6_parser.yy" + { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2747 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2757 "dhcp6_parser.cc" break; - case 487: -#line 1708 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 487: // code: "code" ":" "integer" +#line 1708 "dhcp6_parser.yy" + { ctx.unique("code", ctx.loc2pos(yystack_[2].location)); ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2757 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2767 "dhcp6_parser.cc" break; - case 489: -#line 1716 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 489: // $@72: %empty +#line 1716 "dhcp6_parser.yy" + { ctx.unique("type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2766 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2776 "dhcp6_parser.cc" break; - case 490: -#line 1719 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 490: // option_def_type: "type" $@72 ":" "constant string" +#line 1719 "dhcp6_parser.yy" + { ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2776 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2786 "dhcp6_parser.cc" break; - case 491: -#line 1725 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 491: // $@73: %empty +#line 1725 "dhcp6_parser.yy" + { ctx.unique("record-types", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2785 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2795 "dhcp6_parser.cc" break; - case 492: -#line 1728 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 492: // option_def_record_types: "record-types" $@73 ":" "constant string" +#line 1728 "dhcp6_parser.yy" + { ElementPtr rtypes(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2795 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2805 "dhcp6_parser.cc" break; - case 493: -#line 1734 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 493: // $@74: %empty +#line 1734 "dhcp6_parser.yy" + { ctx.unique("space", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2804 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2814 "dhcp6_parser.cc" break; - case 494: -#line 1737 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 494: // space: "space" $@74 ":" "constant string" +#line 1737 "dhcp6_parser.yy" + { ElementPtr space(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2814 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2824 "dhcp6_parser.cc" break; - case 496: -#line 1745 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 496: // $@75: %empty +#line 1745 "dhcp6_parser.yy" + { ctx.unique("encapsulate", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2823 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2833 "dhcp6_parser.cc" break; - case 497: -#line 1748 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 497: // option_def_encapsulate: "encapsulate" $@75 ":" "constant string" +#line 1748 "dhcp6_parser.yy" + { ElementPtr encap(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2833 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2843 "dhcp6_parser.cc" break; - case 498: -#line 1754 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 498: // option_def_array: "array" ":" "boolean" +#line 1754 "dhcp6_parser.yy" + { ctx.unique("array", ctx.loc2pos(yystack_[2].location)); ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2843 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2853 "dhcp6_parser.cc" break; - case 499: -#line 1764 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 499: // $@76: %empty +#line 1764 "dhcp6_parser.yy" + { ctx.unique("option-data", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-data", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2855 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2865 "dhcp6_parser.cc" break; - case 500: -#line 1770 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 500: // option_data_list: "option-data" $@76 ":" "[" option_data_list_content "]" +#line 1770 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2864 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2874 "dhcp6_parser.cc" break; - case 505: -#line 1789 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 505: // $@77: %empty +#line 1789 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2874 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2884 "dhcp6_parser.cc" break; - case 506: -#line 1793 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 506: // option_data_entry: "{" $@77 option_data_params "}" +#line 1793 "dhcp6_parser.yy" + { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2883 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2893 "dhcp6_parser.cc" break; - case 507: -#line 1801 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 507: // $@78: %empty +#line 1801 "dhcp6_parser.yy" + { // Parse the option-data list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2893 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2903 "dhcp6_parser.cc" break; - case 508: -#line 1805 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 508: // sub_option_data: "{" $@78 option_data_params "}" +#line 1805 "dhcp6_parser.yy" + { /// @todo: the code or name parameters are required. // parsing completed } -#line 2902 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2912 "dhcp6_parser.cc" break; - case 523: -#line 1838 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 523: // $@79: %empty +#line 1838 "dhcp6_parser.yy" + { ctx.unique("data", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 2911 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2921 "dhcp6_parser.cc" break; - case 524: -#line 1841 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 524: // option_data_data: "data" $@79 ":" "constant string" +#line 1841 "dhcp6_parser.yy" + { ElementPtr data(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2921 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2931 "dhcp6_parser.cc" break; - case 527: -#line 1851 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 527: // option_data_csv_format: "csv-format" ":" "boolean" +#line 1851 "dhcp6_parser.yy" + { ctx.unique("csv-format", ctx.loc2pos(yystack_[2].location)); ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2931 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2941 "dhcp6_parser.cc" break; - case 528: -#line 1857 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 528: // option_data_always_send: "always-send" ":" "boolean" +#line 1857 "dhcp6_parser.yy" + { ctx.unique("always-send", ctx.loc2pos(yystack_[2].location)); ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2941 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2951 "dhcp6_parser.cc" break; - case 529: -#line 1866 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 529: // $@80: %empty +#line 1866 "dhcp6_parser.yy" + { ctx.unique("pools", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2953 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2963 "dhcp6_parser.cc" break; - case 530: -#line 1872 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 530: // pools_list: "pools" $@80 ":" "[" pools_list_content "]" +#line 1872 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 2962 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2972 "dhcp6_parser.cc" break; - case 535: -#line 1887 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 535: // $@81: %empty +#line 1887 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2972 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2982 "dhcp6_parser.cc" break; - case 536: -#line 1891 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 536: // pool_list_entry: "{" $@81 pool_params "}" +#line 1891 "dhcp6_parser.yy" + { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2982 "dhcp6_parser.cc" // lalr1.cc:919 +#line 2992 "dhcp6_parser.cc" break; - case 537: -#line 1897 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 537: // $@82: %empty +#line 1897 "dhcp6_parser.yy" + { // Parse the pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2992 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3002 "dhcp6_parser.cc" break; - case 538: -#line 1901 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 538: // sub_pool6: "{" $@82 pool_params "}" +#line 1901 "dhcp6_parser.yy" + { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3002 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3012 "dhcp6_parser.cc" break; - case 548: -#line 1920 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 548: // $@83: %empty +#line 1920 "dhcp6_parser.yy" + { ctx.unique("pool", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3011 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3021 "dhcp6_parser.cc" break; - case 549: -#line 1923 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 549: // pool_entry: "pool" $@83 ":" "constant string" +#line 1923 "dhcp6_parser.yy" + { ElementPtr pool(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 3021 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3031 "dhcp6_parser.cc" break; - case 550: -#line 1929 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 550: // $@84: %empty +#line 1929 "dhcp6_parser.yy" + { ctx.enter(ctx.NO_KEYWORD); } -#line 3029 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3039 "dhcp6_parser.cc" break; - case 551: -#line 1931 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 551: // user_context: "user-context" $@84 ":" map_value +#line 1931 "dhcp6_parser.yy" + { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); @@ -3052,20 +3062,20 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 3056 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3066 "dhcp6_parser.cc" break; - case 552: -#line 1954 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 552: // $@85: %empty +#line 1954 "dhcp6_parser.yy" + { ctx.enter(ctx.NO_KEYWORD); } -#line 3064 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3074 "dhcp6_parser.cc" break; - case 553: -#line 1956 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 553: // comment: "comment" $@85 ":" "constant string" +#line 1956 "dhcp6_parser.yy" + { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); @@ -3089,1271 +3099,1272 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 3093 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3103 "dhcp6_parser.cc" break; - case 554: -#line 1984 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 554: // $@86: %empty +#line 1984 "dhcp6_parser.yy" + { ctx.unique("pd-pools", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pd-pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.PD_POOLS); } -#line 3105 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3115 "dhcp6_parser.cc" break; - case 555: -#line 1990 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 555: // pd_pools_list: "pd-pools" $@86 ":" "[" pd_pools_list_content "]" +#line 1990 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3114 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3124 "dhcp6_parser.cc" break; - case 560: -#line 2005 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 560: // $@87: %empty +#line 2005 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3124 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3134 "dhcp6_parser.cc" break; - case 561: -#line 2009 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 561: // pd_pool_entry: "{" $@87 pd_pool_params "}" +#line 2009 "dhcp6_parser.yy" + { // The prefix, prefix len and delegated len parameters are required. ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("prefix-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3136 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3146 "dhcp6_parser.cc" break; - case 562: -#line 2017 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 562: // $@88: %empty +#line 2017 "dhcp6_parser.yy" + { // Parse the pd-pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3146 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3156 "dhcp6_parser.cc" break; - case 563: -#line 2021 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 563: // sub_pd_pool: "{" $@88 pd_pool_params "}" +#line 2021 "dhcp6_parser.yy" + { // The prefix, prefix len and delegated len parameters are required. ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("prefix-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3158 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3168 "dhcp6_parser.cc" break; - case 577: -#line 2046 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 577: // $@89: %empty +#line 2046 "dhcp6_parser.yy" + { ctx.unique("prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3167 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3177 "dhcp6_parser.cc" break; - case 578: -#line 2049 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 578: // pd_prefix: "prefix" $@89 ":" "constant string" +#line 2049 "dhcp6_parser.yy" + { ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefix", prf); ctx.leave(); } -#line 3177 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3187 "dhcp6_parser.cc" break; - case 579: -#line 2055 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 579: // pd_prefix_len: "prefix-len" ":" "integer" +#line 2055 "dhcp6_parser.yy" + { ctx.unique("prefix-len", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefix-len", prf); } -#line 3187 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3197 "dhcp6_parser.cc" break; - case 580: -#line 2061 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 580: // $@90: %empty +#line 2061 "dhcp6_parser.yy" + { ctx.unique("excluded-prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3196 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3206 "dhcp6_parser.cc" break; - case 581: -#line 2064 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 581: // excluded_prefix: "excluded-prefix" $@90 ":" "constant string" +#line 2064 "dhcp6_parser.yy" + { ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("excluded-prefix", prf); ctx.leave(); } -#line 3206 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3216 "dhcp6_parser.cc" break; - case 582: -#line 2070 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 582: // excluded_prefix_len: "excluded-prefix-len" ":" "integer" +#line 2070 "dhcp6_parser.yy" + { ctx.unique("excluded-prefix-len", ctx.loc2pos(yystack_[2].location)); ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("excluded-prefix-len", prf); } -#line 3216 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3226 "dhcp6_parser.cc" break; - case 583: -#line 2076 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 583: // pd_delegated_len: "delegated-len" ":" "integer" +#line 2076 "dhcp6_parser.yy" + { ctx.unique("delegated-len", ctx.loc2pos(yystack_[2].location)); ElementPtr deleg(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("delegated-len", deleg); } -#line 3226 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3236 "dhcp6_parser.cc" break; - case 584: -#line 2085 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 584: // $@91: %empty +#line 2085 "dhcp6_parser.yy" + { ctx.unique("reservations", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations", l); ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 3238 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3248 "dhcp6_parser.cc" break; - case 585: -#line 2091 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 585: // reservations: "reservations" $@91 ":" "[" reservations_list "]" +#line 2091 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3247 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3257 "dhcp6_parser.cc" break; - case 590: -#line 2104 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 590: // $@92: %empty +#line 2104 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3257 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3267 "dhcp6_parser.cc" break; - case 591: -#line 2108 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 591: // reservation: "{" $@92 reservation_params "}" +#line 2108 "dhcp6_parser.yy" + { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 3266 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3276 "dhcp6_parser.cc" break; - case 592: -#line 2113 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 592: // $@93: %empty +#line 2113 "dhcp6_parser.yy" + { // Parse the reservations list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3276 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3286 "dhcp6_parser.cc" break; - case 593: -#line 2117 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 593: // sub_reservation: "{" $@93 reservation_params "}" +#line 2117 "dhcp6_parser.yy" + { /// @todo: an identifier parameter is required. // parsing completed } -#line 3285 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3295 "dhcp6_parser.cc" break; - case 609: -#line 2144 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 609: // $@94: %empty +#line 2144 "dhcp6_parser.yy" + { ctx.unique("ip-addresses", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-addresses", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3297 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3307 "dhcp6_parser.cc" break; - case 610: -#line 2150 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 610: // ip_addresses: "ip-addresses" $@94 ":" list_strings +#line 2150 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3306 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3316 "dhcp6_parser.cc" break; - case 611: -#line 2155 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 611: // $@95: %empty +#line 2155 "dhcp6_parser.yy" + { ctx.unique("prefixes", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefixes", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 3318 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3328 "dhcp6_parser.cc" break; - case 612: -#line 2161 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 612: // prefixes: "prefixes" $@95 ":" list_strings +#line 2161 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3327 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3337 "dhcp6_parser.cc" break; - case 613: -#line 2166 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 613: // $@96: %empty +#line 2166 "dhcp6_parser.yy" + { ctx.unique("duid", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3336 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3346 "dhcp6_parser.cc" break; - case 614: -#line 2169 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 614: // duid: "duid" $@96 ":" "constant string" +#line 2169 "dhcp6_parser.yy" + { ElementPtr d(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 3346 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3356 "dhcp6_parser.cc" break; - case 615: -#line 2175 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 615: // $@97: %empty +#line 2175 "dhcp6_parser.yy" + { ctx.unique("hw-address", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3355 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3365 "dhcp6_parser.cc" break; - case 616: -#line 2178 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 616: // hw_address: "hw-address" $@97 ":" "constant string" +#line 2178 "dhcp6_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 3365 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3375 "dhcp6_parser.cc" break; - case 617: -#line 2184 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 617: // $@98: %empty +#line 2184 "dhcp6_parser.yy" + { ctx.unique("hostname", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3374 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3384 "dhcp6_parser.cc" break; - case 618: -#line 2187 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 618: // hostname: "hostname" $@98 ":" "constant string" +#line 2187 "dhcp6_parser.yy" + { ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 3384 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3394 "dhcp6_parser.cc" break; - case 619: -#line 2193 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 619: // $@99: %empty +#line 2193 "dhcp6_parser.yy" + { ctx.unique("flex-id", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3393 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3403 "dhcp6_parser.cc" break; - case 620: -#line 2196 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 620: // flex_id_value: "flex-id" $@99 ":" "constant string" +#line 2196 "dhcp6_parser.yy" + { ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 3403 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3413 "dhcp6_parser.cc" break; - case 621: -#line 2202 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 621: // $@100: %empty +#line 2202 "dhcp6_parser.yy" + { ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 3415 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3425 "dhcp6_parser.cc" break; - case 622: -#line 2208 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 622: // reservation_client_classes: "client-classes" $@100 ":" list_strings +#line 2208 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3424 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3434 "dhcp6_parser.cc" break; - case 623: -#line 2216 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 623: // $@101: %empty +#line 2216 "dhcp6_parser.yy" + { ctx.unique("relay", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay", m); ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 3436 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3446 "dhcp6_parser.cc" break; - case 624: -#line 2222 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 624: // relay: "relay" $@101 ":" "{" relay_map "}" +#line 2222 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3445 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3455 "dhcp6_parser.cc" break; - case 627: -#line 2231 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 627: // $@102: %empty +#line 2231 "dhcp6_parser.yy" + { ctx.unique("ip-address", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3454 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3464 "dhcp6_parser.cc" break; - case 628: -#line 2234 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 628: // ip_address: "ip-address" $@102 ":" "constant string" +#line 2234 "dhcp6_parser.yy" + { ElementPtr addr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 3464 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3474 "dhcp6_parser.cc" break; - case 629: -#line 2243 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 629: // $@103: %empty +#line 2243 "dhcp6_parser.yy" + { ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", l); ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 3476 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3486 "dhcp6_parser.cc" break; - case 630: -#line 2249 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 630: // client_classes: "client-classes" $@103 ":" "[" client_classes_list "]" +#line 2249 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3485 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3495 "dhcp6_parser.cc" break; - case 633: -#line 2258 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 633: // $@104: %empty +#line 2258 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3495 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3505 "dhcp6_parser.cc" break; - case 634: -#line 2262 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 634: // client_class_entry: "{" $@104 client_class_params "}" +#line 2262 "dhcp6_parser.yy" + { // The name client class parameter is required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 3505 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3515 "dhcp6_parser.cc" break; - case 653: -#line 2293 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 653: // $@105: %empty +#line 2293 "dhcp6_parser.yy" + { ctx.unique("test", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3514 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3524 "dhcp6_parser.cc" break; - case 654: -#line 2296 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 654: // client_class_test: "test" $@105 ":" "constant string" +#line 2296 "dhcp6_parser.yy" + { ElementPtr test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 3524 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3534 "dhcp6_parser.cc" break; - case 655: -#line 2302 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 655: // only_if_required: "only-if-required" ":" "boolean" +#line 2302 "dhcp6_parser.yy" + { ctx.unique("only-if-required", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 3534 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3544 "dhcp6_parser.cc" break; - case 656: -#line 2311 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 656: // $@106: %empty +#line 2311 "dhcp6_parser.yy" + { ctx.unique("server-id", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-id", m); ctx.stack_.push_back(m); ctx.enter(ctx.SERVER_ID); } -#line 3546 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3556 "dhcp6_parser.cc" break; - case 657: -#line 2317 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 657: // server_id: "server-id" $@106 ":" "{" server_id_params "}" +#line 2317 "dhcp6_parser.yy" + { // The type parameter is required. ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3557 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3567 "dhcp6_parser.cc" break; - case 669: -#line 2339 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 669: // $@107: %empty +#line 2339 "dhcp6_parser.yy" + { ctx.unique("type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.DUID_TYPE); } -#line 3566 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3576 "dhcp6_parser.cc" break; - case 670: -#line 2342 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 670: // server_id_type: "type" $@107 ":" duid_type +#line 2342 "dhcp6_parser.yy" + { ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3575 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3585 "dhcp6_parser.cc" break; - case 671: -#line 2347 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); } -#line 3581 "dhcp6_parser.cc" // lalr1.cc:919 + case 671: // duid_type: "LLT" +#line 2347 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); } +#line 3591 "dhcp6_parser.cc" break; - case 672: -#line 2348 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); } -#line 3587 "dhcp6_parser.cc" // lalr1.cc:919 + case 672: // duid_type: "EN" +#line 2348 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); } +#line 3597 "dhcp6_parser.cc" break; - case 673: -#line 2349 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); } -#line 3593 "dhcp6_parser.cc" // lalr1.cc:919 + case 673: // duid_type: "LL" +#line 2349 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); } +#line 3603 "dhcp6_parser.cc" break; - case 674: -#line 2352 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 674: // htype: "htype" ":" "integer" +#line 2352 "dhcp6_parser.yy" + { ctx.unique("htype", ctx.loc2pos(yystack_[2].location)); ElementPtr htype(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("htype", htype); } -#line 3603 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3613 "dhcp6_parser.cc" break; - case 675: -#line 2358 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 675: // $@108: %empty +#line 2358 "dhcp6_parser.yy" + { ctx.unique("identifier", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3612 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3622 "dhcp6_parser.cc" break; - case 676: -#line 2361 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 676: // identifier: "identifier" $@108 ":" "constant string" +#line 2361 "dhcp6_parser.yy" + { ElementPtr id(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("identifier", id); ctx.leave(); } -#line 3622 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3632 "dhcp6_parser.cc" break; - case 677: -#line 2367 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 677: // time: "time" ":" "integer" +#line 2367 "dhcp6_parser.yy" + { ctx.unique("time", ctx.loc2pos(yystack_[2].location)); ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("time", time); } -#line 3632 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3642 "dhcp6_parser.cc" break; - case 678: -#line 2373 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 678: // enterprise_id: "enterprise-id" ":" "integer" +#line 2373 "dhcp6_parser.yy" + { ctx.unique("enterprise-id", ctx.loc2pos(yystack_[2].location)); ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enterprise-id", time); } -#line 3642 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3652 "dhcp6_parser.cc" break; - case 679: -#line 2381 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 679: // dhcp4o6_port: "dhcp4o6-port" ":" "integer" +#line 2381 "dhcp6_parser.yy" + { ctx.unique("dhcp4o6-port", ctx.loc2pos(yystack_[2].location)); ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 3652 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3662 "dhcp6_parser.cc" break; - case 680: -#line 2389 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 680: // $@109: %empty +#line 2389 "dhcp6_parser.yy" + { ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("control-socket", m); ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 3664 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3674 "dhcp6_parser.cc" break; - case 681: -#line 2395 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 681: // control_socket: "control-socket" $@109 ":" "{" control_socket_params "}" +#line 2395 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 3673 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3683 "dhcp6_parser.cc" break; - case 689: -#line 2411 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 689: // $@110: %empty +#line 2411 "dhcp6_parser.yy" + { ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3682 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3692 "dhcp6_parser.cc" break; - case 690: -#line 2414 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 690: // socket_type: "socket-type" $@110 ":" "constant string" +#line 2414 "dhcp6_parser.yy" + { ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 3692 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3702 "dhcp6_parser.cc" break; - case 691: -#line 2420 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 691: // $@111: %empty +#line 2420 "dhcp6_parser.yy" + { ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3701 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3711 "dhcp6_parser.cc" break; - case 692: -#line 2423 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 692: // socket_name: "socket-name" $@111 ":" "constant string" +#line 2423 "dhcp6_parser.yy" + { ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 3711 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3721 "dhcp6_parser.cc" break; - case 693: -#line 2432 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 693: // $@112: %empty +#line 2432 "dhcp6_parser.yy" + { ctx.unique("dhcp-queue-control", ctx.loc2pos(yystack_[0].location)); ElementPtr qc(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-queue-control", qc); ctx.stack_.push_back(qc); ctx.enter(ctx.DHCP_QUEUE_CONTROL); } -#line 3723 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3733 "dhcp6_parser.cc" break; - case 694: -#line 2438 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 694: // dhcp_queue_control: "dhcp-queue-control" $@112 ":" "{" queue_control_params "}" +#line 2438 "dhcp6_parser.yy" + { // The enable queue parameter is required. ctx.require("enable-queue", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3734 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3744 "dhcp6_parser.cc" break; - case 703: -#line 2457 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 703: // enable_queue: "enable-queue" ":" "boolean" +#line 2457 "dhcp6_parser.yy" + { ctx.unique("enable-queue", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-queue", b); } -#line 3744 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3754 "dhcp6_parser.cc" break; - case 704: -#line 2463 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 704: // $@113: %empty +#line 2463 "dhcp6_parser.yy" + { ctx.unique("queue-type", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3753 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3763 "dhcp6_parser.cc" break; - case 705: -#line 2466 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 705: // queue_type: "queue-type" $@113 ":" "constant string" +#line 2466 "dhcp6_parser.yy" + { ElementPtr qt(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("queue-type", qt); ctx.leave(); } -#line 3763 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3773 "dhcp6_parser.cc" break; - case 706: -#line 2472 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 706: // capacity: "capacity" ":" "integer" +#line 2472 "dhcp6_parser.yy" + { ctx.unique("capacity", ctx.loc2pos(yystack_[2].location)); ElementPtr c(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("capacity", c); } -#line 3773 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3783 "dhcp6_parser.cc" break; - case 707: -#line 2478 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 707: // $@114: %empty +#line 2478 "dhcp6_parser.yy" + { ctx.unique(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3782 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3792 "dhcp6_parser.cc" break; - case 708: -#line 2481 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 708: // arbitrary_map_entry: "constant string" $@114 ":" value +#line 2481 "dhcp6_parser.yy" + { ctx.stack_.back()->set(yystack_[3].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3791 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3801 "dhcp6_parser.cc" break; - case 709: -#line 2488 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 709: // $@115: %empty +#line 2488 "dhcp6_parser.yy" + { ctx.unique("dhcp-ddns", ctx.loc2pos(yystack_[0].location)); ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 3803 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3813 "dhcp6_parser.cc" break; - case 710: -#line 2494 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 710: // dhcp_ddns: "dhcp-ddns" $@115 ":" "{" dhcp_ddns_params "}" +#line 2494 "dhcp6_parser.yy" + { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3814 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3824 "dhcp6_parser.cc" break; - case 711: -#line 2501 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 711: // $@116: %empty +#line 2501 "dhcp6_parser.yy" + { // Parse the dhcp-ddns map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3824 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3834 "dhcp6_parser.cc" break; - case 712: -#line 2505 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 712: // sub_dhcp_ddns: "{" $@116 dhcp_ddns_params "}" +#line 2505 "dhcp6_parser.yy" + { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3834 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3844 "dhcp6_parser.cc" break; - case 733: -#line 2535 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 733: // enable_updates: "enable-updates" ":" "boolean" +#line 2535 "dhcp6_parser.yy" + { ctx.unique("enable-updates", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3844 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3854 "dhcp6_parser.cc" break; - case 734: -#line 2542 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 734: // $@117: %empty +#line 2542 "dhcp6_parser.yy" + { ctx.unique("qualifying-suffix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3853 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3863 "dhcp6_parser.cc" break; - case 735: -#line 2545 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 735: // dep_qualifying_suffix: "qualifying-suffix" $@117 ":" "constant string" +#line 2545 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3863 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3873 "dhcp6_parser.cc" break; - case 736: -#line 2551 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 736: // $@118: %empty +#line 2551 "dhcp6_parser.yy" + { ctx.unique("server-ip", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3872 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3882 "dhcp6_parser.cc" break; - case 737: -#line 2554 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 737: // server_ip: "server-ip" $@118 ":" "constant string" +#line 2554 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3882 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3892 "dhcp6_parser.cc" break; - case 738: -#line 2560 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 738: // server_port: "server-port" ":" "integer" +#line 2560 "dhcp6_parser.yy" + { ctx.unique("server-port", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3892 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3902 "dhcp6_parser.cc" break; - case 739: -#line 2566 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 739: // $@119: %empty +#line 2566 "dhcp6_parser.yy" + { ctx.unique("sender-ip", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 3901 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3911 "dhcp6_parser.cc" break; - case 740: -#line 2569 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 740: // sender_ip: "sender-ip" $@119 ":" "constant string" +#line 2569 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3911 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3921 "dhcp6_parser.cc" break; - case 741: -#line 2575 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 741: // sender_port: "sender-port" ":" "integer" +#line 2575 "dhcp6_parser.yy" + { ctx.unique("sender-port", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3921 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3931 "dhcp6_parser.cc" break; - case 742: -#line 2581 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 742: // max_queue_size: "max-queue-size" ":" "integer" +#line 2581 "dhcp6_parser.yy" + { ctx.unique("max-queue-size", ctx.loc2pos(yystack_[2].location)); ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3931 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3941 "dhcp6_parser.cc" break; - case 743: -#line 2587 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 743: // $@120: %empty +#line 2587 "dhcp6_parser.yy" + { ctx.unique("ncr-protocol", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NCR_PROTOCOL); } -#line 3940 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3950 "dhcp6_parser.cc" break; - case 744: -#line 2590 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 744: // ncr_protocol: "ncr-protocol" $@120 ":" ncr_protocol_value +#line 2590 "dhcp6_parser.yy" + { ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3949 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3959 "dhcp6_parser.cc" break; - case 745: -#line 2596 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3955 "dhcp6_parser.cc" // lalr1.cc:919 + case 745: // ncr_protocol_value: "UDP" +#line 2596 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } +#line 3965 "dhcp6_parser.cc" break; - case 746: -#line 2597 "dhcp6_parser.yy" // lalr1.cc:919 - { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3961 "dhcp6_parser.cc" // lalr1.cc:919 + case 746: // ncr_protocol_value: "TCP" +#line 2597 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } +#line 3971 "dhcp6_parser.cc" break; - case 747: -#line 2600 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 747: // $@121: %empty +#line 2600 "dhcp6_parser.yy" + { ctx.unique("ncr-format", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NCR_FORMAT); } -#line 3970 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3980 "dhcp6_parser.cc" break; - case 748: -#line 2603 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 748: // ncr_format: "ncr-format" $@121 ":" "JSON" +#line 2603 "dhcp6_parser.yy" + { ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3980 "dhcp6_parser.cc" // lalr1.cc:919 +#line 3990 "dhcp6_parser.cc" break; - case 749: -#line 2610 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 749: // dep_override_no_update: "override-no-update" ":" "boolean" +#line 2610 "dhcp6_parser.yy" + { ctx.unique("override-no-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3990 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4000 "dhcp6_parser.cc" break; - case 750: -#line 2617 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 750: // dep_override_client_update: "override-client-update" ":" "boolean" +#line 2617 "dhcp6_parser.yy" + { ctx.unique("override-client-update", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 4000 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4010 "dhcp6_parser.cc" break; - case 751: -#line 2624 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 751: // $@122: %empty +#line 2624 "dhcp6_parser.yy" + { ctx.unique("replace-client-name", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 4009 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4019 "dhcp6_parser.cc" break; - case 752: -#line 2627 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 752: // dep_replace_client_name: "replace-client-name" $@122 ":" ddns_replace_client_name_value +#line 2627 "dhcp6_parser.yy" + { ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 4018 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4028 "dhcp6_parser.cc" break; - case 753: -#line 2633 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 753: // $@123: %empty +#line 2633 "dhcp6_parser.yy" + { ctx.unique("generated-prefix", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4027 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4037 "dhcp6_parser.cc" break; - case 754: -#line 2636 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 754: // dep_generated_prefix: "generated-prefix" $@123 ":" "constant string" +#line 2636 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 4037 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4047 "dhcp6_parser.cc" break; - case 755: -#line 2643 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 755: // $@124: %empty +#line 2643 "dhcp6_parser.yy" + { ctx.unique("hostname-char-set", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4046 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4056 "dhcp6_parser.cc" break; - case 756: -#line 2646 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 756: // dep_hostname_char_set: "hostname-char-set" $@124 ":" "constant string" +#line 2646 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-set", s); ctx.leave(); } -#line 4056 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4066 "dhcp6_parser.cc" break; - case 757: -#line 2653 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 757: // $@125: %empty +#line 2653 "dhcp6_parser.yy" + { ctx.unique("hostname-char-replacement", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4065 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4075 "dhcp6_parser.cc" break; - case 758: -#line 2656 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 758: // dep_hostname_char_replacement: "hostname-char-replacement" $@125 ":" "constant string" +#line 2656 "dhcp6_parser.yy" + { ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname-char-replacement", s); ctx.leave(); } -#line 4075 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4085 "dhcp6_parser.cc" break; - case 759: -#line 2665 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 759: // $@126: %empty +#line 2665 "dhcp6_parser.yy" + { ctx.unique("config-control", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-control", i); ctx.stack_.push_back(i); ctx.enter(ctx.CONFIG_CONTROL); } -#line 4087 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4097 "dhcp6_parser.cc" break; - case 760: -#line 2671 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 760: // config_control: "config-control" $@126 ":" "{" config_control_params "}" +#line 2671 "dhcp6_parser.yy" + { // No config control params are required ctx.stack_.pop_back(); ctx.leave(); } -#line 4097 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4107 "dhcp6_parser.cc" break; - case 761: -#line 2677 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 761: // $@127: %empty +#line 2677 "dhcp6_parser.yy" + { // Parse the config-control map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 4107 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4117 "dhcp6_parser.cc" break; - case 762: -#line 2681 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 762: // sub_config_control: "{" $@127 config_control_params "}" +#line 2681 "dhcp6_parser.yy" + { // No config_control params are required // parsing completed } -#line 4116 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4126 "dhcp6_parser.cc" break; - case 767: -#line 2696 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 767: // $@128: %empty +#line 2696 "dhcp6_parser.yy" + { ctx.unique("config-databases", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("config-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.CONFIG_DATABASE); } -#line 4128 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4138 "dhcp6_parser.cc" break; - case 768: -#line 2702 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 768: // config_databases: "config-databases" $@128 ":" "[" database_list "]" +#line 2702 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4137 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4147 "dhcp6_parser.cc" break; - case 769: -#line 2707 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 769: // config_fetch_wait_time: "config-fetch-wait-time" ":" "integer" +#line 2707 "dhcp6_parser.yy" + { ctx.unique("config-fetch-wait-time", ctx.loc2pos(yystack_[2].location)); 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 4147 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4157 "dhcp6_parser.cc" break; - case 770: -#line 2715 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 770: // $@129: %empty +#line 2715 "dhcp6_parser.yy" + { ctx.unique("loggers", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 4159 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4169 "dhcp6_parser.cc" break; - case 771: -#line 2721 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 771: // loggers: "loggers" $@129 ":" "[" loggers_entries "]" +#line 2721 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4168 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4178 "dhcp6_parser.cc" break; - case 774: -#line 2733 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 774: // $@130: %empty +#line 2733 "dhcp6_parser.yy" + { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 4178 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4188 "dhcp6_parser.cc" break; - case 775: -#line 2737 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 775: // logger_entry: "{" $@130 logger_params "}" +#line 2737 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); } -#line 4186 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4196 "dhcp6_parser.cc" break; - case 785: -#line 2754 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 785: // debuglevel: "debuglevel" ":" "integer" +#line 2754 "dhcp6_parser.yy" + { ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location)); ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 4196 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4206 "dhcp6_parser.cc" break; - case 786: -#line 2760 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 786: // $@131: %empty +#line 2760 "dhcp6_parser.yy" + { ctx.unique("severity", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4205 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4215 "dhcp6_parser.cc" break; - case 787: -#line 2763 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 787: // severity: "severity" $@131 ":" "constant string" +#line 2763 "dhcp6_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 4215 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4225 "dhcp6_parser.cc" break; - case 788: -#line 2769 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 788: // $@132: %empty +#line 2769 "dhcp6_parser.yy" + { ctx.unique("output_options", ctx.loc2pos(yystack_[0].location)); ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 4227 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4237 "dhcp6_parser.cc" break; - case 789: -#line 2775 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 789: // output_options_list: "output_options" $@132 ":" "[" output_options_list_content "]" +#line 2775 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4236 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4246 "dhcp6_parser.cc" break; - case 792: -#line 2784 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 792: // $@133: %empty +#line 2784 "dhcp6_parser.yy" + { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 4246 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4256 "dhcp6_parser.cc" break; - case 793: -#line 2788 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 793: // output_entry: "{" $@133 output_params_list "}" +#line 2788 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); } -#line 4254 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4264 "dhcp6_parser.cc" break; - case 801: -#line 2803 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 801: // $@134: %empty +#line 2803 "dhcp6_parser.yy" + { ctx.unique("output", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4263 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4273 "dhcp6_parser.cc" break; - case 802: -#line 2806 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 802: // output: "output" $@134 ":" "constant string" +#line 2806 "dhcp6_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 4273 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4283 "dhcp6_parser.cc" break; - case 803: -#line 2812 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 803: // flush: "flush" ":" "boolean" +#line 2812 "dhcp6_parser.yy" + { ctx.unique("flush", ctx.loc2pos(yystack_[2].location)); ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 4283 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4293 "dhcp6_parser.cc" break; - case 804: -#line 2818 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 804: // maxsize: "maxsize" ":" "integer" +#line 2818 "dhcp6_parser.yy" + { ctx.unique("maxsize", ctx.loc2pos(yystack_[2].location)); ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 4293 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4303 "dhcp6_parser.cc" break; - case 805: -#line 2824 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 805: // maxver: "maxver" ":" "integer" +#line 2824 "dhcp6_parser.yy" + { ctx.unique("maxver", ctx.loc2pos(yystack_[2].location)); ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 4303 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4313 "dhcp6_parser.cc" break; - case 806: -#line 2830 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 806: // $@135: %empty +#line 2830 "dhcp6_parser.yy" + { ctx.unique("pattern", ctx.loc2pos(yystack_[0].location)); ctx.enter(ctx.NO_KEYWORD); } -#line 4312 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4322 "dhcp6_parser.cc" break; - case 807: -#line 2833 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 807: // pattern: "pattern" $@135 ":" "constant string" +#line 2833 "dhcp6_parser.yy" + { ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pattern", sev); ctx.leave(); } -#line 4322 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4332 "dhcp6_parser.cc" break; - case 808: -#line 2839 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 808: // $@136: %empty +#line 2839 "dhcp6_parser.yy" + { ctx.unique("compatibility", ctx.loc2pos(yystack_[0].location)); ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("compatibility", i); ctx.stack_.push_back(i); ctx.enter(ctx.COMPATIBILITY); } -#line 4334 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4344 "dhcp6_parser.cc" break; - case 809: -#line 2845 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 809: // compatibility: "compatibility" $@136 ":" "{" compatibility_params "}" +#line 2845 "dhcp6_parser.yy" + { ctx.stack_.pop_back(); ctx.leave(); } -#line 4343 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4353 "dhcp6_parser.cc" break; - case 814: -#line 2858 "dhcp6_parser.yy" // lalr1.cc:919 - { + case 814: // lenient_option_parsing: "lenient-option-parsing" ":" "boolean" +#line 2858 "dhcp6_parser.yy" + { ctx.unique("lenient-option-parsing", ctx.loc2pos(yystack_[2].location)); ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lenient-option-parsing", b); } -#line 4353 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4363 "dhcp6_parser.cc" break; -#line 4357 "dhcp6_parser.cc" // lalr1.cc:919 +#line 4367 "dhcp6_parser.cc" + default: break; } @@ -4369,7 +4380,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)); @@ -4385,7 +4395,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)); } @@ -4396,7 +4408,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 ()) { @@ -4422,6 +4434,7 @@ namespace isc { namespace dhcp { this YYERROR. */ yypop_ (yylen); yylen = 0; + YY_STACK_PRINT (); goto yyerrlab1; @@ -4430,37 +4443,39 @@ 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 += yyterror_; - if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_) - { - 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); // Shift the error token. - error_token.state = yyn; + error_token.state = state_type (yyn); yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; @@ -4492,6 +4507,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]); @@ -4525,18 +4541,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"). - size_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 @@ -4555,41 +4653,32 @@ namespace isc { namespace dhcp { - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state - merging (from LALR or IELR) and default reductions corrupt the - expected token list. However, the list is correct for - canonical LR with one exception: it will still contain any - token that will not be accepted due to an error action in a - later state. + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + 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 ()) + + if (!yyctx.lookahead ().empty ()) { - int 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 != yyterror_ - && !yy_table_value_is_error_ (yytable_[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - break; - } - else - yyarg[yycount++] = yytname_[yyx]; - } - } + 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) @@ -4610,11 +4699,11 @@ namespace isc { namespace dhcp { std::string yyres; // Argument number. - size_t yyi = 0; + std::ptrdiff_t yyi = 0; 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 @@ -4764,7 +4853,7 @@ namespace isc { namespace dhcp { -983, 939, -983, -983, -983 }; - const unsigned short + const short Dhcp6Parser::yydefact_[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, @@ -4953,7 +5042,7 @@ namespace isc { namespace dhcp { const short Dhcp6Parser::yydefgoto_[] = { - -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 83, 39, 40, 69, 722, 87, 88, 41, 68, 84, 85, 747, 955, 1065, 1066, 810, 43, 70, 90, 427, 45, 71, 155, 156, @@ -4999,7 +5088,7 @@ namespace isc { namespace dhcp { 1296, 1297, 1298, 1304, 218, 490, 952, 953, 954 }; - const unsigned short + const short Dhcp6Parser::yytable_[] = { 154, 221, 238, 284, 298, 318, 38, 340, 359, 376, @@ -5273,7 +5362,7 @@ namespace isc { namespace dhcp { -1, -1, 1243, 1243, -1, 1243, 1243, -1, 1243 }; - const unsigned short + const short Dhcp6Parser::yystos_[] = { 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, @@ -5410,7 +5499,7 @@ namespace isc { namespace dhcp { 210, 4, 639, 209, 209 }; - const unsigned short + const short Dhcp6Parser::yyr1_[] = { 0, 213, 215, 214, 216, 214, 217, 214, 218, 214, @@ -5497,7 +5586,7 @@ namespace isc { namespace dhcp { 649, 649, 650, 650, 651 }; - const unsigned char + const signed char Dhcp6Parser::yyr2_[] = { 0, 2, 0, 3, 0, 3, 0, 3, 0, 3, @@ -5585,15 +5674,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\"", @@ -5767,9 +5856,11 @@ namespace isc { namespace dhcp { "maxsize", "maxver", "pattern", "$@135", "compatibility", "$@136", "compatibility_params", "compatibility_param", "lenient_option_parsing", YY_NULLPTR }; +#endif + #if PARSER6_DEBUG - const unsigned short + const short Dhcp6Parser::yyrline_[] = { 0, 301, 301, 301, 302, 302, 303, 303, 304, 304, @@ -5856,24 +5947,22 @@ namespace isc { namespace dhcp { 2850, 2851, 2854, 2855, 2858 }; - // 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 i = yystack_.begin (), i_end = yystack_.end (); i != i_end; ++i) - *yycdebug_ << ' ' << i->state; + *yycdebug_ << ' ' << int (i->state); *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 { - unsigned yylno = yyrline_[yyrule]; + int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 @@ -5886,10 +5975,11 @@ namespace isc { namespace dhcp { #endif // PARSER6_DEBUG -#line 14 "dhcp6_parser.yy" // lalr1.cc:1242 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 5892 "dhcp6_parser.cc" // lalr1.cc:1242 -#line 2864 "dhcp6_parser.yy" // lalr1.cc:1243 +#line 5981 "dhcp6_parser.cc" + +#line 2864 "dhcp6_parser.yy" void diff --git a/src/bin/dhcp6/dhcp6_parser.h b/src/bin/dhcp6/dhcp6_parser.h index c370ba5df0..46f0607571 100644 --- a/src/bin/dhcp6/dhcp6_parser.h +++ b/src/bin/dhcp6/dhcp6_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -38,13 +38,14 @@ // 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 -// // "%code requires" blocks. -#line 17 "dhcp6_parser.yy" // lalr1.cc:401 +// "%code requires" blocks. +#line 17 "dhcp6_parser.yy" #include #include @@ -56,7 +57,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp6_parser.h" // lalr1.cc:401 +#line 61 "dhcp6_parser.h" # include # include // std::abort @@ -103,44 +104,42 @@ using namespace std; #endif # include "location.hh" #include -#ifndef YYASSERT +#ifndef PARSER6__ASSERT # include -# define YYASSERT assert +# define PARSER6__ASSERT assert #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define YY_ATTRIBUTE(Spec) /* empty */ +# define YY_ATTRIBUTE_PURE # endif #endif -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -153,6 +152,27 @@ using namespace std; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -178,9 +198,10 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined PARSER6_DEBUG */ -#line 14 "dhcp6_parser.yy" // lalr1.cc:401 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 184 "dhcp6_parser.h" // lalr1.cc:401 +#line 204 "dhcp6_parser.h" + @@ -211,14 +232,21 @@ namespace isc { namespace dhcp { semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (sizeof (T) <= size); 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 { - YYASSERT (!yytypeid_); + PARSER6__ASSERT (!yytypeid_); } # if 201103L <= YY_CPLUSPLUS @@ -227,8 +255,8 @@ namespace isc { namespace dhcp { T& emplace (U&&... u) { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (!yytypeid_); + PARSER6__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (std::forward (u)...); } @@ -238,8 +266,8 @@ namespace isc { namespace dhcp { T& emplace () { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (!yytypeid_); + PARSER6__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (); } @@ -249,8 +277,8 @@ namespace isc { namespace dhcp { T& emplace (const T& t) { - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (!yytypeid_); + PARSER6__ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } @@ -279,9 +307,9 @@ namespace isc { namespace dhcp { T& as () YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (yytypeid_); + PARSER6__ASSERT (*yytypeid_ == typeid (T)); + PARSER6__ASSERT (sizeof (T) <= size); return *yyas_ (); } @@ -290,9 +318,9 @@ namespace isc { namespace dhcp { const T& as () const YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size); + PARSER6__ASSERT (yytypeid_); + PARSER6__ASSERT (*yytypeid_ == typeid (T)); + PARSER6__ASSERT (sizeof (T) <= size); return *yyas_ (); } @@ -308,8 +336,8 @@ namespace isc { namespace dhcp { void swap (self_type& that) YY_NOEXCEPT { - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *that.yytypeid_); + PARSER6__ASSERT (yytypeid_); + PARSER6__ASSERT (*yytypeid_ == *that.yytypeid_); std::swap (as (), that.as ()); } @@ -358,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 @@ -446,241 +477,908 @@ 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_ON_FAIL = 292, - TOKEN_STOP_RETRY_EXIT = 293, - TOKEN_SERVE_RETRY_EXIT = 294, - TOKEN_SERVE_RETRY_CONTINUE = 295, - TOKEN_KEYSPACE = 296, - TOKEN_CONSISTENCY = 297, - TOKEN_SERIAL_CONSISTENCY = 298, - TOKEN_REQUEST_TIMEOUT = 299, - TOKEN_TCP_KEEPALIVE = 300, - TOKEN_TCP_NODELAY = 301, - TOKEN_MAX_ROW_ERRORS = 302, - TOKEN_PREFERRED_LIFETIME = 303, - TOKEN_MIN_PREFERRED_LIFETIME = 304, - TOKEN_MAX_PREFERRED_LIFETIME = 305, - TOKEN_VALID_LIFETIME = 306, - TOKEN_MIN_VALID_LIFETIME = 307, - TOKEN_MAX_VALID_LIFETIME = 308, - TOKEN_RENEW_TIMER = 309, - TOKEN_REBIND_TIMER = 310, - TOKEN_CALCULATE_TEE_TIMES = 311, - TOKEN_T1_PERCENT = 312, - TOKEN_T2_PERCENT = 313, - TOKEN_CACHE_THRESHOLD = 314, - TOKEN_CACHE_MAX_AGE = 315, - TOKEN_DECLINE_PROBATION_PERIOD = 316, - TOKEN_SERVER_TAG = 317, - TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 318, - TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 319, - TOKEN_DDNS_SEND_UPDATES = 320, - TOKEN_DDNS_OVERRIDE_NO_UPDATE = 321, - TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 322, - TOKEN_DDNS_REPLACE_CLIENT_NAME = 323, - TOKEN_DDNS_GENERATED_PREFIX = 324, - TOKEN_DDNS_QUALIFYING_SUFFIX = 325, - TOKEN_DDNS_UPDATE_ON_RENEW = 326, - TOKEN_DDNS_USE_CONFLICT_RESOLUTION = 327, - TOKEN_STORE_EXTENDED_INFO = 328, - TOKEN_SUBNET6 = 329, - TOKEN_OPTION_DEF = 330, - TOKEN_OPTION_DATA = 331, - TOKEN_NAME = 332, - TOKEN_DATA = 333, - TOKEN_CODE = 334, - TOKEN_SPACE = 335, - TOKEN_CSV_FORMAT = 336, - TOKEN_ALWAYS_SEND = 337, - TOKEN_RECORD_TYPES = 338, - TOKEN_ENCAPSULATE = 339, - TOKEN_ARRAY = 340, - TOKEN_PARKED_PACKET_LIMIT = 341, - TOKEN_SHARED_NETWORKS = 342, - TOKEN_POOLS = 343, - TOKEN_POOL = 344, - TOKEN_PD_POOLS = 345, - TOKEN_PREFIX = 346, - TOKEN_PREFIX_LEN = 347, - TOKEN_EXCLUDED_PREFIX = 348, - TOKEN_EXCLUDED_PREFIX_LEN = 349, - TOKEN_DELEGATED_LEN = 350, - TOKEN_USER_CONTEXT = 351, - TOKEN_COMMENT = 352, - TOKEN_SUBNET = 353, - TOKEN_INTERFACE = 354, - TOKEN_INTERFACE_ID = 355, - TOKEN_ID = 356, - TOKEN_RAPID_COMMIT = 357, - TOKEN_RESERVATION_MODE = 358, - TOKEN_DISABLED = 359, - TOKEN_OUT_OF_POOL = 360, - TOKEN_GLOBAL = 361, - TOKEN_ALL = 362, - TOKEN_RESERVATIONS_GLOBAL = 363, - TOKEN_RESERVATIONS_IN_SUBNET = 364, - TOKEN_RESERVATIONS_OUT_OF_POOL = 365, - TOKEN_MAC_SOURCES = 366, - TOKEN_RELAY_SUPPLIED_OPTIONS = 367, - TOKEN_HOST_RESERVATION_IDENTIFIERS = 368, - TOKEN_SANITY_CHECKS = 369, - TOKEN_LEASE_CHECKS = 370, - TOKEN_CLIENT_CLASSES = 371, - TOKEN_REQUIRE_CLIENT_CLASSES = 372, - TOKEN_TEST = 373, - TOKEN_ONLY_IF_REQUIRED = 374, - TOKEN_CLIENT_CLASS = 375, - TOKEN_RESERVATIONS = 376, - TOKEN_IP_ADDRESSES = 377, - TOKEN_PREFIXES = 378, - TOKEN_DUID = 379, - TOKEN_HW_ADDRESS = 380, - TOKEN_HOSTNAME = 381, - TOKEN_FLEX_ID = 382, - TOKEN_RELAY = 383, - TOKEN_IP_ADDRESS = 384, - TOKEN_HOOKS_LIBRARIES = 385, - TOKEN_LIBRARY = 386, - TOKEN_PARAMETERS = 387, - TOKEN_EXPIRED_LEASES_PROCESSING = 388, - TOKEN_RECLAIM_TIMER_WAIT_TIME = 389, - TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 390, - TOKEN_HOLD_RECLAIMED_TIME = 391, - TOKEN_MAX_RECLAIM_LEASES = 392, - TOKEN_MAX_RECLAIM_TIME = 393, - TOKEN_UNWARNED_RECLAIM_CYCLES = 394, - TOKEN_SERVER_ID = 395, - TOKEN_LLT = 396, - TOKEN_EN = 397, - TOKEN_LL = 398, - TOKEN_IDENTIFIER = 399, - TOKEN_HTYPE = 400, - TOKEN_TIME = 401, - TOKEN_ENTERPRISE_ID = 402, - TOKEN_DHCP4O6_PORT = 403, - TOKEN_DHCP_MULTI_THREADING = 404, - TOKEN_ENABLE_MULTI_THREADING = 405, - TOKEN_THREAD_POOL_SIZE = 406, - TOKEN_PACKET_QUEUE_SIZE = 407, - TOKEN_CONTROL_SOCKET = 408, - TOKEN_SOCKET_TYPE = 409, - TOKEN_SOCKET_NAME = 410, - TOKEN_DHCP_QUEUE_CONTROL = 411, - TOKEN_ENABLE_QUEUE = 412, - TOKEN_QUEUE_TYPE = 413, - TOKEN_CAPACITY = 414, - TOKEN_DHCP_DDNS = 415, - TOKEN_ENABLE_UPDATES = 416, - TOKEN_QUALIFYING_SUFFIX = 417, - TOKEN_SERVER_IP = 418, - TOKEN_SERVER_PORT = 419, - TOKEN_SENDER_IP = 420, - TOKEN_SENDER_PORT = 421, - TOKEN_MAX_QUEUE_SIZE = 422, - TOKEN_NCR_PROTOCOL = 423, - TOKEN_NCR_FORMAT = 424, - TOKEN_OVERRIDE_NO_UPDATE = 425, - TOKEN_OVERRIDE_CLIENT_UPDATE = 426, - TOKEN_REPLACE_CLIENT_NAME = 427, - TOKEN_GENERATED_PREFIX = 428, - TOKEN_UDP = 429, - TOKEN_TCP = 430, - TOKEN_JSON = 431, - TOKEN_WHEN_PRESENT = 432, - TOKEN_NEVER = 433, - TOKEN_ALWAYS = 434, - TOKEN_WHEN_NOT_PRESENT = 435, - TOKEN_HOSTNAME_CHAR_SET = 436, - TOKEN_HOSTNAME_CHAR_REPLACEMENT = 437, - TOKEN_IP_RESERVATIONS_UNIQUE = 438, - TOKEN_LOGGERS = 439, - TOKEN_OUTPUT_OPTIONS = 440, - TOKEN_OUTPUT = 441, - TOKEN_DEBUGLEVEL = 442, - TOKEN_SEVERITY = 443, - TOKEN_FLUSH = 444, - TOKEN_MAXSIZE = 445, - TOKEN_MAXVER = 446, - TOKEN_PATTERN = 447, - TOKEN_COMPATIBILITY = 448, - TOKEN_LENIENT_OPTION_PARSING = 449, - TOKEN_TOPLEVEL_JSON = 450, - TOKEN_TOPLEVEL_DHCP6 = 451, - TOKEN_SUB_DHCP6 = 452, - TOKEN_SUB_INTERFACES6 = 453, - TOKEN_SUB_SUBNET6 = 454, - TOKEN_SUB_POOL6 = 455, - TOKEN_SUB_PD_POOL = 456, - TOKEN_SUB_RESERVATION = 457, - TOKEN_SUB_OPTION_DEFS = 458, - TOKEN_SUB_OPTION_DEF = 459, - TOKEN_SUB_OPTION_DATA = 460, - TOKEN_SUB_HOOKS_LIBRARY = 461, - TOKEN_SUB_DHCP_DDNS = 462, - TOKEN_SUB_CONFIG_CONTROL = 463, - TOKEN_STRING = 464, - TOKEN_INTEGER = 465, - TOKEN_FLOAT = 466, - TOKEN_BOOLEAN = 467 + 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_ON_FAIL = 292, // "on-fail" + TOKEN_STOP_RETRY_EXIT = 293, // "stop-retry-exit" + TOKEN_SERVE_RETRY_EXIT = 294, // "serve-retry-exit" + TOKEN_SERVE_RETRY_CONTINUE = 295, // "serve-retry-continue" + TOKEN_KEYSPACE = 296, // "keyspace" + TOKEN_CONSISTENCY = 297, // "consistency" + TOKEN_SERIAL_CONSISTENCY = 298, // "serial-consistency" + TOKEN_REQUEST_TIMEOUT = 299, // "request-timeout" + TOKEN_TCP_KEEPALIVE = 300, // "tcp-keepalive" + TOKEN_TCP_NODELAY = 301, // "tcp-nodelay" + TOKEN_MAX_ROW_ERRORS = 302, // "max-row-errors" + TOKEN_PREFERRED_LIFETIME = 303, // "preferred-lifetime" + TOKEN_MIN_PREFERRED_LIFETIME = 304, // "min-preferred-lifetime" + TOKEN_MAX_PREFERRED_LIFETIME = 305, // "max-preferred-lifetime" + TOKEN_VALID_LIFETIME = 306, // "valid-lifetime" + TOKEN_MIN_VALID_LIFETIME = 307, // "min-valid-lifetime" + TOKEN_MAX_VALID_LIFETIME = 308, // "max-valid-lifetime" + TOKEN_RENEW_TIMER = 309, // "renew-timer" + TOKEN_REBIND_TIMER = 310, // "rebind-timer" + TOKEN_CALCULATE_TEE_TIMES = 311, // "calculate-tee-times" + TOKEN_T1_PERCENT = 312, // "t1-percent" + TOKEN_T2_PERCENT = 313, // "t2-percent" + TOKEN_CACHE_THRESHOLD = 314, // "cache-threshold" + TOKEN_CACHE_MAX_AGE = 315, // "cache-max-age" + TOKEN_DECLINE_PROBATION_PERIOD = 316, // "decline-probation-period" + TOKEN_SERVER_TAG = 317, // "server-tag" + TOKEN_STATISTIC_DEFAULT_SAMPLE_COUNT = 318, // "statistic-default-sample-count" + TOKEN_STATISTIC_DEFAULT_SAMPLE_AGE = 319, // "statistic-default-sample-age" + TOKEN_DDNS_SEND_UPDATES = 320, // "ddns-send-updates" + TOKEN_DDNS_OVERRIDE_NO_UPDATE = 321, // "ddns-override-no-update" + TOKEN_DDNS_OVERRIDE_CLIENT_UPDATE = 322, // "ddns-override-client-update" + TOKEN_DDNS_REPLACE_CLIENT_NAME = 323, // "ddns-replace-client-name" + TOKEN_DDNS_GENERATED_PREFIX = 324, // "ddns-generated-prefix" + TOKEN_DDNS_QUALIFYING_SUFFIX = 325, // "ddns-qualifying-suffix" + TOKEN_DDNS_UPDATE_ON_RENEW = 326, // "ddns-update-on-renew" + TOKEN_DDNS_USE_CONFLICT_RESOLUTION = 327, // "ddns-use-conflict-resolution" + TOKEN_STORE_EXTENDED_INFO = 328, // "store-extended-info" + TOKEN_SUBNET6 = 329, // "subnet6" + TOKEN_OPTION_DEF = 330, // "option-def" + TOKEN_OPTION_DATA = 331, // "option-data" + TOKEN_NAME = 332, // "name" + TOKEN_DATA = 333, // "data" + TOKEN_CODE = 334, // "code" + TOKEN_SPACE = 335, // "space" + TOKEN_CSV_FORMAT = 336, // "csv-format" + TOKEN_ALWAYS_SEND = 337, // "always-send" + TOKEN_RECORD_TYPES = 338, // "record-types" + TOKEN_ENCAPSULATE = 339, // "encapsulate" + TOKEN_ARRAY = 340, // "array" + TOKEN_PARKED_PACKET_LIMIT = 341, // "parked-packet-limit" + TOKEN_SHARED_NETWORKS = 342, // "shared-networks" + TOKEN_POOLS = 343, // "pools" + TOKEN_POOL = 344, // "pool" + TOKEN_PD_POOLS = 345, // "pd-pools" + TOKEN_PREFIX = 346, // "prefix" + TOKEN_PREFIX_LEN = 347, // "prefix-len" + TOKEN_EXCLUDED_PREFIX = 348, // "excluded-prefix" + TOKEN_EXCLUDED_PREFIX_LEN = 349, // "excluded-prefix-len" + TOKEN_DELEGATED_LEN = 350, // "delegated-len" + TOKEN_USER_CONTEXT = 351, // "user-context" + TOKEN_COMMENT = 352, // "comment" + TOKEN_SUBNET = 353, // "subnet" + TOKEN_INTERFACE = 354, // "interface" + TOKEN_INTERFACE_ID = 355, // "interface-id" + TOKEN_ID = 356, // "id" + TOKEN_RAPID_COMMIT = 357, // "rapid-commit" + TOKEN_RESERVATION_MODE = 358, // "reservation-mode" + TOKEN_DISABLED = 359, // "disabled" + TOKEN_OUT_OF_POOL = 360, // "out-of-pool" + TOKEN_GLOBAL = 361, // "global" + TOKEN_ALL = 362, // "all" + TOKEN_RESERVATIONS_GLOBAL = 363, // "reservations-global" + TOKEN_RESERVATIONS_IN_SUBNET = 364, // "reservations-in-subnet" + TOKEN_RESERVATIONS_OUT_OF_POOL = 365, // "reservations-out-of-pool" + TOKEN_MAC_SOURCES = 366, // "mac-sources" + TOKEN_RELAY_SUPPLIED_OPTIONS = 367, // "relay-supplied-options" + TOKEN_HOST_RESERVATION_IDENTIFIERS = 368, // "host-reservation-identifiers" + TOKEN_SANITY_CHECKS = 369, // "sanity-checks" + TOKEN_LEASE_CHECKS = 370, // "lease-checks" + TOKEN_CLIENT_CLASSES = 371, // "client-classes" + TOKEN_REQUIRE_CLIENT_CLASSES = 372, // "require-client-classes" + TOKEN_TEST = 373, // "test" + TOKEN_ONLY_IF_REQUIRED = 374, // "only-if-required" + TOKEN_CLIENT_CLASS = 375, // "client-class" + TOKEN_RESERVATIONS = 376, // "reservations" + TOKEN_IP_ADDRESSES = 377, // "ip-addresses" + TOKEN_PREFIXES = 378, // "prefixes" + TOKEN_DUID = 379, // "duid" + TOKEN_HW_ADDRESS = 380, // "hw-address" + TOKEN_HOSTNAME = 381, // "hostname" + TOKEN_FLEX_ID = 382, // "flex-id" + TOKEN_RELAY = 383, // "relay" + TOKEN_IP_ADDRESS = 384, // "ip-address" + TOKEN_HOOKS_LIBRARIES = 385, // "hooks-libraries" + TOKEN_LIBRARY = 386, // "library" + TOKEN_PARAMETERS = 387, // "parameters" + TOKEN_EXPIRED_LEASES_PROCESSING = 388, // "expired-leases-processing" + TOKEN_RECLAIM_TIMER_WAIT_TIME = 389, // "reclaim-timer-wait-time" + TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 390, // "flush-reclaimed-timer-wait-time" + TOKEN_HOLD_RECLAIMED_TIME = 391, // "hold-reclaimed-time" + TOKEN_MAX_RECLAIM_LEASES = 392, // "max-reclaim-leases" + TOKEN_MAX_RECLAIM_TIME = 393, // "max-reclaim-time" + TOKEN_UNWARNED_RECLAIM_CYCLES = 394, // "unwarned-reclaim-cycles" + TOKEN_SERVER_ID = 395, // "server-id" + TOKEN_LLT = 396, // "LLT" + TOKEN_EN = 397, // "EN" + TOKEN_LL = 398, // "LL" + TOKEN_IDENTIFIER = 399, // "identifier" + TOKEN_HTYPE = 400, // "htype" + TOKEN_TIME = 401, // "time" + TOKEN_ENTERPRISE_ID = 402, // "enterprise-id" + TOKEN_DHCP4O6_PORT = 403, // "dhcp4o6-port" + TOKEN_DHCP_MULTI_THREADING = 404, // "multi-threading" + TOKEN_ENABLE_MULTI_THREADING = 405, // "enable-multi-threading" + TOKEN_THREAD_POOL_SIZE = 406, // "thread-pool-size" + TOKEN_PACKET_QUEUE_SIZE = 407, // "packet-queue-size" + TOKEN_CONTROL_SOCKET = 408, // "control-socket" + TOKEN_SOCKET_TYPE = 409, // "socket-type" + TOKEN_SOCKET_NAME = 410, // "socket-name" + TOKEN_DHCP_QUEUE_CONTROL = 411, // "dhcp-queue-control" + TOKEN_ENABLE_QUEUE = 412, // "enable-queue" + TOKEN_QUEUE_TYPE = 413, // "queue-type" + TOKEN_CAPACITY = 414, // "capacity" + TOKEN_DHCP_DDNS = 415, // "dhcp-ddns" + TOKEN_ENABLE_UPDATES = 416, // "enable-updates" + TOKEN_QUALIFYING_SUFFIX = 417, // "qualifying-suffix" + TOKEN_SERVER_IP = 418, // "server-ip" + TOKEN_SERVER_PORT = 419, // "server-port" + TOKEN_SENDER_IP = 420, // "sender-ip" + TOKEN_SENDER_PORT = 421, // "sender-port" + TOKEN_MAX_QUEUE_SIZE = 422, // "max-queue-size" + TOKEN_NCR_PROTOCOL = 423, // "ncr-protocol" + TOKEN_NCR_FORMAT = 424, // "ncr-format" + TOKEN_OVERRIDE_NO_UPDATE = 425, // "override-no-update" + TOKEN_OVERRIDE_CLIENT_UPDATE = 426, // "override-client-update" + TOKEN_REPLACE_CLIENT_NAME = 427, // "replace-client-name" + TOKEN_GENERATED_PREFIX = 428, // "generated-prefix" + TOKEN_UDP = 429, // "UDP" + TOKEN_TCP = 430, // "TCP" + TOKEN_JSON = 431, // "JSON" + TOKEN_WHEN_PRESENT = 432, // "when-present" + TOKEN_NEVER = 433, // "never" + TOKEN_ALWAYS = 434, // "always" + TOKEN_WHEN_NOT_PRESENT = 435, // "when-not-present" + TOKEN_HOSTNAME_CHAR_SET = 436, // "hostname-char-set" + TOKEN_HOSTNAME_CHAR_REPLACEMENT = 437, // "hostname-char-replacement" + TOKEN_IP_RESERVATIONS_UNIQUE = 438, // "ip-reservations-unique" + TOKEN_LOGGERS = 439, // "loggers" + TOKEN_OUTPUT_OPTIONS = 440, // "output_options" + TOKEN_OUTPUT = 441, // "output" + TOKEN_DEBUGLEVEL = 442, // "debuglevel" + TOKEN_SEVERITY = 443, // "severity" + TOKEN_FLUSH = 444, // "flush" + TOKEN_MAXSIZE = 445, // "maxsize" + TOKEN_MAXVER = 446, // "maxver" + TOKEN_PATTERN = 447, // "pattern" + TOKEN_COMPATIBILITY = 448, // "compatibility" + TOKEN_LENIENT_OPTION_PARSING = 449, // "lenient-option-parsing" + TOKEN_TOPLEVEL_JSON = 450, // TOPLEVEL_JSON + TOKEN_TOPLEVEL_DHCP6 = 451, // TOPLEVEL_DHCP6 + TOKEN_SUB_DHCP6 = 452, // SUB_DHCP6 + TOKEN_SUB_INTERFACES6 = 453, // SUB_INTERFACES6 + TOKEN_SUB_SUBNET6 = 454, // SUB_SUBNET6 + TOKEN_SUB_POOL6 = 455, // SUB_POOL6 + TOKEN_SUB_PD_POOL = 456, // SUB_PD_POOL + TOKEN_SUB_RESERVATION = 457, // SUB_RESERVATION + TOKEN_SUB_OPTION_DEFS = 458, // SUB_OPTION_DEFS + TOKEN_SUB_OPTION_DEF = 459, // SUB_OPTION_DEF + TOKEN_SUB_OPTION_DATA = 460, // SUB_OPTION_DATA + TOKEN_SUB_HOOKS_LIBRARY = 461, // SUB_HOOKS_LIBRARY + TOKEN_SUB_DHCP_DDNS = 462, // SUB_DHCP_DDNS + TOKEN_SUB_CONFIG_CONTROL = 463, // SUB_CONFIG_CONTROL + TOKEN_STRING = 464, // "constant string" + TOKEN_INTEGER = 465, // "integer" + TOKEN_FLOAT = 466, // "floating point" + TOKEN_BOOLEAN = 467 // "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; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 213, ///< 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_ON_FAIL = 37, // "on-fail" + S_STOP_RETRY_EXIT = 38, // "stop-retry-exit" + S_SERVE_RETRY_EXIT = 39, // "serve-retry-exit" + S_SERVE_RETRY_CONTINUE = 40, // "serve-retry-continue" + S_KEYSPACE = 41, // "keyspace" + S_CONSISTENCY = 42, // "consistency" + S_SERIAL_CONSISTENCY = 43, // "serial-consistency" + S_REQUEST_TIMEOUT = 44, // "request-timeout" + S_TCP_KEEPALIVE = 45, // "tcp-keepalive" + S_TCP_NODELAY = 46, // "tcp-nodelay" + S_MAX_ROW_ERRORS = 47, // "max-row-errors" + S_PREFERRED_LIFETIME = 48, // "preferred-lifetime" + S_MIN_PREFERRED_LIFETIME = 49, // "min-preferred-lifetime" + S_MAX_PREFERRED_LIFETIME = 50, // "max-preferred-lifetime" + S_VALID_LIFETIME = 51, // "valid-lifetime" + S_MIN_VALID_LIFETIME = 52, // "min-valid-lifetime" + S_MAX_VALID_LIFETIME = 53, // "max-valid-lifetime" + S_RENEW_TIMER = 54, // "renew-timer" + S_REBIND_TIMER = 55, // "rebind-timer" + S_CALCULATE_TEE_TIMES = 56, // "calculate-tee-times" + S_T1_PERCENT = 57, // "t1-percent" + S_T2_PERCENT = 58, // "t2-percent" + S_CACHE_THRESHOLD = 59, // "cache-threshold" + S_CACHE_MAX_AGE = 60, // "cache-max-age" + S_DECLINE_PROBATION_PERIOD = 61, // "decline-probation-period" + S_SERVER_TAG = 62, // "server-tag" + S_STATISTIC_DEFAULT_SAMPLE_COUNT = 63, // "statistic-default-sample-count" + S_STATISTIC_DEFAULT_SAMPLE_AGE = 64, // "statistic-default-sample-age" + S_DDNS_SEND_UPDATES = 65, // "ddns-send-updates" + S_DDNS_OVERRIDE_NO_UPDATE = 66, // "ddns-override-no-update" + S_DDNS_OVERRIDE_CLIENT_UPDATE = 67, // "ddns-override-client-update" + S_DDNS_REPLACE_CLIENT_NAME = 68, // "ddns-replace-client-name" + S_DDNS_GENERATED_PREFIX = 69, // "ddns-generated-prefix" + S_DDNS_QUALIFYING_SUFFIX = 70, // "ddns-qualifying-suffix" + S_DDNS_UPDATE_ON_RENEW = 71, // "ddns-update-on-renew" + S_DDNS_USE_CONFLICT_RESOLUTION = 72, // "ddns-use-conflict-resolution" + S_STORE_EXTENDED_INFO = 73, // "store-extended-info" + S_SUBNET6 = 74, // "subnet6" + S_OPTION_DEF = 75, // "option-def" + S_OPTION_DATA = 76, // "option-data" + S_NAME = 77, // "name" + S_DATA = 78, // "data" + S_CODE = 79, // "code" + S_SPACE = 80, // "space" + S_CSV_FORMAT = 81, // "csv-format" + S_ALWAYS_SEND = 82, // "always-send" + S_RECORD_TYPES = 83, // "record-types" + S_ENCAPSULATE = 84, // "encapsulate" + S_ARRAY = 85, // "array" + S_PARKED_PACKET_LIMIT = 86, // "parked-packet-limit" + S_SHARED_NETWORKS = 87, // "shared-networks" + S_POOLS = 88, // "pools" + S_POOL = 89, // "pool" + S_PD_POOLS = 90, // "pd-pools" + S_PREFIX = 91, // "prefix" + S_PREFIX_LEN = 92, // "prefix-len" + S_EXCLUDED_PREFIX = 93, // "excluded-prefix" + S_EXCLUDED_PREFIX_LEN = 94, // "excluded-prefix-len" + S_DELEGATED_LEN = 95, // "delegated-len" + S_USER_CONTEXT = 96, // "user-context" + S_COMMENT = 97, // "comment" + S_SUBNET = 98, // "subnet" + S_INTERFACE = 99, // "interface" + S_INTERFACE_ID = 100, // "interface-id" + S_ID = 101, // "id" + S_RAPID_COMMIT = 102, // "rapid-commit" + S_RESERVATION_MODE = 103, // "reservation-mode" + S_DISABLED = 104, // "disabled" + S_OUT_OF_POOL = 105, // "out-of-pool" + S_GLOBAL = 106, // "global" + S_ALL = 107, // "all" + S_RESERVATIONS_GLOBAL = 108, // "reservations-global" + S_RESERVATIONS_IN_SUBNET = 109, // "reservations-in-subnet" + S_RESERVATIONS_OUT_OF_POOL = 110, // "reservations-out-of-pool" + S_MAC_SOURCES = 111, // "mac-sources" + S_RELAY_SUPPLIED_OPTIONS = 112, // "relay-supplied-options" + S_HOST_RESERVATION_IDENTIFIERS = 113, // "host-reservation-identifiers" + S_SANITY_CHECKS = 114, // "sanity-checks" + S_LEASE_CHECKS = 115, // "lease-checks" + S_CLIENT_CLASSES = 116, // "client-classes" + S_REQUIRE_CLIENT_CLASSES = 117, // "require-client-classes" + S_TEST = 118, // "test" + S_ONLY_IF_REQUIRED = 119, // "only-if-required" + S_CLIENT_CLASS = 120, // "client-class" + S_RESERVATIONS = 121, // "reservations" + S_IP_ADDRESSES = 122, // "ip-addresses" + S_PREFIXES = 123, // "prefixes" + S_DUID = 124, // "duid" + S_HW_ADDRESS = 125, // "hw-address" + S_HOSTNAME = 126, // "hostname" + S_FLEX_ID = 127, // "flex-id" + S_RELAY = 128, // "relay" + S_IP_ADDRESS = 129, // "ip-address" + S_HOOKS_LIBRARIES = 130, // "hooks-libraries" + S_LIBRARY = 131, // "library" + S_PARAMETERS = 132, // "parameters" + S_EXPIRED_LEASES_PROCESSING = 133, // "expired-leases-processing" + S_RECLAIM_TIMER_WAIT_TIME = 134, // "reclaim-timer-wait-time" + S_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 135, // "flush-reclaimed-timer-wait-time" + S_HOLD_RECLAIMED_TIME = 136, // "hold-reclaimed-time" + S_MAX_RECLAIM_LEASES = 137, // "max-reclaim-leases" + S_MAX_RECLAIM_TIME = 138, // "max-reclaim-time" + S_UNWARNED_RECLAIM_CYCLES = 139, // "unwarned-reclaim-cycles" + S_SERVER_ID = 140, // "server-id" + S_LLT = 141, // "LLT" + S_EN = 142, // "EN" + S_LL = 143, // "LL" + S_IDENTIFIER = 144, // "identifier" + S_HTYPE = 145, // "htype" + S_TIME = 146, // "time" + S_ENTERPRISE_ID = 147, // "enterprise-id" + S_DHCP4O6_PORT = 148, // "dhcp4o6-port" + S_DHCP_MULTI_THREADING = 149, // "multi-threading" + S_ENABLE_MULTI_THREADING = 150, // "enable-multi-threading" + S_THREAD_POOL_SIZE = 151, // "thread-pool-size" + S_PACKET_QUEUE_SIZE = 152, // "packet-queue-size" + S_CONTROL_SOCKET = 153, // "control-socket" + S_SOCKET_TYPE = 154, // "socket-type" + S_SOCKET_NAME = 155, // "socket-name" + S_DHCP_QUEUE_CONTROL = 156, // "dhcp-queue-control" + S_ENABLE_QUEUE = 157, // "enable-queue" + S_QUEUE_TYPE = 158, // "queue-type" + S_CAPACITY = 159, // "capacity" + S_DHCP_DDNS = 160, // "dhcp-ddns" + S_ENABLE_UPDATES = 161, // "enable-updates" + S_QUALIFYING_SUFFIX = 162, // "qualifying-suffix" + S_SERVER_IP = 163, // "server-ip" + S_SERVER_PORT = 164, // "server-port" + S_SENDER_IP = 165, // "sender-ip" + S_SENDER_PORT = 166, // "sender-port" + S_MAX_QUEUE_SIZE = 167, // "max-queue-size" + S_NCR_PROTOCOL = 168, // "ncr-protocol" + S_NCR_FORMAT = 169, // "ncr-format" + S_OVERRIDE_NO_UPDATE = 170, // "override-no-update" + S_OVERRIDE_CLIENT_UPDATE = 171, // "override-client-update" + S_REPLACE_CLIENT_NAME = 172, // "replace-client-name" + S_GENERATED_PREFIX = 173, // "generated-prefix" + S_UDP = 174, // "UDP" + S_TCP = 175, // "TCP" + S_JSON = 176, // "JSON" + S_WHEN_PRESENT = 177, // "when-present" + S_NEVER = 178, // "never" + S_ALWAYS = 179, // "always" + S_WHEN_NOT_PRESENT = 180, // "when-not-present" + S_HOSTNAME_CHAR_SET = 181, // "hostname-char-set" + S_HOSTNAME_CHAR_REPLACEMENT = 182, // "hostname-char-replacement" + S_IP_RESERVATIONS_UNIQUE = 183, // "ip-reservations-unique" + S_LOGGERS = 184, // "loggers" + S_OUTPUT_OPTIONS = 185, // "output_options" + S_OUTPUT = 186, // "output" + S_DEBUGLEVEL = 187, // "debuglevel" + S_SEVERITY = 188, // "severity" + S_FLUSH = 189, // "flush" + S_MAXSIZE = 190, // "maxsize" + S_MAXVER = 191, // "maxver" + S_PATTERN = 192, // "pattern" + S_COMPATIBILITY = 193, // "compatibility" + S_LENIENT_OPTION_PARSING = 194, // "lenient-option-parsing" + S_TOPLEVEL_JSON = 195, // TOPLEVEL_JSON + S_TOPLEVEL_DHCP6 = 196, // TOPLEVEL_DHCP6 + S_SUB_DHCP6 = 197, // SUB_DHCP6 + S_SUB_INTERFACES6 = 198, // SUB_INTERFACES6 + S_SUB_SUBNET6 = 199, // SUB_SUBNET6 + S_SUB_POOL6 = 200, // SUB_POOL6 + S_SUB_PD_POOL = 201, // SUB_PD_POOL + S_SUB_RESERVATION = 202, // SUB_RESERVATION + S_SUB_OPTION_DEFS = 203, // SUB_OPTION_DEFS + S_SUB_OPTION_DEF = 204, // SUB_OPTION_DEF + S_SUB_OPTION_DATA = 205, // SUB_OPTION_DATA + S_SUB_HOOKS_LIBRARY = 206, // SUB_HOOKS_LIBRARY + S_SUB_DHCP_DDNS = 207, // SUB_DHCP_DDNS + S_SUB_CONFIG_CONTROL = 208, // SUB_CONFIG_CONTROL + S_STRING = 209, // "constant string" + S_INTEGER = 210, // "integer" + S_FLOAT = 211, // "floating point" + S_BOOLEAN = 212, // "boolean" + S_YYACCEPT = 213, // $accept + S_start = 214, // start + S_215_1 = 215, // $@1 + S_216_2 = 216, // $@2 + S_217_3 = 217, // $@3 + S_218_4 = 218, // $@4 + S_219_5 = 219, // $@5 + S_220_6 = 220, // $@6 + S_221_7 = 221, // $@7 + S_222_8 = 222, // $@8 + S_223_9 = 223, // $@9 + S_224_10 = 224, // $@10 + S_225_11 = 225, // $@11 + S_226_12 = 226, // $@12 + S_227_13 = 227, // $@13 + S_228_14 = 228, // $@14 + S_value = 229, // value + S_sub_json = 230, // sub_json + S_map2 = 231, // map2 + S_232_15 = 232, // $@15 + S_map_value = 233, // map_value + S_map_content = 234, // map_content + S_not_empty_map = 235, // not_empty_map + S_list_generic = 236, // list_generic + S_237_16 = 237, // $@16 + S_list_content = 238, // list_content + S_not_empty_list = 239, // not_empty_list + S_list_strings = 240, // list_strings + S_241_17 = 241, // $@17 + S_list_strings_content = 242, // list_strings_content + S_not_empty_list_strings = 243, // not_empty_list_strings + S_unknown_map_entry = 244, // unknown_map_entry + S_syntax_map = 245, // syntax_map + S_246_18 = 246, // $@18 + S_global_object = 247, // global_object + S_248_19 = 248, // $@19 + S_sub_dhcp6 = 249, // sub_dhcp6 + S_250_20 = 250, // $@20 + S_global_params = 251, // global_params + S_global_param = 252, // global_param + S_data_directory = 253, // data_directory + S_254_21 = 254, // $@21 + S_preferred_lifetime = 255, // preferred_lifetime + S_min_preferred_lifetime = 256, // min_preferred_lifetime + S_max_preferred_lifetime = 257, // max_preferred_lifetime + S_valid_lifetime = 258, // valid_lifetime + S_min_valid_lifetime = 259, // min_valid_lifetime + S_max_valid_lifetime = 260, // max_valid_lifetime + S_renew_timer = 261, // renew_timer + S_rebind_timer = 262, // rebind_timer + S_calculate_tee_times = 263, // calculate_tee_times + S_t1_percent = 264, // t1_percent + S_t2_percent = 265, // t2_percent + S_cache_threshold = 266, // cache_threshold + S_cache_max_age = 267, // cache_max_age + S_decline_probation_period = 268, // decline_probation_period + S_ddns_send_updates = 269, // ddns_send_updates + S_ddns_override_no_update = 270, // ddns_override_no_update + S_ddns_override_client_update = 271, // ddns_override_client_update + S_ddns_replace_client_name = 272, // ddns_replace_client_name + S_273_22 = 273, // $@22 + S_ddns_replace_client_name_value = 274, // ddns_replace_client_name_value + S_ddns_generated_prefix = 275, // ddns_generated_prefix + S_276_23 = 276, // $@23 + S_ddns_qualifying_suffix = 277, // ddns_qualifying_suffix + S_278_24 = 278, // $@24 + S_ddns_update_on_renew = 279, // ddns_update_on_renew + S_ddns_use_conflict_resolution = 280, // ddns_use_conflict_resolution + S_hostname_char_set = 281, // hostname_char_set + S_282_25 = 282, // $@25 + S_hostname_char_replacement = 283, // hostname_char_replacement + S_284_26 = 284, // $@26 + S_store_extended_info = 285, // store_extended_info + S_statistic_default_sample_count = 286, // statistic_default_sample_count + S_statistic_default_sample_age = 287, // statistic_default_sample_age + S_server_tag = 288, // server_tag + S_289_27 = 289, // $@27 + S_parked_packet_limit = 290, // parked_packet_limit + S_ip_reservations_unique = 291, // ip_reservations_unique + S_interfaces_config = 292, // interfaces_config + S_293_28 = 293, // $@28 + S_sub_interfaces6 = 294, // sub_interfaces6 + S_295_29 = 295, // $@29 + S_interfaces_config_params = 296, // interfaces_config_params + S_interfaces_config_param = 297, // interfaces_config_param + S_interfaces_list = 298, // interfaces_list + S_299_30 = 299, // $@30 + S_re_detect = 300, // re_detect + S_lease_database = 301, // lease_database + S_302_31 = 302, // $@31 + S_hosts_database = 303, // hosts_database + S_304_32 = 304, // $@32 + S_hosts_databases = 305, // hosts_databases + S_306_33 = 306, // $@33 + S_database_list = 307, // database_list + S_not_empty_database_list = 308, // not_empty_database_list + S_database = 309, // database + S_310_34 = 310, // $@34 + S_database_map_params = 311, // database_map_params + S_database_map_param = 312, // database_map_param + S_database_type = 313, // database_type + S_314_35 = 314, // $@35 + S_db_type = 315, // db_type + S_user = 316, // user + S_317_36 = 317, // $@36 + S_password = 318, // password + S_319_37 = 319, // $@37 + S_host = 320, // host + S_321_38 = 321, // $@38 + S_port = 322, // port + S_name = 323, // name + S_324_39 = 324, // $@39 + S_persist = 325, // persist + S_lfc_interval = 326, // lfc_interval + S_readonly = 327, // readonly + S_connect_timeout = 328, // connect_timeout + S_reconnect_wait_time = 329, // reconnect_wait_time + S_on_fail = 330, // on_fail + S_331_40 = 331, // $@40 + S_on_fail_mode = 332, // on_fail_mode + S_max_row_errors = 333, // max_row_errors + S_request_timeout = 334, // request_timeout + S_tcp_keepalive = 335, // tcp_keepalive + S_tcp_nodelay = 336, // tcp_nodelay + S_contact_points = 337, // contact_points + S_338_41 = 338, // $@41 + S_max_reconnect_tries = 339, // max_reconnect_tries + S_keyspace = 340, // keyspace + S_341_42 = 341, // $@42 + S_consistency = 342, // consistency + S_343_43 = 343, // $@43 + S_serial_consistency = 344, // serial_consistency + S_345_44 = 345, // $@44 + S_sanity_checks = 346, // sanity_checks + S_347_45 = 347, // $@45 + S_sanity_checks_params = 348, // sanity_checks_params + S_sanity_checks_param = 349, // sanity_checks_param + S_lease_checks = 350, // lease_checks + S_351_46 = 351, // $@46 + S_mac_sources = 352, // mac_sources + S_353_47 = 353, // $@47 + S_mac_sources_list = 354, // mac_sources_list + S_mac_sources_value = 355, // mac_sources_value + S_duid_id = 356, // duid_id + S_string_id = 357, // string_id + S_host_reservation_identifiers = 358, // host_reservation_identifiers + S_359_48 = 359, // $@48 + S_host_reservation_identifiers_list = 360, // host_reservation_identifiers_list + S_host_reservation_identifier = 361, // host_reservation_identifier + S_hw_address_id = 362, // hw_address_id + S_flex_id = 363, // flex_id + S_relay_supplied_options = 364, // relay_supplied_options + S_365_49 = 365, // $@49 + S_dhcp_multi_threading = 366, // dhcp_multi_threading + S_367_50 = 367, // $@50 + S_multi_threading_params = 368, // multi_threading_params + S_multi_threading_param = 369, // multi_threading_param + S_enable_multi_threading = 370, // enable_multi_threading + S_thread_pool_size = 371, // thread_pool_size + S_packet_queue_size = 372, // packet_queue_size + S_hooks_libraries = 373, // hooks_libraries + S_374_51 = 374, // $@51 + S_hooks_libraries_list = 375, // hooks_libraries_list + S_not_empty_hooks_libraries_list = 376, // not_empty_hooks_libraries_list + S_hooks_library = 377, // hooks_library + S_378_52 = 378, // $@52 + S_sub_hooks_library = 379, // sub_hooks_library + S_380_53 = 380, // $@53 + S_hooks_params = 381, // hooks_params + S_hooks_param = 382, // hooks_param + S_library = 383, // library + S_384_54 = 384, // $@54 + S_parameters = 385, // parameters + S_386_55 = 386, // $@55 + S_expired_leases_processing = 387, // expired_leases_processing + S_388_56 = 388, // $@56 + S_expired_leases_params = 389, // expired_leases_params + S_expired_leases_param = 390, // expired_leases_param + S_reclaim_timer_wait_time = 391, // reclaim_timer_wait_time + S_flush_reclaimed_timer_wait_time = 392, // flush_reclaimed_timer_wait_time + S_hold_reclaimed_time = 393, // hold_reclaimed_time + S_max_reclaim_leases = 394, // max_reclaim_leases + S_max_reclaim_time = 395, // max_reclaim_time + S_unwarned_reclaim_cycles = 396, // unwarned_reclaim_cycles + S_subnet6_list = 397, // subnet6_list + S_398_57 = 398, // $@57 + S_subnet6_list_content = 399, // subnet6_list_content + S_not_empty_subnet6_list = 400, // not_empty_subnet6_list + S_subnet6 = 401, // subnet6 + S_402_58 = 402, // $@58 + S_sub_subnet6 = 403, // sub_subnet6 + S_404_59 = 404, // $@59 + S_subnet6_params = 405, // subnet6_params + S_subnet6_param = 406, // subnet6_param + S_subnet = 407, // subnet + S_408_60 = 408, // $@60 + S_interface = 409, // interface + S_410_61 = 410, // $@61 + S_interface_id = 411, // interface_id + S_412_62 = 412, // $@62 + S_client_class = 413, // client_class + S_414_63 = 414, // $@63 + S_require_client_classes = 415, // require_client_classes + S_416_64 = 416, // $@64 + S_reservations_global = 417, // reservations_global + S_reservations_in_subnet = 418, // reservations_in_subnet + S_reservations_out_of_pool = 419, // reservations_out_of_pool + S_reservation_mode = 420, // reservation_mode + S_421_65 = 421, // $@65 + S_hr_mode = 422, // hr_mode + S_id = 423, // id + S_rapid_commit = 424, // rapid_commit + S_shared_networks = 425, // shared_networks + S_426_66 = 426, // $@66 + S_shared_networks_content = 427, // shared_networks_content + S_shared_networks_list = 428, // shared_networks_list + S_shared_network = 429, // shared_network + S_430_67 = 430, // $@67 + S_shared_network_params = 431, // shared_network_params + S_shared_network_param = 432, // shared_network_param + S_option_def_list = 433, // option_def_list + S_434_68 = 434, // $@68 + S_sub_option_def_list = 435, // sub_option_def_list + S_436_69 = 436, // $@69 + S_option_def_list_content = 437, // option_def_list_content + S_not_empty_option_def_list = 438, // not_empty_option_def_list + S_option_def_entry = 439, // option_def_entry + S_440_70 = 440, // $@70 + S_sub_option_def = 441, // sub_option_def + S_442_71 = 442, // $@71 + S_option_def_params = 443, // option_def_params + S_not_empty_option_def_params = 444, // not_empty_option_def_params + S_option_def_param = 445, // option_def_param + S_option_def_name = 446, // option_def_name + S_code = 447, // code + S_option_def_code = 448, // option_def_code + S_option_def_type = 449, // option_def_type + S_450_72 = 450, // $@72 + S_option_def_record_types = 451, // option_def_record_types + S_452_73 = 452, // $@73 + S_space = 453, // space + S_454_74 = 454, // $@74 + S_option_def_space = 455, // option_def_space + S_option_def_encapsulate = 456, // option_def_encapsulate + S_457_75 = 457, // $@75 + S_option_def_array = 458, // option_def_array + S_option_data_list = 459, // option_data_list + S_460_76 = 460, // $@76 + S_option_data_list_content = 461, // option_data_list_content + S_not_empty_option_data_list = 462, // not_empty_option_data_list + S_option_data_entry = 463, // option_data_entry + S_464_77 = 464, // $@77 + S_sub_option_data = 465, // sub_option_data + S_466_78 = 466, // $@78 + S_option_data_params = 467, // option_data_params + S_not_empty_option_data_params = 468, // not_empty_option_data_params + S_option_data_param = 469, // option_data_param + S_option_data_name = 470, // option_data_name + S_option_data_data = 471, // option_data_data + S_472_79 = 472, // $@79 + S_option_data_code = 473, // option_data_code + S_option_data_space = 474, // option_data_space + S_option_data_csv_format = 475, // option_data_csv_format + S_option_data_always_send = 476, // option_data_always_send + S_pools_list = 477, // pools_list + S_478_80 = 478, // $@80 + S_pools_list_content = 479, // pools_list_content + S_not_empty_pools_list = 480, // not_empty_pools_list + S_pool_list_entry = 481, // pool_list_entry + S_482_81 = 482, // $@81 + S_sub_pool6 = 483, // sub_pool6 + S_484_82 = 484, // $@82 + S_pool_params = 485, // pool_params + S_pool_param = 486, // pool_param + S_pool_entry = 487, // pool_entry + S_488_83 = 488, // $@83 + S_user_context = 489, // user_context + S_490_84 = 490, // $@84 + S_comment = 491, // comment + S_492_85 = 492, // $@85 + S_pd_pools_list = 493, // pd_pools_list + S_494_86 = 494, // $@86 + S_pd_pools_list_content = 495, // pd_pools_list_content + S_not_empty_pd_pools_list = 496, // not_empty_pd_pools_list + S_pd_pool_entry = 497, // pd_pool_entry + S_498_87 = 498, // $@87 + S_sub_pd_pool = 499, // sub_pd_pool + S_500_88 = 500, // $@88 + S_pd_pool_params = 501, // pd_pool_params + S_pd_pool_param = 502, // pd_pool_param + S_pd_prefix = 503, // pd_prefix + S_504_89 = 504, // $@89 + S_pd_prefix_len = 505, // pd_prefix_len + S_excluded_prefix = 506, // excluded_prefix + S_507_90 = 507, // $@90 + S_excluded_prefix_len = 508, // excluded_prefix_len + S_pd_delegated_len = 509, // pd_delegated_len + S_reservations = 510, // reservations + S_511_91 = 511, // $@91 + S_reservations_list = 512, // reservations_list + S_not_empty_reservations_list = 513, // not_empty_reservations_list + S_reservation = 514, // reservation + S_515_92 = 515, // $@92 + S_sub_reservation = 516, // sub_reservation + S_517_93 = 517, // $@93 + S_reservation_params = 518, // reservation_params + S_not_empty_reservation_params = 519, // not_empty_reservation_params + S_reservation_param = 520, // reservation_param + S_ip_addresses = 521, // ip_addresses + S_522_94 = 522, // $@94 + S_prefixes = 523, // prefixes + S_524_95 = 524, // $@95 + S_duid = 525, // duid + S_526_96 = 526, // $@96 + S_hw_address = 527, // hw_address + S_528_97 = 528, // $@97 + S_hostname = 529, // hostname + S_530_98 = 530, // $@98 + S_flex_id_value = 531, // flex_id_value + S_532_99 = 532, // $@99 + S_reservation_client_classes = 533, // reservation_client_classes + S_534_100 = 534, // $@100 + S_relay = 535, // relay + S_536_101 = 536, // $@101 + S_relay_map = 537, // relay_map + S_ip_address = 538, // ip_address + S_539_102 = 539, // $@102 + S_client_classes = 540, // client_classes + S_541_103 = 541, // $@103 + S_client_classes_list = 542, // client_classes_list + S_client_class_entry = 543, // client_class_entry + S_544_104 = 544, // $@104 + S_client_class_params = 545, // client_class_params + S_not_empty_client_class_params = 546, // not_empty_client_class_params + S_client_class_param = 547, // client_class_param + S_client_class_name = 548, // client_class_name + S_client_class_test = 549, // client_class_test + S_550_105 = 550, // $@105 + S_only_if_required = 551, // only_if_required + S_server_id = 552, // server_id + S_553_106 = 553, // $@106 + S_server_id_params = 554, // server_id_params + S_server_id_param = 555, // server_id_param + S_server_id_type = 556, // server_id_type + S_557_107 = 557, // $@107 + S_duid_type = 558, // duid_type + S_htype = 559, // htype + S_identifier = 560, // identifier + S_561_108 = 561, // $@108 + S_time = 562, // time + S_enterprise_id = 563, // enterprise_id + S_dhcp4o6_port = 564, // dhcp4o6_port + S_control_socket = 565, // control_socket + S_566_109 = 566, // $@109 + S_control_socket_params = 567, // control_socket_params + S_control_socket_param = 568, // control_socket_param + S_socket_type = 569, // socket_type + S_570_110 = 570, // $@110 + S_socket_name = 571, // socket_name + S_572_111 = 572, // $@111 + S_dhcp_queue_control = 573, // dhcp_queue_control + S_574_112 = 574, // $@112 + S_queue_control_params = 575, // queue_control_params + S_queue_control_param = 576, // queue_control_param + S_enable_queue = 577, // enable_queue + S_queue_type = 578, // queue_type + S_579_113 = 579, // $@113 + S_capacity = 580, // capacity + S_arbitrary_map_entry = 581, // arbitrary_map_entry + S_582_114 = 582, // $@114 + S_dhcp_ddns = 583, // dhcp_ddns + S_584_115 = 584, // $@115 + S_sub_dhcp_ddns = 585, // sub_dhcp_ddns + S_586_116 = 586, // $@116 + S_dhcp_ddns_params = 587, // dhcp_ddns_params + S_dhcp_ddns_param = 588, // dhcp_ddns_param + S_enable_updates = 589, // enable_updates + S_dep_qualifying_suffix = 590, // dep_qualifying_suffix + S_591_117 = 591, // $@117 + S_server_ip = 592, // server_ip + S_593_118 = 593, // $@118 + S_server_port = 594, // server_port + S_sender_ip = 595, // sender_ip + S_596_119 = 596, // $@119 + S_sender_port = 597, // sender_port + S_max_queue_size = 598, // max_queue_size + S_ncr_protocol = 599, // ncr_protocol + S_600_120 = 600, // $@120 + S_ncr_protocol_value = 601, // ncr_protocol_value + S_ncr_format = 602, // ncr_format + S_603_121 = 603, // $@121 + S_dep_override_no_update = 604, // dep_override_no_update + S_dep_override_client_update = 605, // dep_override_client_update + S_dep_replace_client_name = 606, // dep_replace_client_name + S_607_122 = 607, // $@122 + S_dep_generated_prefix = 608, // dep_generated_prefix + S_609_123 = 609, // $@123 + S_dep_hostname_char_set = 610, // dep_hostname_char_set + S_611_124 = 611, // $@124 + S_dep_hostname_char_replacement = 612, // dep_hostname_char_replacement + S_613_125 = 613, // $@125 + S_config_control = 614, // config_control + S_615_126 = 615, // $@126 + S_sub_config_control = 616, // sub_config_control + S_617_127 = 617, // $@127 + S_config_control_params = 618, // config_control_params + S_config_control_param = 619, // config_control_param + S_config_databases = 620, // config_databases + S_621_128 = 621, // $@128 + S_config_fetch_wait_time = 622, // config_fetch_wait_time + S_loggers = 623, // loggers + S_624_129 = 624, // $@129 + S_loggers_entries = 625, // loggers_entries + S_logger_entry = 626, // logger_entry + S_627_130 = 627, // $@130 + S_logger_params = 628, // logger_params + S_logger_param = 629, // logger_param + S_debuglevel = 630, // debuglevel + S_severity = 631, // severity + S_632_131 = 632, // $@131 + S_output_options_list = 633, // output_options_list + S_634_132 = 634, // $@132 + S_output_options_list_content = 635, // output_options_list_content + S_output_entry = 636, // output_entry + S_637_133 = 637, // $@133 + S_output_params_list = 638, // output_params_list + S_output_params = 639, // output_params + S_output = 640, // output + S_641_134 = 641, // $@134 + S_flush = 642, // flush + S_maxsize = 643, // maxsize + S_maxver = 644, // maxver + S_pattern = 645, // pattern + S_646_135 = 646, // $@135 + S_compatibility = 647, // compatibility + S_648_136 = 648, // $@136 + S_compatibility_params = 649, // compatibility_params + S_compatibility_param = 650, // compatibility_param + S_lenient_option_parsing = 651 // lenient_option_parsing + }; + }; - /// 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 @@ -697,13 +1395,51 @@ 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 symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value + value.move< ElementPtr > (std::move (that.value)); + break; + + case symbol_kind::S_BOOLEAN: // "boolean" + value.move< bool > (std::move (that.value)); + break; + + case symbol_kind::S_FLOAT: // "floating point" + value.move< double > (std::move (that.value)); + break; + + case symbol_kind::S_INTEGER: // "integer" + value.move< int64_t > (std::move (that.value)); + break; + + case symbol_kind::S_STRING: // "constant string" + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } #endif /// Copy constructor. basic_symbol (const basic_symbol& that); - /// Constructor for valueless symbols, and symbols from each type. + /// Constructors for typed symbols. #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) @@ -715,6 +1451,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) @@ -728,6 +1465,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) @@ -741,6 +1479,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) : Base (t) @@ -754,6 +1493,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) : Base (t) @@ -767,6 +1507,7 @@ namespace isc { namespace dhcp { , location (l) {} #endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) : Base (t) @@ -788,45 +1529,45 @@ namespace isc { namespace dhcp { } /// Destroy contents, and record that is empty. - void clear () + void clear () YY_NOEXCEPT { // 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 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.template destroy< ElementPtr > (); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.template destroy< bool > (); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.template destroy< double > (); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< int64_t > (); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.template destroy< std::string > (); break; @@ -837,6 +1578,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; @@ -857,49 +1607,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 (); + void clear () YY_NOEXCEPT; - /// 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; - /// The token. - token_type token () 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,74 +1660,67 @@ switch (yytype) #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) - { - YYASSERT (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_ON_FAIL || tok == token::TOKEN_STOP_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_CONTINUE || 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_CACHE_THRESHOLD || tok == token::TOKEN_CACHE_MAX_AGE || 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_DDNS_UPDATE_ON_RENEW || tok == token::TOKEN_DDNS_USE_CONFLICT_RESOLUTION || 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_PARKED_PACKET_LIMIT || tok == token::TOKEN_SHARED_NETWORKS || 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_RESERVATIONS_GLOBAL || tok == token::TOKEN_RESERVATIONS_IN_SUBNET || tok == token::TOKEN_RESERVATIONS_OUT_OF_POOL || 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_IP_RESERVATIONS_UNIQUE || 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_COMPATIBILITY || tok == token::TOKEN_LENIENT_OPTION_PARSING || 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_CONFIG_CONTROL); - } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) +#endif { - YYASSERT (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_ON_FAIL || tok == token::TOKEN_STOP_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_EXIT || tok == token::TOKEN_SERVE_RETRY_CONTINUE || 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_CACHE_THRESHOLD || tok == token::TOKEN_CACHE_MAX_AGE || 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_DDNS_UPDATE_ON_RENEW || tok == token::TOKEN_DDNS_USE_CONFLICT_RESOLUTION || 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_PARKED_PACKET_LIMIT || tok == token::TOKEN_SHARED_NETWORKS || 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_RESERVATIONS_GLOBAL || tok == token::TOKEN_RESERVATIONS_IN_SUBNET || tok == token::TOKEN_RESERVATIONS_OUT_OF_POOL || 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_IP_RESERVATIONS_UNIQUE || 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_COMPATIBILITY || tok == token::TOKEN_LENIENT_OPTION_PARSING || 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_CONFIG_CONTROL); + PARSER6__ASSERT (tok == token::TOKEN_END + || (token::TOKEN_PARSER6_error <= tok && tok <= token::TOKEN_SUB_CONFIG_CONTROL)); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, bool v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_BOOLEAN); - } #else symbol_type (int tok, const bool& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_BOOLEAN); + PARSER6__ASSERT (tok == token::TOKEN_BOOLEAN); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, double v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_FLOAT); - } #else symbol_type (int tok, const double& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_FLOAT); + PARSER6__ASSERT (tok == token::TOKEN_FLOAT); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, int64_t v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_INTEGER); - } #else symbol_type (int tok, const int64_t& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_INTEGER); + PARSER6__ASSERT (tok == token::TOKEN_INTEGER); } -#endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, std::string v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) - { - YYASSERT (tok == token::TOKEN_STRING); - } #else symbol_type (int tok, const std::string& v, const location_type& l) : super_type(token_type (tok), v, l) +#endif { - YYASSERT (tok == token::TOKEN_STRING); + PARSER6__ASSERT (tok == token::TOKEN_STRING); } -#endif }; /// Build a parser object. 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() (); @@ -1006,6 +1751,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 @@ -1022,6 +1771,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 @@ -4174,24 +4953,47 @@ switch (yytype) #endif + class context + { + public: + context (const Dhcp6Parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; } + symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); } + const location_type& location () const YY_NOEXCEPT { 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 - /// State numbers. - typedef int 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; + /// Stored state numbers (used for stacks). + typedef short state_type; + + /// 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 - state_type yy_lr_goto_state_ (state_type yystate, int yysym); + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); /// Whether the given \c yypact_ value indicates a defaulted state. /// \param yyvalue the value to check @@ -4204,63 +5006,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. - static token_number_type yytranslate_ (token_type t); + /// 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 symbol_kind_type yytranslate_ (int t); - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const short yypact_[]; + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); - // YYDEFACT[STATE-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 short yydefact_[]; + /// For a symbol, its name in clear. + static const char* const yytname_[]; - // YYPGOTO[NTERM-NUM]. - static const short yypgoto_[]; - // YYDEFGOTO[NTERM-NUM]. - static const short yydefgoto_[]; + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; - // YYTABLE[YYPACT[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 short yytable_[]; + // YYDEFACT[STATE-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_[]; - static const short yycheck_[]; + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing - // symbol of state STATE-NUM. - static const unsigned short yystos_[]; + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. - static const unsigned short yyr1_[]; + // YYTABLE[YYPACT[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_[]; - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. - static const unsigned char yyr2_[]; + static const short yycheck_[]; + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const short yystos_[]; - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); + // YYR1[YYN] -- 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. + static const signed char yyr2_[]; - /// 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. - static const unsigned short yyrline_[]; + // YYRLINE[YYN] -- 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 @@ -4281,7 +5086,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. @@ -4293,15 +5098,16 @@ 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 symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. - enum { empty_state = -1 }; + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; /// The state. /// \a empty when empty. @@ -4323,6 +5129,10 @@ switch (yytype) /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; @@ -4332,48 +5142,38 @@ 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; stack (size_type n = 200) : seq_ (n) {} - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (size_type i) - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (int i) - { - return operator[] (size_type (i)); - } +#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. const T& - operator[] (size_type i) const + operator[] (index_type i) const { - return seq_[size () - 1 - i]; + return seq_[size_type (size () - 1 - i)]; } /// Random access. /// /// Index 0 returns the topmost element. - const T& - operator[] (int i) const + T& + operator[] (index_type i) { - return operator[] (size_type (i)); + return seq_[size_type (size () - 1 - i)]; } /// Steal the contents of \a t. @@ -4388,7 +5188,7 @@ switch (yytype) /// Pop elements from the stack. void - pop (int n = 1) YY_NOEXCEPT + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT { for (; 0 < n; --n) seq_.pop_back (); @@ -4402,49 +5202,53 @@ switch (yytype) } /// Number of elements on the stack. - size_type + index_type size () const YY_NOEXCEPT { - return seq_.size (); + return index_type (seq_.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. class slice { public: - slice (const stack& stack, int range) + slice (const stack& stack, index_type range) : stack_ (stack) , range_ (range) {} const T& - operator[] (int i) const + operator[] (index_type i) const { return stack_[range_ - i]; } private: const stack& stack_; - int range_; + index_type range_; }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; @@ -4477,28 +5281,25 @@ switch (yytype) /// Constants. enum { - yyeof_ = 0, yylast_ = 1318, ///< Last index in yytable_. yynnts_ = 439, ///< Number of nonterminal symbols. - yyfinal_ = 30, ///< Termination state number. - yyterror_ = 1, - yyerrcode_ = 256, - yyntokens_ = 213 ///< Number of tokens. + yyfinal_ = 30 ///< Termination state number. }; // User arguments. isc::dhcp::Parser6Context& ctx; + }; inline - Dhcp6Parser::token_number_type - Dhcp6Parser::yytranslate_ (token_type t) + 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, @@ -4549,93 +5350,50 @@ switch (yytype) 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212 }; - const unsigned user_token_number_max_ = 467; - const token_number_type undef_token_ = 2; + // Last valid token kind. + const int code_max = 467; - if (static_cast (t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return YY_CAST (symbol_kind_type, translate_table[t]); else - return 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 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value - value.move< ElementPtr > (std::move (that.value)); - break; - - case 212: // "boolean" - value.move< bool > (std::move (that.value)); - break; - - case 211: // "floating point" - value.move< double > (std::move (that.value)); - break; - - case 210: // "integer" - value.move< int64_t > (std::move (that.value)); - break; - - case 209: // "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 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.copy< ElementPtr > (YY_MOVE (that.value)); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.copy< bool > (YY_MOVE (that.value)); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.copy< double > (YY_MOVE (that.value)); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.copy< int64_t > (YY_MOVE (that.value)); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -4647,11 +5405,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 @@ -4659,32 +5424,32 @@ switch (yytype) Dhcp6Parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); - switch (this->type_get ()) + switch (this->kind ()) { - case 229: // value - case 233: // map_value - case 274: // ddns_replace_client_name_value - case 315: // db_type - case 332: // on_fail_mode - case 422: // hr_mode - case 558: // duid_type - case 601: // ncr_protocol_value + case symbol_kind::S_value: // value + case symbol_kind::S_map_value: // map_value + case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value + case symbol_kind::S_db_type: // db_type + case symbol_kind::S_on_fail_mode: // on_fail_mode + case symbol_kind::S_hr_mode: // hr_mode + case symbol_kind::S_duid_type: // duid_type + case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value value.move< ElementPtr > (YY_MOVE (s.value)); break; - case 212: // "boolean" + case symbol_kind::S_BOOLEAN: // "boolean" value.move< bool > (YY_MOVE (s.value)); break; - case 211: // "floating point" + case symbol_kind::S_FLOAT: // "floating point" value.move< double > (YY_MOVE (s.value)); break; - case 210: // "integer" + case symbol_kind::S_INTEGER: // "integer" value.move< int64_t > (YY_MOVE (s.value)); break; - case 209: // "constant string" + case symbol_kind::S_STRING: // "constant string" value.move< std::string > (YY_MOVE (s.value)); break; @@ -4695,92 +5460,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 () YY_NOEXCEPT { - 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 type; + return kind_; } inline - Dhcp6Parser::token_type - Dhcp6Parser::by_type::token () const YY_NOEXCEPT + Dhcp6Parser::symbol_kind_type + Dhcp6Parser::by_kind::type_get () const YY_NOEXCEPT { - // YYTOKNUM[NUM] -- (External) token number corresponding to the - // (internal) symbol number NUM (which must be that of a token). */ - static - const unsigned short - yytoken_number_[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467 - }; - return token_type (yytoken_number_[type]); + return this->kind (); } -#line 14 "dhcp6_parser.yy" // lalr1.cc:401 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 4784 "dhcp6_parser.h" // lalr1.cc:401 +#line 5520 "dhcp6_parser.h" diff --git a/src/bin/dhcp6/location.hh b/src/bin/dhcp6/location.hh index d551b34a38..e8036de559 100644 --- a/src/bin/dhcp6/location.hh +++ b/src/bin/dhcp6/location.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.3.1. +// A Bison parser, made by GNU Bison 3.7.6. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work @@ -38,7 +38,6 @@ #ifndef YY_PARSER6_LOCATION_HH_INCLUDED # define YY_PARSER6_LOCATION_HH_INCLUDED -# include // std::max # include # include @@ -54,17 +53,23 @@ # endif # endif -#line 14 "dhcp6_parser.yy" // location.cc:339 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 60 "location.hh" // location.cc:339 +#line 59 "location.hh" + /// A point in a source file. class position { public: + /// Type for file name. + typedef const std::string filename_type; + /// Type for line and column numbers. + typedef int counter_type; + /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + explicit position (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) : filename (f) , line (l) , column (c) @@ -72,9 +77,9 @@ namespace isc { namespace dhcp { /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* fn = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { filename = fn; line = l; @@ -84,41 +89,40 @@ namespace isc { namespace dhcp { /** \name Line and Column related manipulators ** \{ */ /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { if (count) { - column = 1u; + column = 1; line = add_ (line, count, 1); } } /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { column = add_ (column, count, 1); } /** \} */ /// File name to which this position refers. - std::string* filename; + filename_type* filename; /// Current line number. - unsigned line; + counter_type line; /// Current column number. - unsigned column; + counter_type column; private: /// Compute max (min, lhs+rhs). - static unsigned add_ (unsigned lhs, int rhs, int min) + static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min) { - return static_cast (std::max (min, - static_cast (lhs) + rhs)); + return lhs + rhs < min ? min : lhs + rhs; } }; /// Add \a width columns, in place. inline position& - operator+= (position& res, int width) + operator+= (position& res, position::counter_type width) { res.columns (width); return res; @@ -126,43 +130,25 @@ namespace isc { namespace dhcp { /// Add \a width columns. inline position - operator+ (position res, int width) + operator+ (position res, position::counter_type width) { return res += width; } /// Subtract \a width columns, in place. inline position& - operator-= (position& res, int width) + operator-= (position& res, position::counter_type width) { return res += -width; } /// Subtract \a width columns. inline position - operator- (position res, int width) + operator- (position res, position::counter_type width) { return res -= width; } - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param pos a reference to the position to redirect @@ -180,6 +166,10 @@ namespace isc { namespace dhcp { class location { public: + /// Type for file name. + typedef position::filename_type filename_type; + /// Type for line and column numbers. + typedef position::counter_type counter_type; /// Construct a location from \a b to \a e. location (const position& b, const position& e) @@ -194,18 +184,18 @@ namespace isc { namespace dhcp { {} /// Construct a 0-width location in \a f, \a l, \a c. - explicit location (std::string* f, - unsigned l = 1u, - unsigned c = 1u) + explicit location (filename_type* f, + counter_type l = 1, + counter_type c = 1) : begin (f, l, c) , end (f, l, c) {} /// Initialization. - void initialize (std::string* f = YY_NULLPTR, - unsigned l = 1u, - unsigned c = 1u) + void initialize (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) { begin.initialize (f, l, c); end = begin; @@ -221,13 +211,13 @@ namespace isc { namespace dhcp { } /// Extend the current location to the COUNT next columns. - void columns (int count = 1) + void columns (counter_type count = 1) { end += count; } /// Extend the current location to the COUNT next lines. - void lines (int count = 1) + void lines (counter_type count = 1) { end.lines (count); } @@ -242,57 +232,49 @@ namespace isc { namespace dhcp { }; /// Join two locations, in place. - inline location& operator+= (location& res, const location& end) + inline location& + operator+= (location& res, const location& end) { res.end = end.end; return res; } /// Join two locations. - inline location operator+ (location res, const location& end) + inline location + operator+ (location res, const location& end) { return res += end; } /// Add \a width columns to the end position, in place. - inline location& operator+= (location& res, int width) + inline location& + operator+= (location& res, location::counter_type width) { res.columns (width); return res; } /// Add \a width columns to the end position. - inline location operator+ (location res, int width) + inline location + operator+ (location res, location::counter_type width) { return res += width; } /// Subtract \a width columns to the end position, in place. - inline location& operator-= (location& res, int width) + inline location& + operator-= (location& res, location::counter_type width) { return res += -width; } /// Subtract \a width columns to the end position. - inline location operator- (location res, int width) + inline location + operator- (location res, location::counter_type width) { return res -= width; } - /// Compare two location objects. - inline bool - operator== (const location& loc1, const location& loc2) - { - return loc1.begin == loc2.begin && loc1.end == loc2.end; - } - - /// Compare two location objects. - inline bool - operator!= (const location& loc1, const location& loc2) - { - return !(loc1 == loc2); - } - /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param loc a reference to the location to redirect @@ -303,7 +285,8 @@ namespace isc { namespace dhcp { std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + location::counter_type end_col + = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -316,7 +299,8 @@ namespace isc { namespace dhcp { return ostr; } -#line 14 "dhcp6_parser.yy" // location.cc:339 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 322 "location.hh" // location.cc:339 +#line 305 "location.hh" + #endif // !YY_PARSER6_LOCATION_HH_INCLUDED