Kea 2.0.2
d2_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
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_D2_PARSER_D2_PARSER_H_INCLUDED
46# define YY_D2_PARSER_D2_PARSER_H_INCLUDED
47// "%code requires" blocks.
48#line 17 "d2_parser.yy"
49
50#include <string>
51#include <cc/data.h>
52#include <d2srv/d2_config.h>
53#include <boost/lexical_cast.hpp>
55
56using namespace isc::d2;
57using namespace isc::data;
58using namespace std;
59
60#line 61 "d2_parser.h"
61
62# include <cassert>
63# include <cstdlib> // std::abort
64# include <iostream>
65# include <stdexcept>
66# include <string>
67# include <vector>
68
69#if defined __cplusplus
70# define YY_CPLUSPLUS __cplusplus
71#else
72# define YY_CPLUSPLUS 199711L
73#endif
74
75// Support move semantics when possible.
76#if 201103L <= YY_CPLUSPLUS
77# define YY_MOVE std::move
78# define YY_MOVE_OR_COPY move
79# define YY_MOVE_REF(Type) Type&&
80# define YY_RVREF(Type) Type&&
81# define YY_COPY(Type) Type
82#else
83# define YY_MOVE
84# define YY_MOVE_OR_COPY copy
85# define YY_MOVE_REF(Type) Type&
86# define YY_RVREF(Type) const Type&
87# define YY_COPY(Type) const Type&
88#endif
89
90// Support noexcept when possible.
91#if 201103L <= YY_CPLUSPLUS
92# define YY_NOEXCEPT noexcept
93# define YY_NOTHROW
94#else
95# define YY_NOEXCEPT
96# define YY_NOTHROW throw ()
97#endif
98
99// Support constexpr when possible.
100#if 201703 <= YY_CPLUSPLUS
101# define YY_CONSTEXPR constexpr
102#else
103# define YY_CONSTEXPR
104#endif
105# include "location.hh"
106#include <typeinfo>
107#ifndef D2_PARSER__ASSERT
108# include <cassert>
109# define D2_PARSER__ASSERT assert
110#endif
111
112
113#ifndef YY_ATTRIBUTE_PURE
114# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
115# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
116# else
117# define YY_ATTRIBUTE_PURE
118# endif
119#endif
120
121#ifndef YY_ATTRIBUTE_UNUSED
122# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
123# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
124# else
125# define YY_ATTRIBUTE_UNUSED
126# endif
127#endif
128
129/* Suppress unused-variable warnings by "using" E. */
130#if ! defined lint || defined __GNUC__
131# define YY_USE(E) ((void) (E))
132#else
133# define YY_USE(E) /* empty */
134#endif
135
136/* Suppress an incorrect diagnostic about yylval being uninitialized. */
137#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
138# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
139# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
140 _Pragma ("GCC diagnostic push") \
141 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
142# else
143# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
144 _Pragma ("GCC diagnostic push") \
145 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
146 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
147# endif
148# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
149 _Pragma ("GCC diagnostic pop")
150#else
151# define YY_INITIAL_VALUE(Value) Value
152#endif
153#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
154# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
155# define YY_IGNORE_MAYBE_UNINITIALIZED_END
156#endif
157#ifndef YY_INITIAL_VALUE
158# define YY_INITIAL_VALUE(Value) /* Nothing. */
159#endif
160
161#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
162# define YY_IGNORE_USELESS_CAST_BEGIN \
163 _Pragma ("GCC diagnostic push") \
164 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
165# define YY_IGNORE_USELESS_CAST_END \
166 _Pragma ("GCC diagnostic pop")
167#endif
168#ifndef YY_IGNORE_USELESS_CAST_BEGIN
169# define YY_IGNORE_USELESS_CAST_BEGIN
170# define YY_IGNORE_USELESS_CAST_END
171#endif
172
173# ifndef YY_CAST
174# ifdef __cplusplus
175# define YY_CAST(Type, Val) static_cast<Type> (Val)
176# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
177# else
178# define YY_CAST(Type, Val) ((Type) (Val))
179# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
180# endif
181# endif
182# ifndef YY_NULLPTR
183# if defined __cplusplus
184# if 201103L <= __cplusplus
185# define YY_NULLPTR nullptr
186# else
187# define YY_NULLPTR 0
188# endif
189# else
190# define YY_NULLPTR ((void*)0)
191# endif
192# endif
193
194/* Debug traces. */
195#ifndef D2_PARSER_DEBUG
196# if defined YYDEBUG
197#if YYDEBUG
198# define D2_PARSER_DEBUG 1
199# else
200# define D2_PARSER_DEBUG 0
201# endif
202# else /* ! defined YYDEBUG */
203# define D2_PARSER_DEBUG 1
204# endif /* ! defined YYDEBUG */
205#endif /* ! defined D2_PARSER_DEBUG */
206
207#line 14 "d2_parser.yy"
208namespace isc { namespace d2 {
209#line 210 "d2_parser.h"
210
211
212
213
216 {
217 public:
218#ifdef D2_PARSER_STYPE
219# ifdef __GNUC__
220# pragma GCC message "bison: do not #define D2_PARSER_STYPE in C++, use %define api.value.type"
221# endif
222 typedef D2_PARSER_STYPE value_type;
223#else
230 {
231 public:
234
237 : yyraw_ ()
238 , yytypeid_ (YY_NULLPTR)
239 {}
240
242 template <typename T>
244 : yytypeid_ (&typeid (T))
245 {
246 D2_PARSER__ASSERT (sizeof (T) <= size);
247 new (yyas_<T> ()) T (YY_MOVE (t));
248 }
249
250#if 201103L <= YY_CPLUSPLUS
252 value_type (const self_type&) = delete;
254 self_type& operator= (const self_type&) = delete;
255#endif
256
259 {
260 D2_PARSER__ASSERT (!yytypeid_);
261 }
262
263# if 201103L <= YY_CPLUSPLUS
265 template <typename T, typename... U>
266 T&
267 emplace (U&&... u)
268 {
269 D2_PARSER__ASSERT (!yytypeid_);
270 D2_PARSER__ASSERT (sizeof (T) <= size);
271 yytypeid_ = & typeid (T);
272 return *new (yyas_<T> ()) T (std::forward <U>(u)...);
273 }
274# else
276 template <typename T>
277 T&
279 {
280 D2_PARSER__ASSERT (!yytypeid_);
281 D2_PARSER__ASSERT (sizeof (T) <= size);
282 yytypeid_ = & typeid (T);
283 return *new (yyas_<T> ()) T ();
284 }
285
287 template <typename T>
288 T&
289 emplace (const T& t)
290 {
291 D2_PARSER__ASSERT (!yytypeid_);
292 D2_PARSER__ASSERT (sizeof (T) <= size);
293 yytypeid_ = & typeid (T);
294 return *new (yyas_<T> ()) T (t);
295 }
296# endif
297
300 template <typename T>
301 T&
303 {
304 return emplace<T> ();
305 }
306
309 template <typename T>
310 T&
311 build (const T& t)
312 {
313 return emplace<T> (t);
314 }
315
317 template <typename T>
318 T&
320 {
321 D2_PARSER__ASSERT (yytypeid_);
322 D2_PARSER__ASSERT (*yytypeid_ == typeid (T));
323 D2_PARSER__ASSERT (sizeof (T) <= size);
324 return *yyas_<T> ();
325 }
326
328 template <typename T>
329 const T&
331 {
332 D2_PARSER__ASSERT (yytypeid_);
333 D2_PARSER__ASSERT (*yytypeid_ == typeid (T));
334 D2_PARSER__ASSERT (sizeof (T) <= size);
335 return *yyas_<T> ();
336 }
337
346 template <typename T>
347 void
349 {
350 D2_PARSER__ASSERT (yytypeid_);
351 D2_PARSER__ASSERT (*yytypeid_ == *that.yytypeid_);
352 std::swap (as<T> (), that.as<T> ());
353 }
354
358 template <typename T>
359 void
361 {
362# if 201103L <= YY_CPLUSPLUS
363 emplace<T> (std::move (that.as<T> ()));
364# else
365 emplace<T> ();
366 swap<T> (that);
367# endif
368 that.destroy<T> ();
369 }
370
371# if 201103L <= YY_CPLUSPLUS
373 template <typename T>
374 void
375 move (self_type&& that)
376 {
377 emplace<T> (std::move (that.as<T> ()));
378 that.destroy<T> ();
379 }
380#endif
381
383 template <typename T>
384 void
385 copy (const self_type& that)
386 {
387 emplace<T> (that.as<T> ());
388 }
389
391 template <typename T>
392 void
394 {
395 as<T> ().~T ();
396 yytypeid_ = YY_NULLPTR;
397 }
398
399 private:
400#if YY_CPLUSPLUS < 201103L
402 value_type (const self_type&);
404 self_type& operator= (const self_type&);
405#endif
406
408 template <typename T>
409 T*
410 yyas_ () YY_NOEXCEPT
411 {
412 void *yyp = yyraw_;
413 return static_cast<T*> (yyp);
414 }
415
417 template <typename T>
418 const T*
419 yyas_ () const YY_NOEXCEPT
420 {
421 const void *yyp = yyraw_;
422 return static_cast<const T*> (yyp);
423 }
424
426 union union_type
427 {
428 // value
429 // map_value
430 // ncr_protocol_value
431 char dummy1[sizeof (ElementPtr)];
432
433 // "boolean"
434 char dummy2[sizeof (bool)];
435
436 // "floating point"
437 char dummy3[sizeof (double)];
438
439 // "integer"
440 char dummy4[sizeof (int64_t)];
441
442 // "constant string"
443 char dummy5[sizeof (std::string)];
444 };
445
447 enum { size = sizeof (union_type) };
448
450 union
451 {
453 long double yyalign_me_;
455 char yyraw_[size];
456 };
457
459 const std::type_info *yytypeid_;
460 };
461
462#endif
465
467 typedef location location_type;
468
470 struct syntax_error : std::runtime_error
471 {
472 syntax_error (const location_type& l, const std::string& m)
473 : std::runtime_error (m)
474 , location (l)
475 {}
476
478 : std::runtime_error (s.what ())
479 , location (s.location)
480 {}
481
483
485 };
486
488 struct token
489 {
491 {
492 TOKEN_D2_PARSER_EMPTY = -2,
493 TOKEN_END = 0, // "end of file"
494 TOKEN_D2_PARSER_error = 256, // error
495 TOKEN_D2_PARSER_UNDEF = 257, // "invalid token"
496 TOKEN_COMMA = 258, // ","
497 TOKEN_COLON = 259, // ":"
498 TOKEN_LSQUARE_BRACKET = 260, // "["
499 TOKEN_RSQUARE_BRACKET = 261, // "]"
500 TOKEN_LCURLY_BRACKET = 262, // "{"
501 TOKEN_RCURLY_BRACKET = 263, // "}"
502 TOKEN_NULL_TYPE = 264, // "null"
503 TOKEN_DHCPDDNS = 265, // "DhcpDdns"
504 TOKEN_IP_ADDRESS = 266, // "ip-address"
505 TOKEN_PORT = 267, // "port"
506 TOKEN_DNS_SERVER_TIMEOUT = 268, // "dns-server-timeout"
507 TOKEN_NCR_PROTOCOL = 269, // "ncr-protocol"
508 TOKEN_UDP = 270, // "UDP"
509 TOKEN_TCP = 271, // "TCP"
510 TOKEN_NCR_FORMAT = 272, // "ncr-format"
511 TOKEN_JSON = 273, // "JSON"
512 TOKEN_USER_CONTEXT = 274, // "user-context"
513 TOKEN_COMMENT = 275, // "comment"
514 TOKEN_FORWARD_DDNS = 276, // "forward-ddns"
515 TOKEN_REVERSE_DDNS = 277, // "reverse-ddns"
516 TOKEN_DDNS_DOMAINS = 278, // "ddns-domains"
517 TOKEN_KEY_NAME = 279, // "key-name"
518 TOKEN_DNS_SERVERS = 280, // "dns-servers"
519 TOKEN_HOSTNAME = 281, // "hostname"
520 TOKEN_TSIG_KEYS = 282, // "tsig-keys"
521 TOKEN_ALGORITHM = 283, // "algorithm"
522 TOKEN_DIGEST_BITS = 284, // "digest-bits"
523 TOKEN_SECRET = 285, // "secret"
524 TOKEN_CONTROL_SOCKET = 286, // "control-socket"
525 TOKEN_SOCKET_TYPE = 287, // "socket-type"
526 TOKEN_SOCKET_NAME = 288, // "socket-name"
527 TOKEN_HOOKS_LIBRARIES = 289, // "hooks-libraries"
528 TOKEN_LIBRARY = 290, // "library"
529 TOKEN_PARAMETERS = 291, // "parameters"
530 TOKEN_LOGGERS = 292, // "loggers"
531 TOKEN_NAME = 293, // "name"
532 TOKEN_OUTPUT_OPTIONS = 294, // "output_options"
533 TOKEN_OUTPUT = 295, // "output"
534 TOKEN_DEBUGLEVEL = 296, // "debuglevel"
535 TOKEN_SEVERITY = 297, // "severity"
536 TOKEN_FLUSH = 298, // "flush"
537 TOKEN_MAXSIZE = 299, // "maxsize"
538 TOKEN_MAXVER = 300, // "maxver"
539 TOKEN_PATTERN = 301, // "pattern"
540 TOKEN_TOPLEVEL_JSON = 302, // TOPLEVEL_JSON
541 TOKEN_TOPLEVEL_DHCPDDNS = 303, // TOPLEVEL_DHCPDDNS
542 TOKEN_SUB_DHCPDDNS = 304, // SUB_DHCPDDNS
543 TOKEN_SUB_TSIG_KEY = 305, // SUB_TSIG_KEY
544 TOKEN_SUB_TSIG_KEYS = 306, // SUB_TSIG_KEYS
545 TOKEN_SUB_DDNS_DOMAIN = 307, // SUB_DDNS_DOMAIN
546 TOKEN_SUB_DDNS_DOMAINS = 308, // SUB_DDNS_DOMAINS
547 TOKEN_SUB_DNS_SERVER = 309, // SUB_DNS_SERVER
548 TOKEN_SUB_DNS_SERVERS = 310, // SUB_DNS_SERVERS
549 TOKEN_SUB_HOOKS_LIBRARY = 311, // SUB_HOOKS_LIBRARY
550 TOKEN_STRING = 312, // "constant string"
551 TOKEN_INTEGER = 313, // "integer"
552 TOKEN_FLOAT = 314, // "floating point"
553 TOKEN_BOOLEAN = 315 // "boolean"
554 };
557 };
558
561
564
567 {
569 {
571 S_YYEMPTY = -2,
572 S_YYEOF = 0, // "end of file"
573 S_YYerror = 1, // error
574 S_YYUNDEF = 2, // "invalid token"
575 S_COMMA = 3, // ","
576 S_COLON = 4, // ":"
577 S_LSQUARE_BRACKET = 5, // "["
578 S_RSQUARE_BRACKET = 6, // "]"
579 S_LCURLY_BRACKET = 7, // "{"
580 S_RCURLY_BRACKET = 8, // "}"
581 S_NULL_TYPE = 9, // "null"
582 S_DHCPDDNS = 10, // "DhcpDdns"
583 S_IP_ADDRESS = 11, // "ip-address"
584 S_PORT = 12, // "port"
585 S_DNS_SERVER_TIMEOUT = 13, // "dns-server-timeout"
586 S_NCR_PROTOCOL = 14, // "ncr-protocol"
587 S_UDP = 15, // "UDP"
588 S_TCP = 16, // "TCP"
589 S_NCR_FORMAT = 17, // "ncr-format"
590 S_JSON = 18, // "JSON"
591 S_USER_CONTEXT = 19, // "user-context"
592 S_COMMENT = 20, // "comment"
593 S_FORWARD_DDNS = 21, // "forward-ddns"
594 S_REVERSE_DDNS = 22, // "reverse-ddns"
595 S_DDNS_DOMAINS = 23, // "ddns-domains"
596 S_KEY_NAME = 24, // "key-name"
597 S_DNS_SERVERS = 25, // "dns-servers"
598 S_HOSTNAME = 26, // "hostname"
599 S_TSIG_KEYS = 27, // "tsig-keys"
600 S_ALGORITHM = 28, // "algorithm"
601 S_DIGEST_BITS = 29, // "digest-bits"
602 S_SECRET = 30, // "secret"
603 S_CONTROL_SOCKET = 31, // "control-socket"
604 S_SOCKET_TYPE = 32, // "socket-type"
605 S_SOCKET_NAME = 33, // "socket-name"
606 S_HOOKS_LIBRARIES = 34, // "hooks-libraries"
607 S_LIBRARY = 35, // "library"
608 S_PARAMETERS = 36, // "parameters"
609 S_LOGGERS = 37, // "loggers"
610 S_NAME = 38, // "name"
611 S_OUTPUT_OPTIONS = 39, // "output_options"
612 S_OUTPUT = 40, // "output"
613 S_DEBUGLEVEL = 41, // "debuglevel"
614 S_SEVERITY = 42, // "severity"
615 S_FLUSH = 43, // "flush"
616 S_MAXSIZE = 44, // "maxsize"
617 S_MAXVER = 45, // "maxver"
618 S_PATTERN = 46, // "pattern"
619 S_TOPLEVEL_JSON = 47, // TOPLEVEL_JSON
620 S_TOPLEVEL_DHCPDDNS = 48, // TOPLEVEL_DHCPDDNS
621 S_SUB_DHCPDDNS = 49, // SUB_DHCPDDNS
622 S_SUB_TSIG_KEY = 50, // SUB_TSIG_KEY
623 S_SUB_TSIG_KEYS = 51, // SUB_TSIG_KEYS
624 S_SUB_DDNS_DOMAIN = 52, // SUB_DDNS_DOMAIN
625 S_SUB_DDNS_DOMAINS = 53, // SUB_DDNS_DOMAINS
626 S_SUB_DNS_SERVER = 54, // SUB_DNS_SERVER
627 S_SUB_DNS_SERVERS = 55, // SUB_DNS_SERVERS
628 S_SUB_HOOKS_LIBRARY = 56, // SUB_HOOKS_LIBRARY
629 S_STRING = 57, // "constant string"
630 S_INTEGER = 58, // "integer"
631 S_FLOAT = 59, // "floating point"
632 S_BOOLEAN = 60, // "boolean"
633 S_YYACCEPT = 61, // $accept
634 S_start = 62, // start
635 S_63_1 = 63, // $@1
636 S_64_2 = 64, // $@2
637 S_65_3 = 65, // $@3
638 S_66_4 = 66, // $@4
639 S_67_5 = 67, // $@5
640 S_68_6 = 68, // $@6
641 S_69_7 = 69, // $@7
642 S_70_8 = 70, // $@8
643 S_71_9 = 71, // $@9
644 S_72_10 = 72, // $@10
645 S_value = 73, // value
646 S_sub_json = 74, // sub_json
647 S_map2 = 75, // map2
648 S_76_11 = 76, // $@11
649 S_map_value = 77, // map_value
650 S_map_content = 78, // map_content
651 S_not_empty_map = 79, // not_empty_map
652 S_list_generic = 80, // list_generic
653 S_81_12 = 81, // $@12
654 S_list_content = 82, // list_content
655 S_not_empty_list = 83, // not_empty_list
656 S_unknown_map_entry = 84, // unknown_map_entry
657 S_syntax_map = 85, // syntax_map
658 S_86_13 = 86, // $@13
659 S_global_object = 87, // global_object
660 S_88_14 = 88, // $@14
661 S_sub_dhcpddns = 89, // sub_dhcpddns
662 S_90_15 = 90, // $@15
663 S_dhcpddns_params = 91, // dhcpddns_params
664 S_dhcpddns_param = 92, // dhcpddns_param
665 S_ip_address = 93, // ip_address
666 S_94_16 = 94, // $@16
667 S_port = 95, // port
668 S_dns_server_timeout = 96, // dns_server_timeout
669 S_ncr_protocol = 97, // ncr_protocol
670 S_98_17 = 98, // $@17
671 S_ncr_protocol_value = 99, // ncr_protocol_value
672 S_ncr_format = 100, // ncr_format
673 S_101_18 = 101, // $@18
674 S_user_context = 102, // user_context
675 S_103_19 = 103, // $@19
676 S_comment = 104, // comment
677 S_105_20 = 105, // $@20
678 S_forward_ddns = 106, // forward_ddns
679 S_107_21 = 107, // $@21
680 S_reverse_ddns = 108, // reverse_ddns
681 S_109_22 = 109, // $@22
682 S_ddns_mgr_params = 110, // ddns_mgr_params
683 S_not_empty_ddns_mgr_params = 111, // not_empty_ddns_mgr_params
684 S_ddns_mgr_param = 112, // ddns_mgr_param
685 S_ddns_domains = 113, // ddns_domains
686 S_114_23 = 114, // $@23
687 S_sub_ddns_domains = 115, // sub_ddns_domains
688 S_116_24 = 116, // $@24
689 S_ddns_domain_list = 117, // ddns_domain_list
690 S_not_empty_ddns_domain_list = 118, // not_empty_ddns_domain_list
691 S_ddns_domain = 119, // ddns_domain
692 S_120_25 = 120, // $@25
693 S_sub_ddns_domain = 121, // sub_ddns_domain
694 S_122_26 = 122, // $@26
695 S_ddns_domain_params = 123, // ddns_domain_params
696 S_ddns_domain_param = 124, // ddns_domain_param
697 S_ddns_domain_name = 125, // ddns_domain_name
698 S_126_27 = 126, // $@27
699 S_ddns_key_name = 127, // ddns_key_name
700 S_128_28 = 128, // $@28
701 S_dns_servers = 129, // dns_servers
702 S_130_29 = 130, // $@29
703 S_sub_dns_servers = 131, // sub_dns_servers
704 S_132_30 = 132, // $@30
705 S_dns_server_list = 133, // dns_server_list
706 S_dns_server = 134, // dns_server
707 S_135_31 = 135, // $@31
708 S_sub_dns_server = 136, // sub_dns_server
709 S_137_32 = 137, // $@32
710 S_dns_server_params = 138, // dns_server_params
711 S_dns_server_param = 139, // dns_server_param
712 S_dns_server_hostname = 140, // dns_server_hostname
713 S_141_33 = 141, // $@33
714 S_dns_server_ip_address = 142, // dns_server_ip_address
715 S_143_34 = 143, // $@34
716 S_dns_server_port = 144, // dns_server_port
717 S_tsig_keys = 145, // tsig_keys
718 S_146_35 = 146, // $@35
719 S_sub_tsig_keys = 147, // sub_tsig_keys
720 S_148_36 = 148, // $@36
721 S_tsig_keys_list = 149, // tsig_keys_list
722 S_not_empty_tsig_keys_list = 150, // not_empty_tsig_keys_list
723 S_tsig_key = 151, // tsig_key
724 S_152_37 = 152, // $@37
725 S_sub_tsig_key = 153, // sub_tsig_key
726 S_154_38 = 154, // $@38
727 S_tsig_key_params = 155, // tsig_key_params
728 S_tsig_key_param = 156, // tsig_key_param
729 S_tsig_key_name = 157, // tsig_key_name
730 S_158_39 = 158, // $@39
731 S_tsig_key_algorithm = 159, // tsig_key_algorithm
732 S_160_40 = 160, // $@40
733 S_tsig_key_digest_bits = 161, // tsig_key_digest_bits
734 S_tsig_key_secret = 162, // tsig_key_secret
735 S_163_41 = 163, // $@41
736 S_control_socket = 164, // control_socket
737 S_165_42 = 165, // $@42
738 S_control_socket_params = 166, // control_socket_params
739 S_control_socket_param = 167, // control_socket_param
740 S_control_socket_type = 168, // control_socket_type
741 S_169_43 = 169, // $@43
742 S_control_socket_name = 170, // control_socket_name
743 S_171_44 = 171, // $@44
744 S_hooks_libraries = 172, // hooks_libraries
745 S_173_45 = 173, // $@45
746 S_hooks_libraries_list = 174, // hooks_libraries_list
747 S_not_empty_hooks_libraries_list = 175, // not_empty_hooks_libraries_list
748 S_hooks_library = 176, // hooks_library
749 S_177_46 = 177, // $@46
750 S_sub_hooks_library = 178, // sub_hooks_library
751 S_179_47 = 179, // $@47
752 S_hooks_params = 180, // hooks_params
753 S_hooks_param = 181, // hooks_param
754 S_library = 182, // library
755 S_183_48 = 183, // $@48
756 S_parameters = 184, // parameters
757 S_185_49 = 185, // $@49
758 S_loggers = 186, // loggers
759 S_187_50 = 187, // $@50
760 S_loggers_entries = 188, // loggers_entries
761 S_logger_entry = 189, // logger_entry
762 S_190_51 = 190, // $@51
763 S_logger_params = 191, // logger_params
764 S_logger_param = 192, // logger_param
765 S_name = 193, // name
766 S_194_52 = 194, // $@52
767 S_debuglevel = 195, // debuglevel
768 S_severity = 196, // severity
769 S_197_53 = 197, // $@53
770 S_output_options_list = 198, // output_options_list
771 S_199_54 = 199, // $@54
772 S_output_options_list_content = 200, // output_options_list_content
773 S_output_entry = 201, // output_entry
774 S_202_55 = 202, // $@55
775 S_output_params_list = 203, // output_params_list
776 S_output_params = 204, // output_params
777 S_output = 205, // output
778 S_206_56 = 206, // $@56
779 S_flush = 207, // flush
780 S_maxsize = 208, // maxsize
781 S_maxver = 209, // maxver
782 S_pattern = 210, // pattern
783 S_211_57 = 211 // $@57
784 };
785 };
786
789
792
799 template <typename Base>
800 struct basic_symbol : Base
801 {
803 typedef Base super_type;
804
807 : value ()
808 , location ()
809 {}
810
811#if 201103L <= YY_CPLUSPLUS
814 : Base (std::move (that))
815 , value ()
816 , location (std::move (that.location))
817 {
818 switch (this->kind ())
819 {
820 case symbol_kind::S_value: // value
821 case symbol_kind::S_map_value: // map_value
822 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
823 value.move< ElementPtr > (std::move (that.value));
824 break;
825
826 case symbol_kind::S_BOOLEAN: // "boolean"
827 value.move< bool > (std::move (that.value));
828 break;
829
830 case symbol_kind::S_FLOAT: // "floating point"
831 value.move< double > (std::move (that.value));
832 break;
833
834 case symbol_kind::S_INTEGER: // "integer"
835 value.move< int64_t > (std::move (that.value));
836 break;
837
838 case symbol_kind::S_STRING: // "constant string"
839 value.move< std::string > (std::move (that.value));
840 break;
841
842 default:
843 break;
844 }
845
846 }
847#endif
848
850 basic_symbol (const basic_symbol& that);
851
853#if 201103L <= YY_CPLUSPLUS
854 basic_symbol (typename Base::kind_type t, location_type&& l)
855 : Base (t)
856 , location (std::move (l))
857 {}
858#else
859 basic_symbol (typename Base::kind_type t, const location_type& l)
860 : Base (t)
861 , location (l)
862 {}
863#endif
864
865#if 201103L <= YY_CPLUSPLUS
866 basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
867 : Base (t)
868 , value (std::move (v))
869 , location (std::move (l))
870 {}
871#else
872 basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
873 : Base (t)
874 , value (v)
875 , location (l)
876 {}
877#endif
878
879#if 201103L <= YY_CPLUSPLUS
880 basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
881 : Base (t)
882 , value (std::move (v))
883 , location (std::move (l))
884 {}
885#else
886 basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
887 : Base (t)
888 , value (v)
889 , location (l)
890 {}
891#endif
892
893#if 201103L <= YY_CPLUSPLUS
894 basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
895 : Base (t)
896 , value (std::move (v))
897 , location (std::move (l))
898 {}
899#else
900 basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
901 : Base (t)
902 , value (v)
903 , location (l)
904 {}
905#endif
906
907#if 201103L <= YY_CPLUSPLUS
908 basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
909 : Base (t)
910 , value (std::move (v))
911 , location (std::move (l))
912 {}
913#else
914 basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
915 : Base (t)
916 , value (v)
917 , location (l)
918 {}
919#endif
920
921#if 201103L <= YY_CPLUSPLUS
922 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
923 : Base (t)
924 , value (std::move (v))
925 , location (std::move (l))
926 {}
927#else
928 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
929 : Base (t)
930 , value (v)
931 , location (l)
932 {}
933#endif
934
937 {
938 clear ();
939 }
940
941
942
945 {
946 // User destructor.
947 symbol_kind_type yykind = this->kind ();
948 basic_symbol<Base>& yysym = *this;
949 (void) yysym;
950 switch (yykind)
951 {
952 default:
953 break;
954 }
955
956 // Value type destructor.
957switch (yykind)
958 {
959 case symbol_kind::S_value: // value
960 case symbol_kind::S_map_value: // map_value
961 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
962 value.template destroy< ElementPtr > ();
963 break;
964
965 case symbol_kind::S_BOOLEAN: // "boolean"
966 value.template destroy< bool > ();
967 break;
968
969 case symbol_kind::S_FLOAT: // "floating point"
970 value.template destroy< double > ();
971 break;
972
973 case symbol_kind::S_INTEGER: // "integer"
974 value.template destroy< int64_t > ();
975 break;
976
977 case symbol_kind::S_STRING: // "constant string"
978 value.template destroy< std::string > ();
979 break;
980
981 default:
982 break;
983 }
984
985 Base::clear ();
986 }
987
989 std::string name () const YY_NOEXCEPT
990 {
991 return D2Parser::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
1005
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 {
1021
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
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
1054 };
1055
1058
1061 {
1064
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__
1080#endif
1081 }
1082#if 201103L <= YY_CPLUSPLUS
1083 symbol_type (int tok, bool 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 bool& v, const location_type& l)
1087 : super_type (token_kind_type (tok), v, l)
1088#endif
1089 {
1090#if !defined _MSC_VER || defined __clang__
1092#endif
1093 }
1094#if 201103L <= YY_CPLUSPLUS
1095 symbol_type (int tok, double v, location_type l)
1096 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1097#else
1098 symbol_type (int tok, const double& v, const location_type& l)
1099 : super_type (token_kind_type (tok), v, l)
1100#endif
1101 {
1102#if !defined _MSC_VER || defined __clang__
1104#endif
1105 }
1106#if 201103L <= YY_CPLUSPLUS
1107 symbol_type (int tok, int64_t v, location_type l)
1108 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1109#else
1110 symbol_type (int tok, const int64_t& v, const location_type& l)
1111 : super_type (token_kind_type (tok), v, l)
1112#endif
1113 {
1114#if !defined _MSC_VER || defined __clang__
1116#endif
1117 }
1118#if 201103L <= YY_CPLUSPLUS
1119 symbol_type (int tok, std::string v, location_type l)
1120 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1121#else
1122 symbol_type (int tok, const std::string& v, const location_type& l)
1123 : super_type (token_kind_type (tok), v, l)
1124#endif
1125 {
1126#if !defined _MSC_VER || defined __clang__
1128#endif
1129 }
1130 };
1131
1134 virtual ~D2Parser ();
1135
1136#if 201103L <= YY_CPLUSPLUS
1138 D2Parser (const D2Parser&) = delete;
1140 D2Parser& operator= (const D2Parser&) = delete;
1141#endif
1142
1145 int operator() ();
1146
1149 virtual int parse ();
1150
1151#if D2_PARSER_DEBUG
1153 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1155 void set_debug_stream (std::ostream &);
1156
1158 typedef int debug_level_type;
1163#endif
1164
1168 virtual void error (const location_type& loc, const std::string& msg);
1169
1171 void error (const syntax_error& err);
1172
1175 static std::string symbol_name (symbol_kind_type yysymbol);
1176
1177 // Implementation of make_symbol for each token kind.
1178#if 201103L <= YY_CPLUSPLUS
1179 static
1182 {
1183 return symbol_type (token::TOKEN_END, std::move (l));
1184 }
1185#else
1186 static
1187 symbol_type
1189 {
1190 return symbol_type (token::TOKEN_END, l);
1191 }
1192#endif
1193#if 201103L <= YY_CPLUSPLUS
1194 static
1195 symbol_type
1197 {
1198 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1199 }
1200#else
1201 static
1202 symbol_type
1204 {
1206 }
1207#endif
1208#if 201103L <= YY_CPLUSPLUS
1209 static
1210 symbol_type
1212 {
1213 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1214 }
1215#else
1216 static
1217 symbol_type
1219 {
1221 }
1222#endif
1223#if 201103L <= YY_CPLUSPLUS
1224 static
1225 symbol_type
1227 {
1228 return symbol_type (token::TOKEN_COMMA, std::move (l));
1229 }
1230#else
1231 static
1232 symbol_type
1234 {
1235 return symbol_type (token::TOKEN_COMMA, l);
1236 }
1237#endif
1238#if 201103L <= YY_CPLUSPLUS
1239 static
1240 symbol_type
1242 {
1243 return symbol_type (token::TOKEN_COLON, std::move (l));
1244 }
1245#else
1246 static
1247 symbol_type
1249 {
1250 return symbol_type (token::TOKEN_COLON, l);
1251 }
1252#endif
1253#if 201103L <= YY_CPLUSPLUS
1254 static
1255 symbol_type
1257 {
1258 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1259 }
1260#else
1261 static
1262 symbol_type
1264 {
1266 }
1267#endif
1268#if 201103L <= YY_CPLUSPLUS
1269 static
1270 symbol_type
1272 {
1273 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1274 }
1275#else
1276 static
1277 symbol_type
1279 {
1281 }
1282#endif
1283#if 201103L <= YY_CPLUSPLUS
1284 static
1285 symbol_type
1287 {
1288 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1289 }
1290#else
1291 static
1292 symbol_type
1294 {
1296 }
1297#endif
1298#if 201103L <= YY_CPLUSPLUS
1299 static
1300 symbol_type
1302 {
1303 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1304 }
1305#else
1306 static
1307 symbol_type
1309 {
1311 }
1312#endif
1313#if 201103L <= YY_CPLUSPLUS
1314 static
1315 symbol_type
1317 {
1318 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1319 }
1320#else
1321 static
1322 symbol_type
1324 {
1326 }
1327#endif
1328#if 201103L <= YY_CPLUSPLUS
1329 static
1330 symbol_type
1332 {
1333 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1334 }
1335#else
1336 static
1337 symbol_type
1339 {
1341 }
1342#endif
1343#if 201103L <= YY_CPLUSPLUS
1344 static
1345 symbol_type
1347 {
1348 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1349 }
1350#else
1351 static
1352 symbol_type
1354 {
1356 }
1357#endif
1358#if 201103L <= YY_CPLUSPLUS
1359 static
1360 symbol_type
1362 {
1363 return symbol_type (token::TOKEN_PORT, std::move (l));
1364 }
1365#else
1366 static
1367 symbol_type
1369 {
1370 return symbol_type (token::TOKEN_PORT, l);
1371 }
1372#endif
1373#if 201103L <= YY_CPLUSPLUS
1374 static
1375 symbol_type
1377 {
1378 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1379 }
1380#else
1381 static
1382 symbol_type
1384 {
1386 }
1387#endif
1388#if 201103L <= YY_CPLUSPLUS
1389 static
1390 symbol_type
1392 {
1393 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1394 }
1395#else
1396 static
1397 symbol_type
1399 {
1401 }
1402#endif
1403#if 201103L <= YY_CPLUSPLUS
1404 static
1405 symbol_type
1407 {
1408 return symbol_type (token::TOKEN_UDP, std::move (l));
1409 }
1410#else
1411 static
1412 symbol_type
1414 {
1415 return symbol_type (token::TOKEN_UDP, l);
1416 }
1417#endif
1418#if 201103L <= YY_CPLUSPLUS
1419 static
1420 symbol_type
1422 {
1423 return symbol_type (token::TOKEN_TCP, std::move (l));
1424 }
1425#else
1426 static
1427 symbol_type
1429 {
1430 return symbol_type (token::TOKEN_TCP, l);
1431 }
1432#endif
1433#if 201103L <= YY_CPLUSPLUS
1434 static
1435 symbol_type
1437 {
1438 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1439 }
1440#else
1441 static
1442 symbol_type
1444 {
1446 }
1447#endif
1448#if 201103L <= YY_CPLUSPLUS
1449 static
1450 symbol_type
1452 {
1453 return symbol_type (token::TOKEN_JSON, std::move (l));
1454 }
1455#else
1456 static
1457 symbol_type
1459 {
1460 return symbol_type (token::TOKEN_JSON, l);
1461 }
1462#endif
1463#if 201103L <= YY_CPLUSPLUS
1464 static
1465 symbol_type
1467 {
1468 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1469 }
1470#else
1471 static
1472 symbol_type
1474 {
1476 }
1477#endif
1478#if 201103L <= YY_CPLUSPLUS
1479 static
1480 symbol_type
1482 {
1483 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1484 }
1485#else
1486 static
1487 symbol_type
1489 {
1491 }
1492#endif
1493#if 201103L <= YY_CPLUSPLUS
1494 static
1495 symbol_type
1497 {
1498 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1499 }
1500#else
1501 static
1502 symbol_type
1504 {
1506 }
1507#endif
1508#if 201103L <= YY_CPLUSPLUS
1509 static
1510 symbol_type
1512 {
1513 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1514 }
1515#else
1516 static
1517 symbol_type
1519 {
1521 }
1522#endif
1523#if 201103L <= YY_CPLUSPLUS
1524 static
1525 symbol_type
1527 {
1528 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1529 }
1530#else
1531 static
1532 symbol_type
1534 {
1536 }
1537#endif
1538#if 201103L <= YY_CPLUSPLUS
1539 static
1540 symbol_type
1542 {
1543 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1544 }
1545#else
1546 static
1547 symbol_type
1549 {
1551 }
1552#endif
1553#if 201103L <= YY_CPLUSPLUS
1554 static
1555 symbol_type
1557 {
1558 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1559 }
1560#else
1561 static
1562 symbol_type
1564 {
1566 }
1567#endif
1568#if 201103L <= YY_CPLUSPLUS
1569 static
1570 symbol_type
1572 {
1573 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1574 }
1575#else
1576 static
1577 symbol_type
1579 {
1581 }
1582#endif
1583#if 201103L <= YY_CPLUSPLUS
1584 static
1585 symbol_type
1587 {
1588 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1589 }
1590#else
1591 static
1592 symbol_type
1594 {
1596 }
1597#endif
1598#if 201103L <= YY_CPLUSPLUS
1599 static
1600 symbol_type
1602 {
1603 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1604 }
1605#else
1606 static
1607 symbol_type
1609 {
1611 }
1612#endif
1613#if 201103L <= YY_CPLUSPLUS
1614 static
1615 symbol_type
1617 {
1618 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1619 }
1620#else
1621 static
1622 symbol_type
1624 {
1626 }
1627#endif
1628#if 201103L <= YY_CPLUSPLUS
1629 static
1630 symbol_type
1632 {
1633 return symbol_type (token::TOKEN_SECRET, std::move (l));
1634 }
1635#else
1636 static
1637 symbol_type
1639 {
1640 return symbol_type (token::TOKEN_SECRET, l);
1641 }
1642#endif
1643#if 201103L <= YY_CPLUSPLUS
1644 static
1645 symbol_type
1647 {
1648 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1649 }
1650#else
1651 static
1652 symbol_type
1654 {
1656 }
1657#endif
1658#if 201103L <= YY_CPLUSPLUS
1659 static
1660 symbol_type
1662 {
1663 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1664 }
1665#else
1666 static
1667 symbol_type
1669 {
1671 }
1672#endif
1673#if 201103L <= YY_CPLUSPLUS
1674 static
1675 symbol_type
1677 {
1678 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1679 }
1680#else
1681 static
1682 symbol_type
1684 {
1686 }
1687#endif
1688#if 201103L <= YY_CPLUSPLUS
1689 static
1690 symbol_type
1692 {
1693 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1694 }
1695#else
1696 static
1697 symbol_type
1699 {
1701 }
1702#endif
1703#if 201103L <= YY_CPLUSPLUS
1704 static
1705 symbol_type
1707 {
1708 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1709 }
1710#else
1711 static
1712 symbol_type
1714 {
1716 }
1717#endif
1718#if 201103L <= YY_CPLUSPLUS
1719 static
1720 symbol_type
1722 {
1723 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1724 }
1725#else
1726 static
1727 symbol_type
1729 {
1731 }
1732#endif
1733#if 201103L <= YY_CPLUSPLUS
1734 static
1735 symbol_type
1737 {
1738 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1739 }
1740#else
1741 static
1742 symbol_type
1744 {
1746 }
1747#endif
1748#if 201103L <= YY_CPLUSPLUS
1749 static
1750 symbol_type
1752 {
1753 return symbol_type (token::TOKEN_NAME, std::move (l));
1754 }
1755#else
1756 static
1757 symbol_type
1759 {
1760 return symbol_type (token::TOKEN_NAME, l);
1761 }
1762#endif
1763#if 201103L <= YY_CPLUSPLUS
1764 static
1765 symbol_type
1767 {
1768 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1769 }
1770#else
1771 static
1772 symbol_type
1774 {
1776 }
1777#endif
1778#if 201103L <= YY_CPLUSPLUS
1779 static
1780 symbol_type
1782 {
1783 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1784 }
1785#else
1786 static
1787 symbol_type
1789 {
1790 return symbol_type (token::TOKEN_OUTPUT, l);
1791 }
1792#endif
1793#if 201103L <= YY_CPLUSPLUS
1794 static
1795 symbol_type
1797 {
1798 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1799 }
1800#else
1801 static
1802 symbol_type
1804 {
1806 }
1807#endif
1808#if 201103L <= YY_CPLUSPLUS
1809 static
1810 symbol_type
1812 {
1813 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1814 }
1815#else
1816 static
1817 symbol_type
1819 {
1821 }
1822#endif
1823#if 201103L <= YY_CPLUSPLUS
1824 static
1825 symbol_type
1827 {
1828 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1829 }
1830#else
1831 static
1832 symbol_type
1834 {
1835 return symbol_type (token::TOKEN_FLUSH, l);
1836 }
1837#endif
1838#if 201103L <= YY_CPLUSPLUS
1839 static
1840 symbol_type
1842 {
1843 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1844 }
1845#else
1846 static
1847 symbol_type
1849 {
1851 }
1852#endif
1853#if 201103L <= YY_CPLUSPLUS
1854 static
1855 symbol_type
1857 {
1858 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1859 }
1860#else
1861 static
1862 symbol_type
1864 {
1865 return symbol_type (token::TOKEN_MAXVER, l);
1866 }
1867#endif
1868#if 201103L <= YY_CPLUSPLUS
1869 static
1870 symbol_type
1872 {
1873 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1874 }
1875#else
1876 static
1877 symbol_type
1879 {
1881 }
1882#endif
1883#if 201103L <= YY_CPLUSPLUS
1884 static
1885 symbol_type
1887 {
1888 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1889 }
1890#else
1891 static
1892 symbol_type
1894 {
1896 }
1897#endif
1898#if 201103L <= YY_CPLUSPLUS
1899 static
1900 symbol_type
1902 {
1903 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1904 }
1905#else
1906 static
1907 symbol_type
1909 {
1911 }
1912#endif
1913#if 201103L <= YY_CPLUSPLUS
1914 static
1915 symbol_type
1917 {
1918 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1919 }
1920#else
1921 static
1922 symbol_type
1924 {
1926 }
1927#endif
1928#if 201103L <= YY_CPLUSPLUS
1929 static
1930 symbol_type
1932 {
1933 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1934 }
1935#else
1936 static
1937 symbol_type
1939 {
1941 }
1942#endif
1943#if 201103L <= YY_CPLUSPLUS
1944 static
1945 symbol_type
1947 {
1948 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1949 }
1950#else
1951 static
1952 symbol_type
1954 {
1956 }
1957#endif
1958#if 201103L <= YY_CPLUSPLUS
1959 static
1960 symbol_type
1962 {
1963 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1964 }
1965#else
1966 static
1967 symbol_type
1969 {
1971 }
1972#endif
1973#if 201103L <= YY_CPLUSPLUS
1974 static
1975 symbol_type
1977 {
1978 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
1979 }
1980#else
1981 static
1982 symbol_type
1984 {
1986 }
1987#endif
1988#if 201103L <= YY_CPLUSPLUS
1989 static
1990 symbol_type
1992 {
1993 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
1994 }
1995#else
1996 static
1997 symbol_type
1999 {
2001 }
2002#endif
2003#if 201103L <= YY_CPLUSPLUS
2004 static
2005 symbol_type
2007 {
2008 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2009 }
2010#else
2011 static
2012 symbol_type
2014 {
2016 }
2017#endif
2018#if 201103L <= YY_CPLUSPLUS
2019 static
2020 symbol_type
2022 {
2023 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2024 }
2025#else
2026 static
2027 symbol_type
2029 {
2031 }
2032#endif
2033#if 201103L <= YY_CPLUSPLUS
2034 static
2035 symbol_type
2036 make_STRING (std::string v, location_type l)
2037 {
2038 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2039 }
2040#else
2041 static
2042 symbol_type
2043 make_STRING (const std::string& v, const location_type& l)
2044 {
2045 return symbol_type (token::TOKEN_STRING, v, l);
2046 }
2047#endif
2048#if 201103L <= YY_CPLUSPLUS
2049 static
2050 symbol_type
2051 make_INTEGER (int64_t v, location_type l)
2052 {
2053 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2054 }
2055#else
2056 static
2057 symbol_type
2058 make_INTEGER (const int64_t& v, const location_type& l)
2059 {
2060 return symbol_type (token::TOKEN_INTEGER, v, l);
2061 }
2062#endif
2063#if 201103L <= YY_CPLUSPLUS
2064 static
2065 symbol_type
2066 make_FLOAT (double v, location_type l)
2067 {
2068 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2069 }
2070#else
2071 static
2072 symbol_type
2073 make_FLOAT (const double& v, const location_type& l)
2074 {
2075 return symbol_type (token::TOKEN_FLOAT, v, l);
2076 }
2077#endif
2078#if 201103L <= YY_CPLUSPLUS
2079 static
2080 symbol_type
2081 make_BOOLEAN (bool v, location_type l)
2082 {
2083 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2084 }
2085#else
2086 static
2087 symbol_type
2088 make_BOOLEAN (const bool& v, const location_type& l)
2089 {
2090 return symbol_type (token::TOKEN_BOOLEAN, v, l);
2091 }
2092#endif
2093
2094
2096 {
2097 public:
2098 context (const D2Parser& yyparser, const symbol_type& yyla);
2099 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
2100 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
2101 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
2102
2106 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
2107
2108 private:
2109 const D2Parser& yyparser_;
2110 const symbol_type& yyla_;
2111 };
2112
2113 private:
2114#if YY_CPLUSPLUS < 201103L
2116 D2Parser (const D2Parser&);
2118 D2Parser& operator= (const D2Parser&);
2119#endif
2120
2121
2123 typedef short state_type;
2124
2126 int yy_syntax_error_arguments_ (const context& yyctx,
2127 symbol_kind_type yyarg[], int yyargn) const;
2128
2131 virtual std::string yysyntax_error_ (const context& yyctx) const;
2135 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
2136
2139 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
2140
2143 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
2144
2145 static const short yypact_ninf_;
2146 static const signed char yytable_ninf_;
2147
2151 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
2152
2154 static std::string yytnamerr_ (const char *yystr);
2155
2157 static const char* const yytname_[];
2158
2159
2160 // Tables.
2161 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2162 // STATE-NUM.
2163 static const short yypact_[];
2164
2165 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2166 // Performed when YYTABLE does not specify something else to do. Zero
2167 // means the default is an error.
2168 static const unsigned char yydefact_[];
2169
2170 // YYPGOTO[NTERM-NUM].
2171 static const short yypgoto_[];
2172
2173 // YYDEFGOTO[NTERM-NUM].
2174 static const short yydefgoto_[];
2175
2176 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2177 // positive, shift that token. If negative, reduce the rule whose
2178 // number is the opposite. If YYTABLE_NINF, syntax error.
2179 static const short yytable_[];
2180
2181 static const short yycheck_[];
2182
2183 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2184 // state STATE-NUM.
2185 static const unsigned char yystos_[];
2186
2187 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
2188 static const unsigned char yyr1_[];
2189
2190 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
2191 static const signed char yyr2_[];
2192
2193
2194#if D2_PARSER_DEBUG
2195 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
2196 static const short yyrline_[];
2198 virtual void yy_reduce_print_ (int r) const;
2200 virtual void yy_stack_print_ () const;
2201
2203 int yydebug_;
2205 std::ostream* yycdebug_;
2206
2210 template <typename Base>
2211 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
2212#endif
2213
2218 template <typename Base>
2219 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
2220
2221 private:
2223 struct by_state
2224 {
2226 by_state () YY_NOEXCEPT;
2227
2229 typedef state_type kind_type;
2230
2232 by_state (kind_type s) YY_NOEXCEPT;
2233
2235 by_state (const by_state& that) YY_NOEXCEPT;
2236
2238 void clear () YY_NOEXCEPT;
2239
2241 void move (by_state& that);
2242
2245 symbol_kind_type kind () const YY_NOEXCEPT;
2246
2249 enum { empty_state = 0 };
2250
2253 state_type state;
2254 };
2255
2257 struct stack_symbol_type : basic_symbol<by_state>
2258 {
2260 typedef basic_symbol<by_state> super_type;
2262 stack_symbol_type ();
2264 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2266 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2267#if YY_CPLUSPLUS < 201103L
2270 stack_symbol_type& operator= (stack_symbol_type& that);
2271
2274 stack_symbol_type& operator= (const stack_symbol_type& that);
2275#endif
2276 };
2277
2279 template <typename T, typename S = std::vector<T> >
2280 class stack
2281 {
2282 public:
2283 // Hide our reversed order.
2284 typedef typename S::iterator iterator;
2285 typedef typename S::const_iterator const_iterator;
2286 typedef typename S::size_type size_type;
2287 typedef typename std::ptrdiff_t index_type;
2288
2289 stack (size_type n = 200) YY_NOEXCEPT
2290 : seq_ (n)
2291 {}
2292
2293#if 201103L <= YY_CPLUSPLUS
2295 stack (const stack&) = delete;
2297 stack& operator= (const stack&) = delete;
2298#endif
2299
2303 const T&
2304 operator[] (index_type i) const
2305 {
2306 return seq_[size_type (size () - 1 - i)];
2307 }
2308
2312 T&
2313 operator[] (index_type i)
2314 {
2315 return seq_[size_type (size () - 1 - i)];
2316 }
2317
2321 void
2322 push (YY_MOVE_REF (T) t)
2323 {
2324 seq_.push_back (T ());
2325 operator[] (0).move (t);
2326 }
2327
2329 void
2330 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2331 {
2332 for (; 0 < n; --n)
2333 seq_.pop_back ();
2334 }
2335
2337 void
2338 clear () YY_NOEXCEPT
2339 {
2340 seq_.clear ();
2341 }
2342
2344 index_type
2345 size () const YY_NOEXCEPT
2346 {
2347 return index_type (seq_.size ());
2348 }
2349
2351 const_iterator
2352 begin () const YY_NOEXCEPT
2353 {
2354 return seq_.begin ();
2355 }
2356
2358 const_iterator
2359 end () const YY_NOEXCEPT
2360 {
2361 return seq_.end ();
2362 }
2363
2365 class slice
2366 {
2367 public:
2368 slice (const stack& stack, index_type range) YY_NOEXCEPT
2369 : stack_ (stack)
2370 , range_ (range)
2371 {}
2372
2373 const T&
2374 operator[] (index_type i) const
2375 {
2376 return stack_[range_ - i];
2377 }
2378
2379 private:
2380 const stack& stack_;
2381 index_type range_;
2382 };
2383
2384 private:
2385#if YY_CPLUSPLUS < 201103L
2387 stack (const stack&);
2389 stack& operator= (const stack&);
2390#endif
2392 S seq_;
2393 };
2394
2395
2397 typedef stack<stack_symbol_type> stack_type;
2398
2400 stack_type yystack_;
2401
2407 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2408
2415 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2416
2418 void yypop_ (int n = 1) YY_NOEXCEPT;
2419
2421 enum
2422 {
2423 yylast_ = 307,
2424 yynnts_ = 151,
2425 yyfinal_ = 22
2426 };
2427
2428
2429 // User arguments.
2431
2432 };
2433
2434 inline
2436 D2Parser::yytranslate_ (int t) YY_NOEXCEPT
2437 {
2438 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2439 // TOKEN-NUM as returned by yylex.
2440 static
2441 const signed char
2442 translate_table[] =
2443 {
2444 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2469 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2470 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2471 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2472 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2473 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2474 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2475 55, 56, 57, 58, 59, 60
2476 };
2477 // Last valid token kind.
2478 const int code_max = 315;
2479
2480 if (t <= 0)
2481 return symbol_kind::S_YYEOF;
2482 else if (t <= code_max)
2483 return static_cast <symbol_kind_type> (translate_table[t]);
2484 else
2486 }
2487
2488 // basic_symbol.
2489 template <typename Base>
2491 : Base (that)
2492 , value ()
2493 , location (that.location)
2494 {
2495 switch (this->kind ())
2496 {
2497 case symbol_kind::S_value: // value
2498 case symbol_kind::S_map_value: // map_value
2499 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2500 value.copy< ElementPtr > (YY_MOVE (that.value));
2501 break;
2502
2503 case symbol_kind::S_BOOLEAN: // "boolean"
2504 value.copy< bool > (YY_MOVE (that.value));
2505 break;
2506
2507 case symbol_kind::S_FLOAT: // "floating point"
2508 value.copy< double > (YY_MOVE (that.value));
2509 break;
2510
2511 case symbol_kind::S_INTEGER: // "integer"
2512 value.copy< int64_t > (YY_MOVE (that.value));
2513 break;
2514
2515 case symbol_kind::S_STRING: // "constant string"
2516 value.copy< std::string > (YY_MOVE (that.value));
2517 break;
2518
2519 default:
2520 break;
2521 }
2522
2523 }
2524
2525
2526
2527
2528 template <typename Base>
2531 {
2532 return this->kind ();
2533 }
2534
2535
2536 template <typename Base>
2537 bool
2539 {
2540 return this->kind () == symbol_kind::S_YYEMPTY;
2541 }
2542
2543 template <typename Base>
2544 void
2546 {
2547 super_type::move (s);
2548 switch (this->kind ())
2549 {
2550 case symbol_kind::S_value: // value
2551 case symbol_kind::S_map_value: // map_value
2552 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2553 value.move< ElementPtr > (YY_MOVE (s.value));
2554 break;
2555
2556 case symbol_kind::S_BOOLEAN: // "boolean"
2557 value.move< bool > (YY_MOVE (s.value));
2558 break;
2559
2560 case symbol_kind::S_FLOAT: // "floating point"
2561 value.move< double > (YY_MOVE (s.value));
2562 break;
2563
2564 case symbol_kind::S_INTEGER: // "integer"
2565 value.move< int64_t > (YY_MOVE (s.value));
2566 break;
2567
2568 case symbol_kind::S_STRING: // "constant string"
2569 value.move< std::string > (YY_MOVE (s.value));
2570 break;
2571
2572 default:
2573 break;
2574 }
2575
2576 location = YY_MOVE (s.location);
2577 }
2578
2579 // by_kind.
2580 inline
2582 : kind_ (symbol_kind::S_YYEMPTY)
2583 {}
2584
2585#if 201103L <= YY_CPLUSPLUS
2586 inline
2588 : kind_ (that.kind_)
2589 {
2590 that.clear ();
2591 }
2592#endif
2593
2594 inline
2596 : kind_ (that.kind_)
2597 {}
2598
2599 inline
2601 : kind_ (yytranslate_ (t))
2602 {}
2603
2604
2605
2606 inline
2607 void
2609 {
2610 kind_ = symbol_kind::S_YYEMPTY;
2611 }
2612
2613 inline
2614 void
2616 {
2617 kind_ = that.kind_;
2618 that.clear ();
2619 }
2620
2621 inline
2624 {
2625 return kind_;
2626 }
2627
2628
2629 inline
2632 {
2633 return this->kind ();
2634 }
2635
2636
2637#line 14 "d2_parser.yy"
2638} } // isc::d2
2639#line 2640 "d2_parser.h"
2640
2641
2642
2643
2644#endif // !YY_D2_PARSER_D2_PARSER_H_INCLUDED
Evaluation context, an interface to the expression evaluation.
const symbol_type & lookahead() const YY_NOEXCEPT
Definition: d2_parser.h:2099
symbol_kind_type token() const YY_NOEXCEPT
Definition: d2_parser.h:2100
const location_type & location() const YY_NOEXCEPT
Definition: d2_parser.h:2101
Present a slice of the top of a stack.
Definition: d2_parser.h:2366
slice(const stack &stack, index_type range) YY_NOEXCEPT
Definition: d2_parser.h:2368
A buffer to store and retrieve objects.
Definition: d2_parser.h:230
value_type self_type
Type of *this.
Definition: d2_parser.h:233
T & emplace(const T &t)
Instantiate a T in here from t.
Definition: d2_parser.h:289
T & emplace()
Instantiate an empty T in here.
Definition: d2_parser.h:278
T & build()
Instantiate an empty T in here.
Definition: d2_parser.h:302
void copy(const self_type &that)
Copy the content of that to this.
Definition: d2_parser.h:385
long double yyalign_me_
Strongest alignment constraints.
Definition: d2_parser.h:453
T & as() YY_NOEXCEPT
Accessor to a built T.
Definition: d2_parser.h:319
value_type(YY_RVREF(T) t)
Construct and fill.
Definition: d2_parser.h:243
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
Definition: d2_parser.h:330
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
Definition: d2_parser.h:258
T & build(const T &t)
Instantiate a T in here from t.
Definition: d2_parser.h:311
void destroy()
Destroy the stored T.
Definition: d2_parser.h:393
char yyraw_[size]
A buffer large enough to store any of the semantic values.
Definition: d2_parser.h:455
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
Definition: d2_parser.h:348
void move(self_type &that)
Move the content of that to this.
Definition: d2_parser.h:360
value_type() YY_NOEXCEPT
Empty construction.
Definition: d2_parser.h:236
A Bison parser.
Definition: d2_parser.h:216
static symbol_type make_COMMENT(const location_type &l)
Definition: d2_parser.h:1488
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition: d2_parser.h:2043
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: d2_parser.h:788
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition: d2_parser.h:1968
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition: d2_parser.h:2028
static symbol_type make_LOGGERS(const location_type &l)
Definition: d2_parser.h:1743
static symbol_type make_KEY_NAME(const location_type &l)
Definition: d2_parser.h:1548
virtual ~D2Parser()
Definition: d2_parser.cc:157
void set_debug_level(debug_level_type l)
Set the current debugging level.
Definition: d2_parser.cc:476
static symbol_type make_PARAMETERS(const location_type &l)
Definition: d2_parser.h:1728
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1953
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition: d2_parser.h:1503
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:2013
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1908
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition: d2_parser.h:1668
D2Parser(isc::d2::D2ParserContext &ctx_yyarg)
Build a parser object.
Definition: d2_parser.cc:147
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1983
static symbol_type make_TCP(const location_type &l)
Definition: d2_parser.h:1428
static symbol_type make_NAME(const location_type &l)
Definition: d2_parser.h:1758
location location_type
Symbol locations.
Definition: d2_parser.h:467
static symbol_type make_MAXSIZE(const location_type &l)
Definition: d2_parser.h:1848
int debug_level_type
Type for debugging levels.
Definition: d2_parser.h:1158
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
Definition: d2_parser.cc:470
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
Definition: d2_parser.h:1218
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition: d2_parser.h:1773
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1263
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition: d2_parser.h:1803
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1293
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition: d2_parser.h:1623
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition: d2_parser.h:1893
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition: d2_parser.h:1683
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition: d2_parser.h:1383
static symbol_type make_NULL_TYPE(const location_type &l)
Definition: d2_parser.h:1323
static symbol_type make_LIBRARY(const location_type &l)
Definition: d2_parser.h:1713
static symbol_type make_UDP(const location_type &l)
Definition: d2_parser.h:1413
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition: d2_parser.h:1698
static symbol_type make_COLON(const location_type &l)
Definition: d2_parser.h:1248
static symbol_type make_COMMA(const location_type &l)
Definition: d2_parser.h:1233
static symbol_type make_SECRET(const location_type &l)
Definition: d2_parser.h:1638
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition: d2_parser.h:1938
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1308
void set_debug_stream(std::ostream &)
Set the current debugging stream.
Definition: d2_parser.cc:463
static symbol_type make_OUTPUT(const location_type &l)
Definition: d2_parser.h:1788
value_type semantic_type
Backward compatibility (Bison 3.8).
Definition: d2_parser.h:464
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1923
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition: d2_parser.h:791
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition: d2_parser.h:2058
static symbol_type make_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1338
static symbol_type make_D2_PARSER_error(const location_type &l)
Definition: d2_parser.h:1203
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition: d2_parser.h:1998
static symbol_type make_MAXVER(const location_type &l)
Definition: d2_parser.h:1863
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1533
virtual int parse()
Parse.
Definition: d2_parser.cc:511
static symbol_type make_SEVERITY(const location_type &l)
Definition: d2_parser.h:1818
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1278
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
Definition: d2_parser.cc:457
static symbol_type make_HOSTNAME(const location_type &l)
Definition: d2_parser.h:1578
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition: d2_parser.h:1473
static symbol_type make_FLUSH(const location_type &l)
Definition: d2_parser.h:1833
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition: d2_parser.h:1518
static symbol_type make_PATTERN(const location_type &l)
Definition: d2_parser.h:1878
static symbol_type make_ALGORITHM(const location_type &l)
Definition: d2_parser.h:1608
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition: d2_parser.h:560
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition: d2_parser.h:1353
static symbol_type make_PORT(const location_type &l)
Definition: d2_parser.h:1368
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
Definition: d2_parser.cc:2134
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition: d2_parser.h:2073
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition: d2_parser.h:2088
static symbol_type make_JSON(const location_type &l)
Definition: d2_parser.h:1458
int operator()()
Parse.
Definition: d2_parser.cc:505
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: d2_parser.h:563
static symbol_type make_END(const location_type &l)
Definition: d2_parser.h:1188
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Definition: d2_parser.h:1653
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition: d2_parser.h:1398
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
Definition: d2_parser.cc:2703
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:1563
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1593
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition: d2_parser.h:1443
Forward declaration of the ParserContext class.
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
#define D2_PARSER__ASSERT
Definition: d2_parser.h:109
#define YY_RVREF(Type)
Definition: d2_parser.h:86
#define YY_MOVE_REF(Type)
Definition: d2_parser.h:85
#define YY_NOEXCEPT
Definition: d2_parser.h:95
#define YY_ATTRIBUTE_PURE
Definition: d2_parser.h:117
#define YY_MOVE
Definition: d2_parser.h:83
#define YY_NOTHROW
Definition: d2_parser.h:96
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
Defines the logger used by the top-level component of kea-lfc.
value_type value
The semantic value.
Definition: d2_parser.h:1004
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
Definition: d2_parser.h:989
basic_symbol() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:806
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
Definition: d2_parser.h:900
bool empty() const YY_NOEXCEPT
Whether empty.
Definition: d2_parser.h:2538
Base super_type
Alias to Base.
Definition: d2_parser.h:803
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
Definition: d2_parser.h:928
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Definition: d2_parser.h:859
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
Definition: d2_parser.h:914
location_type location
The location.
Definition: d2_parser.h:1007
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2530
~basic_symbol()
Destroy the symbol.
Definition: d2_parser.h:936
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Definition: d2_parser.h:886
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Definition: d2_parser.h:2545
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Definition: d2_parser.h:944
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
Definition: d2_parser.h:872
Type access provider for token (enum) based symbols.
Definition: d2_parser.h:1018
void clear() YY_NOEXCEPT
Record that this symbol is empty.
Definition: d2_parser.h:2608
by_kind() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:2581
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition: d2_parser.h:1020
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2631
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Definition: d2_parser.h:2623
void move(by_kind &that)
Steal the symbol kind from that.
Definition: d2_parser.h:2615
symbol_kind_type kind_
The symbol kind.
Definition: d2_parser.h:1053
@ YYNTOKENS
Number of tokens.
Definition: d2_parser.h:570
"External" symbols: returned by the scanner.
Definition: d2_parser.h:1061
basic_symbol< by_kind > super_type
Superclass.
Definition: d2_parser.h:1063
symbol_type() YY_NOEXCEPT
Empty symbol.
Definition: d2_parser.h:1066
Syntax errors thrown from user actions.
Definition: d2_parser.h:471
syntax_error(const location_type &l, const std::string &m)
Definition: d2_parser.h:472
~syntax_error() YY_NOEXCEPT YY_NOTHROW
Definition: d2_parser.cc:160
syntax_error(const syntax_error &s)
Definition: d2_parser.h:477
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition: d2_parser.h:556