44 #ifndef YY_EVAL_PARSER_H_INCLUDED
45 # define YY_EVAL_PARSER_H_INCLUDED
47 #line 17 "parser.yy" // lalr1.cc:404
53 #include <boost/lexical_cast.hpp>
58 #line 59 "parser.h" // lalr1.cc:404
67 #if defined __cplusplus
68 # define YY_CPLUSPLUS __cplusplus
70 # define YY_CPLUSPLUS 199711L
74 #if 201103L <= YY_CPLUSPLUS
75 # define YY_MOVE std::move
76 # define YY_MOVE_OR_COPY move
77 # define YY_MOVE_REF(Type) Type&&
78 # define YY_RVREF(Type) Type&&
79 # define YY_COPY(Type) Type
82 # define YY_MOVE_OR_COPY copy
83 # define YY_MOVE_REF(Type) Type&
84 # define YY_RVREF(Type) const Type&
85 # define YY_COPY(Type) const Type&
87 # include "location.hh"
91 # define YYASSERT assert
96 # if (defined __GNUC__ \
97 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
98 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
99 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
101 # define YY_ATTRIBUTE(Spec)
105 #ifndef YY_ATTRIBUTE_PURE
106 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
109 #ifndef YY_ATTRIBUTE_UNUSED
110 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
114 #if ! defined lint || defined __GNUC__
115 # define YYUSE(E) ((void) (E))
120 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
122 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
123 _Pragma ("GCC diagnostic push") \
124 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
125 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
126 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
127 _Pragma ("GCC diagnostic pop")
129 # define YY_INITIAL_VALUE(Value) Value
131 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
132 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
133 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
135 #ifndef YY_INITIAL_VALUE
136 # define YY_INITIAL_VALUE(Value)
140 # if defined __cplusplus
141 # if 201103L <= __cplusplus
142 # define YY_NULLPTR nullptr
144 # define YY_NULLPTR 0
147 # define YY_NULLPTR ((void*)0)
164 #line 14 "parser.yy" // lalr1.cc:404
165 namespace isc {
namespace eval {
166 #line 167 "parser.h" // lalr1.cc:404
169 template <
typename T,
typename S = std::vector<T> >
188 return seq_[size () - 1 - i];
206 return seq_[size () - 1 - i];
213 operator[] (
int i)
const
224 seq_.push_back (T ());
225 operator[](0).move (t);
250 return seq_.rbegin ();
267 template <
typename T,
typename S = stack<T> >
277 operator[] (
int i)
const
279 return stack_[range_ - i];
303 , yytypeid_ (YY_NULLPTR)
307 template <
typename T>
309 : yytypeid_ (&typeid (T))
312 new (yyas_<T> ()) T (
YY_MOVE (t));
322 template <
typename T>
328 yytypeid_ = &
typeid (T);
329 return *
new (yyas_<T> ()) T ();
332 # if 201103L <= YY_CPLUSPLUS
333 template <
typename T,
typename U>
340 yytypeid_ = &
typeid (T);
341 return *
new (yyas_<T> ()) T (std::forward <U>(u));
344 template <
typename T>
351 yytypeid_ = &
typeid (T);
352 return *
new (yyas_<T> ()) T (t);
358 template <
typename T>
362 return emplace<T> ();
367 template <
typename T>
371 return emplace<T> (t);
375 template <
typename T>
380 YYASSERT (*yytypeid_ ==
typeid (T));
386 template <
typename T>
391 YYASSERT (*yytypeid_ ==
typeid (T));
404 template <
typename T>
409 YYASSERT (*yytypeid_ == *other.yytypeid_);
410 std::swap (as<T> (), other.
as<T> ());
416 template <
typename T>
420 # if 201103L <= YY_CPLUSPLUS
421 emplace<T> (std::move (other.
as<T> ()));
429 # if 201103L <= YY_CPLUSPLUS
430 template <
typename T>
433 move (self_type&& other)
435 emplace<T> (std::move (other.as<T> ()));
441 template <
typename T>
445 emplace<T> (other.
as<T> ());
449 template <
typename T>
454 yytypeid_ = YY_NULLPTR;
459 self_type& operator= (
const self_type&);
463 template <
typename T>
467 void *yyp = yybuffer_.yyraw;
468 return static_cast<T*
> (yyp);
472 template <
typename T>
476 const void *yyp = yybuffer_.yyraw;
477 return static_cast<const T*
> (yyp);
489 const std::type_info *yytypeid_;
517 char dummy6[
sizeof (int8_t)];
524 char dummy7[
sizeof (std::string)];
527 char dummy8[
sizeof (uint16_t)];
531 char dummy9[
sizeof (uint32_t)];
565 TOKEN_PEERADDR = 268,
566 TOKEN_LINKADDR = 269,
567 TOKEN_LBRACKET = 270,
568 TOKEN_RBRACKET = 271,
586 TOKEN_SUBSTRING = 289,
591 TOKEN_TOHEXSTRING = 294,
595 TOKEN_VENDOR_CLASS = 298,
599 TOKEN_ENTERPRISE = 302,
600 TOKEN_TOPLEVEL_BOOL = 303,
601 TOKEN_TOPLEVEL_STRING = 304,
604 TOKEN_HEXSTRING = 307,
605 TOKEN_OPTION_NAME = 308,
606 TOKEN_IP_ADDRESS = 309
617 enum { empty_symbol = -2 };
628 template <
typename Base>
642 # if 201103L <= YY_CPLUSPLUS
647 # if 201103L <= YY_CPLUSPLUS
652 # if 201103L <= YY_CPLUSPLUS
657 # if 201103L <= YY_CPLUSPLUS
662 # if 201103L <= YY_CPLUSPLUS
667 # if 201103L <= YY_CPLUSPLUS
672 # if 201103L <= YY_CPLUSPLUS
677 # if 201103L <= YY_CPLUSPLUS
682 # if 201103L <= YY_CPLUSPLUS
687 # if 201103L <= YY_CPLUSPLUS
713 #if YY_CPLUSPLUS < 201103L
766 virtual int parse ();
772 void set_debug_stream (std::ostream &);
785 virtual void error (
const location_type& loc,
const std::string& msg);
1011 typedef int state_type;
1016 virtual std::string yysyntax_error_ (state_type yystate,
1022 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
1026 static bool yy_pact_value_is_default_ (
int yyvalue);
1030 static bool yy_table_value_is_error_ (
int yyvalue);
1032 static const signed char yypact_ninf_;
1033 static const signed char yytable_ninf_;
1041 static const short yypact_[];
1046 static const unsigned char yydefact_[];
1049 static const short yypgoto_[];
1052 static const short yydefgoto_[];
1057 static const unsigned char yytable_[];
1059 static const unsigned char yycheck_[];
1063 static const unsigned char yystos_[];
1066 static const unsigned char yyr1_[];
1069 static const unsigned char yyr2_[];
1073 static std::string yytnamerr_ (
const char *n);
1077 static const char*
const yytname_[];
1080 static const unsigned short yyrline_[];
1082 virtual void yy_reduce_print_ (
int r);
1084 virtual void yystack_print_ ();
1089 std::ostream* yycdebug_;
1094 template <
typename Base>
1102 template <
typename Base>
1113 typedef state_type kind_type;
1116 by_state (kind_type s);
1119 by_state (
const by_state& other);
1125 void move (by_state& that);
1132 enum { empty_state = -1 };
1140 struct stack_symbol_type : basic_symbol<by_state>
1143 typedef basic_symbol<by_state> super_type;
1145 stack_symbol_type ();
1147 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
1149 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
1150 #if YY_CPLUSPLUS < 201103L
1151 stack_symbol_type& operator= (stack_symbol_type& that);
1161 stack_type yystack_;
1168 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
1176 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
1179 void yypop_ (
int n = 1);
1201 EvalParser::yytranslate_ (token_type t)
1204 const token_number_type
1207 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1232 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1233 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1234 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1235 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1236 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1237 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
1239 const unsigned user_token_number_max_ = 309;
1240 const token_number_type undef_token_ = 2;
1242 if (
static_cast<int> (t) <= yyeof_)
1244 else if (
static_cast<unsigned> (t) <= user_token_number_max_)
1245 return translate_table[t];
1247 return undef_token_;
1251 EvalParser::syntax_error::syntax_error (
const location_type& l,
const std::string& m)
1252 : std::runtime_error (m)
1257 template <
typename Base>
1263 template <
typename Base>
1267 , location (
YY_MOVE (other.location))
1269 switch (other.type_get ())
1320 # if 201103L <= YY_CPLUSPLUS
1321 template <
typename Base>
1324 , location (std::move (l))
1327 template <
typename Base>
1333 # if 201103L <= YY_CPLUSPLUS
1334 template <
typename Base>
1337 , value (std::move (v))
1338 , location (std::move (l))
1341 template <
typename Base>
1348 # if 201103L <= YY_CPLUSPLUS
1349 template <
typename Base>
1352 , value (std::move (v))
1353 , location (std::move (l))
1356 template <
typename Base>
1363 # if 201103L <= YY_CPLUSPLUS
1364 template <
typename Base>
1367 , value (std::move (v))
1368 , location (std::move (l))
1371 template <
typename Base>
1378 # if 201103L <= YY_CPLUSPLUS
1379 template <
typename Base>
1382 , value (std::move (v))
1383 , location (std::move (l))
1386 template <
typename Base>
1393 # if 201103L <= YY_CPLUSPLUS
1394 template <
typename Base>
1397 , value (std::move (v))
1398 , location (std::move (l))
1401 template <
typename Base>
1408 # if 201103L <= YY_CPLUSPLUS
1409 template <
typename Base>
1412 , value (std::move (v))
1413 , location (std::move (l))
1416 template <
typename Base>
1423 # if 201103L <= YY_CPLUSPLUS
1424 template <
typename Base>
1427 , value (std::move (v))
1428 , location (std::move (l))
1431 template <
typename Base>
1438 # if 201103L <= YY_CPLUSPLUS
1439 template <
typename Base>
1442 , value (std::move (v))
1443 , location (std::move (l))
1446 template <
typename Base>
1453 # if 201103L <= YY_CPLUSPLUS
1454 template <
typename Base>
1457 , value (std::move (v))
1458 , location (std::move (l))
1461 template <
typename Base>
1470 template <
typename Base>
1476 template <
typename Base>
1494 value.template destroy< TokenOption::RepresentationType > ();
1498 value.template destroy< TokenPkt4::FieldType > ();
1502 value.template destroy< TokenPkt6::FieldType > ();
1506 value.template destroy< TokenPkt::MetadataType > ();
1510 value.template destroy< TokenRelay6Field::FieldType > ();
1514 value.template destroy< int8_t > ();
1522 value.template destroy< std::string > ();
1526 value.template destroy< uint16_t > ();
1531 value.template destroy< uint32_t > ();
1541 template <
typename Base>
1548 template <
typename Base>
1552 super_type::move (s);
1553 switch (this->type_get ())
1616 : type (yytranslate_ (t))
1648 const unsigned short
1651 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1652 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1653 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1654 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1655 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1656 305, 306, 307, 308, 309
1658 return static_cast<token_type> (yytoken_number_[type]);
2034 #line 14 "parser.yy" // lalr1.cc:404
2036 #line 2037 "parser.h" // lalr1.cc:404
2041 #endif // !YY_EVAL_PARSER_H_INCLUDED