-// A Bison parser, made by GNU Bison 3.0.5.
+// A Bison parser, made by GNU Bison 3.0.4.
// Skeleton implementation for Bison LALR(1) parsers in C++
-// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015 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
// First part of user declarations.
-#line 39 "agent_parser.cc" // lalr1.cc:406
+#line 39 "agent_parser.cc" // lalr1.cc:404
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
// User implementation prologue.
-#line 53 "agent_parser.cc" // lalr1.cc:414
+#line 53 "agent_parser.cc" // lalr1.cc:412
// Unqualified %code blocks.
-#line 33 "agent_parser.yy" // lalr1.cc:415
+#line 33 "agent_parser.yy" // lalr1.cc:413
#include <agent/parser_context.h>
-#line 59 "agent_parser.cc" // lalr1.cc:415
+#line 59 "agent_parser.cc" // lalr1.cc:413
#ifndef YY_
{ \
*yycdebug_ << Title << ' '; \
yy_print_ (*yycdebug_, Symbol); \
- *yycdebug_ << '\n'; \
+ *yycdebug_ << std::endl; \
} \
} while (false)
#else // !AGENT_DEBUG
# define YYCDEBUG if (false) std::cerr
-# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
-# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
-# define YY_STACK_PRINT() static_cast<void> (0)
+# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
+# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
+# define YY_STACK_PRINT() static_cast<void>(0)
#endif // !AGENT_DEBUG
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
-#line 14 "agent_parser.yy" // lalr1.cc:481
+#line 14 "agent_parser.yy" // lalr1.cc:479
namespace isc { namespace agent {
-#line 145 "agent_parser.cc" // lalr1.cc:481
+#line 145 "agent_parser.cc" // lalr1.cc:479
/* Return YYSTR after stripping away unnecessary quotes and
backslashes, so that it's suitable for yyerror. The heuristic is
// by_state.
+ inline
AgentParser::by_state::by_state ()
: state (empty_state)
{}
+ inline
AgentParser::by_state::by_state (const by_state& other)
: state (other.state)
{}
+ inline
void
AgentParser::by_state::clear ()
{
state = empty_state;
}
+ inline
void
AgentParser::by_state::move (by_state& that)
{
that.clear ();
}
+ inline
AgentParser::by_state::by_state (state_type s)
: state (s)
{}
+ inline
AgentParser::symbol_number_type
AgentParser::by_state::type_get () const
{
return yystos_[state];
}
+ inline
AgentParser::stack_symbol_type::stack_symbol_type ()
{}
- AgentParser::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
- : super_type (that.state, that.location)
- {
- switch (that.type_get ())
- {
- case 53: // value
- case 56: // map_value
- case 107: // socket_type_value
- value.copy< ElementPtr > (that.value);
- break;
-
- case 44: // "boolean"
- value.copy< bool > (that.value);
- break;
-
- case 43: // "floating point"
- value.copy< double > (that.value);
- break;
-
- case 42: // "integer"
- value.copy< int64_t > (that.value);
- break;
-
- case 41: // "constant string"
- value.copy< std::string > (that.value);
- break;
-
- default:
- break;
- }
-
- }
+ inline
AgentParser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
: super_type (s, that.location)
{
- switch (that.type_get ())
+ switch (that.type_get ())
{
case 53: // value
case 56: // map_value
that.type = empty_symbol;
}
+ inline
AgentParser::stack_symbol_type&
AgentParser::stack_symbol_type::operator= (const stack_symbol_type& that)
{
state = that.state;
- switch (that.type_get ())
+ switch (that.type_get ())
{
case 53: // value
case 56: // map_value
template <typename Base>
+ inline
void
AgentParser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
{
{
case 41: // "constant string"
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< std::string > (); }
-#line 378 "agent_parser.cc" // lalr1.cc:635
+#line 356 "agent_parser.cc" // lalr1.cc:636
break;
case 42: // "integer"
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< int64_t > (); }
-#line 385 "agent_parser.cc" // lalr1.cc:635
+#line 363 "agent_parser.cc" // lalr1.cc:636
break;
case 43: // "floating point"
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< double > (); }
-#line 392 "agent_parser.cc" // lalr1.cc:635
+#line 370 "agent_parser.cc" // lalr1.cc:636
break;
case 44: // "boolean"
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< bool > (); }
-#line 399 "agent_parser.cc" // lalr1.cc:635
+#line 377 "agent_parser.cc" // lalr1.cc:636
break;
case 53: // value
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 406 "agent_parser.cc" // lalr1.cc:635
+#line 384 "agent_parser.cc" // lalr1.cc:636
break;
case 56: // map_value
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 413 "agent_parser.cc" // lalr1.cc:635
+#line 391 "agent_parser.cc" // lalr1.cc:636
break;
case 107: // socket_type_value
-#line 103 "agent_parser.yy" // lalr1.cc:635
+#line 103 "agent_parser.yy" // lalr1.cc:636
{ yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 420 "agent_parser.cc" // lalr1.cc:635
+#line 398 "agent_parser.cc" // lalr1.cc:636
break;
}
#endif
+ inline
void
AgentParser::yypush_ (const char* m, state_type s, symbol_type& sym)
{
yypush_ (m, t);
}
+ inline
void
AgentParser::yypush_ (const char* m, stack_symbol_type& s)
{
yystack_.push (s);
}
+ inline
void
- AgentParser::yypop_ (unsigned n)
+ AgentParser::yypop_ (unsigned int n)
{
yystack_.pop (n);
}
}
#endif // AGENT_DEBUG
- AgentParser::state_type
+ inline AgentParser::state_type
AgentParser::yy_lr_goto_state_ (state_type yystate, int yysym)
{
int yyr = yypgoto_[yysym - yyntokens_] + yystate;
return yydefgoto_[yysym - yyntokens_];
}
- bool
+ inline bool
AgentParser::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
- bool
+ inline bool
AgentParser::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
// avoid gratuitous conflicts when merging into the master branch.
try
{
- YYCDEBUG << "Starting parse\n";
+ YYCDEBUG << "Starting parse" << std::endl;
/* Initialize the stack. The initial state will be set in
// A new symbol was pushed on the stack.
yynewstate:
- YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
+ YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;
// Accept?
if (yystack_[0].state == yyfinal_)
yylen = yyr2_[yyn];
{
stack_symbol_type yylhs;
- yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
+ yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);
/* Variants are always initialized to an empty instance of the
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
- switch (yyr1_[yyn])
+ switch (yyr1_[yyn])
{
case 53: // value
case 56: // map_value
}
- // Default location.
+ // Compute the default @$.
{
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
- yyerror_range[1].location = yylhs.location;
}
// Perform the reduction.
switch (yyn)
{
case 2:
-#line 114 "agent_parser.yy" // lalr1.cc:856
+#line 114 "agent_parser.yy" // lalr1.cc:859
{ ctx.ctx_ = ctx.NO_KEYWORDS; }
-#line 660 "agent_parser.cc" // lalr1.cc:856
+#line 640 "agent_parser.cc" // lalr1.cc:859
break;
case 4:
-#line 115 "agent_parser.yy" // lalr1.cc:856
+#line 115 "agent_parser.yy" // lalr1.cc:859
{ ctx.ctx_ = ctx.CONFIG; }
-#line 666 "agent_parser.cc" // lalr1.cc:856
+#line 646 "agent_parser.cc" // lalr1.cc:859
break;
case 6:
-#line 116 "agent_parser.yy" // lalr1.cc:856
+#line 116 "agent_parser.yy" // lalr1.cc:859
{ ctx.ctx_ = ctx.AGENT; }
-#line 672 "agent_parser.cc" // lalr1.cc:856
+#line 652 "agent_parser.cc" // lalr1.cc:859
break;
case 8:
-#line 124 "agent_parser.yy" // lalr1.cc:856
+#line 124 "agent_parser.yy" // lalr1.cc:859
{
// Parse the Control-agent map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 682 "agent_parser.cc" // lalr1.cc:856
+#line 662 "agent_parser.cc" // lalr1.cc:859
break;
case 9:
-#line 128 "agent_parser.yy" // lalr1.cc:856
+#line 128 "agent_parser.yy" // lalr1.cc:859
{
// parsing completed
}
-#line 690 "agent_parser.cc" // lalr1.cc:856
+#line 670 "agent_parser.cc" // lalr1.cc:859
break;
case 10:
-#line 135 "agent_parser.yy" // lalr1.cc:856
+#line 135 "agent_parser.yy" // lalr1.cc:859
{
// Push back the JSON value on the stack
ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
}
-#line 699 "agent_parser.cc" // lalr1.cc:856
+#line 679 "agent_parser.cc" // lalr1.cc:859
break;
case 11:
-#line 141 "agent_parser.yy" // lalr1.cc:856
+#line 141 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
-#line 705 "agent_parser.cc" // lalr1.cc:856
+#line 685 "agent_parser.cc" // lalr1.cc:859
break;
case 12:
-#line 142 "agent_parser.yy" // lalr1.cc:856
+#line 142 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
-#line 711 "agent_parser.cc" // lalr1.cc:856
+#line 691 "agent_parser.cc" // lalr1.cc:859
break;
case 13:
-#line 143 "agent_parser.yy" // lalr1.cc:856
+#line 143 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
-#line 717 "agent_parser.cc" // lalr1.cc:856
+#line 697 "agent_parser.cc" // lalr1.cc:859
break;
case 14:
-#line 144 "agent_parser.yy" // lalr1.cc:856
+#line 144 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
-#line 723 "agent_parser.cc" // lalr1.cc:856
+#line 703 "agent_parser.cc" // lalr1.cc:859
break;
case 15:
-#line 145 "agent_parser.yy" // lalr1.cc:856
+#line 145 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
-#line 729 "agent_parser.cc" // lalr1.cc:856
+#line 709 "agent_parser.cc" // lalr1.cc:859
break;
case 16:
-#line 146 "agent_parser.yy" // lalr1.cc:856
+#line 146 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 735 "agent_parser.cc" // lalr1.cc:856
+#line 715 "agent_parser.cc" // lalr1.cc:859
break;
case 17:
-#line 147 "agent_parser.yy" // lalr1.cc:856
+#line 147 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 741 "agent_parser.cc" // lalr1.cc:856
+#line 721 "agent_parser.cc" // lalr1.cc:859
break;
case 18:
-#line 151 "agent_parser.yy" // lalr1.cc:856
+#line 151 "agent_parser.yy" // lalr1.cc:859
{
// 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 752 "agent_parser.cc" // lalr1.cc:856
+#line 732 "agent_parser.cc" // lalr1.cc:859
break;
case 19:
-#line 156 "agent_parser.yy" // lalr1.cc:856
+#line 156 "agent_parser.yy" // lalr1.cc:859
{
// 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 762 "agent_parser.cc" // lalr1.cc:856
+#line 742 "agent_parser.cc" // lalr1.cc:859
break;
case 20:
-#line 162 "agent_parser.yy" // lalr1.cc:856
+#line 162 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 768 "agent_parser.cc" // lalr1.cc:856
+#line 748 "agent_parser.cc" // lalr1.cc:859
break;
case 23:
-#line 176 "agent_parser.yy" // lalr1.cc:856
+#line 176 "agent_parser.yy" // lalr1.cc:859
{
// map containing a single entry
ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
}
-#line 777 "agent_parser.cc" // lalr1.cc:856
+#line 757 "agent_parser.cc" // lalr1.cc:859
break;
case 24:
-#line 180 "agent_parser.yy" // lalr1.cc:856
+#line 180 "agent_parser.yy" // lalr1.cc:859
{
// map consisting of a shorter map followed by
// comma and string:value
ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
}
-#line 787 "agent_parser.cc" // lalr1.cc:856
+#line 767 "agent_parser.cc" // lalr1.cc:859
break;
case 25:
-#line 187 "agent_parser.yy" // lalr1.cc:856
+#line 187 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 796 "agent_parser.cc" // lalr1.cc:856
+#line 776 "agent_parser.cc" // lalr1.cc:859
break;
case 26:
-#line 190 "agent_parser.yy" // lalr1.cc:856
+#line 190 "agent_parser.yy" // lalr1.cc:859
{
}
-#line 803 "agent_parser.cc" // lalr1.cc:856
+#line 783 "agent_parser.cc" // lalr1.cc:859
break;
case 29:
-#line 197 "agent_parser.yy" // lalr1.cc:856
+#line 197 "agent_parser.yy" // lalr1.cc:859
{
// List consisting of a single element.
ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
}
-#line 812 "agent_parser.cc" // lalr1.cc:856
+#line 792 "agent_parser.cc" // lalr1.cc:859
break;
case 30:
-#line 201 "agent_parser.yy" // lalr1.cc:856
+#line 201 "agent_parser.yy" // lalr1.cc:859
{
// List ending with , and a value.
ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
}
-#line 821 "agent_parser.cc" // lalr1.cc:856
+#line 801 "agent_parser.cc" // lalr1.cc:859
break;
case 31:
-#line 214 "agent_parser.yy" // lalr1.cc:856
+#line 214 "agent_parser.yy" // lalr1.cc:859
{
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 832 "agent_parser.cc" // lalr1.cc:856
+#line 812 "agent_parser.cc" // lalr1.cc:859
break;
case 32:
-#line 223 "agent_parser.yy" // lalr1.cc:856
+#line 223 "agent_parser.yy" // lalr1.cc:859
{
// 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 843 "agent_parser.cc" // lalr1.cc:856
+#line 823 "agent_parser.cc" // lalr1.cc:859
break;
case 33:
-#line 228 "agent_parser.yy" // lalr1.cc:856
+#line 228 "agent_parser.yy" // lalr1.cc:859
{
// 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 853 "agent_parser.cc" // lalr1.cc:856
+#line 833 "agent_parser.cc" // lalr1.cc:859
break;
case 42:
-#line 249 "agent_parser.yy" // lalr1.cc:856
+#line 249 "agent_parser.yy" // lalr1.cc:859
{
// Let's create a MapElement that will represent it, add it to the
ctx.stack_.push_back(m);
ctx.enter(ctx.AGENT);
}
-#line 869 "agent_parser.cc" // lalr1.cc:856
+#line 849 "agent_parser.cc" // lalr1.cc:859
break;
case 43:
-#line 259 "agent_parser.yy" // lalr1.cc:856
+#line 259 "agent_parser.yy" // lalr1.cc:859
{
// Ok, we're done with parsing control-agent. Let's take the map
// off the stack.
ctx.stack_.pop_back();
ctx.leave();
}
-#line 880 "agent_parser.cc" // lalr1.cc:856
+#line 860 "agent_parser.cc" // lalr1.cc:859
break;
case 53:
-#line 281 "agent_parser.yy" // lalr1.cc:856
+#line 281 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 888 "agent_parser.cc" // lalr1.cc:856
+#line 868 "agent_parser.cc" // lalr1.cc:859
break;
case 54:
-#line 283 "agent_parser.yy" // lalr1.cc:856
+#line 283 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr host(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("http-host", host);
ctx.leave();
}
-#line 898 "agent_parser.cc" // lalr1.cc:856
+#line 878 "agent_parser.cc" // lalr1.cc:859
break;
case 55:
-#line 289 "agent_parser.yy" // lalr1.cc:856
+#line 289 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("http-port", prf);
}
-#line 907 "agent_parser.cc" // lalr1.cc:856
+#line 887 "agent_parser.cc" // lalr1.cc:859
break;
case 56:
-#line 294 "agent_parser.yy" // lalr1.cc:856
+#line 294 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 915 "agent_parser.cc" // lalr1.cc:856
+#line 895 "agent_parser.cc" // lalr1.cc:859
break;
case 57:
-#line 296 "agent_parser.yy" // lalr1.cc:856
+#line 296 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context = yystack_[0].value.as< ElementPtr > ();
parent->set("user-context", user_context);
ctx.leave();
}
-#line 942 "agent_parser.cc" // lalr1.cc:856
+#line 922 "agent_parser.cc" // lalr1.cc:859
break;
case 58:
-#line 319 "agent_parser.yy" // lalr1.cc:856
+#line 319 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 950 "agent_parser.cc" // lalr1.cc:856
+#line 930 "agent_parser.cc" // lalr1.cc:859
break;
case 59:
-#line 321 "agent_parser.yy" // lalr1.cc:856
+#line 321 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
parent->set("user-context", user_context);
ctx.leave();
}
-#line 979 "agent_parser.cc" // lalr1.cc:856
+#line 959 "agent_parser.cc" // lalr1.cc:859
break;
case 60:
-#line 347 "agent_parser.yy" // lalr1.cc:856
+#line 347 "agent_parser.yy" // lalr1.cc:859
{
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 990 "agent_parser.cc" // lalr1.cc:856
+#line 970 "agent_parser.cc" // lalr1.cc:859
break;
case 61:
-#line 352 "agent_parser.yy" // lalr1.cc:856
+#line 352 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 999 "agent_parser.cc" // lalr1.cc:856
+#line 979 "agent_parser.cc" // lalr1.cc:859
break;
case 66:
-#line 365 "agent_parser.yy" // lalr1.cc:856
+#line 365 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1009 "agent_parser.cc" // lalr1.cc:856
+#line 989 "agent_parser.cc" // lalr1.cc:859
break;
case 67:
-#line 369 "agent_parser.yy" // lalr1.cc:856
+#line 369 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
}
-#line 1017 "agent_parser.cc" // lalr1.cc:856
+#line 997 "agent_parser.cc" // lalr1.cc:859
break;
case 73:
-#line 382 "agent_parser.yy" // lalr1.cc:856
+#line 382 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1025 "agent_parser.cc" // lalr1.cc:856
+#line 1005 "agent_parser.cc" // lalr1.cc:859
break;
case 74:
-#line 384 "agent_parser.yy" // lalr1.cc:856
+#line 384 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("library", lib);
ctx.leave();
}
-#line 1035 "agent_parser.cc" // lalr1.cc:856
+#line 1015 "agent_parser.cc" // lalr1.cc:859
break;
case 75:
-#line 390 "agent_parser.yy" // lalr1.cc:856
+#line 390 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1043 "agent_parser.cc" // lalr1.cc:856
+#line 1023 "agent_parser.cc" // lalr1.cc:859
break;
case 76:
-#line 392 "agent_parser.yy" // lalr1.cc:856
+#line 392 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ());
ctx.leave();
}
-#line 1052 "agent_parser.cc" // lalr1.cc:856
+#line 1032 "agent_parser.cc" // lalr1.cc:859
break;
case 77:
-#line 400 "agent_parser.yy" // lalr1.cc:856
+#line 400 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[2].location)));
ctx.stack_.back()->set("control-sockets", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.CONTROL_SOCKETS);
}
-#line 1063 "agent_parser.cc" // lalr1.cc:856
+#line 1043 "agent_parser.cc" // lalr1.cc:859
break;
case 78:
-#line 405 "agent_parser.yy" // lalr1.cc:856
+#line 405 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1072 "agent_parser.cc" // lalr1.cc:856
+#line 1052 "agent_parser.cc" // lalr1.cc:859
break;
case 85:
-#line 426 "agent_parser.yy" // lalr1.cc:856
+#line 426 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp4", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1083 "agent_parser.cc" // lalr1.cc:856
+#line 1063 "agent_parser.cc" // lalr1.cc:859
break;
case 86:
-#line 431 "agent_parser.yy" // lalr1.cc:856
+#line 431 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1092 "agent_parser.cc" // lalr1.cc:856
+#line 1072 "agent_parser.cc" // lalr1.cc:859
break;
case 87:
-#line 437 "agent_parser.yy" // lalr1.cc:856
+#line 437 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp6", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1103 "agent_parser.cc" // lalr1.cc:856
+#line 1083 "agent_parser.cc" // lalr1.cc:859
break;
case 88:
-#line 442 "agent_parser.yy" // lalr1.cc:856
+#line 442 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1112 "agent_parser.cc" // lalr1.cc:856
+#line 1092 "agent_parser.cc" // lalr1.cc:859
break;
case 89:
-#line 448 "agent_parser.yy" // lalr1.cc:856
+#line 448 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("d2", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1123 "agent_parser.cc" // lalr1.cc:856
+#line 1103 "agent_parser.cc" // lalr1.cc:859
break;
case 90:
-#line 453 "agent_parser.yy" // lalr1.cc:856
+#line 453 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1132 "agent_parser.cc" // lalr1.cc:856
+#line 1112 "agent_parser.cc" // lalr1.cc:859
break;
case 98:
-#line 472 "agent_parser.yy" // lalr1.cc:856
+#line 472 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1140 "agent_parser.cc" // lalr1.cc:856
+#line 1120 "agent_parser.cc" // lalr1.cc:859
break;
case 99:
-#line 474 "agent_parser.yy" // lalr1.cc:856
+#line 474 "agent_parser.yy" // lalr1.cc:859
{
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 1150 "agent_parser.cc" // lalr1.cc:856
+#line 1130 "agent_parser.cc" // lalr1.cc:859
break;
case 100:
-#line 481 "agent_parser.yy" // lalr1.cc:856
+#line 481 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.SOCKET_TYPE);
}
-#line 1158 "agent_parser.cc" // lalr1.cc:856
+#line 1138 "agent_parser.cc" // lalr1.cc:859
break;
case 101:
-#line 483 "agent_parser.yy" // lalr1.cc:856
+#line 483 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.back()->set("socket-type", yystack_[0].value.as< ElementPtr > ());
ctx.leave();
}
-#line 1167 "agent_parser.cc" // lalr1.cc:856
+#line 1147 "agent_parser.cc" // lalr1.cc:859
break;
case 102:
-#line 489 "agent_parser.yy" // lalr1.cc:856
+#line 489 "agent_parser.yy" // lalr1.cc:859
{ yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
-#line 1173 "agent_parser.cc" // lalr1.cc:856
+#line 1153 "agent_parser.cc" // lalr1.cc:859
break;
case 103:
-#line 495 "agent_parser.yy" // lalr1.cc:856
+#line 495 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1181 "agent_parser.cc" // lalr1.cc:856
+#line 1161 "agent_parser.cc" // lalr1.cc:859
break;
case 104:
-#line 497 "agent_parser.yy" // lalr1.cc:856
+#line 497 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ());
ctx.leave();
}
-#line 1190 "agent_parser.cc" // lalr1.cc:856
+#line 1170 "agent_parser.cc" // lalr1.cc:859
break;
case 105:
-#line 502 "agent_parser.yy" // lalr1.cc:856
+#line 502 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1198 "agent_parser.cc" // lalr1.cc:856
+#line 1178 "agent_parser.cc" // lalr1.cc:859
break;
case 106:
-#line 504 "agent_parser.yy" // lalr1.cc:856
+#line 504 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ());
ctx.leave();
}
-#line 1207 "agent_parser.cc" // lalr1.cc:856
+#line 1187 "agent_parser.cc" // lalr1.cc:859
break;
case 107:
-#line 509 "agent_parser.yy" // lalr1.cc:856
+#line 509 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1215 "agent_parser.cc" // lalr1.cc:856
+#line 1195 "agent_parser.cc" // lalr1.cc:859
break;
case 108:
-#line 511 "agent_parser.yy" // lalr1.cc:856
+#line 511 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as< ElementPtr > ());
ctx.leave();
}
-#line 1224 "agent_parser.cc" // lalr1.cc:856
+#line 1204 "agent_parser.cc" // lalr1.cc:859
break;
case 109:
-#line 521 "agent_parser.yy" // lalr1.cc:856
+#line 521 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("Logging", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.LOGGING);
}
-#line 1235 "agent_parser.cc" // lalr1.cc:856
+#line 1215 "agent_parser.cc" // lalr1.cc:859
break;
case 110:
-#line 526 "agent_parser.yy" // lalr1.cc:856
+#line 526 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1244 "agent_parser.cc" // lalr1.cc:856
+#line 1224 "agent_parser.cc" // lalr1.cc:859
break;
case 114:
-#line 543 "agent_parser.yy" // lalr1.cc:856
+#line 543 "agent_parser.yy" // lalr1.cc:859
{
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 1255 "agent_parser.cc" // lalr1.cc:856
+#line 1235 "agent_parser.cc" // lalr1.cc:859
break;
case 115:
-#line 548 "agent_parser.yy" // lalr1.cc:856
+#line 548 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1264 "agent_parser.cc" // lalr1.cc:856
+#line 1244 "agent_parser.cc" // lalr1.cc:859
break;
case 118:
-#line 560 "agent_parser.yy" // lalr1.cc:856
+#line 560 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(l);
ctx.stack_.push_back(l);
}
-#line 1274 "agent_parser.cc" // lalr1.cc:856
+#line 1254 "agent_parser.cc" // lalr1.cc:859
break;
case 119:
-#line 564 "agent_parser.yy" // lalr1.cc:856
+#line 564 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
}
-#line 1282 "agent_parser.cc" // lalr1.cc:856
+#line 1262 "agent_parser.cc" // lalr1.cc:859
break;
case 129:
-#line 581 "agent_parser.yy" // lalr1.cc:856
+#line 581 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1290 "agent_parser.cc" // lalr1.cc:856
+#line 1270 "agent_parser.cc" // lalr1.cc:859
break;
case 130:
-#line 583 "agent_parser.yy" // lalr1.cc:856
+#line 583 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1300 "agent_parser.cc" // lalr1.cc:856
+#line 1280 "agent_parser.cc" // lalr1.cc:859
break;
case 131:
-#line 589 "agent_parser.yy" // lalr1.cc:856
+#line 589 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("debuglevel", dl);
}
-#line 1309 "agent_parser.cc" // lalr1.cc:856
+#line 1289 "agent_parser.cc" // lalr1.cc:859
break;
case 132:
-#line 594 "agent_parser.yy" // lalr1.cc:856
+#line 594 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1317 "agent_parser.cc" // lalr1.cc:856
+#line 1297 "agent_parser.cc" // lalr1.cc:859
break;
case 133:
-#line 596 "agent_parser.yy" // lalr1.cc:856
+#line 596 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("severity", sev);
ctx.leave();
}
-#line 1327 "agent_parser.cc" // lalr1.cc:856
+#line 1307 "agent_parser.cc" // lalr1.cc:859
break;
case 134:
-#line 602 "agent_parser.yy" // lalr1.cc:856
+#line 602 "agent_parser.yy" // lalr1.cc:859
{
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 1338 "agent_parser.cc" // lalr1.cc:856
+#line 1318 "agent_parser.cc" // lalr1.cc:859
break;
case 135:
-#line 607 "agent_parser.yy" // lalr1.cc:856
+#line 607 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1347 "agent_parser.cc" // lalr1.cc:856
+#line 1327 "agent_parser.cc" // lalr1.cc:859
break;
case 138:
-#line 616 "agent_parser.yy" // lalr1.cc:856
+#line 616 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1357 "agent_parser.cc" // lalr1.cc:856
+#line 1337 "agent_parser.cc" // lalr1.cc:859
break;
case 139:
-#line 620 "agent_parser.yy" // lalr1.cc:856
+#line 620 "agent_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
}
-#line 1365 "agent_parser.cc" // lalr1.cc:856
+#line 1345 "agent_parser.cc" // lalr1.cc:859
break;
case 146:
-#line 634 "agent_parser.yy" // lalr1.cc:856
+#line 634 "agent_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1373 "agent_parser.cc" // lalr1.cc:856
+#line 1353 "agent_parser.cc" // lalr1.cc:859
break;
case 147:
-#line 636 "agent_parser.yy" // lalr1.cc:856
+#line 636 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output", sev);
ctx.leave();
}
-#line 1383 "agent_parser.cc" // lalr1.cc:856
+#line 1363 "agent_parser.cc" // lalr1.cc:859
break;
case 148:
-#line 642 "agent_parser.yy" // lalr1.cc:856
+#line 642 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("flush", flush);
}
-#line 1392 "agent_parser.cc" // lalr1.cc:856
+#line 1372 "agent_parser.cc" // lalr1.cc:859
break;
case 149:
-#line 647 "agent_parser.yy" // lalr1.cc:856
+#line 647 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxsize", maxsize);
}
-#line 1401 "agent_parser.cc" // lalr1.cc:856
+#line 1381 "agent_parser.cc" // lalr1.cc:859
break;
case 150:
-#line 652 "agent_parser.yy" // lalr1.cc:856
+#line 652 "agent_parser.yy" // lalr1.cc:859
{
ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxver", maxver);
}
-#line 1410 "agent_parser.cc" // lalr1.cc:856
+#line 1390 "agent_parser.cc" // lalr1.cc:859
break;
-#line 1414 "agent_parser.cc" // lalr1.cc:856
+#line 1394 "agent_parser.cc" // lalr1.cc:859
default:
break;
}
code. */
if (false)
goto yyerrorlab;
+ yyerror_range[1].location = yystack_[yylen - 1].location;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
yypop_ (yylen);
}
catch (...)
{
- YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
+ YYCDEBUG << "Exception caught: cleaning lookahead and stack"
+ << std::endl;
// Do not try to display the values of the reclaimed symbols,
// as their printer might throw an exception.
if (!yyla.empty ())
void
AgentParser::error (const syntax_error& yyexc)
{
- error (yyexc.location, yyexc.what ());
+ error (yyexc.location, yyexc.what());
}
// Generate an error message.
case N: \
yyformat = S; \
break
- default: // Avoid compiler warnings.
- YYCASE_ (0, YY_("syntax error"));
- YYCASE_ (1, YY_("syntax error, unexpected %s"));
- YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
i_end = yystack_.end ();
i != i_end; ++i)
*yycdebug_ << ' ' << i->state;
- *yycdebug_ << '\n';
+ *yycdebug_ << std::endl;
}
// Report on the debug stream that the rule \a yyrule is going to be reduced.
void
AgentParser::yy_reduce_print_ (int yyrule)
{
- unsigned yylno = yyrline_[yyrule];
+ unsigned int yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
// Print the symbols being reduced, and their result.
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
- << " (line " << yylno << "):\n";
+ << " (line " << yylno << "):" << std::endl;
// The symbols being reduced.
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
#endif // AGENT_DEBUG
-#line 14 "agent_parser.yy" // lalr1.cc:1163
+#line 14 "agent_parser.yy" // lalr1.cc:1167
} } // isc::agent
-#line 1981 "agent_parser.cc" // lalr1.cc:1163
-#line 657 "agent_parser.yy" // lalr1.cc:1164
+#line 1962 "agent_parser.cc" // lalr1.cc:1167
+#line 657 "agent_parser.yy" // lalr1.cc:1168
void