Kea 2.5.5
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_global_object_comma = 89, // global_object_comma
662 S_sub_dhcpddns = 90, // sub_dhcpddns
663 S_91_15 = 91, // $@15
664 S_dhcpddns_params = 92, // dhcpddns_params
665 S_dhcpddns_param = 93, // dhcpddns_param
666 S_ip_address = 94, // ip_address
667 S_95_16 = 95, // $@16
668 S_port = 96, // port
669 S_dns_server_timeout = 97, // dns_server_timeout
670 S_ncr_protocol = 98, // ncr_protocol
671 S_99_17 = 99, // $@17
672 S_ncr_protocol_value = 100, // ncr_protocol_value
673 S_ncr_format = 101, // ncr_format
674 S_102_18 = 102, // $@18
675 S_user_context = 103, // user_context
676 S_104_19 = 104, // $@19
677 S_comment = 105, // comment
678 S_106_20 = 106, // $@20
679 S_forward_ddns = 107, // forward_ddns
680 S_108_21 = 108, // $@21
681 S_reverse_ddns = 109, // reverse_ddns
682 S_110_22 = 110, // $@22
683 S_ddns_mgr_params = 111, // ddns_mgr_params
684 S_not_empty_ddns_mgr_params = 112, // not_empty_ddns_mgr_params
685 S_ddns_mgr_param = 113, // ddns_mgr_param
686 S_ddns_domains = 114, // ddns_domains
687 S_115_23 = 115, // $@23
688 S_sub_ddns_domains = 116, // sub_ddns_domains
689 S_117_24 = 117, // $@24
690 S_ddns_domain_list = 118, // ddns_domain_list
691 S_not_empty_ddns_domain_list = 119, // not_empty_ddns_domain_list
692 S_ddns_domain = 120, // ddns_domain
693 S_121_25 = 121, // $@25
694 S_sub_ddns_domain = 122, // sub_ddns_domain
695 S_123_26 = 123, // $@26
696 S_ddns_domain_params = 124, // ddns_domain_params
697 S_ddns_domain_param = 125, // ddns_domain_param
698 S_ddns_domain_name = 126, // ddns_domain_name
699 S_127_27 = 127, // $@27
700 S_ddns_key_name = 128, // ddns_key_name
701 S_129_28 = 129, // $@28
702 S_dns_servers = 130, // dns_servers
703 S_131_29 = 131, // $@29
704 S_sub_dns_servers = 132, // sub_dns_servers
705 S_133_30 = 133, // $@30
706 S_dns_server_list = 134, // dns_server_list
707 S_dns_server = 135, // dns_server
708 S_136_31 = 136, // $@31
709 S_sub_dns_server = 137, // sub_dns_server
710 S_138_32 = 138, // $@32
711 S_dns_server_params = 139, // dns_server_params
712 S_dns_server_param = 140, // dns_server_param
713 S_dns_server_hostname = 141, // dns_server_hostname
714 S_142_33 = 142, // $@33
715 S_dns_server_ip_address = 143, // dns_server_ip_address
716 S_144_34 = 144, // $@34
717 S_dns_server_port = 145, // dns_server_port
718 S_tsig_keys = 146, // tsig_keys
719 S_147_35 = 147, // $@35
720 S_sub_tsig_keys = 148, // sub_tsig_keys
721 S_149_36 = 149, // $@36
722 S_tsig_keys_list = 150, // tsig_keys_list
723 S_not_empty_tsig_keys_list = 151, // not_empty_tsig_keys_list
724 S_tsig_key = 152, // tsig_key
725 S_153_37 = 153, // $@37
726 S_sub_tsig_key = 154, // sub_tsig_key
727 S_155_38 = 155, // $@38
728 S_tsig_key_params = 156, // tsig_key_params
729 S_tsig_key_param = 157, // tsig_key_param
730 S_tsig_key_name = 158, // tsig_key_name
731 S_159_39 = 159, // $@39
732 S_tsig_key_algorithm = 160, // tsig_key_algorithm
733 S_161_40 = 161, // $@40
734 S_tsig_key_digest_bits = 162, // tsig_key_digest_bits
735 S_tsig_key_secret = 163, // tsig_key_secret
736 S_164_41 = 164, // $@41
737 S_control_socket = 165, // control_socket
738 S_166_42 = 166, // $@42
739 S_control_socket_params = 167, // control_socket_params
740 S_control_socket_param = 168, // control_socket_param
741 S_control_socket_type = 169, // control_socket_type
742 S_170_43 = 170, // $@43
743 S_control_socket_name = 171, // control_socket_name
744 S_172_44 = 172, // $@44
745 S_hooks_libraries = 173, // hooks_libraries
746 S_174_45 = 174, // $@45
747 S_hooks_libraries_list = 175, // hooks_libraries_list
748 S_not_empty_hooks_libraries_list = 176, // not_empty_hooks_libraries_list
749 S_hooks_library = 177, // hooks_library
750 S_178_46 = 178, // $@46
751 S_sub_hooks_library = 179, // sub_hooks_library
752 S_180_47 = 180, // $@47
753 S_hooks_params = 181, // hooks_params
754 S_hooks_param = 182, // hooks_param
755 S_library = 183, // library
756 S_184_48 = 184, // $@48
757 S_parameters = 185, // parameters
758 S_186_49 = 186, // $@49
759 S_loggers = 187, // loggers
760 S_188_50 = 188, // $@50
761 S_loggers_entries = 189, // loggers_entries
762 S_logger_entry = 190, // logger_entry
763 S_191_51 = 191, // $@51
764 S_logger_params = 192, // logger_params
765 S_logger_param = 193, // logger_param
766 S_name = 194, // name
767 S_195_52 = 195, // $@52
768 S_debuglevel = 196, // debuglevel
769 S_severity = 197, // severity
770 S_198_53 = 198, // $@53
771 S_output_options_list = 199, // output_options_list
772 S_200_54 = 200, // $@54
773 S_output_options_list_content = 201, // output_options_list_content
774 S_output_entry = 202, // output_entry
775 S_203_55 = 203, // $@55
776 S_output_params_list = 204, // output_params_list
777 S_output_params = 205, // output_params
778 S_output = 206, // output
779 S_207_56 = 207, // $@56
780 S_flush = 208, // flush
781 S_maxsize = 209, // maxsize
782 S_maxver = 210, // maxver
783 S_pattern = 211, // pattern
784 S_212_57 = 212 // $@57
785 };
786 };
787
790
793
800 template <typename Base>
801 struct basic_symbol : Base
802 {
804 typedef Base super_type;
805
808 : value ()
809 , location ()
810 {}
811
812#if 201103L <= YY_CPLUSPLUS
815 : Base (std::move (that))
816 , value ()
817 , location (std::move (that.location))
818 {
819 switch (this->kind ())
820 {
821 case symbol_kind::S_value: // value
822 case symbol_kind::S_map_value: // map_value
823 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
824 value.move< ElementPtr > (std::move (that.value));
825 break;
826
827 case symbol_kind::S_BOOLEAN: // "boolean"
828 value.move< bool > (std::move (that.value));
829 break;
830
831 case symbol_kind::S_FLOAT: // "floating point"
832 value.move< double > (std::move (that.value));
833 break;
834
835 case symbol_kind::S_INTEGER: // "integer"
836 value.move< int64_t > (std::move (that.value));
837 break;
838
839 case symbol_kind::S_STRING: // "constant string"
840 value.move< std::string > (std::move (that.value));
841 break;
842
843 default:
844 break;
845 }
846
847 }
848#endif
849
851 basic_symbol (const basic_symbol& that);
852
854#if 201103L <= YY_CPLUSPLUS
855 basic_symbol (typename Base::kind_type t, location_type&& l)
856 : Base (t)
857 , location (std::move (l))
858 {}
859#else
860 basic_symbol (typename Base::kind_type t, const location_type& l)
861 : Base (t)
862 , location (l)
863 {}
864#endif
865
866#if 201103L <= YY_CPLUSPLUS
867 basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
868 : Base (t)
869 , value (std::move (v))
870 , location (std::move (l))
871 {}
872#else
873 basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
874 : Base (t)
875 , value (v)
876 , location (l)
877 {}
878#endif
879
880#if 201103L <= YY_CPLUSPLUS
881 basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
882 : Base (t)
883 , value (std::move (v))
884 , location (std::move (l))
885 {}
886#else
887 basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
888 : Base (t)
889 , value (v)
890 , location (l)
891 {}
892#endif
893
894#if 201103L <= YY_CPLUSPLUS
895 basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
896 : Base (t)
897 , value (std::move (v))
898 , location (std::move (l))
899 {}
900#else
901 basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
902 : Base (t)
903 , value (v)
904 , location (l)
905 {}
906#endif
907
908#if 201103L <= YY_CPLUSPLUS
909 basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
910 : Base (t)
911 , value (std::move (v))
912 , location (std::move (l))
913 {}
914#else
915 basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
916 : Base (t)
917 , value (v)
918 , location (l)
919 {}
920#endif
921
922#if 201103L <= YY_CPLUSPLUS
923 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
924 : Base (t)
925 , value (std::move (v))
926 , location (std::move (l))
927 {}
928#else
929 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
930 : Base (t)
931 , value (v)
932 , location (l)
933 {}
934#endif
935
938 {
939 clear ();
940 }
941
942
943
946 {
947 // User destructor.
948 symbol_kind_type yykind = this->kind ();
949 basic_symbol<Base>& yysym = *this;
950 (void) yysym;
951 switch (yykind)
952 {
953 default:
954 break;
955 }
956
957 // Value type destructor.
958switch (yykind)
959 {
960 case symbol_kind::S_value: // value
961 case symbol_kind::S_map_value: // map_value
962 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
963 value.template destroy< ElementPtr > ();
964 break;
965
966 case symbol_kind::S_BOOLEAN: // "boolean"
967 value.template destroy< bool > ();
968 break;
969
970 case symbol_kind::S_FLOAT: // "floating point"
971 value.template destroy< double > ();
972 break;
973
974 case symbol_kind::S_INTEGER: // "integer"
975 value.template destroy< int64_t > ();
976 break;
977
978 case symbol_kind::S_STRING: // "constant string"
979 value.template destroy< std::string > ();
980 break;
981
982 default:
983 break;
984 }
985
986 Base::clear ();
987 }
988
990 std::string name () const YY_NOEXCEPT
991 {
992 return D2Parser::symbol_name (this->kind ());
993 }
994
996 symbol_kind_type type_get () const YY_NOEXCEPT;
997
999 bool empty () const YY_NOEXCEPT;
1000
1002 void move (basic_symbol& s);
1003
1006
1009
1010 private:
1011#if YY_CPLUSPLUS < 201103L
1013 basic_symbol& operator= (const basic_symbol& that);
1014#endif
1015 };
1016
1018 struct by_kind
1019 {
1022
1025
1026#if 201103L <= YY_CPLUSPLUS
1028 by_kind (by_kind&& that) YY_NOEXCEPT;
1029#endif
1030
1032 by_kind (const by_kind& that) YY_NOEXCEPT;
1033
1036
1037
1038
1040 void clear () YY_NOEXCEPT;
1041
1043 void move (by_kind& that);
1044
1047 symbol_kind_type kind () const YY_NOEXCEPT;
1048
1050 symbol_kind_type type_get () const YY_NOEXCEPT;
1051
1055 };
1056
1059
1062 {
1065
1068
1070#if 201103L <= YY_CPLUSPLUS
1071 symbol_type (int tok, location_type l)
1072 : super_type (token_kind_type (tok), std::move (l))
1073#else
1074 symbol_type (int tok, const location_type& l)
1075 : super_type (token_kind_type (tok), l)
1076#endif
1077 {
1078#if !defined _MSC_VER || defined __clang__
1081#endif
1082 }
1083#if 201103L <= YY_CPLUSPLUS
1084 symbol_type (int tok, bool v, location_type l)
1085 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1086#else
1087 symbol_type (int tok, const bool& v, const location_type& l)
1088 : super_type (token_kind_type (tok), v, l)
1089#endif
1090 {
1091#if !defined _MSC_VER || defined __clang__
1093#endif
1094 }
1095#if 201103L <= YY_CPLUSPLUS
1096 symbol_type (int tok, double v, location_type l)
1097 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1098#else
1099 symbol_type (int tok, const double& v, const location_type& l)
1100 : super_type (token_kind_type (tok), v, l)
1101#endif
1102 {
1103#if !defined _MSC_VER || defined __clang__
1105#endif
1106 }
1107#if 201103L <= YY_CPLUSPLUS
1108 symbol_type (int tok, int64_t v, location_type l)
1109 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1110#else
1111 symbol_type (int tok, const int64_t& v, const location_type& l)
1112 : super_type (token_kind_type (tok), v, l)
1113#endif
1114 {
1115#if !defined _MSC_VER || defined __clang__
1117#endif
1118 }
1119#if 201103L <= YY_CPLUSPLUS
1120 symbol_type (int tok, std::string v, location_type l)
1121 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1122#else
1123 symbol_type (int tok, const std::string& v, const location_type& l)
1124 : super_type (token_kind_type (tok), v, l)
1125#endif
1126 {
1127#if !defined _MSC_VER || defined __clang__
1129#endif
1130 }
1131 };
1132
1135 virtual ~D2Parser ();
1136
1137#if 201103L <= YY_CPLUSPLUS
1139 D2Parser (const D2Parser&) = delete;
1141 D2Parser& operator= (const D2Parser&) = delete;
1142#endif
1143
1146 int operator() ();
1147
1150 virtual int parse ();
1151
1152#if D2_PARSER_DEBUG
1154 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1156 void set_debug_stream (std::ostream &);
1157
1159 typedef int debug_level_type;
1164#endif
1165
1169 virtual void error (const location_type& loc, const std::string& msg);
1170
1172 void error (const syntax_error& err);
1173
1176 static std::string symbol_name (symbol_kind_type yysymbol);
1177
1178 // Implementation of make_symbol for each token kind.
1179#if 201103L <= YY_CPLUSPLUS
1180 static
1183 {
1184 return symbol_type (token::TOKEN_END, std::move (l));
1185 }
1186#else
1187 static
1188 symbol_type
1190 {
1191 return symbol_type (token::TOKEN_END, l);
1192 }
1193#endif
1194#if 201103L <= YY_CPLUSPLUS
1195 static
1196 symbol_type
1198 {
1199 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1200 }
1201#else
1202 static
1203 symbol_type
1205 {
1207 }
1208#endif
1209#if 201103L <= YY_CPLUSPLUS
1210 static
1211 symbol_type
1213 {
1214 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1215 }
1216#else
1217 static
1218 symbol_type
1220 {
1222 }
1223#endif
1224#if 201103L <= YY_CPLUSPLUS
1225 static
1226 symbol_type
1228 {
1229 return symbol_type (token::TOKEN_COMMA, std::move (l));
1230 }
1231#else
1232 static
1233 symbol_type
1235 {
1236 return symbol_type (token::TOKEN_COMMA, l);
1237 }
1238#endif
1239#if 201103L <= YY_CPLUSPLUS
1240 static
1241 symbol_type
1243 {
1244 return symbol_type (token::TOKEN_COLON, std::move (l));
1245 }
1246#else
1247 static
1248 symbol_type
1250 {
1251 return symbol_type (token::TOKEN_COLON, l);
1252 }
1253#endif
1254#if 201103L <= YY_CPLUSPLUS
1255 static
1256 symbol_type
1258 {
1259 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1260 }
1261#else
1262 static
1263 symbol_type
1265 {
1267 }
1268#endif
1269#if 201103L <= YY_CPLUSPLUS
1270 static
1271 symbol_type
1273 {
1274 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1275 }
1276#else
1277 static
1278 symbol_type
1280 {
1282 }
1283#endif
1284#if 201103L <= YY_CPLUSPLUS
1285 static
1286 symbol_type
1288 {
1289 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1290 }
1291#else
1292 static
1293 symbol_type
1295 {
1297 }
1298#endif
1299#if 201103L <= YY_CPLUSPLUS
1300 static
1301 symbol_type
1303 {
1304 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1305 }
1306#else
1307 static
1308 symbol_type
1310 {
1312 }
1313#endif
1314#if 201103L <= YY_CPLUSPLUS
1315 static
1316 symbol_type
1318 {
1319 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1320 }
1321#else
1322 static
1323 symbol_type
1325 {
1327 }
1328#endif
1329#if 201103L <= YY_CPLUSPLUS
1330 static
1331 symbol_type
1333 {
1334 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1335 }
1336#else
1337 static
1338 symbol_type
1340 {
1342 }
1343#endif
1344#if 201103L <= YY_CPLUSPLUS
1345 static
1346 symbol_type
1348 {
1349 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1350 }
1351#else
1352 static
1353 symbol_type
1355 {
1357 }
1358#endif
1359#if 201103L <= YY_CPLUSPLUS
1360 static
1361 symbol_type
1363 {
1364 return symbol_type (token::TOKEN_PORT, std::move (l));
1365 }
1366#else
1367 static
1368 symbol_type
1370 {
1371 return symbol_type (token::TOKEN_PORT, l);
1372 }
1373#endif
1374#if 201103L <= YY_CPLUSPLUS
1375 static
1376 symbol_type
1378 {
1379 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1380 }
1381#else
1382 static
1383 symbol_type
1385 {
1387 }
1388#endif
1389#if 201103L <= YY_CPLUSPLUS
1390 static
1391 symbol_type
1393 {
1394 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1395 }
1396#else
1397 static
1398 symbol_type
1400 {
1402 }
1403#endif
1404#if 201103L <= YY_CPLUSPLUS
1405 static
1406 symbol_type
1408 {
1409 return symbol_type (token::TOKEN_UDP, std::move (l));
1410 }
1411#else
1412 static
1413 symbol_type
1415 {
1416 return symbol_type (token::TOKEN_UDP, l);
1417 }
1418#endif
1419#if 201103L <= YY_CPLUSPLUS
1420 static
1421 symbol_type
1423 {
1424 return symbol_type (token::TOKEN_TCP, std::move (l));
1425 }
1426#else
1427 static
1428 symbol_type
1430 {
1431 return symbol_type (token::TOKEN_TCP, l);
1432 }
1433#endif
1434#if 201103L <= YY_CPLUSPLUS
1435 static
1436 symbol_type
1438 {
1439 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1440 }
1441#else
1442 static
1443 symbol_type
1445 {
1447 }
1448#endif
1449#if 201103L <= YY_CPLUSPLUS
1450 static
1451 symbol_type
1453 {
1454 return symbol_type (token::TOKEN_JSON, std::move (l));
1455 }
1456#else
1457 static
1458 symbol_type
1460 {
1461 return symbol_type (token::TOKEN_JSON, l);
1462 }
1463#endif
1464#if 201103L <= YY_CPLUSPLUS
1465 static
1466 symbol_type
1468 {
1469 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1470 }
1471#else
1472 static
1473 symbol_type
1475 {
1477 }
1478#endif
1479#if 201103L <= YY_CPLUSPLUS
1480 static
1481 symbol_type
1483 {
1484 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1485 }
1486#else
1487 static
1488 symbol_type
1490 {
1492 }
1493#endif
1494#if 201103L <= YY_CPLUSPLUS
1495 static
1496 symbol_type
1498 {
1499 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1500 }
1501#else
1502 static
1503 symbol_type
1505 {
1507 }
1508#endif
1509#if 201103L <= YY_CPLUSPLUS
1510 static
1511 symbol_type
1513 {
1514 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1515 }
1516#else
1517 static
1518 symbol_type
1520 {
1522 }
1523#endif
1524#if 201103L <= YY_CPLUSPLUS
1525 static
1526 symbol_type
1528 {
1529 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1530 }
1531#else
1532 static
1533 symbol_type
1535 {
1537 }
1538#endif
1539#if 201103L <= YY_CPLUSPLUS
1540 static
1541 symbol_type
1543 {
1544 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1545 }
1546#else
1547 static
1548 symbol_type
1550 {
1552 }
1553#endif
1554#if 201103L <= YY_CPLUSPLUS
1555 static
1556 symbol_type
1558 {
1559 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1560 }
1561#else
1562 static
1563 symbol_type
1565 {
1567 }
1568#endif
1569#if 201103L <= YY_CPLUSPLUS
1570 static
1571 symbol_type
1573 {
1574 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1575 }
1576#else
1577 static
1578 symbol_type
1580 {
1582 }
1583#endif
1584#if 201103L <= YY_CPLUSPLUS
1585 static
1586 symbol_type
1588 {
1589 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1590 }
1591#else
1592 static
1593 symbol_type
1595 {
1597 }
1598#endif
1599#if 201103L <= YY_CPLUSPLUS
1600 static
1601 symbol_type
1603 {
1604 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1605 }
1606#else
1607 static
1608 symbol_type
1610 {
1612 }
1613#endif
1614#if 201103L <= YY_CPLUSPLUS
1615 static
1616 symbol_type
1618 {
1619 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1620 }
1621#else
1622 static
1623 symbol_type
1625 {
1627 }
1628#endif
1629#if 201103L <= YY_CPLUSPLUS
1630 static
1631 symbol_type
1633 {
1634 return symbol_type (token::TOKEN_SECRET, std::move (l));
1635 }
1636#else
1637 static
1638 symbol_type
1640 {
1641 return symbol_type (token::TOKEN_SECRET, l);
1642 }
1643#endif
1644#if 201103L <= YY_CPLUSPLUS
1645 static
1646 symbol_type
1648 {
1649 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1650 }
1651#else
1652 static
1653 symbol_type
1655 {
1657 }
1658#endif
1659#if 201103L <= YY_CPLUSPLUS
1660 static
1661 symbol_type
1663 {
1664 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1665 }
1666#else
1667 static
1668 symbol_type
1670 {
1672 }
1673#endif
1674#if 201103L <= YY_CPLUSPLUS
1675 static
1676 symbol_type
1678 {
1679 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1680 }
1681#else
1682 static
1683 symbol_type
1685 {
1687 }
1688#endif
1689#if 201103L <= YY_CPLUSPLUS
1690 static
1691 symbol_type
1693 {
1694 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1695 }
1696#else
1697 static
1698 symbol_type
1700 {
1702 }
1703#endif
1704#if 201103L <= YY_CPLUSPLUS
1705 static
1706 symbol_type
1708 {
1709 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1710 }
1711#else
1712 static
1713 symbol_type
1715 {
1717 }
1718#endif
1719#if 201103L <= YY_CPLUSPLUS
1720 static
1721 symbol_type
1723 {
1724 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1725 }
1726#else
1727 static
1728 symbol_type
1730 {
1732 }
1733#endif
1734#if 201103L <= YY_CPLUSPLUS
1735 static
1736 symbol_type
1738 {
1739 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1740 }
1741#else
1742 static
1743 symbol_type
1745 {
1747 }
1748#endif
1749#if 201103L <= YY_CPLUSPLUS
1750 static
1751 symbol_type
1753 {
1754 return symbol_type (token::TOKEN_NAME, std::move (l));
1755 }
1756#else
1757 static
1758 symbol_type
1760 {
1761 return symbol_type (token::TOKEN_NAME, l);
1762 }
1763#endif
1764#if 201103L <= YY_CPLUSPLUS
1765 static
1766 symbol_type
1768 {
1769 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1770 }
1771#else
1772 static
1773 symbol_type
1775 {
1777 }
1778#endif
1779#if 201103L <= YY_CPLUSPLUS
1780 static
1781 symbol_type
1783 {
1784 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1785 }
1786#else
1787 static
1788 symbol_type
1790 {
1791 return symbol_type (token::TOKEN_OUTPUT, l);
1792 }
1793#endif
1794#if 201103L <= YY_CPLUSPLUS
1795 static
1796 symbol_type
1798 {
1799 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1800 }
1801#else
1802 static
1803 symbol_type
1805 {
1807 }
1808#endif
1809#if 201103L <= YY_CPLUSPLUS
1810 static
1811 symbol_type
1813 {
1814 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1815 }
1816#else
1817 static
1818 symbol_type
1820 {
1822 }
1823#endif
1824#if 201103L <= YY_CPLUSPLUS
1825 static
1826 symbol_type
1828 {
1829 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1830 }
1831#else
1832 static
1833 symbol_type
1835 {
1836 return symbol_type (token::TOKEN_FLUSH, l);
1837 }
1838#endif
1839#if 201103L <= YY_CPLUSPLUS
1840 static
1841 symbol_type
1843 {
1844 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1845 }
1846#else
1847 static
1848 symbol_type
1850 {
1852 }
1853#endif
1854#if 201103L <= YY_CPLUSPLUS
1855 static
1856 symbol_type
1858 {
1859 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1860 }
1861#else
1862 static
1863 symbol_type
1865 {
1866 return symbol_type (token::TOKEN_MAXVER, l);
1867 }
1868#endif
1869#if 201103L <= YY_CPLUSPLUS
1870 static
1871 symbol_type
1873 {
1874 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1875 }
1876#else
1877 static
1878 symbol_type
1880 {
1882 }
1883#endif
1884#if 201103L <= YY_CPLUSPLUS
1885 static
1886 symbol_type
1888 {
1889 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1890 }
1891#else
1892 static
1893 symbol_type
1895 {
1897 }
1898#endif
1899#if 201103L <= YY_CPLUSPLUS
1900 static
1901 symbol_type
1903 {
1904 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1905 }
1906#else
1907 static
1908 symbol_type
1910 {
1912 }
1913#endif
1914#if 201103L <= YY_CPLUSPLUS
1915 static
1916 symbol_type
1918 {
1919 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1920 }
1921#else
1922 static
1923 symbol_type
1925 {
1927 }
1928#endif
1929#if 201103L <= YY_CPLUSPLUS
1930 static
1931 symbol_type
1933 {
1934 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1935 }
1936#else
1937 static
1938 symbol_type
1940 {
1942 }
1943#endif
1944#if 201103L <= YY_CPLUSPLUS
1945 static
1946 symbol_type
1948 {
1949 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1950 }
1951#else
1952 static
1953 symbol_type
1955 {
1957 }
1958#endif
1959#if 201103L <= YY_CPLUSPLUS
1960 static
1961 symbol_type
1963 {
1964 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1965 }
1966#else
1967 static
1968 symbol_type
1970 {
1972 }
1973#endif
1974#if 201103L <= YY_CPLUSPLUS
1975 static
1976 symbol_type
1978 {
1979 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
1980 }
1981#else
1982 static
1983 symbol_type
1985 {
1987 }
1988#endif
1989#if 201103L <= YY_CPLUSPLUS
1990 static
1991 symbol_type
1993 {
1994 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
1995 }
1996#else
1997 static
1998 symbol_type
2000 {
2002 }
2003#endif
2004#if 201103L <= YY_CPLUSPLUS
2005 static
2006 symbol_type
2008 {
2009 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2010 }
2011#else
2012 static
2013 symbol_type
2015 {
2017 }
2018#endif
2019#if 201103L <= YY_CPLUSPLUS
2020 static
2021 symbol_type
2023 {
2024 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2025 }
2026#else
2027 static
2028 symbol_type
2030 {
2032 }
2033#endif
2034#if 201103L <= YY_CPLUSPLUS
2035 static
2036 symbol_type
2037 make_STRING (std::string v, location_type l)
2038 {
2039 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2040 }
2041#else
2042 static
2043 symbol_type
2044 make_STRING (const std::string& v, const location_type& l)
2045 {
2046 return symbol_type (token::TOKEN_STRING, v, l);
2047 }
2048#endif
2049#if 201103L <= YY_CPLUSPLUS
2050 static
2051 symbol_type
2052 make_INTEGER (int64_t v, location_type l)
2053 {
2054 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2055 }
2056#else
2057 static
2058 symbol_type
2059 make_INTEGER (const int64_t& v, const location_type& l)
2060 {
2061 return symbol_type (token::TOKEN_INTEGER, v, l);
2062 }
2063#endif
2064#if 201103L <= YY_CPLUSPLUS
2065 static
2066 symbol_type
2067 make_FLOAT (double v, location_type l)
2068 {
2069 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2070 }
2071#else
2072 static
2073 symbol_type
2074 make_FLOAT (const double& v, const location_type& l)
2075 {
2076 return symbol_type (token::TOKEN_FLOAT, v, l);
2077 }
2078#endif
2079#if 201103L <= YY_CPLUSPLUS
2080 static
2081 symbol_type
2082 make_BOOLEAN (bool v, location_type l)
2083 {
2084 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2085 }
2086#else
2087 static
2088 symbol_type
2089 make_BOOLEAN (const bool& v, const location_type& l)
2090 {
2091 return symbol_type (token::TOKEN_BOOLEAN, v, l);
2092 }
2093#endif
2094
2095
2097 {
2098 public:
2099 context (const D2Parser& yyparser, const symbol_type& yyla);
2100 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
2101 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
2102 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
2103
2107 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
2108
2109 private:
2110 const D2Parser& yyparser_;
2111 const symbol_type& yyla_;
2112 };
2113
2114 private:
2115#if YY_CPLUSPLUS < 201103L
2117 D2Parser (const D2Parser&);
2119 D2Parser& operator= (const D2Parser&);
2120#endif
2121
2122
2124 typedef short state_type;
2125
2127 int yy_syntax_error_arguments_ (const context& yyctx,
2128 symbol_kind_type yyarg[], int yyargn) const;
2129
2132 virtual std::string yysyntax_error_ (const context& yyctx) const;
2136 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
2137
2140 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
2141
2144 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
2145
2146 static const short yypact_ninf_;
2147 static const signed char yytable_ninf_;
2148
2152 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
2153
2155 static std::string yytnamerr_ (const char *yystr);
2156
2158 static const char* const yytname_[];
2159
2160
2161 // Tables.
2162 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2163 // STATE-NUM.
2164 static const short yypact_[];
2165
2166 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2167 // Performed when YYTABLE does not specify something else to do. Zero
2168 // means the default is an error.
2169 static const short yydefact_[];
2170
2171 // YYPGOTO[NTERM-NUM].
2172 static const short yypgoto_[];
2173
2174 // YYDEFGOTO[NTERM-NUM].
2175 static const short yydefgoto_[];
2176
2177 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2178 // positive, shift that token. If negative, reduce the rule whose
2179 // number is the opposite. If YYTABLE_NINF, syntax error.
2180 static const short yytable_[];
2181
2182 static const short yycheck_[];
2183
2184 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2185 // state STATE-NUM.
2186 static const unsigned char yystos_[];
2187
2188 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
2189 static const unsigned char yyr1_[];
2190
2191 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
2192 static const signed char yyr2_[];
2193
2194
2195#if D2_PARSER_DEBUG
2196 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
2197 static const short yyrline_[];
2199 virtual void yy_reduce_print_ (int r) const;
2201 virtual void yy_stack_print_ () const;
2202
2204 int yydebug_;
2206 std::ostream* yycdebug_;
2207
2211 template <typename Base>
2212 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
2213#endif
2214
2219 template <typename Base>
2220 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
2221
2222 private:
2224 struct by_state
2225 {
2227 by_state () YY_NOEXCEPT;
2228
2230 typedef state_type kind_type;
2231
2233 by_state (kind_type s) YY_NOEXCEPT;
2234
2236 by_state (const by_state& that) YY_NOEXCEPT;
2237
2239 void clear () YY_NOEXCEPT;
2240
2242 void move (by_state& that);
2243
2246 symbol_kind_type kind () const YY_NOEXCEPT;
2247
2250 enum { empty_state = 0 };
2251
2254 state_type state;
2255 };
2256
2258 struct stack_symbol_type : basic_symbol<by_state>
2259 {
2261 typedef basic_symbol<by_state> super_type;
2263 stack_symbol_type ();
2265 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2267 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2268#if YY_CPLUSPLUS < 201103L
2271 stack_symbol_type& operator= (stack_symbol_type& that);
2272
2275 stack_symbol_type& operator= (const stack_symbol_type& that);
2276#endif
2277 };
2278
2280 template <typename T, typename S = std::vector<T> >
2281 class stack
2282 {
2283 public:
2284 // Hide our reversed order.
2285 typedef typename S::iterator iterator;
2286 typedef typename S::const_iterator const_iterator;
2287 typedef typename S::size_type size_type;
2288 typedef typename std::ptrdiff_t index_type;
2289
2290 stack (size_type n = 200) YY_NOEXCEPT
2291 : seq_ (n)
2292 {}
2293
2294#if 201103L <= YY_CPLUSPLUS
2296 stack (const stack&) = delete;
2298 stack& operator= (const stack&) = delete;
2299#endif
2300
2304 const T&
2305 operator[] (index_type i) const
2306 {
2307 return seq_[size_type (size () - 1 - i)];
2308 }
2309
2313 T&
2314 operator[] (index_type i)
2315 {
2316 return seq_[size_type (size () - 1 - i)];
2317 }
2318
2322 void
2323 push (YY_MOVE_REF (T) t)
2324 {
2325 seq_.push_back (T ());
2326 operator[] (0).move (t);
2327 }
2328
2330 void
2331 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2332 {
2333 for (; 0 < n; --n)
2334 seq_.pop_back ();
2335 }
2336
2338 void
2339 clear () YY_NOEXCEPT
2340 {
2341 seq_.clear ();
2342 }
2343
2345 index_type
2346 size () const YY_NOEXCEPT
2347 {
2348 return index_type (seq_.size ());
2349 }
2350
2352 const_iterator
2353 begin () const YY_NOEXCEPT
2354 {
2355 return seq_.begin ();
2356 }
2357
2359 const_iterator
2360 end () const YY_NOEXCEPT
2361 {
2362 return seq_.end ();
2363 }
2364
2366 class slice
2367 {
2368 public:
2369 slice (const stack& stack, index_type range) YY_NOEXCEPT
2370 : stack_ (stack)
2371 , range_ (range)
2372 {}
2373
2374 const T&
2375 operator[] (index_type i) const
2376 {
2377 return stack_[range_ - i];
2378 }
2379
2380 private:
2381 const stack& stack_;
2382 index_type range_;
2383 };
2384
2385 private:
2386#if YY_CPLUSPLUS < 201103L
2388 stack (const stack&);
2390 stack& operator= (const stack&);
2391#endif
2393 S seq_;
2394 };
2395
2396
2398 typedef stack<stack_symbol_type> stack_type;
2399
2401 stack_type yystack_;
2402
2408 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2409
2416 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2417
2419 void yypop_ (int n = 1) YY_NOEXCEPT;
2420
2422 enum
2423 {
2424 yylast_ = 307,
2425 yynnts_ = 152,
2426 yyfinal_ = 22
2427 };
2428
2429
2430 // User arguments.
2432
2433 };
2434
2435 inline
2437 D2Parser::yytranslate_ (int t) YY_NOEXCEPT
2438 {
2439 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2440 // TOKEN-NUM as returned by yylex.
2441 static
2442 const signed char
2443 translate_table[] =
2444 {
2445 0, 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, 2, 2, 2, 2,
2470 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2471 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2472 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2473 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2474 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2475 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2476 55, 56, 57, 58, 59, 60
2477 };
2478 // Last valid token kind.
2479 const int code_max = 315;
2480
2481 if (t <= 0)
2482 return symbol_kind::S_YYEOF;
2483 else if (t <= code_max)
2484 return static_cast <symbol_kind_type> (translate_table[t]);
2485 else
2487 }
2488
2489 // basic_symbol.
2490 template <typename Base>
2492 : Base (that)
2493 , value ()
2494 , location (that.location)
2495 {
2496 switch (this->kind ())
2497 {
2498 case symbol_kind::S_value: // value
2499 case symbol_kind::S_map_value: // map_value
2500 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2501 value.copy< ElementPtr > (YY_MOVE (that.value));
2502 break;
2503
2504 case symbol_kind::S_BOOLEAN: // "boolean"
2505 value.copy< bool > (YY_MOVE (that.value));
2506 break;
2507
2508 case symbol_kind::S_FLOAT: // "floating point"
2509 value.copy< double > (YY_MOVE (that.value));
2510 break;
2511
2512 case symbol_kind::S_INTEGER: // "integer"
2513 value.copy< int64_t > (YY_MOVE (that.value));
2514 break;
2515
2516 case symbol_kind::S_STRING: // "constant string"
2517 value.copy< std::string > (YY_MOVE (that.value));
2518 break;
2519
2520 default:
2521 break;
2522 }
2523
2524 }
2525
2526
2527
2528
2529 template <typename Base>
2532 {
2533 return this->kind ();
2534 }
2535
2536
2537 template <typename Base>
2538 bool
2540 {
2541 return this->kind () == symbol_kind::S_YYEMPTY;
2542 }
2543
2544 template <typename Base>
2545 void
2547 {
2548 super_type::move (s);
2549 switch (this->kind ())
2550 {
2551 case symbol_kind::S_value: // value
2552 case symbol_kind::S_map_value: // map_value
2553 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2554 value.move< ElementPtr > (YY_MOVE (s.value));
2555 break;
2556
2557 case symbol_kind::S_BOOLEAN: // "boolean"
2558 value.move< bool > (YY_MOVE (s.value));
2559 break;
2560
2561 case symbol_kind::S_FLOAT: // "floating point"
2562 value.move< double > (YY_MOVE (s.value));
2563 break;
2564
2565 case symbol_kind::S_INTEGER: // "integer"
2566 value.move< int64_t > (YY_MOVE (s.value));
2567 break;
2568
2569 case symbol_kind::S_STRING: // "constant string"
2570 value.move< std::string > (YY_MOVE (s.value));
2571 break;
2572
2573 default:
2574 break;
2575 }
2576
2577 location = YY_MOVE (s.location);
2578 }
2579
2580 // by_kind.
2581 inline
2583 : kind_ (symbol_kind::S_YYEMPTY)
2584 {}
2585
2586#if 201103L <= YY_CPLUSPLUS
2587 inline
2589 : kind_ (that.kind_)
2590 {
2591 that.clear ();
2592 }
2593#endif
2594
2595 inline
2597 : kind_ (that.kind_)
2598 {}
2599
2600 inline
2602 : kind_ (yytranslate_ (t))
2603 {}
2604
2605
2606
2607 inline
2608 void
2610 {
2611 kind_ = symbol_kind::S_YYEMPTY;
2612 }
2613
2614 inline
2615 void
2617 {
2618 kind_ = that.kind_;
2619 that.clear ();
2620 }
2621
2622 inline
2625 {
2626 return kind_;
2627 }
2628
2629
2630 inline
2633 {
2634 return this->kind ();
2635 }
2636
2637
2638#line 14 "d2_parser.yy"
2639} } // isc::d2
2640#line 2641 "d2_parser.h"
2641
2642
2643
2644
2645#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:2100
symbol_kind_type token() const YY_NOEXCEPT
Definition: d2_parser.h:2101
const location_type & location() const YY_NOEXCEPT
Definition: d2_parser.h:2102
Present a slice of the top of a stack.
Definition: d2_parser.h:2367
slice(const stack &stack, index_type range) YY_NOEXCEPT
Definition: d2_parser.h:2369
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:1489
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition: d2_parser.h:2044
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: d2_parser.h:789
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition: d2_parser.h:1969
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition: d2_parser.h:2029
static symbol_type make_LOGGERS(const location_type &l)
Definition: d2_parser.h:1744
static symbol_type make_KEY_NAME(const location_type &l)
Definition: d2_parser.h:1549
virtual ~D2Parser()
Definition: d2_parser.cc:162
void set_debug_level(debug_level_type l)
Set the current debugging level.
Definition: d2_parser.cc:481
static symbol_type make_PARAMETERS(const location_type &l)
Definition: d2_parser.h:1729
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1954
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition: d2_parser.h:1504
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:2014
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1909
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition: d2_parser.h:1669
D2Parser(isc::d2::D2ParserContext &ctx_yyarg)
Build a parser object.
Definition: d2_parser.cc:152
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1984
static symbol_type make_TCP(const location_type &l)
Definition: d2_parser.h:1429
static symbol_type make_NAME(const location_type &l)
Definition: d2_parser.h:1759
location location_type
Symbol locations.
Definition: d2_parser.h:467
static symbol_type make_MAXSIZE(const location_type &l)
Definition: d2_parser.h:1849
int debug_level_type
Type for debugging levels.
Definition: d2_parser.h:1159
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
Definition: d2_parser.cc:475
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
Definition: d2_parser.h:1219
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition: d2_parser.h:1774
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1264
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition: d2_parser.h:1804
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1294
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition: d2_parser.h:1624
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition: d2_parser.h:1894
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition: d2_parser.h:1684
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition: d2_parser.h:1384
static symbol_type make_NULL_TYPE(const location_type &l)
Definition: d2_parser.h:1324
static symbol_type make_LIBRARY(const location_type &l)
Definition: d2_parser.h:1714
static symbol_type make_UDP(const location_type &l)
Definition: d2_parser.h:1414
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition: d2_parser.h:1699
static symbol_type make_COLON(const location_type &l)
Definition: d2_parser.h:1249
static symbol_type make_COMMA(const location_type &l)
Definition: d2_parser.h:1234
static symbol_type make_SECRET(const location_type &l)
Definition: d2_parser.h:1639
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition: d2_parser.h:1939
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1309
void set_debug_stream(std::ostream &)
Set the current debugging stream.
Definition: d2_parser.cc:468
static symbol_type make_OUTPUT(const location_type &l)
Definition: d2_parser.h:1789
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:1924
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition: d2_parser.h:792
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition: d2_parser.h:2059
static symbol_type make_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1339
static symbol_type make_D2_PARSER_error(const location_type &l)
Definition: d2_parser.h:1204
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition: d2_parser.h:1999
static symbol_type make_MAXVER(const location_type &l)
Definition: d2_parser.h:1864
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1534
virtual int parse()
Parse.
Definition: d2_parser.cc:516
static symbol_type make_SEVERITY(const location_type &l)
Definition: d2_parser.h:1819
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1279
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
Definition: d2_parser.cc:462
static symbol_type make_HOSTNAME(const location_type &l)
Definition: d2_parser.h:1579
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition: d2_parser.h:1474
static symbol_type make_FLUSH(const location_type &l)
Definition: d2_parser.h:1834
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition: d2_parser.h:1519
static symbol_type make_PATTERN(const location_type &l)
Definition: d2_parser.h:1879
static symbol_type make_ALGORITHM(const location_type &l)
Definition: d2_parser.h:1609
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:1354
static symbol_type make_PORT(const location_type &l)
Definition: d2_parser.h:1369
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:2283
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition: d2_parser.h:2074
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition: d2_parser.h:2089
static symbol_type make_JSON(const location_type &l)
Definition: d2_parser.h:1459
int operator()()
Parse.
Definition: d2_parser.cc:510
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:1189
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Definition: d2_parser.h:1654
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition: d2_parser.h:1399
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
Definition: d2_parser.cc:2859
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:1564
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1594
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition: d2_parser.h:1444
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:28
Defines the logger used by the top-level component of kea-lfc.
value_type value
The semantic value.
Definition: d2_parser.h:1005
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
Definition: d2_parser.h:990
basic_symbol() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:807
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
Definition: d2_parser.h:901
bool empty() const YY_NOEXCEPT
Whether empty.
Definition: d2_parser.h:2539
Base super_type
Alias to Base.
Definition: d2_parser.h:804
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
Definition: d2_parser.h:929
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Definition: d2_parser.h:860
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
Definition: d2_parser.h:915
location_type location
The location.
Definition: d2_parser.h:1008
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2531
~basic_symbol()
Destroy the symbol.
Definition: d2_parser.h:937
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Definition: d2_parser.h:887
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Definition: d2_parser.h:2546
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Definition: d2_parser.h:945
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
Definition: d2_parser.h:873
Type access provider for token (enum) based symbols.
Definition: d2_parser.h:1019
void clear() YY_NOEXCEPT
Record that this symbol is empty.
Definition: d2_parser.h:2609
by_kind() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:2582
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition: d2_parser.h:1021
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2632
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Definition: d2_parser.h:2624
void move(by_kind &that)
Steal the symbol kind from that.
Definition: d2_parser.h:2616
symbol_kind_type kind_
The symbol kind.
Definition: d2_parser.h:1054
@ YYNTOKENS
Number of tokens.
Definition: d2_parser.h:570
"External" symbols: returned by the scanner.
Definition: d2_parser.h:1062
basic_symbol< by_kind > super_type
Superclass.
Definition: d2_parser.h:1064
symbol_type() YY_NOEXCEPT
Empty symbol.
Definition: d2_parser.h:1067
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:165
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