]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#129,!55] Reverted not needed changes
authorTomek Mrugalski <tomasz@isc.org>
Tue, 30 Oct 2018 10:23:06 +0000 (11:23 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 30 Oct 2018 10:23:06 +0000 (11:23 +0100)
src/bin/agent/location.hh
src/bin/agent/position.hh
src/bin/agent/stack.hh
src/lib/eval/location.hh
src/lib/eval/parser.cc
src/lib/eval/parser.h
src/lib/eval/position.hh
src/lib/eval/stack.hh

index 851b154d3e2041e65526af4ff623b898168547de..c978ea584a5f6f9adf19a68a73471bf3a5f87c94 100644 (file)
@@ -1,3 +1,4 @@
+// Generated 201804111444
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Locations for Bison parsers in C++
index 7bb77d373c134338127f42eab08812ac49b4ffe4..4678102783ffab04ca4ef37ff420d797a329b0e2 100644 (file)
@@ -1,3 +1,4 @@
+// Generated 201804111444
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Positions for Bison parsers in C++
index db8c4dfa0356a925a87371698ba4f4d4f05ee4ce..efca5678c7c6f6bc20791f4b3b108798869d509e 100644 (file)
@@ -1,3 +1,4 @@
+// Generated 201804111444
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Stack handling for Bison parsers in C++
index 291696d580d06209a4adb937b87134f60c30c91d..b20a76b1a849de6f7956281086931f150140fb29 100644 (file)
@@ -1,8 +1,9 @@
-// A Bison parser, made by GNU Bison 3.0.4.
+// Generated 201809161042
+// A Bison parser, made by GNU Bison 3.0.5.
 
 // Locations for Bison parsers in C++
 
-// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
@@ -40,9 +41,9 @@
 
 # include "position.hh"
 
-#line 14 "parser.yy" // location.cc:296
+#line 14 "parser.yy" // location.cc:292
 namespace isc { namespace eval {
-#line 46 "location.hh" // location.cc:296
+#line 46 "location.hh" // location.cc:292
   /// Abstract a location.
   class location
   {
@@ -52,30 +53,27 @@ namespace isc { namespace eval {
     location (const position& b, const position& e)
       : begin (b)
       , end (e)
-    {
-    }
+    {}
 
     /// Construct a 0-width location in \a p.
     explicit location (const position& p = position ())
       : begin (p)
       , end (p)
-    {
-    }
+    {}
 
     /// Construct a 0-width location in \a f, \a l, \a c.
     explicit location (std::string* f,
-                       unsigned int l = 1u,
-                       unsigned int c = 1u)
+                       unsigned l = 1u,
+                       unsigned c = 1u)
       : begin (f, l, c)
       , end (f, l, c)
-    {
-    }
+    {}
 
 
     /// Initialization.
     void initialize (std::string* f = YY_NULLPTR,
-                     unsigned int l = 1u,
-                     unsigned int c = 1u)
+                     unsigned l = 1u,
+                     unsigned c = 1u)
     {
       begin.initialize (f, l, c);
       end = begin;
@@ -173,7 +171,7 @@ namespace isc { namespace eval {
   inline std::basic_ostream<YYChar>&
   operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
   {
-    unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
+    unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
     ostr << loc.begin;
     if (loc.end.filename
         && (!loc.begin.filename
@@ -186,7 +184,7 @@ namespace isc { namespace eval {
     return ostr;
   }
 
-#line 14 "parser.yy" // location.cc:296
+#line 14 "parser.yy" // location.cc:292
 } } // isc::eval
-#line 192 "location.hh" // location.cc:296
+#line 189 "location.hh" // location.cc:292
 #endif // !YY_EVAL_LOCATION_HH_INCLUDED
index 9313dbfbe684a054e0f4fbd2f9d8def7faf41e53..86a9b2345fce1c77567f0a397b2f90ce7de40c44 100644 (file)
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.0.4.
+// A Bison parser, made by GNU Bison 3.0.5.
 
 // Skeleton implementation for Bison LALR(1) parsers in C++
 
-// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
@@ -35,7 +35,7 @@
 
 // First part of user declarations.
 
-#line 39 "parser.cc" // lalr1.cc:404
+#line 39 "parser.cc" // lalr1.cc:406
 
 # ifndef YY_NULLPTR
 #  if defined __cplusplus && 201103L <= __cplusplus
 
 // User implementation prologue.
 
-#line 53 "parser.cc" // lalr1.cc:412
+#line 53 "parser.cc" // lalr1.cc:414
 // Unqualified %code blocks.
-#line 33 "parser.yy" // lalr1.cc:413
+#line 33 "parser.yy" // lalr1.cc:415
 
 # include "eval_context.h"
 
-#line 59 "parser.cc" // lalr1.cc:413
+#line 59 "parser.cc" // lalr1.cc:415
 
 
 #ifndef YY_
     {                                           \
       *yycdebug_ << Title << ' ';               \
       yy_print_ (*yycdebug_, Symbol);           \
-      *yycdebug_ << std::endl;                  \
+      *yycdebug_ << '\n';                       \
     }                                           \
   } while (false)
 
 #else // !EVALDEBUG
 
 # 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 // !EVALDEBUG
 
 #define YYERROR         goto yyerrorlab
 #define YYRECOVERING()  (!!yyerrstatus_)
 
-#line 14 "parser.yy" // lalr1.cc:479
+#line 14 "parser.yy" // lalr1.cc:481
 namespace isc { namespace eval {
-#line 145 "parser.cc" // lalr1.cc:479
+#line 145 "parser.cc" // lalr1.cc:481
 
   /* Return YYSTR after stripping away unnecessary quotes and
      backslashes, so that it's suitable for yyerror.  The heuristic is
@@ -202,24 +202,20 @@ namespace isc { namespace eval {
 
 
   // by_state.
-  inline
   EvalParser::by_state::by_state ()
     : state (empty_state)
   {}
 
-  inline
   EvalParser::by_state::by_state (const by_state& other)
     : state (other.state)
   {}
 
-  inline
   void
   EvalParser::by_state::clear ()
   {
     state = empty_state;
   }
 
-  inline
   void
   EvalParser::by_state::move (by_state& that)
   {
@@ -227,12 +223,10 @@ namespace isc { namespace eval {
     that.clear ();
   }
 
-  inline
   EvalParser::by_state::by_state (state_type s)
     : state (s)
   {}
 
-  inline
   EvalParser::symbol_number_type
   EvalParser::by_state::type_get () const
   {
@@ -242,16 +236,65 @@ namespace isc { namespace eval {
       return yystos_[state];
   }
 
-  inline
   EvalParser::stack_symbol_type::stack_symbol_type ()
   {}
 
+  EvalParser::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
+    : super_type (that.state, that.location)
+  {
+    switch (that.type_get ())
+    {
+      case 62: // option_repr_type
+        value.copy< TokenOption::RepresentationType > (that.value);
+        break;
+
+      case 66: // pkt4_field
+        value.copy< TokenPkt4::FieldType > (that.value);
+        break;
+
+      case 67: // pkt6_field
+        value.copy< TokenPkt6::FieldType > (that.value);
+        break;
+
+      case 64: // pkt_metadata
+        value.copy< TokenPkt::MetadataType > (that.value);
+        break;
+
+      case 68: // relay6_field
+        value.copy< TokenRelay6Field::FieldType > (that.value);
+        break;
+
+      case 63: // nest_level
+        value.copy< int8_t > (that.value);
+        break;
+
+      case 50: // "constant string"
+      case 51: // "integer"
+      case 52: // "constant hexstring"
+      case 53: // "option name"
+      case 54: // "ip address"
+        value.copy< std::string > (that.value);
+        break;
+
+      case 61: // option_code
+        value.copy< uint16_t > (that.value);
+        break;
+
+      case 60: // integer_expr
+      case 65: // enterprise_id
+        value.copy< uint32_t > (that.value);
+        break;
+
+      default:
+        break;
+    }
+
+  }
 
-  inline
   EvalParser::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 62: // option_repr_type
         value.move< TokenOption::RepresentationType > (that.value);
@@ -302,12 +345,11 @@ namespace isc { namespace eval {
     that.type = empty_symbol;
   }
 
-  inline
   EvalParser::stack_symbol_type&
   EvalParser::stack_symbol_type::operator= (const stack_symbol_type& that)
   {
     state = that.state;
-      switch (that.type_get ())
+    switch (that.type_get ())
     {
       case 62: // option_repr_type
         value.copy< TokenOption::RepresentationType > (that.value);
@@ -360,7 +402,6 @@ namespace isc { namespace eval {
 
 
   template <typename Base>
-  inline
   void
   EvalParser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
   {
@@ -388,100 +429,100 @@ namespace isc { namespace eval {
     {
             case 50: // "constant string"
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< std::string > (); }
-#line 394 "parser.cc" // lalr1.cc:636
+#line 435 "parser.cc" // lalr1.cc:635
         break;
 
       case 51: // "integer"
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< std::string > (); }
-#line 401 "parser.cc" // lalr1.cc:636
+#line 442 "parser.cc" // lalr1.cc:635
         break;
 
       case 52: // "constant hexstring"
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< std::string > (); }
-#line 408 "parser.cc" // lalr1.cc:636
+#line 449 "parser.cc" // lalr1.cc:635
         break;
 
       case 53: // "option name"
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< std::string > (); }
-#line 415 "parser.cc" // lalr1.cc:636
+#line 456 "parser.cc" // lalr1.cc:635
         break;
 
       case 54: // "ip address"
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< std::string > (); }
-#line 422 "parser.cc" // lalr1.cc:636
+#line 463 "parser.cc" // lalr1.cc:635
         break;
 
       case 60: // integer_expr
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< uint32_t > (); }
-#line 429 "parser.cc" // lalr1.cc:636
+#line 470 "parser.cc" // lalr1.cc:635
         break;
 
       case 61: // option_code
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< uint16_t > (); }
-#line 436 "parser.cc" // lalr1.cc:636
+#line 477 "parser.cc" // lalr1.cc:635
         break;
 
       case 62: // option_repr_type
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< TokenOption::RepresentationType > (); }
-#line 443 "parser.cc" // lalr1.cc:636
+#line 484 "parser.cc" // lalr1.cc:635
         break;
 
       case 63: // nest_level
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< int8_t > (); }
-#line 450 "parser.cc" // lalr1.cc:636
+#line 491 "parser.cc" // lalr1.cc:635
         break;
 
       case 64: // pkt_metadata
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< TokenPkt::MetadataType > (); }
-#line 457 "parser.cc" // lalr1.cc:636
+#line 498 "parser.cc" // lalr1.cc:635
         break;
 
       case 65: // enterprise_id
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< uint32_t > (); }
-#line 464 "parser.cc" // lalr1.cc:636
+#line 505 "parser.cc" // lalr1.cc:635
         break;
 
       case 66: // pkt4_field
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< TokenPkt4::FieldType > (); }
-#line 471 "parser.cc" // lalr1.cc:636
+#line 512 "parser.cc" // lalr1.cc:635
         break;
 
       case 67: // pkt6_field
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< TokenPkt6::FieldType > (); }
-#line 478 "parser.cc" // lalr1.cc:636
+#line 519 "parser.cc" // lalr1.cc:635
         break;
 
       case 68: // relay6_field
 
-#line 111 "parser.yy" // lalr1.cc:636
+#line 111 "parser.yy" // lalr1.cc:635
         { yyoutput << yysym.value.template as< TokenRelay6Field::FieldType > (); }
-#line 485 "parser.cc" // lalr1.cc:636
+#line 526 "parser.cc" // lalr1.cc:635
         break;
 
 
@@ -492,7 +533,6 @@ namespace isc { namespace eval {
   }
 #endif
 
-  inline
   void
   EvalParser::yypush_ (const char* m, state_type s, symbol_type& sym)
   {
@@ -500,7 +540,6 @@ namespace isc { namespace eval {
     yypush_ (m, t);
   }
 
-  inline
   void
   EvalParser::yypush_ (const char* m, stack_symbol_type& s)
   {
@@ -509,9 +548,8 @@ namespace isc { namespace eval {
     yystack_.push (s);
   }
 
-  inline
   void
-  EvalParser::yypop_ (unsigned int n)
+  EvalParser::yypop_ (unsigned n)
   {
     yystack_.pop (n);
   }
@@ -543,7 +581,7 @@ namespace isc { namespace eval {
   }
 #endif // EVALDEBUG
 
-  inline EvalParser::state_type
+  EvalParser::state_type
   EvalParser::yy_lr_goto_state_ (state_type yystate, int yysym)
   {
     int yyr = yypgoto_[yysym - yyntokens_] + yystate;
@@ -553,13 +591,13 @@ namespace isc { namespace eval {
       return yydefgoto_[yysym - yyntokens_];
   }
 
-  inline bool
+  bool
   EvalParser::yy_pact_value_is_default_ (int yyvalue)
   {
     return yyvalue == yypact_ninf_;
   }
 
-  inline bool
+  bool
   EvalParser::yy_table_value_is_error_ (int yyvalue)
   {
     return yyvalue == yytable_ninf_;
@@ -590,7 +628,7 @@ namespace isc { namespace eval {
     // avoid gratuitous conflicts when merging into the master branch.
     try
       {
-    YYCDEBUG << "Starting parse" << std::endl;
+    YYCDEBUG << "Starting parse\n";
 
 
     /* Initialize the stack.  The initial state will be set in
@@ -602,7 +640,7 @@ namespace isc { namespace eval {
 
     // A new symbol was pushed on the stack.
   yynewstate:
-    YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;
+    YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
 
     // Accept?
     if (yystack_[0].state == yyfinal_)
@@ -675,11 +713,11 @@ namespace isc { namespace eval {
     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 62: // option_repr_type
         yylhs.value.build< TokenOption::RepresentationType > ();
@@ -727,10 +765,11 @@ namespace isc { namespace eval {
     }
 
 
-      // Compute the default @$.
+      // Default location.
       {
         slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
         YYLLOC_DEFAULT (yylhs.location, slice, yylen);
+        yyerror_range[1].location = yylhs.location;
       }
 
       // Perform the reduction.
@@ -740,52 +779,52 @@ namespace isc { namespace eval {
           switch (yyn)
             {
   case 6:
-#line 131 "parser.yy" // lalr1.cc:859
+#line 131 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr neg(new TokenNot());
                     ctx.expression.push_back(neg);
                 }
-#line 749 "parser.cc" // lalr1.cc:859
+#line 788 "parser.cc" // lalr1.cc:856
     break;
 
   case 7:
-#line 136 "parser.yy" // lalr1.cc:859
+#line 136 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr neg(new TokenAnd());
                     ctx.expression.push_back(neg);
                 }
-#line 758 "parser.cc" // lalr1.cc:859
+#line 797 "parser.cc" // lalr1.cc:856
     break;
 
   case 8:
-#line 141 "parser.yy" // lalr1.cc:859
+#line 141 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr neg(new TokenOr());
                     ctx.expression.push_back(neg);
                 }
-#line 767 "parser.cc" // lalr1.cc:859
+#line 806 "parser.cc" // lalr1.cc:856
     break;
 
   case 9:
-#line 146 "parser.yy" // lalr1.cc:859
+#line 146 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr eq(new TokenEqual());
                     ctx.expression.push_back(eq);
                 }
-#line 776 "parser.cc" // lalr1.cc:859
+#line 815 "parser.cc" // lalr1.cc:856
     break;
 
   case 10:
-#line 151 "parser.yy" // lalr1.cc:859
+#line 151 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr opt(new TokenOption(yystack_[3].value.as< uint16_t > (), TokenOption::EXISTS));
                     ctx.expression.push_back(opt);
                 }
-#line 785 "parser.cc" // lalr1.cc:859
+#line 824 "parser.cc" // lalr1.cc:856
     break;
 
   case 11:
-#line 156 "parser.yy" // lalr1.cc:859
+#line 156 "parser.yy" // lalr1.cc:856
     {
                    switch (ctx.getUniverse()) {
                    case Option::V4:
@@ -805,11 +844,11 @@ namespace isc { namespace eval {
                        error(yystack_[5].location, "relay4 can only be used in DHCPv4.");
                    }
                 }
-#line 809 "parser.cc" // lalr1.cc:859
+#line 848 "parser.cc" // lalr1.cc:856
     break;
 
   case 12:
-#line 176 "parser.yy" // lalr1.cc:859
+#line 176 "parser.yy" // lalr1.cc:856
     {
                     switch (ctx.getUniverse()) {
                     case Option::V6:
@@ -823,11 +862,11 @@ namespace isc { namespace eval {
                         error(yystack_[10].location, "relay6 can only be used in DHCPv6.");
                     }
                 }
-#line 827 "parser.cc" // lalr1.cc:859
+#line 866 "parser.cc" // lalr1.cc:856
     break;
 
   case 13:
-#line 190 "parser.yy" // lalr1.cc:859
+#line 190 "parser.yy" // lalr1.cc:856
     {
                   // Expression: vendor-class[1234].exists
                   //
@@ -836,11 +875,11 @@ namespace isc { namespace eval {
                   TokenPtr exist(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as< uint32_t > (), TokenOption::EXISTS));
                   ctx.expression.push_back(exist);
               }
-#line 840 "parser.cc" // lalr1.cc:859
+#line 879 "parser.cc" // lalr1.cc:856
     break;
 
   case 14:
-#line 199 "parser.yy" // lalr1.cc:859
+#line 199 "parser.yy" // lalr1.cc:856
     {
                   // Expression: vendor[1234].exists
                   //
@@ -849,11 +888,11 @@ namespace isc { namespace eval {
                   TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[3].value.as< uint32_t > (), TokenOption::EXISTS));
                   ctx.expression.push_back(exist);
               }
-#line 853 "parser.cc" // lalr1.cc:859
+#line 892 "parser.cc" // lalr1.cc:856
     break;
 
   case 15:
-#line 208 "parser.yy" // lalr1.cc:859
+#line 208 "parser.yy" // lalr1.cc:856
     {
                   // Expression vendor[1234].option[123].exists
                   //
@@ -863,11 +902,11 @@ namespace isc { namespace eval {
                   TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as< uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as< uint16_t > ()));
                   ctx.expression.push_back(exist);
                }
-#line 867 "parser.cc" // lalr1.cc:859
+#line 906 "parser.cc" // lalr1.cc:856
     break;
 
   case 16:
-#line 218 "parser.yy" // lalr1.cc:859
+#line 218 "parser.yy" // lalr1.cc:856
     {
                   // Expression member('foo')
                   //
@@ -882,47 +921,47 @@ namespace isc { namespace eval {
                   TokenPtr member(new TokenMember(cc));
                   ctx.expression.push_back(member);
               }
-#line 886 "parser.cc" // lalr1.cc:859
+#line 925 "parser.cc" // lalr1.cc:856
     break;
 
   case 17:
-#line 235 "parser.yy" // lalr1.cc:859
+#line 235 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
                       ctx.expression.push_back(str);
                   }
-#line 895 "parser.cc" // lalr1.cc:859
+#line 934 "parser.cc" // lalr1.cc:856
     break;
 
   case 18:
-#line 240 "parser.yy" // lalr1.cc:859
+#line 240 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr hex(new TokenHexString(yystack_[0].value.as< std::string > ()));
                       ctx.expression.push_back(hex);
                   }
-#line 904 "parser.cc" // lalr1.cc:859
+#line 943 "parser.cc" // lalr1.cc:856
     break;
 
   case 19:
-#line 245 "parser.yy" // lalr1.cc:859
+#line 245 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr ip(new TokenIpAddress(yystack_[0].value.as< std::string > ()));
                       ctx.expression.push_back(ip);
                   }
-#line 913 "parser.cc" // lalr1.cc:859
+#line 952 "parser.cc" // lalr1.cc:856
     break;
 
   case 20:
-#line 250 "parser.yy" // lalr1.cc:859
+#line 250 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr opt(new TokenOption(yystack_[3].value.as< uint16_t > (), yystack_[0].value.as< TokenOption::RepresentationType > ()));
                       ctx.expression.push_back(opt);
                   }
-#line 922 "parser.cc" // lalr1.cc:859
+#line 961 "parser.cc" // lalr1.cc:856
     break;
 
   case 21:
-#line 255 "parser.yy" // lalr1.cc:859
+#line 255 "parser.yy" // lalr1.cc:856
     {
                      switch (ctx.getUniverse()) {
                      case Option::V4:
@@ -942,11 +981,11 @@ namespace isc { namespace eval {
                          error(yystack_[5].location, "relay4 can only be used in DHCPv4.");
                      }
                   }
-#line 946 "parser.cc" // lalr1.cc:859
+#line 985 "parser.cc" // lalr1.cc:856
     break;
 
   case 22:
-#line 276 "parser.yy" // lalr1.cc:859
+#line 276 "parser.yy" // lalr1.cc:856
     {
                      switch (ctx.getUniverse()) {
                      case Option::V6:
@@ -960,20 +999,20 @@ namespace isc { namespace eval {
                          error(yystack_[10].location, "relay6 can only be used in DHCPv6.");
                      }
                   }
-#line 964 "parser.cc" // lalr1.cc:859
+#line 1003 "parser.cc" // lalr1.cc:856
     break;
 
   case 23:
-#line 291 "parser.yy" // lalr1.cc:859
+#line 291 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr pkt_metadata(new TokenPkt(yystack_[0].value.as< TokenPkt::MetadataType > ()));
                       ctx.expression.push_back(pkt_metadata);
                   }
-#line 973 "parser.cc" // lalr1.cc:859
+#line 1012 "parser.cc" // lalr1.cc:856
     break;
 
   case 24:
-#line 296 "parser.yy" // lalr1.cc:859
+#line 296 "parser.yy" // lalr1.cc:856
     {
                      switch (ctx.getUniverse()) {
                      case Option::V4:
@@ -987,11 +1026,11 @@ namespace isc { namespace eval {
                          error(yystack_[2].location, "pkt4 can only be used in DHCPv4.");
                      }
                   }
-#line 991 "parser.cc" // lalr1.cc:859
+#line 1030 "parser.cc" // lalr1.cc:856
     break;
 
   case 25:
-#line 310 "parser.yy" // lalr1.cc:859
+#line 310 "parser.yy" // lalr1.cc:856
     {
                      switch (ctx.getUniverse()) {
                      case Option::V6:
@@ -1005,11 +1044,11 @@ namespace isc { namespace eval {
                          error(yystack_[2].location, "pkt6 can only be used in DHCPv6.");
                      }
                   }
-#line 1009 "parser.cc" // lalr1.cc:859
+#line 1048 "parser.cc" // lalr1.cc:856
     break;
 
   case 26:
-#line 324 "parser.yy" // lalr1.cc:859
+#line 324 "parser.yy" // lalr1.cc:856
     {
                      switch (ctx.getUniverse()) {
                      case Option::V6:
@@ -1023,47 +1062,47 @@ namespace isc { namespace eval {
                          error(yystack_[5].location, "relay6 can only be used in DHCPv6.");
                      }
                   }
-#line 1027 "parser.cc" // lalr1.cc:859
+#line 1066 "parser.cc" // lalr1.cc:856
     break;
 
   case 27:
-#line 339 "parser.yy" // lalr1.cc:859
+#line 339 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr sub(new TokenSubstring());
                       ctx.expression.push_back(sub);
                   }
-#line 1036 "parser.cc" // lalr1.cc:859
+#line 1075 "parser.cc" // lalr1.cc:856
     break;
 
   case 28:
-#line 344 "parser.yy" // lalr1.cc:859
+#line 344 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr conc(new TokenConcat());
                       ctx.expression.push_back(conc);
                   }
-#line 1045 "parser.cc" // lalr1.cc:859
+#line 1084 "parser.cc" // lalr1.cc:856
     break;
 
   case 29:
-#line 349 "parser.yy" // lalr1.cc:859
+#line 349 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr cond(new TokenIfElse());
                       ctx.expression.push_back(cond);
                   }
-#line 1054 "parser.cc" // lalr1.cc:859
+#line 1093 "parser.cc" // lalr1.cc:856
     break;
 
   case 30:
-#line 354 "parser.yy" // lalr1.cc:859
+#line 354 "parser.yy" // lalr1.cc:856
     {
                       TokenPtr tohex(new TokenToHexString());
                       ctx.expression.push_back(tohex);
                   }
-#line 1063 "parser.cc" // lalr1.cc:859
+#line 1102 "parser.cc" // lalr1.cc:856
     break;
 
   case 31:
-#line 359 "parser.yy" // lalr1.cc:859
+#line 359 "parser.yy" // lalr1.cc:856
     {
                     // expression: vendor.enterprise
                     //
@@ -1072,11 +1111,11 @@ namespace isc { namespace eval {
                     TokenPtr vendor(new TokenVendor(ctx.getUniverse(), 0, TokenVendor::ENTERPRISE_ID));
                     ctx.expression.push_back(vendor);
                 }
-#line 1076 "parser.cc" // lalr1.cc:859
+#line 1115 "parser.cc" // lalr1.cc:856
     break;
 
   case 32:
-#line 368 "parser.yy" // lalr1.cc:859
+#line 368 "parser.yy" // lalr1.cc:856
     {
                     // expression: vendor-class.enterprise
                     //
@@ -1086,11 +1125,11 @@ namespace isc { namespace eval {
                                                          TokenVendor::ENTERPRISE_ID));
                     ctx.expression.push_back(vendor);
                 }
-#line 1090 "parser.cc" // lalr1.cc:859
+#line 1129 "parser.cc" // lalr1.cc:856
     break;
 
   case 33:
-#line 378 "parser.yy" // lalr1.cc:859
+#line 378 "parser.yy" // lalr1.cc:856
     {
                     // This token will search for vendor option with
                     // specified enterprise-id.  If found, will search
@@ -1099,11 +1138,11 @@ namespace isc { namespace eval {
                     TokenPtr opt(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as< uint32_t > (), yystack_[0].value.as< TokenOption::RepresentationType > (), yystack_[3].value.as< uint16_t > ()));
                     ctx.expression.push_back(opt);
                 }
-#line 1103 "parser.cc" // lalr1.cc:859
+#line 1142 "parser.cc" // lalr1.cc:856
     break;
 
   case 34:
-#line 387 "parser.yy" // lalr1.cc:859
+#line 387 "parser.yy" // lalr1.cc:856
     {
                     // expression: vendor-class[1234].data
                     //
@@ -1116,11 +1155,11 @@ namespace isc { namespace eval {
                                                                TokenVendor::DATA, 0));
                     ctx.expression.push_back(vendor_class);
                 }
-#line 1120 "parser.cc" // lalr1.cc:859
+#line 1159 "parser.cc" // lalr1.cc:856
     break;
 
   case 35:
-#line 400 "parser.yy" // lalr1.cc:859
+#line 400 "parser.yy" // lalr1.cc:856
     {
                     // expression: vendor-class[1234].data[5]
                     //
@@ -1133,247 +1172,247 @@ namespace isc { namespace eval {
                                                                TokenVendor::DATA, index));
                     ctx.expression.push_back(vendor_class);
                 }
-#line 1137 "parser.cc" // lalr1.cc:859
+#line 1176 "parser.cc" // lalr1.cc:856
     break;
 
   case 36:
-#line 413 "parser.yy" // lalr1.cc:859
+#line 413 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr integer(new TokenInteger(yystack_[0].value.as< uint32_t > ()));
                     ctx.expression.push_back(integer);
                 }
-#line 1146 "parser.cc" // lalr1.cc:859
+#line 1185 "parser.cc" // lalr1.cc:856
     break;
 
   case 37:
-#line 420 "parser.yy" // lalr1.cc:859
+#line 420 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< uint32_t > () = ctx.convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
-#line 1154 "parser.cc" // lalr1.cc:859
+#line 1193 "parser.cc" // lalr1.cc:856
     break;
 
   case 38:
-#line 426 "parser.yy" // lalr1.cc:859
+#line 426 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
-#line 1162 "parser.cc" // lalr1.cc:859
+#line 1201 "parser.cc" // lalr1.cc:856
     break;
 
   case 39:
-#line 430 "parser.yy" // lalr1.cc:859
+#line 430 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< uint16_t > () = ctx.convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
-#line 1170 "parser.cc" // lalr1.cc:859
+#line 1209 "parser.cc" // lalr1.cc:856
     break;
 
   case 40:
-#line 436 "parser.yy" // lalr1.cc:859
+#line 436 "parser.yy" // lalr1.cc:856
     {
                           yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::TEXTUAL;
                       }
-#line 1178 "parser.cc" // lalr1.cc:859
+#line 1217 "parser.cc" // lalr1.cc:856
     break;
 
   case 41:
-#line 440 "parser.yy" // lalr1.cc:859
+#line 440 "parser.yy" // lalr1.cc:856
     {
                           yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::HEXADECIMAL;
                       }
-#line 1186 "parser.cc" // lalr1.cc:859
+#line 1225 "parser.cc" // lalr1.cc:856
     break;
 
   case 42:
-#line 446 "parser.yy" // lalr1.cc:859
+#line 446 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< int8_t > () = ctx.convertNestLevelNumber(yystack_[0].value.as< std::string > (), yystack_[0].location);
                  }
-#line 1194 "parser.cc" // lalr1.cc:859
+#line 1233 "parser.cc" // lalr1.cc:856
     break;
 
   case 43:
-#line 455 "parser.yy" // lalr1.cc:859
+#line 455 "parser.yy" // lalr1.cc:856
     {
                       yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::IFACE;
                   }
-#line 1202 "parser.cc" // lalr1.cc:859
+#line 1241 "parser.cc" // lalr1.cc:856
     break;
 
   case 44:
-#line 459 "parser.yy" // lalr1.cc:859
+#line 459 "parser.yy" // lalr1.cc:856
     {
                       yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::SRC;
                   }
-#line 1210 "parser.cc" // lalr1.cc:859
+#line 1249 "parser.cc" // lalr1.cc:856
     break;
 
   case 45:
-#line 463 "parser.yy" // lalr1.cc:859
+#line 463 "parser.yy" // lalr1.cc:856
     {
                       yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::DST;
                   }
-#line 1218 "parser.cc" // lalr1.cc:859
+#line 1257 "parser.cc" // lalr1.cc:856
     break;
 
   case 46:
-#line 467 "parser.yy" // lalr1.cc:859
+#line 467 "parser.yy" // lalr1.cc:856
     {
                       yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::LEN;
                   }
-#line 1226 "parser.cc" // lalr1.cc:859
+#line 1265 "parser.cc" // lalr1.cc:856
     break;
 
   case 47:
-#line 473 "parser.yy" // lalr1.cc:859
+#line 473 "parser.yy" // lalr1.cc:856
     {
                        yylhs.value.as< uint32_t > () = ctx.convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location);
                    }
-#line 1234 "parser.cc" // lalr1.cc:859
+#line 1273 "parser.cc" // lalr1.cc:856
     break;
 
   case 48:
-#line 477 "parser.yy" // lalr1.cc:859
+#line 477 "parser.yy" // lalr1.cc:856
     {
                        yylhs.value.as< uint32_t > () = 0;
                    }
-#line 1242 "parser.cc" // lalr1.cc:859
+#line 1281 "parser.cc" // lalr1.cc:856
     break;
 
   case 49:
-#line 483 "parser.yy" // lalr1.cc:859
+#line 483 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::CHADDR;
                 }
-#line 1250 "parser.cc" // lalr1.cc:859
+#line 1289 "parser.cc" // lalr1.cc:856
     break;
 
   case 50:
-#line 487 "parser.yy" // lalr1.cc:859
+#line 487 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::HLEN;
                 }
-#line 1258 "parser.cc" // lalr1.cc:859
+#line 1297 "parser.cc" // lalr1.cc:856
     break;
 
   case 51:
-#line 491 "parser.yy" // lalr1.cc:859
+#line 491 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::HTYPE;
                 }
-#line 1266 "parser.cc" // lalr1.cc:859
+#line 1305 "parser.cc" // lalr1.cc:856
     break;
 
   case 52:
-#line 495 "parser.yy" // lalr1.cc:859
+#line 495 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::CIADDR;
                 }
-#line 1274 "parser.cc" // lalr1.cc:859
+#line 1313 "parser.cc" // lalr1.cc:856
     break;
 
   case 53:
-#line 499 "parser.yy" // lalr1.cc:859
+#line 499 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::GIADDR;
                 }
-#line 1282 "parser.cc" // lalr1.cc:859
+#line 1321 "parser.cc" // lalr1.cc:856
     break;
 
   case 54:
-#line 503 "parser.yy" // lalr1.cc:859
+#line 503 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::YIADDR;
                 }
-#line 1290 "parser.cc" // lalr1.cc:859
+#line 1329 "parser.cc" // lalr1.cc:856
     break;
 
   case 55:
-#line 507 "parser.yy" // lalr1.cc:859
+#line 507 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::SIADDR;
                 }
-#line 1298 "parser.cc" // lalr1.cc:859
+#line 1337 "parser.cc" // lalr1.cc:856
     break;
 
   case 56:
-#line 511 "parser.yy" // lalr1.cc:859
+#line 511 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::MSGTYPE;
                  }
-#line 1306 "parser.cc" // lalr1.cc:859
+#line 1345 "parser.cc" // lalr1.cc:856
     break;
 
   case 57:
-#line 515 "parser.yy" // lalr1.cc:859
+#line 515 "parser.yy" // lalr1.cc:856
     {
                     yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::TRANSID;
                  }
-#line 1314 "parser.cc" // lalr1.cc:859
+#line 1353 "parser.cc" // lalr1.cc:856
     break;
 
   case 58:
-#line 521 "parser.yy" // lalr1.cc:859
+#line 521 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< TokenPkt6::FieldType > () = TokenPkt6::MSGTYPE;
                  }
-#line 1322 "parser.cc" // lalr1.cc:859
+#line 1361 "parser.cc" // lalr1.cc:856
     break;
 
   case 59:
-#line 525 "parser.yy" // lalr1.cc:859
+#line 525 "parser.yy" // lalr1.cc:856
     {
                      yylhs.value.as< TokenPkt6::FieldType > () = TokenPkt6::TRANSID;
                  }
-#line 1330 "parser.cc" // lalr1.cc:859
+#line 1369 "parser.cc" // lalr1.cc:856
     break;
 
   case 60:
-#line 531 "parser.yy" // lalr1.cc:859
+#line 531 "parser.yy" // lalr1.cc:856
     {
                        yylhs.value.as< TokenRelay6Field::FieldType > () = TokenRelay6Field::PEERADDR;
                    }
-#line 1338 "parser.cc" // lalr1.cc:859
+#line 1377 "parser.cc" // lalr1.cc:856
     break;
 
   case 61:
-#line 535 "parser.yy" // lalr1.cc:859
+#line 535 "parser.yy" // lalr1.cc:856
     {
                        yylhs.value.as< TokenRelay6Field::FieldType > () = TokenRelay6Field::LINKADDR;
                    }
-#line 1346 "parser.cc" // lalr1.cc:859
+#line 1385 "parser.cc" // lalr1.cc:856
     break;
 
   case 62:
-#line 541 "parser.yy" // lalr1.cc:859
+#line 541 "parser.yy" // lalr1.cc:856
     {
                     TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
                     ctx.expression.push_back(str);
                 }
-#line 1355 "parser.cc" // lalr1.cc:859
+#line 1394 "parser.cc" // lalr1.cc:856
     break;
 
   case 63:
-#line 548 "parser.yy" // lalr1.cc:859
+#line 548 "parser.yy" // lalr1.cc:856
     {
                      TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ()));
                      ctx.expression.push_back(str);
                  }
-#line 1364 "parser.cc" // lalr1.cc:859
+#line 1403 "parser.cc" // lalr1.cc:856
     break;
 
   case 64:
-#line 553 "parser.yy" // lalr1.cc:859
+#line 553 "parser.yy" // lalr1.cc:856
     {
                      TokenPtr str(new TokenString("all"));
                      ctx.expression.push_back(str);
                  }
-#line 1373 "parser.cc" // lalr1.cc:859
+#line 1412 "parser.cc" // lalr1.cc:856
     break;
 
 
-#line 1377 "parser.cc" // lalr1.cc:859
+#line 1416 "parser.cc" // lalr1.cc:856
             default:
               break;
             }
@@ -1435,7 +1474,6 @@ namespace isc { namespace eval {
        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);
@@ -1509,8 +1547,7 @@ namespace isc { namespace eval {
   }
     catch (...)
       {
-        YYCDEBUG << "Exception caught: cleaning lookahead and stack"
-                 << std::endl;
+        YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
         // Do not try to display the values of the reclaimed symbols,
         // as their printer might throw an exception.
         if (!yyla.empty ())
@@ -1528,7 +1565,7 @@ namespace isc { namespace eval {
   void
   EvalParser::error (const syntax_error& yyexc)
   {
-    error (yyexc.location, yyexc.what());
+    error (yyexc.location, yyexc.what ());
   }
 
   // Generate an error message.
@@ -1604,12 +1641,13 @@ namespace isc { namespace eval {
         case N:                               \
           yyformat = S;                       \
         break
-        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"));
+      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"));
 #undef YYCASE_
       }
 
@@ -1839,18 +1877,18 @@ namespace isc { namespace eval {
            i_end = yystack_.end ();
          i != i_end; ++i)
       *yycdebug_ << ' ' << i->state;
-    *yycdebug_ << std::endl;
+    *yycdebug_ << '\n';
   }
 
   // Report on the debug stream that the rule \a yyrule is going to be reduced.
   void
   EvalParser::yy_reduce_print_ (int yyrule)
   {
-    unsigned int yylno = yyrline_[yyrule];
+    unsigned yylno = yyrline_[yyrule];
     int yynrhs = yyr2_[yyrule];
     // Print the symbols being reduced, and their result.
     *yycdebug_ << "Reducing stack by rule " << yyrule - 1
-               << " (line " << yylno << "):" << std::endl;
+               << " (line " << yylno << "):\n";
     // The symbols being reduced.
     for (int yyi = 0; yyi < yynrhs; yyi++)
       YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
@@ -1859,10 +1897,10 @@ namespace isc { namespace eval {
 #endif // EVALDEBUG
 
 
-#line 14 "parser.yy" // lalr1.cc:1167
+#line 14 "parser.yy" // lalr1.cc:1163
 } } // isc::eval
-#line 1865 "parser.cc" // lalr1.cc:1167
-#line 559 "parser.yy" // lalr1.cc:1168
+#line 1903 "parser.cc" // lalr1.cc:1163
+#line 559 "parser.yy" // lalr1.cc:1164
 
 void
 isc::eval::EvalParser::error(const location_type& loc,
index 8f19851c0d7c3e9d4ed1e76d1a713838c557679e..c79f0fddbb9c6c0460851e52e5a430c0b5dcb985 100644 (file)
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.0.4.
+// A Bison parser, made by GNU Bison 3.0.5.
 
 // Skeleton interface for Bison LALR(1) parsers in C++
 
-// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
@@ -40,7 +40,7 @@
 #ifndef YY_EVAL_PARSER_H_INCLUDED
 # define YY_EVAL_PARSER_H_INCLUDED
 // //                    "%code requires" blocks.
-#line 17 "parser.yy" // lalr1.cc:377
+#line 17 "parser.yy" // lalr1.cc:379
 
 #include <string>
 #include <eval/token.h>
@@ -51,7 +51,7 @@
 using namespace isc::dhcp;
 using namespace isc::eval;
 
-#line 55 "parser.h" // lalr1.cc:377
+#line 55 "parser.h" // lalr1.cc:379
 
 # include <cassert>
 # include <cstdlib> // std::abort
@@ -134,9 +134,9 @@ using namespace isc::eval;
 # endif /* ! defined YYDEBUG */
 #endif  /* ! defined EVALDEBUG */
 
-#line 14 "parser.yy" // lalr1.cc:377
+#line 14 "parser.yy" // lalr1.cc:379
 namespace isc { namespace eval {
-#line 140 "parser.h" // lalr1.cc:377
+#line 140 "parser.h" // lalr1.cc:379
 
 
 
@@ -914,6 +914,8 @@ namespace isc { namespace eval {
       typedef basic_symbol<by_state> super_type;
       /// Construct an empty symbol.
       stack_symbol_type ();
+      /// Copy construct.
+      stack_symbol_type (const stack_symbol_type& that);
       /// Steal the contents from \a sym to build this.
       stack_symbol_type (state_type s, symbol_type& sym);
       /// Assignment, needed by push_back.
@@ -942,7 +944,7 @@ namespace isc { namespace eval {
     void yypush_ (const char* m, state_type s, symbol_type& sym);
 
     /// Pop \a n symbols the three stacks.
-    void yypop_ (unsigned int n = 1);
+    void yypop_ (unsigned n = 1);
 
     /// Constants.
     enum
@@ -1002,12 +1004,12 @@ namespace isc { namespace eval {
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54
     };
-    const unsigned int user_token_number_max_ = 309;
+    const unsigned user_token_number_max_ = 309;
     const token_number_type undef_token_ = 2;
 
-    if (static_cast<int>(t) <= yyeof_)
+    if (static_cast<int> (t) <= yyeof_)
       return yyeof_;
-    else if (static_cast<unsigned int> (t) <= user_token_number_max_)
+    else if (static_cast<unsigned> (t) <= user_token_number_max_)
       return translate_table[t];
     else
       return undef_token_;
@@ -1021,19 +1023,17 @@ namespace isc { namespace eval {
 
   // basic_symbol.
   template <typename Base>
-  inline
   EvalParser::basic_symbol<Base>::basic_symbol ()
     : value ()
   {}
 
   template <typename Base>
-  inline
   EvalParser::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
     : Base (other)
     , value ()
     , location (other.location)
   {
-      switch (other.type_get ())
+    switch (other.type_get ())
     {
       case 62: // option_repr_type
         value.copy< TokenOption::RepresentationType > (other.value);
@@ -1082,16 +1082,14 @@ namespace isc { namespace eval {
 
   }
 
-
   template <typename Base>
-  inline
   EvalParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l)
     : Base (t)
     , value ()
     , location (l)
   {
     (void) v;
-      switch (this->type_get ())
+    switch (this->type_get ())
     {
       case 62: // option_repr_type
         value.copy< TokenOption::RepresentationType > (v);
@@ -1214,14 +1212,12 @@ namespace isc { namespace eval {
 
 
   template <typename Base>
-  inline
   EvalParser::basic_symbol<Base>::~basic_symbol ()
   {
     clear ();
   }
 
   template <typename Base>
-  inline
   void
   EvalParser::basic_symbol<Base>::clear ()
   {
@@ -1236,7 +1232,7 @@ namespace isc { namespace eval {
     }
 
     // Type destructor.
-    switch (yytype)
+  switch (yytype)
     {
       case 62: // option_repr_type
         value.template destroy< TokenOption::RepresentationType > ();
@@ -1287,7 +1283,6 @@ namespace isc { namespace eval {
   }
 
   template <typename Base>
-  inline
   bool
   EvalParser::basic_symbol<Base>::empty () const
   {
@@ -1295,12 +1290,11 @@ namespace isc { namespace eval {
   }
 
   template <typename Base>
-  inline
   void
   EvalParser::basic_symbol<Base>::move (basic_symbol& s)
   {
-    super_type::move(s);
-      switch (this->type_get ())
+    super_type::move (s);
+    switch (this->type_get ())
     {
       case 62: // option_repr_type
         value.move< TokenOption::RepresentationType > (s.value);
@@ -1727,9 +1721,9 @@ namespace isc { namespace eval {
   }
 
 
-#line 14 "parser.yy" // lalr1.cc:377
+#line 14 "parser.yy" // lalr1.cc:379
 } } // isc::eval
-#line 1733 "parser.h" // lalr1.cc:377
+#line 1727 "parser.h" // lalr1.cc:379
 
 
 
index 6d547f27460432a096949f45225629e231ab72c5..cb72c16895dd400d9c0e94b797a800f04e24024a 100644 (file)
@@ -1,8 +1,9 @@
-// A Bison parser, made by GNU Bison 3.0.4.
+// Generated 201809161042
+// A Bison parser, made by GNU Bison 3.0.5.
 
 // Positions for Bison parsers in C++
 
-// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
 #  endif
 # endif
 
-#line 14 "parser.yy" // location.cc:296
+#line 14 "parser.yy" // location.cc:292
 namespace isc { namespace eval {
-#line 56 "position.hh" // location.cc:296
+#line 56 "position.hh" // location.cc:292
   /// Abstract a position.
   class position
   {
   public:
     /// Construct a position.
     explicit position (std::string* f = YY_NULLPTR,
-                       unsigned int l = 1u,
-                       unsigned int c = 1u)
+                       unsigned l = 1u,
+                       unsigned c = 1u)
       : filename (f)
       , line (l)
       , column (c)
-    {
-    }
+    {}
 
 
     /// Initialization.
     void initialize (std::string* fn = YY_NULLPTR,
-                     unsigned int l = 1u,
-                     unsigned int c = 1u)
+                     unsigned l = 1u,
+                     unsigned c = 1u)
     {
       filename = fn;
       line = l;
@@ -100,15 +100,15 @@ namespace isc { namespace eval {
     /// File name to which this position refers.
     std::string* filename;
     /// Current line number.
-    unsigned int line;
+    unsigned line;
     /// Current column number.
-    unsigned int column;
+    unsigned column;
 
   private:
     /// Compute max(min, lhs+rhs) (provided min <= lhs).
-    static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
+    static unsigned add_ (unsigned lhs, int rhs, unsigned min)
     {
-      return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
+      return (0 < rhs || -static_cast<unsigned>(rhs) < lhs
               ? rhs + lhs
               : min);
     }
@@ -174,7 +174,7 @@ namespace isc { namespace eval {
     return ostr << pos.line << '.' << pos.column;
   }
 
-#line 14 "parser.yy" // location.cc:296
+#line 14 "parser.yy" // location.cc:292
 } } // isc::eval
-#line 180 "position.hh" // location.cc:296
+#line 179 "position.hh" // location.cc:292
 #endif // !YY_EVAL_POSITION_HH_INCLUDED
index e0d2dfe10ffb954546fe71bea6738fb72e7a5c77..2d70e54f4b941f0b6aed0a3b028d92b09ea67776 100644 (file)
@@ -1,8 +1,9 @@
-// A Bison parser, made by GNU Bison 3.0.4.
+// Generated 201809161042
+// A Bison parser, made by GNU Bison 3.0.5.
 
 // Stack handling for Bison parsers in C++
 
-// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
 
 # include <vector>
 
-#line 14 "parser.yy" // stack.hh:132
+#line 14 "parser.yy" // stack.hh:131
 namespace isc { namespace eval {
-#line 46 "stack.hh" // stack.hh:132
+#line 46 "stack.hh" // stack.hh:131
+  /// A stack with random access from its top.
   template <class T, class S = std::vector<T> >
   class stack
   {
@@ -57,20 +59,24 @@ namespace isc { namespace eval {
       seq_.reserve (200);
     }
 
-    stack (unsigned int n)
+    stack (unsigned n)
       : seq_ (n)
     {}
 
-    inline
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
     T&
-    operator[] (unsigned int i)
+    operator[] (unsigned i)
     {
       return seq_[seq_.size () - 1 - i];
     }
 
-    inline
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
     const T&
-    operator[] (unsigned int i) const
+    operator[] (unsigned i) const
     {
       return seq_[seq_.size () - 1 - i];
     }
@@ -78,7 +84,6 @@ namespace isc { namespace eval {
     /// Steal the contents of \a t.
     ///
     /// Close to move-semantics.
-    inline
     void
     push (T& t)
     {
@@ -86,9 +91,8 @@ namespace isc { namespace eval {
       operator[](0).move (t);
     }
 
-    inline
     void
-    pop (unsigned int n = 1)
+    pop (unsigned n = 1)
     {
       for (; n; --n)
         seq_.pop_back ();
@@ -100,21 +104,18 @@ namespace isc { namespace eval {
       seq_.clear ();
     }
 
-    inline
     typename S::size_type
     size () const
     {
       return seq_.size ();
     }
 
-    inline
     const_iterator
     begin () const
     {
       return seq_.rbegin ();
     }
 
-    inline
     const_iterator
     end () const
     {
@@ -133,25 +134,24 @@ namespace isc { namespace eval {
   class slice
   {
   public:
-    slice (const S& stack, unsigned int range)
+    slice (const S& stack, unsigned range)
       : stack_ (stack)
       , range_ (range)
     {}
 
-    inline
     const T&
-    operator [] (unsigned int i) const
+    operator [] (unsigned i) const
     {
       return stack_[range_ - i];
     }
 
   private:
     const S& stack_;
-    unsigned int range_;
+    unsigned range_;
   };
 
-#line 14 "parser.yy" // stack.hh:132
+#line 14 "parser.yy" // stack.hh:131
 } } // isc::eval
-#line 156 "stack.hh" // stack.hh:132
+#line 155 "stack.hh" // stack.hh:131
 
 #endif // !YY_EVAL_STACK_HH_INCLUDED