| Kea 3.0.2-git

parser.h
Go to the documentation of this file.
1// A Bison parser, made by GNU Bison 3.8.2.
2
3// Skeleton interface for Bison LALR(1) parsers in C++
4
5// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
6
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <https://www.gnu.org/licenses/>.
19
20// As a special exception, you may create a larger work that contains
21// part or all of the Bison parser skeleton and distribute that work
22// under terms of your choice, so long as that work isn't itself a
23// parser generator using the skeleton or a modified version thereof
24// as a parser skeleton. Alternatively, if you modify or redistribute
25// the parser skeleton itself, you may (at your option) remove this
26// special exception, which will cause the skeleton and the resulting
27// Bison output files to be licensed under the GNU General Public
28// License without this special exception.
29
30// This special exception was added by the Free Software Foundation in
31// version 2.2 of Bison.
32
33
38
39// C++ LALR(1) parser skeleton written by Akim Demaille.
40
41// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
42// especially those whose name start with YY_ or yy_. They are
43// private implementation details that can be changed or removed.
44
45#ifndef YY_EVAL_PARSER_H_INCLUDED
46# define YY_EVAL_PARSER_H_INCLUDED
47// "%code requires" blocks.
48#line 17 "parser.yy"
49
50#include <string>
51#include <eval/token.h>
52#include <eval/eval_context_decl.h>
53#include <dhcp/option.h>
54#include <boost/lexical_cast.hpp>
55
56 using namespace isc::dhcp;
57 using namespace isc::eval;
58
59#line 60 "parser.h"
60
61# include <cassert>
62# include <cstdlib> // std::abort
63# include <iostream>
64# include <stdexcept>
65# include <string>
66# include <vector>
67
68#if defined __cplusplus
69# define YY_CPLUSPLUS __cplusplus
70#else
71# define YY_CPLUSPLUS 199711L
72#endif
73
74// Support move semantics when possible.
75#if 201103L <= YY_CPLUSPLUS
76# define YY_MOVE std::move
77# define YY_MOVE_OR_COPY move
78# define YY_MOVE_REF(Type) Type&&
79# define YY_RVREF(Type) Type&&
80# define YY_COPY(Type) Type
81#else
82# define YY_MOVE
83# define YY_MOVE_OR_COPY copy
84# define YY_MOVE_REF(Type) Type&
85# define YY_RVREF(Type) const Type&
86# define YY_COPY(Type) const Type&
87#endif
88
89// Support noexcept when possible.
90#if 201103L <= YY_CPLUSPLUS
91# define YY_NOEXCEPT noexcept
92# define YY_NOTHROW
93#else
94# define YY_NOEXCEPT
95# define YY_NOTHROW throw ()
96#endif
97
98// Support constexpr when possible.
99#if 201703 <= YY_CPLUSPLUS
100# define YY_CONSTEXPR constexpr
101#else
102# define YY_CONSTEXPR
103#endif
104# include "location.hh"
105#include <typeinfo>
106#ifndef EVAL_ASSERT
107# include <cassert>
108# define EVAL_ASSERT assert
109#endif
110
111
112#ifndef YY_ATTRIBUTE_PURE
113# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
114# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
115# else
116# define YY_ATTRIBUTE_PURE
117# endif
118#endif
119
120#ifndef YY_ATTRIBUTE_UNUSED
121# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
122# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
123# else
124# define YY_ATTRIBUTE_UNUSED
125# endif
126#endif
127
128/* Suppress unused-variable warnings by "using" E. */
129#if ! defined lint || defined __GNUC__
130# define YY_USE(E) ((void) (E))
131#else
132# define YY_USE(E) /* empty */
133#endif
134
135/* Suppress an incorrect diagnostic about yylval being uninitialized. */
136#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
137# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
138# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
139 _Pragma ("GCC diagnostic push") \
140 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
141# else
142# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
143 _Pragma ("GCC diagnostic push") \
144 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
145 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
146# endif
147# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
148 _Pragma ("GCC diagnostic pop")
149#else
150# define YY_INITIAL_VALUE(Value) Value
151#endif
152#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
153# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
154# define YY_IGNORE_MAYBE_UNINITIALIZED_END
155#endif
156#ifndef YY_INITIAL_VALUE
157# define YY_INITIAL_VALUE(Value) /* Nothing. */
158#endif
159
160#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
161# define YY_IGNORE_USELESS_CAST_BEGIN \
162 _Pragma ("GCC diagnostic push") \
163 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
164# define YY_IGNORE_USELESS_CAST_END \
165 _Pragma ("GCC diagnostic pop")
166#endif
167#ifndef YY_IGNORE_USELESS_CAST_BEGIN
168# define YY_IGNORE_USELESS_CAST_BEGIN
169# define YY_IGNORE_USELESS_CAST_END
170#endif
171
172# ifndef YY_CAST
173# ifdef __cplusplus
174# define YY_CAST(Type, Val) static_cast<Type> (Val)
175# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
176# else
177# define YY_CAST(Type, Val) ((Type) (Val))
178# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
179# endif
180# endif
181# ifndef YY_NULLPTR
182# if defined __cplusplus
183# if 201103L <= __cplusplus
184# define YY_NULLPTR nullptr
185# else
186# define YY_NULLPTR 0
187# endif
188# else
189# define YY_NULLPTR ((void*)0)
190# endif
191# endif
192
193/* Debug traces. */
194#ifndef EVALDEBUG
195# if defined YYDEBUG
196#if YYDEBUG
197# define EVALDEBUG 1
198# else
199# define EVALDEBUG 0
200# endif
201# else /* ! defined YYDEBUG */
202# define EVALDEBUG 1
203# endif /* ! defined YYDEBUG */
204#endif /* ! defined EVALDEBUG */
205
206#line 14 "parser.yy"
207 namespace isc { namespace eval {
208#line 209 "parser.h"
209
210
211
212
214 class EvalParser
215 {
216 public:
217#ifdef EVALSTYPE
218# ifdef __GNUC__
219# pragma GCC message "bison: do not #define EVALSTYPE in C++, use %define api.value.type"
220# endif
221 typedef EVALSTYPE value_type;
222#else
228 class value_type
229 {
230 public:
232 typedef value_type self_type;
233
235 value_type () YY_NOEXCEPT
236 : yyraw_ ()
237 , yytypeid_ (YY_NULLPTR)
238 {}
239
241 template <typename T>
242 value_type (YY_RVREF (T) t)
243 : yytypeid_ (&typeid (T))
244 {
245 EVAL_ASSERT (sizeof (T) <= size);
246 new (yyas_<T> ()) T (YY_MOVE (t));
247 }
248
249#if 201103L <= YY_CPLUSPLUS
251 value_type (const self_type&) = delete;
253 self_type& operator= (const self_type&) = delete;
254#endif
255
257 ~value_type () YY_NOEXCEPT
258 {
259 EVAL_ASSERT (!yytypeid_);
260 }
261
262# if 201103L <= YY_CPLUSPLUS
264 template <typename T, typename... U>
265 T&
266 emplace (U&&... u)
267 {
268 EVAL_ASSERT (!yytypeid_);
269 EVAL_ASSERT (sizeof (T) <= size);
270 yytypeid_ = & typeid (T);
271 return *new (yyas_<T> ()) T (std::forward <U>(u)...);
272 }
273# else
275 template <typename T>
276 T&
277 emplace ()
278 {
279 EVAL_ASSERT (!yytypeid_);
280 EVAL_ASSERT (sizeof (T) <= size);
281 yytypeid_ = & typeid (T);
282 return *new (yyas_<T> ()) T ();
283 }
284
286 template <typename T>
287 T&
288 emplace (const T& t)
289 {
290 EVAL_ASSERT (!yytypeid_);
291 EVAL_ASSERT (sizeof (T) <= size);
292 yytypeid_ = & typeid (T);
293 return *new (yyas_<T> ()) T (t);
294 }
295# endif
296
299 template <typename T>
300 T&
301 build ()
302 {
303 return emplace<T> ();
304 }
305
308 template <typename T>
309 T&
310 build (const T& t)
311 {
312 return emplace<T> (t);
313 }
314
316 template <typename T>
317 T&
318 as () YY_NOEXCEPT
319 {
320 EVAL_ASSERT (yytypeid_);
321 EVAL_ASSERT (*yytypeid_ == typeid (T));
322 EVAL_ASSERT (sizeof (T) <= size);
323 return *yyas_<T> ();
324 }
325
327 template <typename T>
328 const T&
329 as () const YY_NOEXCEPT
330 {
331 EVAL_ASSERT (yytypeid_);
332 EVAL_ASSERT (*yytypeid_ == typeid (T));
333 EVAL_ASSERT (sizeof (T) <= size);
334 return *yyas_<T> ();
335 }
336
345 template <typename T>
346 void
347 swap (self_type& that) YY_NOEXCEPT
348 {
349 EVAL_ASSERT (yytypeid_);
350 EVAL_ASSERT (*yytypeid_ == *that.yytypeid_);
351 std::swap (as<T> (), that.as<T> ());
352 }
353
357 template <typename T>
358 void
359 move (self_type& that)
360 {
361# if 201103L <= YY_CPLUSPLUS
362 emplace<T> (std::move (that.as<T> ()));
363# else
364 emplace<T> ();
365 swap<T> (that);
366# endif
367 that.destroy<T> ();
368 }
369
370# if 201103L <= YY_CPLUSPLUS
372 template <typename T>
373 void
374 move (self_type&& that)
375 {
376 emplace<T> (std::move (that.as<T> ()));
377 that.destroy<T> ();
378 }
379#endif
380
382 template <typename T>
383 void
384 copy (const self_type& that)
385 {
386 emplace<T> (that.as<T> ());
387 }
388
390 template <typename T>
391 void
392 destroy ()
393 {
394 as<T> ().~T ();
395 yytypeid_ = YY_NULLPTR;
396 }
397
398 private:
399#if YY_CPLUSPLUS < 201103L
401 value_type (const self_type&);
403 self_type& operator= (const self_type&);
404#endif
405
407 template <typename T>
408 T*
409 yyas_ () YY_NOEXCEPT
410 {
411 void *yyp = yyraw_;
412 return static_cast<T*> (yyp);
413 }
414
416 template <typename T>
417 const T*
418 yyas_ () const YY_NOEXCEPT
419 {
420 const void *yyp = yyraw_;
421 return static_cast<const T*> (yyp);
422 }
423
425 union union_type
426 {
427 // option_repr_type
428 char dummy1[sizeof (TokenOption::RepresentationType)];
429
430 // pkt4_field
431 char dummy2[sizeof (TokenPkt4::FieldType)];
432
433 // pkt6_field
434 char dummy3[sizeof (TokenPkt6::FieldType)];
435
436 // pkt_metadata
437 char dummy4[sizeof (TokenPkt::MetadataType)];
438
439 // relay6_field
440 char dummy5[sizeof (TokenRelay6Field::FieldType)];
441
442 // nest_level
443 char dummy6[sizeof (int8_t)];
444
445 // "constant string"
446 // "integer"
447 // "constant hexstring"
448 // "option name"
449 // "ip address"
450 char dummy7[sizeof (std::string)];
451
452 // option_code
453 // sub_option_code
454 char dummy8[sizeof (uint16_t)];
455
456 // integer_expr
457 // enterprise_id
458 char dummy9[sizeof (uint32_t)];
459 };
460
462 enum { size = sizeof (union_type) };
463
465 union
466 {
468 long double yyalign_me_;
470 char yyraw_[size];
471 };
472
474 const std::type_info *yytypeid_;
475 };
476
477#endif
479 typedef value_type semantic_type;
480
482 typedef location location_type;
483
485 struct syntax_error : std::runtime_error
486 {
487 syntax_error (const location_type& l, const std::string& m)
488 : std::runtime_error (m)
489 , location (l)
490 {}
491
492 syntax_error (const syntax_error& s)
493 : std::runtime_error (s.what ())
494 , location (s.location)
495 {}
496
497 ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
498
499 location_type location;
500 };
501
503 struct token
504 {
505 enum token_kind_type
506 {
507 TOKEN_EVALEMPTY = -2,
508 TOKEN_END = 0, // "end of file"
509 TOKEN_EVALerror = 256, // error
510 TOKEN_EVALUNDEF = 257, // "invalid token"
511 TOKEN_LPAREN = 258, // "("
512 TOKEN_RPAREN = 259, // ")"
513 TOKEN_NOT = 260, // "not"
514 TOKEN_AND = 261, // "and"
515 TOKEN_SAND = 262, // "sand"
516 TOKEN_OR = 263, // "or"
517 TOKEN_SOR = 264, // "sor"
518 TOKEN_EQUAL = 265, // "=="
519 TOKEN_OPTION = 266, // "option"
520 TOKEN_RELAY4 = 267, // "relay4"
521 TOKEN_RELAY6 = 268, // "relay6"
522 TOKEN_MEMBER = 269, // "member"
523 TOKEN_PEERADDR = 270, // "peeraddr"
524 TOKEN_LINKADDR = 271, // "linkaddr"
525 TOKEN_LBRACKET = 272, // "["
526 TOKEN_RBRACKET = 273, // "]"
527 TOKEN_DOT = 274, // "."
528 TOKEN_TEXT = 275, // "text"
529 TOKEN_HEX = 276, // "hex"
530 TOKEN_EXISTS = 277, // "exists"
531 TOKEN_PKT = 278, // "pkt"
532 TOKEN_IFACE = 279, // "iface"
533 TOKEN_SRC = 280, // "src"
534 TOKEN_DST = 281, // "dst"
535 TOKEN_LEN = 282, // "len"
536 TOKEN_PKT4 = 283, // "pkt4"
537 TOKEN_CHADDR = 284, // "mac"
538 TOKEN_HLEN = 285, // "hlen"
539 TOKEN_HTYPE = 286, // "htype"
540 TOKEN_CIADDR = 287, // "ciaddr"
541 TOKEN_GIADDR = 288, // "giaddr"
542 TOKEN_YIADDR = 289, // "yiaddr"
543 TOKEN_SIADDR = 290, // "siaddr"
544 TOKEN_SUBSTRING = 291, // "substring"
545 TOKEN_SPLIT = 292, // "split"
546 TOKEN_ALL = 293, // "all"
547 TOKEN_COMA = 294, // ","
548 TOKEN_CONCAT = 295, // "concat"
549 TOKEN_PLUS = 296, // "+"
550 TOKEN_IFELSE = 297, // "ifelse"
551 TOKEN_SIFELSE = 298, // "sifelse"
552 TOKEN_TOHEXSTRING = 299, // "hexstring"
553 TOKEN_ADDRTOTEXT = 300, // "addrtotext"
554 TOKEN_INT8TOTEXT = 301, // "int8totext"
555 TOKEN_INT16TOTEXT = 302, // "int16totext"
556 TOKEN_INT32TOTEXT = 303, // "int32totext"
557 TOKEN_UINT8TOTEXT = 304, // "uint8totext"
558 TOKEN_UINT16TOTEXT = 305, // "uint16totext"
559 TOKEN_UINT32TOTEXT = 306, // "uint32totext"
560 TOKEN_LCASE = 307, // "lcase"
561 TOKEN_UCASE = 308, // "ucase"
562 TOKEN_PKT6 = 309, // "pkt6"
563 TOKEN_MSGTYPE = 310, // "msgtype"
564 TOKEN_TRANSID = 311, // "transid"
565 TOKEN_VENDOR_CLASS = 312, // "vendor-class"
566 TOKEN_VENDOR = 313, // "vendor"
567 TOKEN_ANY = 314, // "*"
568 TOKEN_DATA = 315, // "data"
569 TOKEN_ENTERPRISE = 316, // "enterprise"
570 TOKEN_MATCH = 317, // "match"
571 TOKEN_TOPLEVEL_BOOL = 318, // "top-level bool"
572 TOKEN_TOPLEVEL_STRING = 319, // "top-level string"
573 TOKEN_STRING = 320, // "constant string"
574 TOKEN_INTEGER = 321, // "integer"
575 TOKEN_HEXSTRING = 322, // "constant hexstring"
576 TOKEN_OPTION_NAME = 323, // "option name"
577 TOKEN_IP_ADDRESS = 324 // "ip address"
578 };
579
580 typedef token_kind_type yytokentype;
581 };
582
584 typedef token::token_kind_type token_kind_type;
585
587 typedef token_kind_type token_type;
588
590 struct symbol_kind
591 {
592 enum symbol_kind_type
593 {
594 YYNTOKENS = 70,
595 S_YYEMPTY = -2,
596 S_YYEOF = 0, // "end of file"
597 S_YYerror = 1, // error
598 S_YYUNDEF = 2, // "invalid token"
599 S_LPAREN = 3, // "("
600 S_RPAREN = 4, // ")"
601 S_NOT = 5, // "not"
602 S_AND = 6, // "and"
603 S_SAND = 7, // "sand"
604 S_OR = 8, // "or"
605 S_SOR = 9, // "sor"
606 S_EQUAL = 10, // "=="
607 S_OPTION = 11, // "option"
608 S_RELAY4 = 12, // "relay4"
609 S_RELAY6 = 13, // "relay6"
610 S_MEMBER = 14, // "member"
611 S_PEERADDR = 15, // "peeraddr"
612 S_LINKADDR = 16, // "linkaddr"
613 S_LBRACKET = 17, // "["
614 S_RBRACKET = 18, // "]"
615 S_DOT = 19, // "."
616 S_TEXT = 20, // "text"
617 S_HEX = 21, // "hex"
618 S_EXISTS = 22, // "exists"
619 S_PKT = 23, // "pkt"
620 S_IFACE = 24, // "iface"
621 S_SRC = 25, // "src"
622 S_DST = 26, // "dst"
623 S_LEN = 27, // "len"
624 S_PKT4 = 28, // "pkt4"
625 S_CHADDR = 29, // "mac"
626 S_HLEN = 30, // "hlen"
627 S_HTYPE = 31, // "htype"
628 S_CIADDR = 32, // "ciaddr"
629 S_GIADDR = 33, // "giaddr"
630 S_YIADDR = 34, // "yiaddr"
631 S_SIADDR = 35, // "siaddr"
632 S_SUBSTRING = 36, // "substring"
633 S_SPLIT = 37, // "split"
634 S_ALL = 38, // "all"
635 S_COMA = 39, // ","
636 S_CONCAT = 40, // "concat"
637 S_PLUS = 41, // "+"
638 S_IFELSE = 42, // "ifelse"
639 S_SIFELSE = 43, // "sifelse"
640 S_TOHEXSTRING = 44, // "hexstring"
641 S_ADDRTOTEXT = 45, // "addrtotext"
642 S_INT8TOTEXT = 46, // "int8totext"
643 S_INT16TOTEXT = 47, // "int16totext"
644 S_INT32TOTEXT = 48, // "int32totext"
645 S_UINT8TOTEXT = 49, // "uint8totext"
646 S_UINT16TOTEXT = 50, // "uint16totext"
647 S_UINT32TOTEXT = 51, // "uint32totext"
648 S_LCASE = 52, // "lcase"
649 S_UCASE = 53, // "ucase"
650 S_PKT6 = 54, // "pkt6"
651 S_MSGTYPE = 55, // "msgtype"
652 S_TRANSID = 56, // "transid"
653 S_VENDOR_CLASS = 57, // "vendor-class"
654 S_VENDOR = 58, // "vendor"
655 S_ANY = 59, // "*"
656 S_DATA = 60, // "data"
657 S_ENTERPRISE = 61, // "enterprise"
658 S_MATCH = 62, // "match"
659 S_TOPLEVEL_BOOL = 63, // "top-level bool"
660 S_TOPLEVEL_STRING = 64, // "top-level string"
661 S_STRING = 65, // "constant string"
662 S_INTEGER = 66, // "integer"
663 S_HEXSTRING = 67, // "constant hexstring"
664 S_OPTION_NAME = 68, // "option name"
665 S_IP_ADDRESS = 69, // "ip address"
666 S_YYACCEPT = 70, // $accept
667 S_start = 71, // start
668 S_expression = 72, // expression
669 S_bool_expr = 73, // bool_expr
670 S_74_1 = 74, // $@1
671 S_75_2 = 75, // $@2
672 S_string_expr = 76, // string_expr
673 S_77_3 = 77, // $@3
674 S_78_4 = 78, // $@4
675 S_integer_expr = 79, // integer_expr
676 S_option_code = 80, // option_code
677 S_sub_option_code = 81, // sub_option_code
678 S_option_repr_type = 82, // option_repr_type
679 S_nest_level = 83, // nest_level
680 S_pkt_metadata = 84, // pkt_metadata
681 S_enterprise_id = 85, // enterprise_id
682 S_pkt4_field = 86, // pkt4_field
683 S_pkt6_field = 87, // pkt6_field
684 S_relay6_field = 88, // relay6_field
685 S_start_expr = 89, // start_expr
686 S_length_expr = 90, // length_expr
687 S_int_expr = 91 // int_expr
688 };
689 };
690
692 typedef symbol_kind::symbol_kind_type symbol_kind_type;
693
695 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
696
703 template <typename Base>
704 struct basic_symbol : Base
705 {
707 typedef Base super_type;
708
710 basic_symbol () YY_NOEXCEPT
711 : value ()
712 , location ()
713 {}
714
715#if 201103L <= YY_CPLUSPLUS
717 basic_symbol (basic_symbol&& that)
718 : Base (std::move (that))
719 , value ()
720 , location (std::move (that.location))
721 {
722 switch (this->kind ())
723 {
724 case symbol_kind::S_option_repr_type: // option_repr_type
725 value.move< TokenOption::RepresentationType > (std::move (that.value));
726 break;
727
728 case symbol_kind::S_pkt4_field: // pkt4_field
729 value.move< TokenPkt4::FieldType > (std::move (that.value));
730 break;
731
732 case symbol_kind::S_pkt6_field: // pkt6_field
733 value.move< TokenPkt6::FieldType > (std::move (that.value));
734 break;
735
736 case symbol_kind::S_pkt_metadata: // pkt_metadata
737 value.move< TokenPkt::MetadataType > (std::move (that.value));
738 break;
739
740 case symbol_kind::S_relay6_field: // relay6_field
741 value.move< TokenRelay6Field::FieldType > (std::move (that.value));
742 break;
743
744 case symbol_kind::S_nest_level: // nest_level
745 value.move< int8_t > (std::move (that.value));
746 break;
747
748 case symbol_kind::S_STRING: // "constant string"
749 case symbol_kind::S_INTEGER: // "integer"
750 case symbol_kind::S_HEXSTRING: // "constant hexstring"
751 case symbol_kind::S_OPTION_NAME: // "option name"
752 case symbol_kind::S_IP_ADDRESS: // "ip address"
753 value.move< std::string > (std::move (that.value));
754 break;
755
756 case symbol_kind::S_option_code: // option_code
757 case symbol_kind::S_sub_option_code: // sub_option_code
758 value.move< uint16_t > (std::move (that.value));
759 break;
760
761 case symbol_kind::S_integer_expr: // integer_expr
762 case symbol_kind::S_enterprise_id: // enterprise_id
763 value.move< uint32_t > (std::move (that.value));
764 break;
765
766 default:
767 break;
768 }
769
770 }
771#endif
772
774 basic_symbol (const basic_symbol& that);
775
777#if 201103L <= YY_CPLUSPLUS
778 basic_symbol (typename Base::kind_type t, location_type&& l)
779 : Base (t)
780 , location (std::move (l))
781 {}
782#else
783 basic_symbol (typename Base::kind_type t, const location_type& l)
784 : Base (t)
785 , location (l)
786 {}
787#endif
788
789#if 201103L <= YY_CPLUSPLUS
790 basic_symbol (typename Base::kind_type t, TokenOption::RepresentationType&& v, location_type&& l)
791 : Base (t)
792 , value (std::move (v))
793 , location (std::move (l))
794 {}
795#else
796 basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType& v, const location_type& l)
797 : Base (t)
798 , value (v)
799 , location (l)
800 {}
801#endif
802
803#if 201103L <= YY_CPLUSPLUS
804 basic_symbol (typename Base::kind_type t, TokenPkt4::FieldType&& v, location_type&& l)
805 : Base (t)
806 , value (std::move (v))
807 , location (std::move (l))
808 {}
809#else
810 basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType& v, const location_type& l)
811 : Base (t)
812 , value (v)
813 , location (l)
814 {}
815#endif
816
817#if 201103L <= YY_CPLUSPLUS
818 basic_symbol (typename Base::kind_type t, TokenPkt6::FieldType&& v, location_type&& l)
819 : Base (t)
820 , value (std::move (v))
821 , location (std::move (l))
822 {}
823#else
824 basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType& v, const location_type& l)
825 : Base (t)
826 , value (v)
827 , location (l)
828 {}
829#endif
830
831#if 201103L <= YY_CPLUSPLUS
832 basic_symbol (typename Base::kind_type t, TokenPkt::MetadataType&& v, location_type&& l)
833 : Base (t)
834 , value (std::move (v))
835 , location (std::move (l))
836 {}
837#else
838 basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType& v, const location_type& l)
839 : Base (t)
840 , value (v)
841 , location (l)
842 {}
843#endif
844
845#if 201103L <= YY_CPLUSPLUS
846 basic_symbol (typename Base::kind_type t, TokenRelay6Field::FieldType&& v, location_type&& l)
847 : Base (t)
848 , value (std::move (v))
849 , location (std::move (l))
850 {}
851#else
852 basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType& v, const location_type& l)
853 : Base (t)
854 , value (v)
855 , location (l)
856 {}
857#endif
858
859#if 201103L <= YY_CPLUSPLUS
860 basic_symbol (typename Base::kind_type t, int8_t&& v, location_type&& l)
861 : Base (t)
862 , value (std::move (v))
863 , location (std::move (l))
864 {}
865#else
866 basic_symbol (typename Base::kind_type t, const int8_t& v, const location_type& l)
867 : Base (t)
868 , value (v)
869 , location (l)
870 {}
871#endif
872
873#if 201103L <= YY_CPLUSPLUS
874 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
875 : Base (t)
876 , value (std::move (v))
877 , location (std::move (l))
878 {}
879#else
880 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
881 : Base (t)
882 , value (v)
883 , location (l)
884 {}
885#endif
886
887#if 201103L <= YY_CPLUSPLUS
888 basic_symbol (typename Base::kind_type t, uint16_t&& v, location_type&& l)
889 : Base (t)
890 , value (std::move (v))
891 , location (std::move (l))
892 {}
893#else
894 basic_symbol (typename Base::kind_type t, const uint16_t& v, const location_type& l)
895 : Base (t)
896 , value (v)
897 , location (l)
898 {}
899#endif
900
901#if 201103L <= YY_CPLUSPLUS
902 basic_symbol (typename Base::kind_type t, uint32_t&& v, location_type&& l)
903 : Base (t)
904 , value (std::move (v))
905 , location (std::move (l))
906 {}
907#else
908 basic_symbol (typename Base::kind_type t, const uint32_t& v, const location_type& l)
909 : Base (t)
910 , value (v)
911 , location (l)
912 {}
913#endif
914
916 ~basic_symbol ()
917 {
918 clear ();
919 }
920
921
922
924 void clear () YY_NOEXCEPT
925 {
926 // User destructor.
927 symbol_kind_type yykind = this->kind ();
928 basic_symbol<Base>& yysym = *this;
929 (void) yysym;
930 switch (yykind)
931 {
932 default:
933 break;
934 }
935
936 // Value type destructor.
937 switch (yykind)
938 {
939 case symbol_kind::S_option_repr_type: // option_repr_type
940 value.template destroy< TokenOption::RepresentationType > ();
941 break;
942
943 case symbol_kind::S_pkt4_field: // pkt4_field
944 value.template destroy< TokenPkt4::FieldType > ();
945 break;
946
947 case symbol_kind::S_pkt6_field: // pkt6_field
948 value.template destroy< TokenPkt6::FieldType > ();
949 break;
950
951 case symbol_kind::S_pkt_metadata: // pkt_metadata
952 value.template destroy< TokenPkt::MetadataType > ();
953 break;
954
955 case symbol_kind::S_relay6_field: // relay6_field
956 value.template destroy< TokenRelay6Field::FieldType > ();
957 break;
958
959 case symbol_kind::S_nest_level: // nest_level
960 value.template destroy< int8_t > ();
961 break;
962
963 case symbol_kind::S_STRING: // "constant string"
964 case symbol_kind::S_INTEGER: // "integer"
965 case symbol_kind::S_HEXSTRING: // "constant hexstring"
966 case symbol_kind::S_OPTION_NAME: // "option name"
967 case symbol_kind::S_IP_ADDRESS: // "ip address"
968 value.template destroy< std::string > ();
969 break;
970
971 case symbol_kind::S_option_code: // option_code
972 case symbol_kind::S_sub_option_code: // sub_option_code
973 value.template destroy< uint16_t > ();
974 break;
975
976 case symbol_kind::S_integer_expr: // integer_expr
977 case symbol_kind::S_enterprise_id: // enterprise_id
978 value.template destroy< uint32_t > ();
979 break;
980
981 default:
982 break;
983 }
984
985 Base::clear ();
986 }
987
989 std::string name () const YY_NOEXCEPT
990 {
991 return EvalParser::symbol_name (this->kind ());
992 }
993
995 symbol_kind_type type_get () const YY_NOEXCEPT;
996
998 bool empty () const YY_NOEXCEPT;
999
1001 void move (basic_symbol& s);
1002
1004 value_type value;
1005
1007 location_type location;
1008
1009 private:
1010#if YY_CPLUSPLUS < 201103L
1012 basic_symbol& operator= (const basic_symbol& that);
1013#endif
1014 };
1015
1017 struct by_kind
1018 {
1020 typedef token_kind_type kind_type;
1021
1023 by_kind () YY_NOEXCEPT;
1024
1025#if 201103L <= YY_CPLUSPLUS
1027 by_kind (by_kind&& that) YY_NOEXCEPT;
1028#endif
1029
1031 by_kind (const by_kind& that) YY_NOEXCEPT;
1032
1034 by_kind (kind_type t) YY_NOEXCEPT;
1035
1036
1037
1039 void clear () YY_NOEXCEPT;
1040
1042 void move (by_kind& that);
1043
1046 symbol_kind_type kind () const YY_NOEXCEPT;
1047
1049 symbol_kind_type type_get () const YY_NOEXCEPT;
1050
1053 symbol_kind_type kind_;
1054 };
1055
1057 typedef by_kind by_type;
1058
1060 struct symbol_type : basic_symbol<by_kind>
1061 {
1063 typedef basic_symbol<by_kind> super_type;
1064
1066 symbol_type () YY_NOEXCEPT {}
1067
1069#if 201103L <= YY_CPLUSPLUS
1070 symbol_type (int tok, location_type l)
1071 : super_type (token_kind_type (tok), std::move (l))
1072#else
1073 symbol_type (int tok, const location_type& l)
1074 : super_type (token_kind_type (tok), l)
1075#endif
1076 {
1077#if !defined _MSC_VER || defined __clang__
1078 EVAL_ASSERT (tok == token::TOKEN_END
1079 || (token::TOKEN_EVALerror <= tok && tok <= token::TOKEN_TOPLEVEL_STRING));
1080#endif
1081 }
1082#if 201103L <= YY_CPLUSPLUS
1083 symbol_type (int tok, std::string v, location_type l)
1084 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1085#else
1086 symbol_type (int tok, const std::string& v, const location_type& l)
1087 : super_type (token_kind_type (tok), v, l)
1088#endif
1089 {
1090#if !defined _MSC_VER || defined __clang__
1091 EVAL_ASSERT ((token::TOKEN_STRING <= tok && tok <= token::TOKEN_IP_ADDRESS));
1092#endif
1093 }
1094 };
1095
1097 EvalParser (EvalContext& ctx_yyarg);
1098 virtual ~EvalParser ();
1099
1100#if 201103L <= YY_CPLUSPLUS
1102 EvalParser (const EvalParser&) = delete;
1104 EvalParser& operator= (const EvalParser&) = delete;
1105#endif
1106
1109 int operator() ();
1110
1113 virtual int parse ();
1114
1115#if EVALDEBUG
1117 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1119 void set_debug_stream (std::ostream &);
1120
1122 typedef int debug_level_type;
1124 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1126 void set_debug_level (debug_level_type l);
1127#endif
1128
1132 virtual void error (const location_type& loc, const std::string& msg);
1133
1135 void error (const syntax_error& err);
1136
1139 static std::string symbol_name (symbol_kind_type yysymbol);
1140
1141 // Implementation of make_symbol for each token kind.
1142#if 201103L <= YY_CPLUSPLUS
1143 static
1144 symbol_type
1145 make_END (location_type l)
1146 {
1147 return symbol_type (token::TOKEN_END, std::move (l));
1148 }
1149#else
1150 static
1151 symbol_type
1152 make_END (const location_type& l)
1153 {
1154 return symbol_type (token::TOKEN_END, l);
1155 }
1156#endif
1157#if 201103L <= YY_CPLUSPLUS
1158 static
1159 symbol_type
1160 make_EVALerror (location_type l)
1161 {
1162 return symbol_type (token::TOKEN_EVALerror, std::move (l));
1163 }
1164#else
1165 static
1166 symbol_type
1167 make_EVALerror (const location_type& l)
1168 {
1169 return symbol_type (token::TOKEN_EVALerror, l);
1170 }
1171#endif
1172#if 201103L <= YY_CPLUSPLUS
1173 static
1174 symbol_type
1175 make_EVALUNDEF (location_type l)
1176 {
1177 return symbol_type (token::TOKEN_EVALUNDEF, std::move (l));
1178 }
1179#else
1180 static
1181 symbol_type
1182 make_EVALUNDEF (const location_type& l)
1183 {
1184 return symbol_type (token::TOKEN_EVALUNDEF, l);
1185 }
1186#endif
1187#if 201103L <= YY_CPLUSPLUS
1188 static
1189 symbol_type
1190 make_LPAREN (location_type l)
1191 {
1192 return symbol_type (token::TOKEN_LPAREN, std::move (l));
1193 }
1194#else
1195 static
1196 symbol_type
1197 make_LPAREN (const location_type& l)
1198 {
1199 return symbol_type (token::TOKEN_LPAREN, l);
1200 }
1201#endif
1202#if 201103L <= YY_CPLUSPLUS
1203 static
1204 symbol_type
1205 make_RPAREN (location_type l)
1206 {
1207 return symbol_type (token::TOKEN_RPAREN, std::move (l));
1208 }
1209#else
1210 static
1211 symbol_type
1212 make_RPAREN (const location_type& l)
1213 {
1214 return symbol_type (token::TOKEN_RPAREN, l);
1215 }
1216#endif
1217#if 201103L <= YY_CPLUSPLUS
1218 static
1219 symbol_type
1220 make_NOT (location_type l)
1221 {
1222 return symbol_type (token::TOKEN_NOT, std::move (l));
1223 }
1224#else
1225 static
1226 symbol_type
1227 make_NOT (const location_type& l)
1228 {
1229 return symbol_type (token::TOKEN_NOT, l);
1230 }
1231#endif
1232#if 201103L <= YY_CPLUSPLUS
1233 static
1234 symbol_type
1235 make_AND (location_type l)
1236 {
1237 return symbol_type (token::TOKEN_AND, std::move (l));
1238 }
1239#else
1240 static
1241 symbol_type
1242 make_AND (const location_type& l)
1243 {
1244 return symbol_type (token::TOKEN_AND, l);
1245 }
1246#endif
1247#if 201103L <= YY_CPLUSPLUS
1248 static
1249 symbol_type
1250 make_SAND (location_type l)
1251 {
1252 return symbol_type (token::TOKEN_SAND, std::move (l));
1253 }
1254#else
1255 static
1256 symbol_type
1257 make_SAND (const location_type& l)
1258 {
1259 return symbol_type (token::TOKEN_SAND, l);
1260 }
1261#endif
1262#if 201103L <= YY_CPLUSPLUS
1263 static
1264 symbol_type
1265 make_OR (location_type l)
1266 {
1267 return symbol_type (token::TOKEN_OR, std::move (l));
1268 }
1269#else
1270 static
1271 symbol_type
1272 make_OR (const location_type& l)
1273 {
1274 return symbol_type (token::TOKEN_OR, l);
1275 }
1276#endif
1277#if 201103L <= YY_CPLUSPLUS
1278 static
1279 symbol_type
1280 make_SOR (location_type l)
1281 {
1282 return symbol_type (token::TOKEN_SOR, std::move (l));
1283 }
1284#else
1285 static
1286 symbol_type
1287 make_SOR (const location_type& l)
1288 {
1289 return symbol_type (token::TOKEN_SOR, l);
1290 }
1291#endif
1292#if 201103L <= YY_CPLUSPLUS
1293 static
1294 symbol_type
1295 make_EQUAL (location_type l)
1296 {
1297 return symbol_type (token::TOKEN_EQUAL, std::move (l));
1298 }
1299#else
1300 static
1301 symbol_type
1302 make_EQUAL (const location_type& l)
1303 {
1304 return symbol_type (token::TOKEN_EQUAL, l);
1305 }
1306#endif
1307#if 201103L <= YY_CPLUSPLUS
1308 static
1309 symbol_type
1310 make_OPTION (location_type l)
1311 {
1312 return symbol_type (token::TOKEN_OPTION, std::move (l));
1313 }
1314#else
1315 static
1316 symbol_type
1317 make_OPTION (const location_type& l)
1318 {
1319 return symbol_type (token::TOKEN_OPTION, l);
1320 }
1321#endif
1322#if 201103L <= YY_CPLUSPLUS
1323 static
1324 symbol_type
1325 make_RELAY4 (location_type l)
1326 {
1327 return symbol_type (token::TOKEN_RELAY4, std::move (l));
1328 }
1329#else
1330 static
1331 symbol_type
1332 make_RELAY4 (const location_type& l)
1333 {
1334 return symbol_type (token::TOKEN_RELAY4, l);
1335 }
1336#endif
1337#if 201103L <= YY_CPLUSPLUS
1338 static
1339 symbol_type
1340 make_RELAY6 (location_type l)
1341 {
1342 return symbol_type (token::TOKEN_RELAY6, std::move (l));
1343 }
1344#else
1345 static
1346 symbol_type
1347 make_RELAY6 (const location_type& l)
1348 {
1349 return symbol_type (token::TOKEN_RELAY6, l);
1350 }
1351#endif
1352#if 201103L <= YY_CPLUSPLUS
1353 static
1354 symbol_type
1355 make_MEMBER (location_type l)
1356 {
1357 return symbol_type (token::TOKEN_MEMBER, std::move (l));
1358 }
1359#else
1360 static
1361 symbol_type
1362 make_MEMBER (const location_type& l)
1363 {
1364 return symbol_type (token::TOKEN_MEMBER, l);
1365 }
1366#endif
1367#if 201103L <= YY_CPLUSPLUS
1368 static
1369 symbol_type
1370 make_PEERADDR (location_type l)
1371 {
1372 return symbol_type (token::TOKEN_PEERADDR, std::move (l));
1373 }
1374#else
1375 static
1376 symbol_type
1377 make_PEERADDR (const location_type& l)
1378 {
1379 return symbol_type (token::TOKEN_PEERADDR, l);
1380 }
1381#endif
1382#if 201103L <= YY_CPLUSPLUS
1383 static
1384 symbol_type
1385 make_LINKADDR (location_type l)
1386 {
1387 return symbol_type (token::TOKEN_LINKADDR, std::move (l));
1388 }
1389#else
1390 static
1391 symbol_type
1392 make_LINKADDR (const location_type& l)
1393 {
1394 return symbol_type (token::TOKEN_LINKADDR, l);
1395 }
1396#endif
1397#if 201103L <= YY_CPLUSPLUS
1398 static
1399 symbol_type
1400 make_LBRACKET (location_type l)
1401 {
1402 return symbol_type (token::TOKEN_LBRACKET, std::move (l));
1403 }
1404#else
1405 static
1406 symbol_type
1407 make_LBRACKET (const location_type& l)
1408 {
1409 return symbol_type (token::TOKEN_LBRACKET, l);
1410 }
1411#endif
1412#if 201103L <= YY_CPLUSPLUS
1413 static
1414 symbol_type
1415 make_RBRACKET (location_type l)
1416 {
1417 return symbol_type (token::TOKEN_RBRACKET, std::move (l));
1418 }
1419#else
1420 static
1421 symbol_type
1422 make_RBRACKET (const location_type& l)
1423 {
1424 return symbol_type (token::TOKEN_RBRACKET, l);
1425 }
1426#endif
1427#if 201103L <= YY_CPLUSPLUS
1428 static
1429 symbol_type
1430 make_DOT (location_type l)
1431 {
1432 return symbol_type (token::TOKEN_DOT, std::move (l));
1433 }
1434#else
1435 static
1436 symbol_type
1437 make_DOT (const location_type& l)
1438 {
1439 return symbol_type (token::TOKEN_DOT, l);
1440 }
1441#endif
1442#if 201103L <= YY_CPLUSPLUS
1443 static
1444 symbol_type
1445 make_TEXT (location_type l)
1446 {
1447 return symbol_type (token::TOKEN_TEXT, std::move (l));
1448 }
1449#else
1450 static
1451 symbol_type
1452 make_TEXT (const location_type& l)
1453 {
1454 return symbol_type (token::TOKEN_TEXT, l);
1455 }
1456#endif
1457#if 201103L <= YY_CPLUSPLUS
1458 static
1459 symbol_type
1460 make_HEX (location_type l)
1461 {
1462 return symbol_type (token::TOKEN_HEX, std::move (l));
1463 }
1464#else
1465 static
1466 symbol_type
1467 make_HEX (const location_type& l)
1468 {
1469 return symbol_type (token::TOKEN_HEX, l);
1470 }
1471#endif
1472#if 201103L <= YY_CPLUSPLUS
1473 static
1474 symbol_type
1475 make_EXISTS (location_type l)
1476 {
1477 return symbol_type (token::TOKEN_EXISTS, std::move (l));
1478 }
1479#else
1480 static
1481 symbol_type
1482 make_EXISTS (const location_type& l)
1483 {
1484 return symbol_type (token::TOKEN_EXISTS, l);
1485 }
1486#endif
1487#if 201103L <= YY_CPLUSPLUS
1488 static
1489 symbol_type
1490 make_PKT (location_type l)
1491 {
1492 return symbol_type (token::TOKEN_PKT, std::move (l));
1493 }
1494#else
1495 static
1496 symbol_type
1497 make_PKT (const location_type& l)
1498 {
1499 return symbol_type (token::TOKEN_PKT, l);
1500 }
1501#endif
1502#if 201103L <= YY_CPLUSPLUS
1503 static
1504 symbol_type
1505 make_IFACE (location_type l)
1506 {
1507 return symbol_type (token::TOKEN_IFACE, std::move (l));
1508 }
1509#else
1510 static
1511 symbol_type
1512 make_IFACE (const location_type& l)
1513 {
1514 return symbol_type (token::TOKEN_IFACE, l);
1515 }
1516#endif
1517#if 201103L <= YY_CPLUSPLUS
1518 static
1519 symbol_type
1520 make_SRC (location_type l)
1521 {
1522 return symbol_type (token::TOKEN_SRC, std::move (l));
1523 }
1524#else
1525 static
1526 symbol_type
1527 make_SRC (const location_type& l)
1528 {
1529 return symbol_type (token::TOKEN_SRC, l);
1530 }
1531#endif
1532#if 201103L <= YY_CPLUSPLUS
1533 static
1534 symbol_type
1535 make_DST (location_type l)
1536 {
1537 return symbol_type (token::TOKEN_DST, std::move (l));
1538 }
1539#else
1540 static
1541 symbol_type
1542 make_DST (const location_type& l)
1543 {
1544 return symbol_type (token::TOKEN_DST, l);
1545 }
1546#endif
1547#if 201103L <= YY_CPLUSPLUS
1548 static
1549 symbol_type
1550 make_LEN (location_type l)
1551 {
1552 return symbol_type (token::TOKEN_LEN, std::move (l));
1553 }
1554#else
1555 static
1556 symbol_type
1557 make_LEN (const location_type& l)
1558 {
1559 return symbol_type (token::TOKEN_LEN, l);
1560 }
1561#endif
1562#if 201103L <= YY_CPLUSPLUS
1563 static
1564 symbol_type
1565 make_PKT4 (location_type l)
1566 {
1567 return symbol_type (token::TOKEN_PKT4, std::move (l));
1568 }
1569#else
1570 static
1571 symbol_type
1572 make_PKT4 (const location_type& l)
1573 {
1574 return symbol_type (token::TOKEN_PKT4, l);
1575 }
1576#endif
1577#if 201103L <= YY_CPLUSPLUS
1578 static
1579 symbol_type
1580 make_CHADDR (location_type l)
1581 {
1582 return symbol_type (token::TOKEN_CHADDR, std::move (l));
1583 }
1584#else
1585 static
1586 symbol_type
1587 make_CHADDR (const location_type& l)
1588 {
1589 return symbol_type (token::TOKEN_CHADDR, l);
1590 }
1591#endif
1592#if 201103L <= YY_CPLUSPLUS
1593 static
1594 symbol_type
1595 make_HLEN (location_type l)
1596 {
1597 return symbol_type (token::TOKEN_HLEN, std::move (l));
1598 }
1599#else
1600 static
1601 symbol_type
1602 make_HLEN (const location_type& l)
1603 {
1604 return symbol_type (token::TOKEN_HLEN, l);
1605 }
1606#endif
1607#if 201103L <= YY_CPLUSPLUS
1608 static
1609 symbol_type
1610 make_HTYPE (location_type l)
1611 {
1612 return symbol_type (token::TOKEN_HTYPE, std::move (l));
1613 }
1614#else
1615 static
1616 symbol_type
1617 make_HTYPE (const location_type& l)
1618 {
1619 return symbol_type (token::TOKEN_HTYPE, l);
1620 }
1621#endif
1622#if 201103L <= YY_CPLUSPLUS
1623 static
1624 symbol_type
1625 make_CIADDR (location_type l)
1626 {
1627 return symbol_type (token::TOKEN_CIADDR, std::move (l));
1628 }
1629#else
1630 static
1631 symbol_type
1632 make_CIADDR (const location_type& l)
1633 {
1634 return symbol_type (token::TOKEN_CIADDR, l);
1635 }
1636#endif
1637#if 201103L <= YY_CPLUSPLUS
1638 static
1639 symbol_type
1640 make_GIADDR (location_type l)
1641 {
1642 return symbol_type (token::TOKEN_GIADDR, std::move (l));
1643 }
1644#else
1645 static
1646 symbol_type
1647 make_GIADDR (const location_type& l)
1648 {
1649 return symbol_type (token::TOKEN_GIADDR, l);
1650 }
1651#endif
1652#if 201103L <= YY_CPLUSPLUS
1653 static
1654 symbol_type
1655 make_YIADDR (location_type l)
1656 {
1657 return symbol_type (token::TOKEN_YIADDR, std::move (l));
1658 }
1659#else
1660 static
1661 symbol_type
1662 make_YIADDR (const location_type& l)
1663 {
1664 return symbol_type (token::TOKEN_YIADDR, l);
1665 }
1666#endif
1667#if 201103L <= YY_CPLUSPLUS
1668 static
1669 symbol_type
1670 make_SIADDR (location_type l)
1671 {
1672 return symbol_type (token::TOKEN_SIADDR, std::move (l));
1673 }
1674#else
1675 static
1676 symbol_type
1677 make_SIADDR (const location_type& l)
1678 {
1679 return symbol_type (token::TOKEN_SIADDR, l);
1680 }
1681#endif
1682#if 201103L <= YY_CPLUSPLUS
1683 static
1684 symbol_type
1685 make_SUBSTRING (location_type l)
1686 {
1687 return symbol_type (token::TOKEN_SUBSTRING, std::move (l));
1688 }
1689#else
1690 static
1691 symbol_type
1692 make_SUBSTRING (const location_type& l)
1693 {
1694 return symbol_type (token::TOKEN_SUBSTRING, l);
1695 }
1696#endif
1697#if 201103L <= YY_CPLUSPLUS
1698 static
1699 symbol_type
1700 make_SPLIT (location_type l)
1701 {
1702 return symbol_type (token::TOKEN_SPLIT, std::move (l));
1703 }
1704#else
1705 static
1706 symbol_type
1707 make_SPLIT (const location_type& l)
1708 {
1709 return symbol_type (token::TOKEN_SPLIT, l);
1710 }
1711#endif
1712#if 201103L <= YY_CPLUSPLUS
1713 static
1714 symbol_type
1715 make_ALL (location_type l)
1716 {
1717 return symbol_type (token::TOKEN_ALL, std::move (l));
1718 }
1719#else
1720 static
1721 symbol_type
1722 make_ALL (const location_type& l)
1723 {
1724 return symbol_type (token::TOKEN_ALL, l);
1725 }
1726#endif
1727#if 201103L <= YY_CPLUSPLUS
1728 static
1729 symbol_type
1730 make_COMA (location_type l)
1731 {
1732 return symbol_type (token::TOKEN_COMA, std::move (l));
1733 }
1734#else
1735 static
1736 symbol_type
1737 make_COMA (const location_type& l)
1738 {
1739 return symbol_type (token::TOKEN_COMA, l);
1740 }
1741#endif
1742#if 201103L <= YY_CPLUSPLUS
1743 static
1744 symbol_type
1745 make_CONCAT (location_type l)
1746 {
1747 return symbol_type (token::TOKEN_CONCAT, std::move (l));
1748 }
1749#else
1750 static
1751 symbol_type
1752 make_CONCAT (const location_type& l)
1753 {
1754 return symbol_type (token::TOKEN_CONCAT, l);
1755 }
1756#endif
1757#if 201103L <= YY_CPLUSPLUS
1758 static
1759 symbol_type
1760 make_PLUS (location_type l)
1761 {
1762 return symbol_type (token::TOKEN_PLUS, std::move (l));
1763 }
1764#else
1765 static
1766 symbol_type
1767 make_PLUS (const location_type& l)
1768 {
1769 return symbol_type (token::TOKEN_PLUS, l);
1770 }
1771#endif
1772#if 201103L <= YY_CPLUSPLUS
1773 static
1774 symbol_type
1775 make_IFELSE (location_type l)
1776 {
1777 return symbol_type (token::TOKEN_IFELSE, std::move (l));
1778 }
1779#else
1780 static
1781 symbol_type
1782 make_IFELSE (const location_type& l)
1783 {
1784 return symbol_type (token::TOKEN_IFELSE, l);
1785 }
1786#endif
1787#if 201103L <= YY_CPLUSPLUS
1788 static
1789 symbol_type
1790 make_SIFELSE (location_type l)
1791 {
1792 return symbol_type (token::TOKEN_SIFELSE, std::move (l));
1793 }
1794#else
1795 static
1796 symbol_type
1797 make_SIFELSE (const location_type& l)
1798 {
1799 return symbol_type (token::TOKEN_SIFELSE, l);
1800 }
1801#endif
1802#if 201103L <= YY_CPLUSPLUS
1803 static
1804 symbol_type
1805 make_TOHEXSTRING (location_type l)
1806 {
1807 return symbol_type (token::TOKEN_TOHEXSTRING, std::move (l));
1808 }
1809#else
1810 static
1811 symbol_type
1812 make_TOHEXSTRING (const location_type& l)
1813 {
1814 return symbol_type (token::TOKEN_TOHEXSTRING, l);
1815 }
1816#endif
1817#if 201103L <= YY_CPLUSPLUS
1818 static
1819 symbol_type
1820 make_ADDRTOTEXT (location_type l)
1821 {
1822 return symbol_type (token::TOKEN_ADDRTOTEXT, std::move (l));
1823 }
1824#else
1825 static
1826 symbol_type
1827 make_ADDRTOTEXT (const location_type& l)
1828 {
1829 return symbol_type (token::TOKEN_ADDRTOTEXT, l);
1830 }
1831#endif
1832#if 201103L <= YY_CPLUSPLUS
1833 static
1834 symbol_type
1835 make_INT8TOTEXT (location_type l)
1836 {
1837 return symbol_type (token::TOKEN_INT8TOTEXT, std::move (l));
1838 }
1839#else
1840 static
1841 symbol_type
1842 make_INT8TOTEXT (const location_type& l)
1843 {
1844 return symbol_type (token::TOKEN_INT8TOTEXT, l);
1845 }
1846#endif
1847#if 201103L <= YY_CPLUSPLUS
1848 static
1849 symbol_type
1850 make_INT16TOTEXT (location_type l)
1851 {
1852 return symbol_type (token::TOKEN_INT16TOTEXT, std::move (l));
1853 }
1854#else
1855 static
1856 symbol_type
1857 make_INT16TOTEXT (const location_type& l)
1858 {
1859 return symbol_type (token::TOKEN_INT16TOTEXT, l);
1860 }
1861#endif
1862#if 201103L <= YY_CPLUSPLUS
1863 static
1864 symbol_type
1865 make_INT32TOTEXT (location_type l)
1866 {
1867 return symbol_type (token::TOKEN_INT32TOTEXT, std::move (l));
1868 }
1869#else
1870 static
1871 symbol_type
1872 make_INT32TOTEXT (const location_type& l)
1873 {
1874 return symbol_type (token::TOKEN_INT32TOTEXT, l);
1875 }
1876#endif
1877#if 201103L <= YY_CPLUSPLUS
1878 static
1879 symbol_type
1880 make_UINT8TOTEXT (location_type l)
1881 {
1882 return symbol_type (token::TOKEN_UINT8TOTEXT, std::move (l));
1883 }
1884#else
1885 static
1886 symbol_type
1887 make_UINT8TOTEXT (const location_type& l)
1888 {
1889 return symbol_type (token::TOKEN_UINT8TOTEXT, l);
1890 }
1891#endif
1892#if 201103L <= YY_CPLUSPLUS
1893 static
1894 symbol_type
1895 make_UINT16TOTEXT (location_type l)
1896 {
1897 return symbol_type (token::TOKEN_UINT16TOTEXT, std::move (l));
1898 }
1899#else
1900 static
1901 symbol_type
1902 make_UINT16TOTEXT (const location_type& l)
1903 {
1904 return symbol_type (token::TOKEN_UINT16TOTEXT, l);
1905 }
1906#endif
1907#if 201103L <= YY_CPLUSPLUS
1908 static
1909 symbol_type
1910 make_UINT32TOTEXT (location_type l)
1911 {
1912 return symbol_type (token::TOKEN_UINT32TOTEXT, std::move (l));
1913 }
1914#else
1915 static
1916 symbol_type
1917 make_UINT32TOTEXT (const location_type& l)
1918 {
1919 return symbol_type (token::TOKEN_UINT32TOTEXT, l);
1920 }
1921#endif
1922#if 201103L <= YY_CPLUSPLUS
1923 static
1924 symbol_type
1925 make_LCASE (location_type l)
1926 {
1927 return symbol_type (token::TOKEN_LCASE, std::move (l));
1928 }
1929#else
1930 static
1931 symbol_type
1932 make_LCASE (const location_type& l)
1933 {
1934 return symbol_type (token::TOKEN_LCASE, l);
1935 }
1936#endif
1937#if 201103L <= YY_CPLUSPLUS
1938 static
1939 symbol_type
1940 make_UCASE (location_type l)
1941 {
1942 return symbol_type (token::TOKEN_UCASE, std::move (l));
1943 }
1944#else
1945 static
1946 symbol_type
1947 make_UCASE (const location_type& l)
1948 {
1949 return symbol_type (token::TOKEN_UCASE, l);
1950 }
1951#endif
1952#if 201103L <= YY_CPLUSPLUS
1953 static
1954 symbol_type
1955 make_PKT6 (location_type l)
1956 {
1957 return symbol_type (token::TOKEN_PKT6, std::move (l));
1958 }
1959#else
1960 static
1961 symbol_type
1962 make_PKT6 (const location_type& l)
1963 {
1964 return symbol_type (token::TOKEN_PKT6, l);
1965 }
1966#endif
1967#if 201103L <= YY_CPLUSPLUS
1968 static
1969 symbol_type
1970 make_MSGTYPE (location_type l)
1971 {
1972 return symbol_type (token::TOKEN_MSGTYPE, std::move (l));
1973 }
1974#else
1975 static
1976 symbol_type
1977 make_MSGTYPE (const location_type& l)
1978 {
1979 return symbol_type (token::TOKEN_MSGTYPE, l);
1980 }
1981#endif
1982#if 201103L <= YY_CPLUSPLUS
1983 static
1984 symbol_type
1985 make_TRANSID (location_type l)
1986 {
1987 return symbol_type (token::TOKEN_TRANSID, std::move (l));
1988 }
1989#else
1990 static
1991 symbol_type
1992 make_TRANSID (const location_type& l)
1993 {
1994 return symbol_type (token::TOKEN_TRANSID, l);
1995 }
1996#endif
1997#if 201103L <= YY_CPLUSPLUS
1998 static
1999 symbol_type
2000 make_VENDOR_CLASS (location_type l)
2001 {
2002 return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l));
2003 }
2004#else
2005 static
2006 symbol_type
2007 make_VENDOR_CLASS (const location_type& l)
2008 {
2009 return symbol_type (token::TOKEN_VENDOR_CLASS, l);
2010 }
2011#endif
2012#if 201103L <= YY_CPLUSPLUS
2013 static
2014 symbol_type
2015 make_VENDOR (location_type l)
2016 {
2017 return symbol_type (token::TOKEN_VENDOR, std::move (l));
2018 }
2019#else
2020 static
2021 symbol_type
2022 make_VENDOR (const location_type& l)
2023 {
2024 return symbol_type (token::TOKEN_VENDOR, l);
2025 }
2026#endif
2027#if 201103L <= YY_CPLUSPLUS
2028 static
2029 symbol_type
2030 make_ANY (location_type l)
2031 {
2032 return symbol_type (token::TOKEN_ANY, std::move (l));
2033 }
2034#else
2035 static
2036 symbol_type
2037 make_ANY (const location_type& l)
2038 {
2039 return symbol_type (token::TOKEN_ANY, l);
2040 }
2041#endif
2042#if 201103L <= YY_CPLUSPLUS
2043 static
2044 symbol_type
2045 make_DATA (location_type l)
2046 {
2047 return symbol_type (token::TOKEN_DATA, std::move (l));
2048 }
2049#else
2050 static
2051 symbol_type
2052 make_DATA (const location_type& l)
2053 {
2054 return symbol_type (token::TOKEN_DATA, l);
2055 }
2056#endif
2057#if 201103L <= YY_CPLUSPLUS
2058 static
2059 symbol_type
2060 make_ENTERPRISE (location_type l)
2061 {
2062 return symbol_type (token::TOKEN_ENTERPRISE, std::move (l));
2063 }
2064#else
2065 static
2066 symbol_type
2067 make_ENTERPRISE (const location_type& l)
2068 {
2069 return symbol_type (token::TOKEN_ENTERPRISE, l);
2070 }
2071#endif
2072#if 201103L <= YY_CPLUSPLUS
2073 static
2074 symbol_type
2075 make_MATCH (location_type l)
2076 {
2077 return symbol_type (token::TOKEN_MATCH, std::move (l));
2078 }
2079#else
2080 static
2081 symbol_type
2082 make_MATCH (const location_type& l)
2083 {
2084 return symbol_type (token::TOKEN_MATCH, l);
2085 }
2086#endif
2087#if 201103L <= YY_CPLUSPLUS
2088 static
2089 symbol_type
2090 make_TOPLEVEL_BOOL (location_type l)
2091 {
2092 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l));
2093 }
2094#else
2095 static
2096 symbol_type
2097 make_TOPLEVEL_BOOL (const location_type& l)
2098 {
2099 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l);
2100 }
2101#endif
2102#if 201103L <= YY_CPLUSPLUS
2103 static
2104 symbol_type
2105 make_TOPLEVEL_STRING (location_type l)
2106 {
2107 return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l));
2108 }
2109#else
2110 static
2111 symbol_type
2112 make_TOPLEVEL_STRING (const location_type& l)
2113 {
2114 return symbol_type (token::TOKEN_TOPLEVEL_STRING, l);
2115 }
2116#endif
2117#if 201103L <= YY_CPLUSPLUS
2118 static
2119 symbol_type
2120 make_STRING (std::string v, location_type l)
2121 {
2122 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2123 }
2124#else
2125 static
2126 symbol_type
2127 make_STRING (const std::string& v, const location_type& l)
2128 {
2129 return symbol_type (token::TOKEN_STRING, v, l);
2130 }
2131#endif
2132#if 201103L <= YY_CPLUSPLUS
2133 static
2134 symbol_type
2135 make_INTEGER (std::string v, location_type l)
2136 {
2137 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2138 }
2139#else
2140 static
2141 symbol_type
2142 make_INTEGER (const std::string& v, const location_type& l)
2143 {
2144 return symbol_type (token::TOKEN_INTEGER, v, l);
2145 }
2146#endif
2147#if 201103L <= YY_CPLUSPLUS
2148 static
2149 symbol_type
2150 make_HEXSTRING (std::string v, location_type l)
2151 {
2152 return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l));
2153 }
2154#else
2155 static
2156 symbol_type
2157 make_HEXSTRING (const std::string& v, const location_type& l)
2158 {
2159 return symbol_type (token::TOKEN_HEXSTRING, v, l);
2160 }
2161#endif
2162#if 201103L <= YY_CPLUSPLUS
2163 static
2164 symbol_type
2165 make_OPTION_NAME (std::string v, location_type l)
2166 {
2167 return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l));
2168 }
2169#else
2170 static
2171 symbol_type
2172 make_OPTION_NAME (const std::string& v, const location_type& l)
2173 {
2174 return symbol_type (token::TOKEN_OPTION_NAME, v, l);
2175 }
2176#endif
2177#if 201103L <= YY_CPLUSPLUS
2178 static
2179 symbol_type
2180 make_IP_ADDRESS (std::string v, location_type l)
2181 {
2182 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l));
2183 }
2184#else
2185 static
2186 symbol_type
2187 make_IP_ADDRESS (const std::string& v, const location_type& l)
2188 {
2189 return symbol_type (token::TOKEN_IP_ADDRESS, v, l);
2190 }
2191#endif
2192
2193
2194 class context
2195 {
2196 public:
2197 context (const EvalParser& yyparser, const symbol_type& yyla);
2198 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
2199 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
2200 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
2201
2205 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
2206
2207 private:
2208 const EvalParser& yyparser_;
2209 const symbol_type& yyla_;
2210 };
2211
2212 private:
2213#if YY_CPLUSPLUS < 201103L
2215 EvalParser (const EvalParser&);
2217 EvalParser& operator= (const EvalParser&);
2218#endif
2219
2220
2222 typedef short state_type;
2223
2225 int yy_syntax_error_arguments_ (const context& yyctx,
2226 symbol_kind_type yyarg[], int yyargn) const;
2227
2230 virtual std::string yysyntax_error_ (const context& yyctx) const;
2234 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
2235
2238 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
2239
2242 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
2243
2244 static const short yypact_ninf_;
2245 static const signed char yytable_ninf_;
2246
2250 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
2251
2253 static std::string yytnamerr_ (const char *yystr);
2254
2256 static const char* const yytname_[];
2257
2258
2259 // Tables.
2260 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2261 // STATE-NUM.
2262 static const short yypact_[];
2263
2264 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2265 // Performed when YYTABLE does not specify something else to do. Zero
2266 // means the default is an error.
2267 static const signed char yydefact_[];
2268
2269 // YYPGOTO[NTERM-NUM].
2270 static const short yypgoto_[];
2271
2272 // YYDEFGOTO[NTERM-NUM].
2273 static const unsigned char yydefgoto_[];
2274
2275 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2276 // positive, shift that token. If negative, reduce the rule whose
2277 // number is the opposite. If YYTABLE_NINF, syntax error.
2278 static const short yytable_[];
2279
2280 static const short yycheck_[];
2281
2282 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2283 // state STATE-NUM.
2284 static const signed char yystos_[];
2285
2286 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
2287 static const signed char yyr1_[];
2288
2289 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
2290 static const signed char yyr2_[];
2291
2292
2293#if EVALDEBUG
2294 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
2295 static const short yyrline_[];
2297 virtual void yy_reduce_print_ (int r) const;
2299 virtual void yy_stack_print_ () const;
2300
2302 int yydebug_;
2304 std::ostream* yycdebug_;
2305
2309 template <typename Base>
2310 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
2311#endif
2312
2317 template <typename Base>
2318 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
2319
2320 private:
2322 struct by_state
2323 {
2325 by_state () YY_NOEXCEPT;
2326
2328 typedef state_type kind_type;
2329
2331 by_state (kind_type s) YY_NOEXCEPT;
2332
2334 by_state (const by_state& that) YY_NOEXCEPT;
2335
2337 void clear () YY_NOEXCEPT;
2338
2340 void move (by_state& that);
2341
2344 symbol_kind_type kind () const YY_NOEXCEPT;
2345
2348 enum { empty_state = 0 };
2349
2352 state_type state;
2353 };
2354
2356 struct stack_symbol_type : basic_symbol<by_state>
2357 {
2359 typedef basic_symbol<by_state> super_type;
2361 stack_symbol_type ();
2363 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2365 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2366#if YY_CPLUSPLUS < 201103L
2369 stack_symbol_type& operator= (stack_symbol_type& that);
2370
2373 stack_symbol_type& operator= (const stack_symbol_type& that);
2374#endif
2375 };
2376
2378 template <typename T, typename S = std::vector<T> >
2379 class stack
2380 {
2381 public:
2382 // Hide our reversed order.
2383 typedef typename S::iterator iterator;
2384 typedef typename S::const_iterator const_iterator;
2385 typedef typename S::size_type size_type;
2386 typedef typename std::ptrdiff_t index_type;
2387
2388 stack (size_type n = 200) YY_NOEXCEPT
2389 : seq_ (n)
2390 {}
2391
2392#if 201103L <= YY_CPLUSPLUS
2394 stack (const stack&) = delete;
2396 stack& operator= (const stack&) = delete;
2397#endif
2398
2402 const T&
2403 operator[] (index_type i) const
2404 {
2405 return seq_[size_type (size () - 1 - i)];
2406 }
2407
2411 T&
2412 operator[] (index_type i)
2413 {
2414 return seq_[size_type (size () - 1 - i)];
2415 }
2416
2420 void
2421 push (YY_MOVE_REF (T) t)
2422 {
2423 seq_.push_back (T ());
2424 operator[] (0).move (t);
2425 }
2426
2428 void
2429 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2430 {
2431 for (; 0 < n; --n)
2432 seq_.pop_back ();
2433 }
2434
2436 void
2437 clear () YY_NOEXCEPT
2438 {
2439 seq_.clear ();
2440 }
2441
2443 index_type
2444 size () const YY_NOEXCEPT
2445 {
2446 return index_type (seq_.size ());
2447 }
2448
2450 const_iterator
2451 begin () const YY_NOEXCEPT
2452 {
2453 return seq_.begin ();
2454 }
2455
2457 const_iterator
2458 end () const YY_NOEXCEPT
2459 {
2460 return seq_.end ();
2461 }
2462
2464 class slice
2465 {
2466 public:
2467 slice (const stack& stack, index_type range) YY_NOEXCEPT
2468 : stack_ (stack)
2469 , range_ (range)
2470 {}
2471
2472 const T&
2473 operator[] (index_type i) const
2474 {
2475 return stack_[range_ - i];
2476 }
2477
2478 private:
2479 const stack& stack_;
2480 index_type range_;
2481 };
2482
2483 private:
2484#if YY_CPLUSPLUS < 201103L
2486 stack (const stack&);
2488 stack& operator= (const stack&);
2489#endif
2491 S seq_;
2492 };
2493
2494
2496 typedef stack<stack_symbol_type> stack_type;
2497
2499 stack_type yystack_;
2500
2506 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2507
2514 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2515
2517 void yypop_ (int n = 1) YY_NOEXCEPT;
2518
2520 enum
2521 {
2522 yylast_ = 343,
2523 yynnts_ = 22,
2524 yyfinal_ = 46
2525 };
2526
2527
2528 // User arguments.
2529 EvalContext& ctx;
2530
2531 };
2532
2533 inline
2534 EvalParser::symbol_kind_type
2535 EvalParser::yytranslate_ (int t) YY_NOEXCEPT
2536 {
2537 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2538 // TOKEN-NUM as returned by yylex.
2539 static
2540 const signed char
2541 translate_table[] =
2542 {
2543 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2568 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2569 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2570 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2571 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2572 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2573 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2574 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2575 65, 66, 67, 68, 69
2576 };
2577 // Last valid token kind.
2578 const int code_max = 324;
2579
2580 if (t <= 0)
2581 return symbol_kind::S_YYEOF;
2582 else if (t <= code_max)
2583 return static_cast <symbol_kind_type> (translate_table[t]);
2584 else
2585 return symbol_kind::S_YYUNDEF;
2586 }
2587
2588 // basic_symbol.
2589 template <typename Base>
2590 EvalParser::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
2591 : Base (that)
2592 , value ()
2593 , location (that.location)
2594 {
2595 switch (this->kind ())
2596 {
2597 case symbol_kind::S_option_repr_type: // option_repr_type
2598 value.copy< TokenOption::RepresentationType > (YY_MOVE (that.value));
2599 break;
2600
2601 case symbol_kind::S_pkt4_field: // pkt4_field
2602 value.copy< TokenPkt4::FieldType > (YY_MOVE (that.value));
2603 break;
2604
2605 case symbol_kind::S_pkt6_field: // pkt6_field
2606 value.copy< TokenPkt6::FieldType > (YY_MOVE (that.value));
2607 break;
2608
2609 case symbol_kind::S_pkt_metadata: // pkt_metadata
2610 value.copy< TokenPkt::MetadataType > (YY_MOVE (that.value));
2611 break;
2612
2613 case symbol_kind::S_relay6_field: // relay6_field
2614 value.copy< TokenRelay6Field::FieldType > (YY_MOVE (that.value));
2615 break;
2616
2617 case symbol_kind::S_nest_level: // nest_level
2618 value.copy< int8_t > (YY_MOVE (that.value));
2619 break;
2620
2621 case symbol_kind::S_STRING: // "constant string"
2622 case symbol_kind::S_INTEGER: // "integer"
2623 case symbol_kind::S_HEXSTRING: // "constant hexstring"
2624 case symbol_kind::S_OPTION_NAME: // "option name"
2625 case symbol_kind::S_IP_ADDRESS: // "ip address"
2626 value.copy< std::string > (YY_MOVE (that.value));
2627 break;
2628
2629 case symbol_kind::S_option_code: // option_code
2630 case symbol_kind::S_sub_option_code: // sub_option_code
2631 value.copy< uint16_t > (YY_MOVE (that.value));
2632 break;
2633
2634 case symbol_kind::S_integer_expr: // integer_expr
2635 case symbol_kind::S_enterprise_id: // enterprise_id
2636 value.copy< uint32_t > (YY_MOVE (that.value));
2637 break;
2638
2639 default:
2640 break;
2641 }
2642
2643 }
2644
2645
2646
2647
2648 template <typename Base>
2649 EvalParser::symbol_kind_type
2650 EvalParser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
2651 {
2652 return this->kind ();
2653 }
2654
2655
2656 template <typename Base>
2657 bool
2658 EvalParser::basic_symbol<Base>::empty () const YY_NOEXCEPT
2659 {
2660 return this->kind () == symbol_kind::S_YYEMPTY;
2661 }
2662
2663 template <typename Base>
2664 void
2665 EvalParser::basic_symbol<Base>::move (basic_symbol& s)
2666 {
2667 super_type::move (s);
2668 switch (this->kind ())
2669 {
2670 case symbol_kind::S_option_repr_type: // option_repr_type
2671 value.move< TokenOption::RepresentationType > (YY_MOVE (s.value));
2672 break;
2673
2674 case symbol_kind::S_pkt4_field: // pkt4_field
2675 value.move< TokenPkt4::FieldType > (YY_MOVE (s.value));
2676 break;
2677
2678 case symbol_kind::S_pkt6_field: // pkt6_field
2679 value.move< TokenPkt6::FieldType > (YY_MOVE (s.value));
2680 break;
2681
2682 case symbol_kind::S_pkt_metadata: // pkt_metadata
2683 value.move< TokenPkt::MetadataType > (YY_MOVE (s.value));
2684 break;
2685
2686 case symbol_kind::S_relay6_field: // relay6_field
2687 value.move< TokenRelay6Field::FieldType > (YY_MOVE (s.value));
2688 break;
2689
2690 case symbol_kind::S_nest_level: // nest_level
2691 value.move< int8_t > (YY_MOVE (s.value));
2692 break;
2693
2694 case symbol_kind::S_STRING: // "constant string"
2695 case symbol_kind::S_INTEGER: // "integer"
2696 case symbol_kind::S_HEXSTRING: // "constant hexstring"
2697 case symbol_kind::S_OPTION_NAME: // "option name"
2698 case symbol_kind::S_IP_ADDRESS: // "ip address"
2699 value.move< std::string > (YY_MOVE (s.value));
2700 break;
2701
2702 case symbol_kind::S_option_code: // option_code
2703 case symbol_kind::S_sub_option_code: // sub_option_code
2704 value.move< uint16_t > (YY_MOVE (s.value));
2705 break;
2706
2707 case symbol_kind::S_integer_expr: // integer_expr
2708 case symbol_kind::S_enterprise_id: // enterprise_id
2709 value.move< uint32_t > (YY_MOVE (s.value));
2710 break;
2711
2712 default:
2713 break;
2714 }
2715
2716 location = YY_MOVE (s.location);
2717 }
2718
2719 // by_kind.
2720 inline
2721 EvalParser::by_kind::by_kind () YY_NOEXCEPT
2722 : kind_ (symbol_kind::S_YYEMPTY)
2723 {}
2724
2725#if 201103L <= YY_CPLUSPLUS
2726 inline
2727 EvalParser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT
2728 : kind_ (that.kind_)
2729 {
2730 that.clear ();
2731 }
2732#endif
2733
2734 inline
2735 EvalParser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT
2736 : kind_ (that.kind_)
2737 {}
2738
2739 inline
2740 EvalParser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT
2741 : kind_ (yytranslate_ (t))
2742 {}
2743
2744
2745
2746 inline
2747 void
2748 EvalParser::by_kind::clear () YY_NOEXCEPT
2749 {
2750 kind_ = symbol_kind::S_YYEMPTY;
2751 }
2752
2753 inline
2754 void
2755 EvalParser::by_kind::move (by_kind& that)
2756 {
2757 kind_ = that.kind_;
2758 that.clear ();
2759 }
2760
2761 inline
2762 EvalParser::symbol_kind_type
2763 EvalParser::by_kind::kind () const YY_NOEXCEPT
2764 {
2765 return kind_;
2766 }
2767
2768
2769 inline
2770 EvalParser::symbol_kind_type
2771 EvalParser::by_kind::type_get () const YY_NOEXCEPT
2772 {
2773 return this->kind ();
2774 }
2775
2776
2777#line 14 "parser.yy"
2778} } // isc::eval
2779#line 2780 "parser.h"
2780
2781
2782
2783
2784#endif // !YY_EVAL_PARSER_H_INCLUDED
YY_RVREF
#define YY_RVREF(Type)
Definition agent_parser.h:85
YY_MOVE_REF
#define YY_MOVE_REF(Type)
Definition agent_parser.h:84
YY_NOEXCEPT
#define YY_NOEXCEPT
Definition agent_parser.h:94
YY_ATTRIBUTE_PURE
#define YY_ATTRIBUTE_PURE
Definition agent_parser.h:116
YY_MOVE
#define YY_MOVE
Definition agent_parser.h:82
YY_NOTHROW
#define YY_NOTHROW
Definition agent_parser.h:95
isc::dhcp::TokenOption::RepresentationType
RepresentationType
Token representation type.
Definition token.h:413
isc::dhcp::TokenPkt4::FieldType
FieldType
enum value that determines the field.
Definition token.h:623
isc::dhcp::TokenPkt6::FieldType
FieldType
enum value that determines the field.
Definition token.h:677
isc::dhcp::TokenPkt::MetadataType
MetadataType
enum value that determines the field.
Definition token.h:573
isc::dhcp::TokenRelay6Field::FieldType
FieldType
enum value that determines the field.
Definition token.h:730
isc::eval::EvalContext
Evaluation context, an interface to the expression evaluation.
Definition eval_context.h:35
isc::eval::EvalParser::context::location
const location_type & location() const YY_NOEXCEPT
Definition parser.h:2200
isc::eval::EvalParser::context::lookahead
const symbol_type & lookahead() const YY_NOEXCEPT
Definition parser.h:2198
isc::eval::EvalParser::context::context
context(const EvalParser &yyparser, const symbol_type &yyla)
Definition parser.cc:1933
isc::eval::EvalParser::context::token
symbol_kind_type token() const YY_NOEXCEPT
Definition parser.h:2199
isc::eval::EvalParser::stack::slice::slice
slice(const stack &stack, index_type range) YY_NOEXCEPT
Definition parser.h:2467
isc::eval::EvalParser::value_type
A buffer to store and retrieve objects.
Definition parser.h:229
isc::eval::EvalParser::value_type::emplace
T & emplace(const T &t)
Instantiate a T in here from t.
Definition parser.h:288
isc::eval::EvalParser::value_type::as
T & as() YY_NOEXCEPT
Accessor to a built T.
Definition parser.h:318
isc::eval::EvalParser::value_type::move
void move(self_type &that)
Move the content of that to this.
Definition parser.h:359
isc::eval::EvalParser::value_type::build
T & build(const T &t)
Instantiate a T in here from t.
Definition parser.h:310
isc::eval::EvalParser::value_type::value_type
value_type(YY_RVREF(T) t)
Construct and fill.
Definition parser.h:242
isc::eval::EvalParser::value_type::yyalign_me_
long double yyalign_me_
Strongest alignment constraints.
Definition parser.h:468
isc::eval::EvalParser::value_type::as
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
Definition parser.h:329
isc::eval::EvalParser::value_type::build
T & build()
Instantiate an empty T in here.
Definition parser.h:301
isc::eval::EvalParser::value_type::copy
void copy(const self_type &that)
Copy the content of that to this.
Definition parser.h:384
isc::eval::EvalParser::value_type::~value_type
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
Definition parser.h:257
isc::eval::EvalParser::value_type::destroy
void destroy()
Destroy the stored T.
Definition parser.h:392
isc::eval::EvalParser::value_type::swap
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
Definition parser.h:347
isc::eval::EvalParser::value_type::emplace
T & emplace()
Instantiate an empty T in here.
Definition parser.h:277
isc::eval::EvalParser::value_type::yyraw_
char yyraw_[size]
A buffer large enough to store any of the semantic values.
Definition parser.h:470
isc::eval::EvalParser::value_type::value_type
value_type() YY_NOEXCEPT
Empty construction.
Definition parser.h:235
isc::eval::EvalParser::value_type::self_type
value_type self_type
Type of *this.
Definition parser.h:232
isc::eval::EvalParser
A Bison parser.
Definition parser.h:215
isc::eval::EvalParser::make_RELAY6
static symbol_type make_RELAY6(const location_type &l)
Definition parser.h:1347
isc::eval::EvalParser::make_INT8TOTEXT
static symbol_type make_INT8TOTEXT(const location_type &l)
Definition parser.h:1842
isc::eval::EvalParser::make_CONCAT
static symbol_type make_CONCAT(const location_type &l)
Definition parser.h:1752
isc::eval::EvalParser::make_TEXT
static symbol_type make_TEXT(const location_type &l)
Definition parser.h:1452
isc::eval::EvalParser::make_OPTION
static symbol_type make_OPTION(const location_type &l)
Definition parser.h:1317
isc::eval::EvalParser::make_AND
static symbol_type make_AND(const location_type &l)
Definition parser.h:1242
isc::eval::EvalParser::make_HTYPE
static symbol_type make_HTYPE(const location_type &l)
Definition parser.h:1617
isc::eval::EvalParser::symbol_kind_type
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition parser.h:692
isc::eval::EvalParser::make_MSGTYPE
static symbol_type make_MSGTYPE(const location_type &l)
Definition parser.h:1977
isc::eval::EvalParser::make_LINKADDR
static symbol_type make_LINKADDR(const location_type &l)
Definition parser.h:1392
isc::eval::EvalParser::make_TOHEXSTRING
static symbol_type make_TOHEXSTRING(const location_type &l)
Definition parser.h:1812
isc::eval::EvalParser::make_EVALerror
static symbol_type make_EVALerror(const location_type &l)
Definition parser.h:1167
isc::eval::EvalParser::make_PKT6
static symbol_type make_PKT6(const location_type &l)
Definition parser.h:1962
isc::eval::EvalParser::make_END
static symbol_type make_END(const location_type &l)
Definition parser.h:1152
isc::eval::EvalParser::make_DST
static symbol_type make_DST(const location_type &l)
Definition parser.h:1542
isc::eval::EvalParser::make_OR
static symbol_type make_OR(const location_type &l)
Definition parser.h:1272
isc::eval::EvalParser::make_PLUS
static symbol_type make_PLUS(const location_type &l)
Definition parser.h:1767
isc::eval::EvalParser::make_RBRACKET
static symbol_type make_RBRACKET(const location_type &l)
Definition parser.h:1422
isc::eval::EvalParser::make_NOT
static symbol_type make_NOT(const location_type &l)
Definition parser.h:1227
isc::eval::EvalParser::make_INT32TOTEXT
static symbol_type make_INT32TOTEXT(const location_type &l)
Definition parser.h:1872
isc::eval::EvalParser::make_SIADDR
static symbol_type make_SIADDR(const location_type &l)
Definition parser.h:1677
isc::eval::EvalParser::make_PKT4
static symbol_type make_PKT4(const location_type &l)
Definition parser.h:1572
isc::eval::EvalParser::make_SOR
static symbol_type make_SOR(const location_type &l)
Definition parser.h:1287
isc::eval::EvalParser::make_IP_ADDRESS
static symbol_type make_IP_ADDRESS(const std::string &v, const location_type &l)
Definition parser.h:2187
isc::eval::EvalParser::make_UINT16TOTEXT
static symbol_type make_UINT16TOTEXT(const location_type &l)
Definition parser.h:1902
isc::eval::EvalParser::make_STRING
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition parser.h:2127
isc::eval::EvalParser::make_TOPLEVEL_BOOL
static symbol_type make_TOPLEVEL_BOOL(const location_type &l)
Definition parser.h:2097
isc::eval::EvalParser::make_LPAREN
static symbol_type make_LPAREN(const location_type &l)
Definition parser.h:1197
isc::eval::EvalParser::make_TOPLEVEL_STRING
static symbol_type make_TOPLEVEL_STRING(const location_type &l)
Definition parser.h:2112
isc::eval::EvalParser::make_GIADDR
static symbol_type make_GIADDR(const location_type &l)
Definition parser.h:1647
isc::eval::EvalParser::make_MATCH
static symbol_type make_MATCH(const location_type &l)
Definition parser.h:2082
isc::eval::EvalParser::make_DATA
static symbol_type make_DATA(const location_type &l)
Definition parser.h:2052
isc::eval::EvalParser::make_CHADDR
static symbol_type make_CHADDR(const location_type &l)
Definition parser.h:1587
isc::eval::EvalParser::make_INT16TOTEXT
static symbol_type make_INT16TOTEXT(const location_type &l)
Definition parser.h:1857
isc::eval::EvalParser::make_LBRACKET
static symbol_type make_LBRACKET(const location_type &l)
Definition parser.h:1407
isc::eval::EvalParser::make_LEN
static symbol_type make_LEN(const location_type &l)
Definition parser.h:1557
isc::eval::EvalParser::make_IFACE
static symbol_type make_IFACE(const location_type &l)
Definition parser.h:1512
isc::eval::EvalParser::make_SAND
static symbol_type make_SAND(const location_type &l)
Definition parser.h:1257
isc::eval::EvalParser::make_ANY
static symbol_type make_ANY(const location_type &l)
Definition parser.h:2037
isc::eval::EvalParser::make_DOT
static symbol_type make_DOT(const location_type &l)
Definition parser.h:1437
isc::eval::EvalParser::by_type
by_kind by_type
Backward compatibility for a private implementation detail (Bison 3.6).
Definition parser.h:1057
isc::eval::EvalParser::make_HLEN
static symbol_type make_HLEN(const location_type &l)
Definition parser.h:1602
isc::eval::EvalParser::make_ALL
static symbol_type make_ALL(const location_type &l)
Definition parser.h:1722
isc::eval::EvalParser::make_UCASE
static symbol_type make_UCASE(const location_type &l)
Definition parser.h:1947
isc::eval::EvalParser::make_COMA
static symbol_type make_COMA(const location_type &l)
Definition parser.h:1737
isc::eval::EvalParser::make_IFELSE
static symbol_type make_IFELSE(const location_type &l)
Definition parser.h:1782
isc::eval::EvalParser::location_type
location location_type
Symbol locations.
Definition parser.h:482
isc::eval::EvalParser::make_YIADDR
static symbol_type make_YIADDR(const location_type &l)
Definition parser.h:1662
isc::eval::EvalParser::make_SRC
static symbol_type make_SRC(const location_type &l)
Definition parser.h:1527
isc::eval::EvalParser::make_INTEGER
static symbol_type make_INTEGER(const std::string &v, const location_type &l)
Definition parser.h:2142
isc::eval::EvalParser::make_EQUAL
static symbol_type make_EQUAL(const location_type &l)
Definition parser.h:1302
isc::eval::EvalParser::token_kind_type
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition parser.h:584
isc::eval::EvalParser::make_EXISTS
static symbol_type make_EXISTS(const location_type &l)
Definition parser.h:1482
isc::eval::EvalParser::make_TRANSID
static symbol_type make_TRANSID(const location_type &l)
Definition parser.h:1992
isc::eval::EvalParser::token_type
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition parser.h:587
isc::eval::EvalParser::make_SIFELSE
static symbol_type make_SIFELSE(const location_type &l)
Definition parser.h:1797
isc::eval::EvalParser::make_ADDRTOTEXT
static symbol_type make_ADDRTOTEXT(const location_type &l)
Definition parser.h:1827
isc::eval::EvalParser::make_LCASE
static symbol_type make_LCASE(const location_type &l)
Definition parser.h:1932
isc::eval::EvalParser::make_RELAY4
static symbol_type make_RELAY4(const location_type &l)
Definition parser.h:1332
isc::eval::EvalParser::make_PKT
static symbol_type make_PKT(const location_type &l)
Definition parser.h:1497
isc::eval::EvalParser::make_CIADDR
static symbol_type make_CIADDR(const location_type &l)
Definition parser.h:1632
isc::eval::EvalParser::make_HEXSTRING
static symbol_type make_HEXSTRING(const std::string &v, const location_type &l)
Definition parser.h:2157
isc::eval::EvalParser::make_EVALUNDEF
static symbol_type make_EVALUNDEF(const location_type &l)
Definition parser.h:1182
isc::eval::EvalParser::make_OPTION_NAME
static symbol_type make_OPTION_NAME(const std::string &v, const location_type &l)
Definition parser.h:2172
isc::eval::EvalParser::make_MEMBER
static symbol_type make_MEMBER(const location_type &l)
Definition parser.h:1362
isc::eval::EvalParser::make_UINT32TOTEXT
static symbol_type make_UINT32TOTEXT(const location_type &l)
Definition parser.h:1917
isc::eval::EvalParser::EvalParser
EvalParser(EvalContext &ctx_yyarg)
Build a parser object.
Definition parser.cc:152
isc::eval::EvalParser::make_SPLIT
static symbol_type make_SPLIT(const location_type &l)
Definition parser.h:1707
isc::eval::EvalParser::make_ENTERPRISE
static symbol_type make_ENTERPRISE(const location_type &l)
Definition parser.h:2067
isc::eval::EvalParser::make_VENDOR
static symbol_type make_VENDOR(const location_type &l)
Definition parser.h:2022
isc::eval::EvalParser::semantic_type
value_type semantic_type
Backward compatibility (Bison 3.8).
Definition parser.h:479
isc::eval::EvalParser::make_RPAREN
static symbol_type make_RPAREN(const location_type &l)
Definition parser.h:1212
isc::eval::EvalParser::make_PEERADDR
static symbol_type make_PEERADDR(const location_type &l)
Definition parser.h:1377
isc::eval::EvalParser::YYNTOKENS
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition parser.h:695
isc::eval::EvalParser::make_SUBSTRING
static symbol_type make_SUBSTRING(const location_type &l)
Definition parser.h:1692
isc::eval::EvalParser::make_VENDOR_CLASS
static symbol_type make_VENDOR_CLASS(const location_type &l)
Definition parser.h:2007
isc::eval::EvalParser::make_HEX
static symbol_type make_HEX(const location_type &l)
Definition parser.h:1467
isc::eval::EvalParser::make_UINT8TOTEXT
static symbol_type make_UINT8TOTEXT(const location_type &l)
Definition parser.h:1887
isc::eval::EvalParser::symbol_name
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
Definition parser.cc:1925
eval_context_decl.h
Forward declaration of the EvalContext class.
isc::db::error
@ error
Definition db_log.h:118
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::eval
Definition eval_context.h:24
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
option.h
EVAL_ASSERT
#define EVAL_ASSERT
Definition parser.h:108
isc::eval::EvalParser::basic_symbol
A complete symbol.
Definition parser.h:705
isc::eval::EvalParser::basic_symbol< by_kind >::move
void move(basic_symbol &s)
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(const basic_symbol &that)
Copy constructor.
Definition parser.h:2590
isc::eval::EvalParser::basic_symbol< by_kind >::location
location_type location
Definition parser.h:1007
isc::eval::EvalParser::basic_symbol::super_type
Base super_type
Alias to Base.
Definition parser.h:707
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const TokenPkt4::FieldType &v, const location_type &l)
Definition parser.h:810
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const uint32_t &v, const location_type &l)
Definition parser.h:908
isc::eval::EvalParser::basic_symbol< by_kind >::value
value_type value
Definition parser.h:1004
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const TokenPkt6::FieldType &v, const location_type &l)
Definition parser.h:824
isc::eval::EvalParser::basic_symbol::~basic_symbol
~basic_symbol()
Destroy the symbol.
Definition parser.h:916
isc::eval::EvalParser::basic_symbol< by_kind >::empty
bool empty() const YY_NOEXCEPT
isc::eval::EvalParser::basic_symbol::type_get
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition parser.h:2650
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const uint16_t &v, const location_type &l)
Definition parser.h:894
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const TokenPkt::MetadataType &v, const location_type &l)
Definition parser.h:838
isc::eval::EvalParser::basic_symbol::name
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
Definition parser.h:989
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const TokenOption::RepresentationType &v, const location_type &l)
Definition parser.h:796
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
Definition parser.h:880
isc::eval::EvalParser::basic_symbol< by_kind >::clear
void clear() YY_NOEXCEPT
Definition parser.h:924
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol() YY_NOEXCEPT
Default constructor.
Definition parser.h:710
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const TokenRelay6Field::FieldType &v, const location_type &l)
Definition parser.h:852
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Definition parser.h:783
isc::eval::EvalParser::basic_symbol::basic_symbol
basic_symbol(typename Base::kind_type t, const int8_t &v, const location_type &l)
Definition parser.h:866
isc::eval::EvalParser::by_kind
Type access provider for token (enum) based symbols.
Definition parser.h:1018
isc::eval::EvalParser::by_kind::type_get
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition parser.h:2771
isc::eval::EvalParser::by_kind::kind_type
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition parser.h:1020
isc::eval::EvalParser::by_kind::by_kind
by_kind() YY_NOEXCEPT
Default constructor.
Definition parser.h:2721
isc::eval::EvalParser::by_kind::kind_
symbol_kind_type kind_
The symbol kind.
Definition parser.h:1053
isc::eval::EvalParser::by_kind::clear
void clear() YY_NOEXCEPT
Record that this symbol is empty.
Definition parser.h:2748
isc::eval::EvalParser::by_kind::kind
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Definition parser.h:2763
isc::eval::EvalParser::by_kind::move
void move(by_kind &that)
Steal the symbol kind from that.
Definition parser.h:2755
isc::eval::EvalParser::symbol_kind
Symbol kinds.
Definition parser.h:591
isc::eval::EvalParser::symbol_kind::symbol_kind_type
symbol_kind_type
Definition parser.h:593
isc::eval::EvalParser::symbol_kind::S_HEX
@ S_HEX
Definition parser.h:617
isc::eval::EvalParser::symbol_kind::S_EQUAL
@ S_EQUAL
Definition parser.h:606
isc::eval::EvalParser::symbol_kind::S_IFACE
@ S_IFACE
Definition parser.h:620
isc::eval::EvalParser::symbol_kind::S_HLEN
@ S_HLEN
Definition parser.h:626
isc::eval::EvalParser::symbol_kind::S_nest_level
@ S_nest_level
Definition parser.h:679
isc::eval::EvalParser::symbol_kind::S_expression
@ S_expression
Definition parser.h:668
isc::eval::EvalParser::symbol_kind::S_ALL
@ S_ALL
Definition parser.h:634
isc::eval::EvalParser::symbol_kind::S_SPLIT
@ S_SPLIT
Definition parser.h:633
isc::eval::EvalParser::symbol_kind::S_PEERADDR
@ S_PEERADDR
Definition parser.h:611
isc::eval::EvalParser::symbol_kind::S_YYACCEPT
@ S_YYACCEPT
Definition parser.h:666
isc::eval::EvalParser::symbol_kind::S_RELAY4
@ S_RELAY4
Definition parser.h:608
isc::eval::EvalParser::symbol_kind::S_INTEGER
@ S_INTEGER
Definition parser.h:662
isc::eval::EvalParser::symbol_kind::S_DATA
@ S_DATA
Definition parser.h:656
isc::eval::EvalParser::symbol_kind::S_TRANSID
@ S_TRANSID
Definition parser.h:652
isc::eval::EvalParser::symbol_kind::S_VENDOR
@ S_VENDOR
Definition parser.h:654
isc::eval::EvalParser::symbol_kind::S_HEXSTRING
@ S_HEXSTRING
Definition parser.h:663
isc::eval::EvalParser::symbol_kind::S_LPAREN
@ S_LPAREN
Definition parser.h:599
isc::eval::EvalParser::symbol_kind::S_YIADDR
@ S_YIADDR
Definition parser.h:630
isc::eval::EvalParser::symbol_kind::S_YYEOF
@ S_YYEOF
Definition parser.h:596
isc::eval::EvalParser::symbol_kind::S_NOT
@ S_NOT
Definition parser.h:601
isc::eval::EvalParser::symbol_kind::S_RELAY6
@ S_RELAY6
Definition parser.h:609
isc::eval::EvalParser::symbol_kind::S_IP_ADDRESS
@ S_IP_ADDRESS
Definition parser.h:665
isc::eval::EvalParser::symbol_kind::S_ADDRTOTEXT
@ S_ADDRTOTEXT
Definition parser.h:641
isc::eval::EvalParser::symbol_kind::S_string_expr
@ S_string_expr
Definition parser.h:672
isc::eval::EvalParser::symbol_kind::S_pkt4_field
@ S_pkt4_field
Definition parser.h:682
isc::eval::EvalParser::symbol_kind::S_75_2
@ S_75_2
Definition parser.h:671
isc::eval::EvalParser::symbol_kind::S_EXISTS
@ S_EXISTS
Definition parser.h:618
isc::eval::EvalParser::symbol_kind::S_OPTION_NAME
@ S_OPTION_NAME
Definition parser.h:664
isc::eval::EvalParser::symbol_kind::S_bool_expr
@ S_bool_expr
Definition parser.h:669
isc::eval::EvalParser::symbol_kind::S_AND
@ S_AND
Definition parser.h:602
isc::eval::EvalParser::symbol_kind::S_SRC
@ S_SRC
Definition parser.h:621
isc::eval::EvalParser::symbol_kind::S_TOPLEVEL_STRING
@ S_TOPLEVEL_STRING
Definition parser.h:660
isc::eval::EvalParser::symbol_kind::S_LCASE
@ S_LCASE
Definition parser.h:648
isc::eval::EvalParser::symbol_kind::S_OPTION
@ S_OPTION
Definition parser.h:607
isc::eval::EvalParser::symbol_kind::S_GIADDR
@ S_GIADDR
Definition parser.h:629
isc::eval::EvalParser::symbol_kind::S_CONCAT
@ S_CONCAT
Definition parser.h:636
isc::eval::EvalParser::symbol_kind::S_integer_expr
@ S_integer_expr
Definition parser.h:675
isc::eval::EvalParser::symbol_kind::S_length_expr
@ S_length_expr
Definition parser.h:686
isc::eval::EvalParser::symbol_kind::S_PKT4
@ S_PKT4
Definition parser.h:624
isc::eval::EvalParser::symbol_kind::S_YYUNDEF
@ S_YYUNDEF
Definition parser.h:598
isc::eval::EvalParser::symbol_kind::S_UINT8TOTEXT
@ S_UINT8TOTEXT
Definition parser.h:645
isc::eval::EvalParser::symbol_kind::S_YYerror
@ S_YYerror
Definition parser.h:597
isc::eval::EvalParser::symbol_kind::S_UCASE
@ S_UCASE
Definition parser.h:649
isc::eval::EvalParser::symbol_kind::S_78_4
@ S_78_4
Definition parser.h:674
isc::eval::EvalParser::symbol_kind::S_STRING
@ S_STRING
Definition parser.h:661
isc::eval::EvalParser::symbol_kind::S_relay6_field
@ S_relay6_field
Definition parser.h:684
isc::eval::EvalParser::symbol_kind::S_SOR
@ S_SOR
Definition parser.h:605
isc::eval::EvalParser::symbol_kind::S_RPAREN
@ S_RPAREN
Definition parser.h:600
isc::eval::EvalParser::symbol_kind::S_MATCH
@ S_MATCH
Definition parser.h:658
isc::eval::EvalParser::symbol_kind::S_INT16TOTEXT
@ S_INT16TOTEXT
Definition parser.h:643
isc::eval::EvalParser::symbol_kind::S_SIADDR
@ S_SIADDR
Definition parser.h:631
isc::eval::EvalParser::symbol_kind::S_PLUS
@ S_PLUS
Definition parser.h:637
isc::eval::EvalParser::symbol_kind::S_UINT16TOTEXT
@ S_UINT16TOTEXT
Definition parser.h:646
isc::eval::EvalParser::symbol_kind::S_MEMBER
@ S_MEMBER
Definition parser.h:610
isc::eval::EvalParser::symbol_kind::S_PKT
@ S_PKT
Definition parser.h:619
isc::eval::EvalParser::symbol_kind::S_LBRACKET
@ S_LBRACKET
Definition parser.h:613
isc::eval::EvalParser::symbol_kind::S_LINKADDR
@ S_LINKADDR
Definition parser.h:612
isc::eval::EvalParser::symbol_kind::S_SIFELSE
@ S_SIFELSE
Definition parser.h:639
isc::eval::EvalParser::symbol_kind::S_DOT
@ S_DOT
Definition parser.h:615
isc::eval::EvalParser::symbol_kind::S_start_expr
@ S_start_expr
Definition parser.h:685
isc::eval::EvalParser::symbol_kind::S_MSGTYPE
@ S_MSGTYPE
Definition parser.h:651
isc::eval::EvalParser::symbol_kind::S_ANY
@ S_ANY
Definition parser.h:655
isc::eval::EvalParser::symbol_kind::S_VENDOR_CLASS
@ S_VENDOR_CLASS
Definition parser.h:653
isc::eval::EvalParser::symbol_kind::YYNTOKENS
@ YYNTOKENS
Number of tokens.
Definition parser.h:594
isc::eval::EvalParser::symbol_kind::S_INT32TOTEXT
@ S_INT32TOTEXT
Definition parser.h:644
isc::eval::EvalParser::symbol_kind::S_pkt_metadata
@ S_pkt_metadata
Definition parser.h:680
isc::eval::EvalParser::symbol_kind::S_enterprise_id
@ S_enterprise_id
Definition parser.h:681
isc::eval::EvalParser::symbol_kind::S_77_3
@ S_77_3
Definition parser.h:673
isc::eval::EvalParser::symbol_kind::S_HTYPE
@ S_HTYPE
Definition parser.h:627
isc::eval::EvalParser::symbol_kind::S_SAND
@ S_SAND
Definition parser.h:603
isc::eval::EvalParser::symbol_kind::S_start
@ S_start
Definition parser.h:667
isc::eval::EvalParser::symbol_kind::S_TEXT
@ S_TEXT
Definition parser.h:616
isc::eval::EvalParser::symbol_kind::S_TOHEXSTRING
@ S_TOHEXSTRING
Definition parser.h:640
isc::eval::EvalParser::symbol_kind::S_YYEMPTY
@ S_YYEMPTY
Definition parser.h:595
isc::eval::EvalParser::symbol_kind::S_ENTERPRISE
@ S_ENTERPRISE
Definition parser.h:657
isc::eval::EvalParser::symbol_kind::S_pkt6_field
@ S_pkt6_field
Definition parser.h:683
isc::eval::EvalParser::symbol_kind::S_COMA
@ S_COMA
Definition parser.h:635
isc::eval::EvalParser::symbol_kind::S_SUBSTRING
@ S_SUBSTRING
Definition parser.h:632
isc::eval::EvalParser::symbol_kind::S_sub_option_code
@ S_sub_option_code
Definition parser.h:677
isc::eval::EvalParser::symbol_kind::S_RBRACKET
@ S_RBRACKET
Definition parser.h:614
isc::eval::EvalParser::symbol_kind::S_IFELSE
@ S_IFELSE
Definition parser.h:638
isc::eval::EvalParser::symbol_kind::S_DST
@ S_DST
Definition parser.h:622
isc::eval::EvalParser::symbol_kind::S_CHADDR
@ S_CHADDR
Definition parser.h:625
isc::eval::EvalParser::symbol_kind::S_OR
@ S_OR
Definition parser.h:604
isc::eval::EvalParser::symbol_kind::S_option_repr_type
@ S_option_repr_type
Definition parser.h:678
isc::eval::EvalParser::symbol_kind::S_PKT6
@ S_PKT6
Definition parser.h:650
isc::eval::EvalParser::symbol_kind::S_LEN
@ S_LEN
Definition parser.h:623
isc::eval::EvalParser::symbol_kind::S_74_1
@ S_74_1
Definition parser.h:670
isc::eval::EvalParser::symbol_kind::S_UINT32TOTEXT
@ S_UINT32TOTEXT
Definition parser.h:647
isc::eval::EvalParser::symbol_kind::S_INT8TOTEXT
@ S_INT8TOTEXT
Definition parser.h:642
isc::eval::EvalParser::symbol_kind::S_option_code
@ S_option_code
Definition parser.h:676
isc::eval::EvalParser::symbol_kind::S_TOPLEVEL_BOOL
@ S_TOPLEVEL_BOOL
Definition parser.h:659
isc::eval::EvalParser::symbol_kind::S_int_expr
@ S_int_expr
Definition parser.h:687
isc::eval::EvalParser::symbol_kind::S_CIADDR
@ S_CIADDR
Definition parser.h:628
isc::eval::EvalParser::symbol_type
"External" symbols: returned by the scanner.
Definition parser.h:1061
isc::eval::EvalParser::symbol_type::symbol_type
symbol_type() YY_NOEXCEPT
Empty symbol.
Definition parser.h:1066
isc::eval::EvalParser::symbol_type::super_type
basic_symbol< by_kind > super_type
Superclass.
Definition parser.h:1063
isc::eval::EvalParser::syntax_error::syntax_error
syntax_error(const location_type &l, const std::string &m)
Definition parser.h:487
isc::eval::EvalParser::syntax_error::location
location_type location
Definition parser.h:499
isc::eval::EvalParser::syntax_error::syntax_error
syntax_error(const syntax_error &s)
Definition parser.h:492
isc::eval::EvalParser::syntax_error::~syntax_error
~syntax_error() YY_NOEXCEPT YY_NOTHROW
Definition parser.cc:165
isc::eval::EvalParser::token
Token kinds.
Definition parser.h:504
isc::eval::EvalParser::token::yytokentype
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition parser.h:580
isc::eval::EvalParser::token::token_kind_type
token_kind_type
Definition parser.h:506
isc::eval::EvalParser::token::TOKEN_LINKADDR
@ TOKEN_LINKADDR
Definition parser.h:524
isc::eval::EvalParser::token::TOKEN_EVALEMPTY
@ TOKEN_EVALEMPTY
Definition parser.h:507
isc::eval::EvalParser::token::TOKEN_CHADDR
@ TOKEN_CHADDR
Definition parser.h:537
isc::eval::EvalParser::token::TOKEN_OPTION
@ TOKEN_OPTION
Definition parser.h:519
isc::eval::EvalParser::token::TOKEN_VENDOR
@ TOKEN_VENDOR
Definition parser.h:566
isc::eval::EvalParser::token::TOKEN_LPAREN
@ TOKEN_LPAREN
Definition parser.h:511
isc::eval::EvalParser::token::TOKEN_HEXSTRING
@ TOKEN_HEXSTRING
Definition parser.h:575
isc::eval::EvalParser::token::TOKEN_NOT
@ TOKEN_NOT
Definition parser.h:513
isc::eval::EvalParser::token::TOKEN_OPTION_NAME
@ TOKEN_OPTION_NAME
Definition parser.h:576
isc::eval::EvalParser::token::TOKEN_PLUS
@ TOKEN_PLUS
Definition parser.h:549
isc::eval::EvalParser::token::TOKEN_SPLIT
@ TOKEN_SPLIT
Definition parser.h:545
isc::eval::EvalParser::token::TOKEN_UCASE
@ TOKEN_UCASE
Definition parser.h:561
isc::eval::EvalParser::token::TOKEN_UINT8TOTEXT
@ TOKEN_UINT8TOTEXT
Definition parser.h:557
isc::eval::EvalParser::token::TOKEN_TEXT
@ TOKEN_TEXT
Definition parser.h:528
isc::eval::EvalParser::token::TOKEN_DST
@ TOKEN_DST
Definition parser.h:534
isc::eval::EvalParser::token::TOKEN_MATCH
@ TOKEN_MATCH
Definition parser.h:570
isc::eval::EvalParser::token::TOKEN_UINT16TOTEXT
@ TOKEN_UINT16TOTEXT
Definition parser.h:558
isc::eval::EvalParser::token::TOKEN_EQUAL
@ TOKEN_EQUAL
Definition parser.h:518
isc::eval::EvalParser::token::TOKEN_IFELSE
@ TOKEN_IFELSE
Definition parser.h:550
isc::eval::EvalParser::token::TOKEN_HLEN
@ TOKEN_HLEN
Definition parser.h:538
isc::eval::EvalParser::token::TOKEN_TOHEXSTRING
@ TOKEN_TOHEXSTRING
Definition parser.h:552
isc::eval::EvalParser::token::TOKEN_HEX
@ TOKEN_HEX
Definition parser.h:529
isc::eval::EvalParser::token::TOKEN_RELAY6
@ TOKEN_RELAY6
Definition parser.h:521
isc::eval::EvalParser::token::TOKEN_EVALerror
@ TOKEN_EVALerror
Definition parser.h:509
isc::eval::EvalParser::token::TOKEN_INT16TOTEXT
@ TOKEN_INT16TOTEXT
Definition parser.h:555
isc::eval::EvalParser::token::TOKEN_INT32TOTEXT
@ TOKEN_INT32TOTEXT
Definition parser.h:556
isc::eval::EvalParser::token::TOKEN_IFACE
@ TOKEN_IFACE
Definition parser.h:532
isc::eval::EvalParser::token::TOKEN_MEMBER
@ TOKEN_MEMBER
Definition parser.h:522
isc::eval::EvalParser::token::TOKEN_YIADDR
@ TOKEN_YIADDR
Definition parser.h:542
isc::eval::EvalParser::token::TOKEN_TOPLEVEL_BOOL
@ TOKEN_TOPLEVEL_BOOL
Definition parser.h:571
isc::eval::EvalParser::token::TOKEN_INTEGER
@ TOKEN_INTEGER
Definition parser.h:574
isc::eval::EvalParser::token::TOKEN_ANY
@ TOKEN_ANY
Definition parser.h:567
isc::eval::EvalParser::token::TOKEN_END
@ TOKEN_END
Definition parser.h:508
isc::eval::EvalParser::token::TOKEN_DATA
@ TOKEN_DATA
Definition parser.h:568
isc::eval::EvalParser::token::TOKEN_VENDOR_CLASS
@ TOKEN_VENDOR_CLASS
Definition parser.h:565
isc::eval::EvalParser::token::TOKEN_PKT6
@ TOKEN_PKT6
Definition parser.h:562
isc::eval::EvalParser::token::TOKEN_SOR
@ TOKEN_SOR
Definition parser.h:517
isc::eval::EvalParser::token::TOKEN_INT8TOTEXT
@ TOKEN_INT8TOTEXT
Definition parser.h:554
isc::eval::EvalParser::token::TOKEN_MSGTYPE
@ TOKEN_MSGTYPE
Definition parser.h:563
isc::eval::EvalParser::token::TOKEN_SIFELSE
@ TOKEN_SIFELSE
Definition parser.h:551
isc::eval::EvalParser::token::TOKEN_ADDRTOTEXT
@ TOKEN_ADDRTOTEXT
Definition parser.h:553
isc::eval::EvalParser::token::TOKEN_CIADDR
@ TOKEN_CIADDR
Definition parser.h:540
isc::eval::EvalParser::token::TOKEN_TRANSID
@ TOKEN_TRANSID
Definition parser.h:564
isc::eval::EvalParser::token::TOKEN_SIADDR
@ TOKEN_SIADDR
Definition parser.h:543
isc::eval::EvalParser::token::TOKEN_EVALUNDEF
@ TOKEN_EVALUNDEF
Definition parser.h:510
isc::eval::EvalParser::token::TOKEN_AND
@ TOKEN_AND
Definition parser.h:514
isc::eval::EvalParser::token::TOKEN_IP_ADDRESS
@ TOKEN_IP_ADDRESS
Definition parser.h:577
isc::eval::EvalParser::token::TOKEN_PEERADDR
@ TOKEN_PEERADDR
Definition parser.h:523
isc::eval::EvalParser::token::TOKEN_LCASE
@ TOKEN_LCASE
Definition parser.h:560
isc::eval::EvalParser::token::TOKEN_PKT4
@ TOKEN_PKT4
Definition parser.h:536
isc::eval::EvalParser::token::TOKEN_SRC
@ TOKEN_SRC
Definition parser.h:533
isc::eval::EvalParser::token::TOKEN_EXISTS
@ TOKEN_EXISTS
Definition parser.h:530
isc::eval::EvalParser::token::TOKEN_ENTERPRISE
@ TOKEN_ENTERPRISE
Definition parser.h:569
isc::eval::EvalParser::token::TOKEN_SUBSTRING
@ TOKEN_SUBSTRING
Definition parser.h:544
isc::eval::EvalParser::token::TOKEN_OR
@ TOKEN_OR
Definition parser.h:516
isc::eval::EvalParser::token::TOKEN_CONCAT
@ TOKEN_CONCAT
Definition parser.h:548
isc::eval::EvalParser::token::TOKEN_RBRACKET
@ TOKEN_RBRACKET
Definition parser.h:526
isc::eval::EvalParser::token::TOKEN_TOPLEVEL_STRING
@ TOKEN_TOPLEVEL_STRING
Definition parser.h:572
isc::eval::EvalParser::token::TOKEN_LBRACKET
@ TOKEN_LBRACKET
Definition parser.h:525
isc::eval::EvalParser::token::TOKEN_PKT
@ TOKEN_PKT
Definition parser.h:531
isc::eval::EvalParser::token::TOKEN_HTYPE
@ TOKEN_HTYPE
Definition parser.h:539
isc::eval::EvalParser::token::TOKEN_LEN
@ TOKEN_LEN
Definition parser.h:535
isc::eval::EvalParser::token::TOKEN_RPAREN
@ TOKEN_RPAREN
Definition parser.h:512
isc::eval::EvalParser::token::TOKEN_ALL
@ TOKEN_ALL
Definition parser.h:546
isc::eval::EvalParser::token::TOKEN_RELAY4
@ TOKEN_RELAY4
Definition parser.h:520
isc::eval::EvalParser::token::TOKEN_GIADDR
@ TOKEN_GIADDR
Definition parser.h:541
isc::eval::EvalParser::token::TOKEN_DOT
@ TOKEN_DOT
Definition parser.h:527
isc::eval::EvalParser::token::TOKEN_UINT32TOTEXT
@ TOKEN_UINT32TOTEXT
Definition parser.h:559
isc::eval::EvalParser::token::TOKEN_STRING
@ TOKEN_STRING
Definition parser.h:573
isc::eval::EvalParser::token::TOKEN_SAND
@ TOKEN_SAND
Definition parser.h:515
isc::eval::EvalParser::token::TOKEN_COMA
@ TOKEN_COMA
Definition parser.h:547
token.h