Kea 3.3.1
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
38
39// C++ LALR(1) parser skeleton written by Akim Demaille.
40
41// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
42// especially those whose name start with YY_ or yy_. They are
43// private implementation details that can be changed or removed.
44
45#ifndef YY_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 <config.h>
51#include <string>
52#include <cc/data.h>
53#include <d2srv/d2_config.h>
54#include <boost/lexical_cast.hpp>
56
57using namespace isc::d2;
58using namespace isc::data;
59using namespace std;
60
61#line 62 "d2_parser.h"
62
63# include <cassert>
64# include <cstdlib> // std::abort
65# include <iostream>
66# include <stdexcept>
67# include <string>
68# include <vector>
69
70#if defined __cplusplus
71# define YY_CPLUSPLUS __cplusplus
72#else
73# define YY_CPLUSPLUS 199711L
74#endif
75
76// Support move semantics when possible.
77#if 201103L <= YY_CPLUSPLUS
78# define YY_MOVE std::move
79# define YY_MOVE_OR_COPY move
80# define YY_MOVE_REF(Type) Type&&
81# define YY_RVREF(Type) Type&&
82# define YY_COPY(Type) Type
83#else
84# define YY_MOVE
85# define YY_MOVE_OR_COPY copy
86# define YY_MOVE_REF(Type) Type&
87# define YY_RVREF(Type) const Type&
88# define YY_COPY(Type) const Type&
89#endif
90
91// Support noexcept when possible.
92#if 201103L <= YY_CPLUSPLUS
93# define YY_NOEXCEPT noexcept
94# define YY_NOTHROW
95#else
96# define YY_NOEXCEPT
97# define YY_NOTHROW throw ()
98#endif
99
100// Support constexpr when possible.
101#if 201703 <= YY_CPLUSPLUS
102# define YY_CONSTEXPR constexpr
103#else
104# define YY_CONSTEXPR
105#endif
106# include "location.hh"
107#include <typeinfo>
108#ifndef D2_PARSER__ASSERT
109# include <cassert>
110# define D2_PARSER__ASSERT assert
111#endif
112
113
114#ifndef YY_ATTRIBUTE_PURE
115# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
116# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
117# else
118# define YY_ATTRIBUTE_PURE
119# endif
120#endif
121
122#ifndef YY_ATTRIBUTE_UNUSED
123# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
124# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
125# else
126# define YY_ATTRIBUTE_UNUSED
127# endif
128#endif
129
130/* Suppress unused-variable warnings by "using" E. */
131#if ! defined lint || defined __GNUC__
132# define YY_USE(E) ((void) (E))
133#else
134# define YY_USE(E) /* empty */
135#endif
136
137/* Suppress an incorrect diagnostic about yylval being uninitialized. */
138#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
139# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
140# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
141 _Pragma ("GCC diagnostic push") \
142 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
143# else
144# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
145 _Pragma ("GCC diagnostic push") \
146 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
147 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
148# endif
149# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
150 _Pragma ("GCC diagnostic pop")
151#else
152# define YY_INITIAL_VALUE(Value) Value
153#endif
154#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
155# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
156# define YY_IGNORE_MAYBE_UNINITIALIZED_END
157#endif
158#ifndef YY_INITIAL_VALUE
159# define YY_INITIAL_VALUE(Value) /* Nothing. */
160#endif
161
162#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
163# define YY_IGNORE_USELESS_CAST_BEGIN \
164 _Pragma ("GCC diagnostic push") \
165 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
166# define YY_IGNORE_USELESS_CAST_END \
167 _Pragma ("GCC diagnostic pop")
168#endif
169#ifndef YY_IGNORE_USELESS_CAST_BEGIN
170# define YY_IGNORE_USELESS_CAST_BEGIN
171# define YY_IGNORE_USELESS_CAST_END
172#endif
173
174# ifndef YY_CAST
175# ifdef __cplusplus
176# define YY_CAST(Type, Val) static_cast<Type> (Val)
177# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
178# else
179# define YY_CAST(Type, Val) ((Type) (Val))
180# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
181# endif
182# endif
183# ifndef YY_NULLPTR
184# if defined __cplusplus
185# if 201103L <= __cplusplus
186# define YY_NULLPTR nullptr
187# else
188# define YY_NULLPTR 0
189# endif
190# else
191# define YY_NULLPTR ((void*)0)
192# endif
193# endif
194
195/* Debug traces. */
196#ifndef D2_PARSER_DEBUG
197# if defined YYDEBUG
198#if YYDEBUG
199# define D2_PARSER_DEBUG 1
200# else
201# define D2_PARSER_DEBUG 0
202# endif
203# else /* ! defined YYDEBUG */
204# define D2_PARSER_DEBUG 1
205# endif /* ! defined YYDEBUG */
206#endif /* ! defined D2_PARSER_DEBUG */
207
208#line 14 "d2_parser.yy"
209namespace isc { namespace d2 {
210#line 211 "d2_parser.h"
211
212
213
214
217 {
218 public:
219#ifdef D2_PARSER_STYPE
220# ifdef __GNUC__
221# pragma GCC message "bison: do not #define D2_PARSER_STYPE in C++, use %define api.value.type"
222# endif
223 typedef D2_PARSER_STYPE value_type;
224#else
231 {
232 public:
235
238 : yyraw_ ()
239 , yytypeid_ (YY_NULLPTR)
240 {}
241
243 template <typename T>
245 : yytypeid_ (&typeid (T))
246 {
247 D2_PARSER__ASSERT (sizeof (T) <= size);
248 new (yyas_<T> ()) T (YY_MOVE (t));
249 }
250
251#if 201103L <= YY_CPLUSPLUS
253 value_type (const self_type&) = delete;
255 self_type& operator= (const self_type&) = delete;
256#endif
257
260 {
261 D2_PARSER__ASSERT (!yytypeid_);
262 }
263
264# if 201103L <= YY_CPLUSPLUS
266 template <typename T, typename... U>
267 T&
268 emplace (U&&... u)
269 {
270 D2_PARSER__ASSERT (!yytypeid_);
271 D2_PARSER__ASSERT (sizeof (T) <= size);
272 yytypeid_ = & typeid (T);
273 return *new (yyas_<T> ()) T (std::forward <U>(u)...);
274 }
275# else
277 template <typename T>
278 T&
280 {
281 D2_PARSER__ASSERT (!yytypeid_);
282 D2_PARSER__ASSERT (sizeof (T) <= size);
283 yytypeid_ = & typeid (T);
284 return *new (yyas_<T> ()) T ();
285 }
286
288 template <typename T>
289 T&
290 emplace (const T& t)
291 {
292 D2_PARSER__ASSERT (!yytypeid_);
293 D2_PARSER__ASSERT (sizeof (T) <= size);
294 yytypeid_ = & typeid (T);
295 return *new (yyas_<T> ()) T (t);
296 }
297# endif
298
301 template <typename T>
302 T&
304 {
305 return emplace<T> ();
306 }
307
310 template <typename T>
311 T&
312 build (const T& t)
313 {
314 return emplace<T> (t);
315 }
316
318 template <typename T>
319 T&
321 {
322 D2_PARSER__ASSERT (yytypeid_);
323 D2_PARSER__ASSERT (*yytypeid_ == typeid (T));
324 D2_PARSER__ASSERT (sizeof (T) <= size);
325 return *yyas_<T> ();
326 }
327
329 template <typename T>
330 const T&
332 {
333 D2_PARSER__ASSERT (yytypeid_);
334 D2_PARSER__ASSERT (*yytypeid_ == typeid (T));
335 D2_PARSER__ASSERT (sizeof (T) <= size);
336 return *yyas_<T> ();
337 }
338
347 template <typename T>
348 void
350 {
351 D2_PARSER__ASSERT (yytypeid_);
352 D2_PARSER__ASSERT (*yytypeid_ == *that.yytypeid_);
353 std::swap (as<T> (), that.as<T> ());
354 }
355
359 template <typename T>
360 void
362 {
363# if 201103L <= YY_CPLUSPLUS
364 emplace<T> (std::move (that.as<T> ()));
365# else
366 emplace<T> ();
367 swap<T> (that);
368# endif
369 that.destroy<T> ();
370 }
371
372# if 201103L <= YY_CPLUSPLUS
374 template <typename T>
375 void
376 move (self_type&& that)
377 {
378 emplace<T> (std::move (that.as<T> ()));
379 that.destroy<T> ();
380 }
381#endif
382
384 template <typename T>
385 void
386 copy (const self_type& that)
387 {
388 emplace<T> (that.as<T> ());
389 }
390
392 template <typename T>
393 void
395 {
396 as<T> ().~T ();
397 yytypeid_ = YY_NULLPTR;
398 }
399
400 private:
401#if YY_CPLUSPLUS < 201103L
403 value_type (const self_type&);
405 self_type& operator= (const self_type&);
406#endif
407
409 template <typename T>
410 T*
411 yyas_ () YY_NOEXCEPT
412 {
413 void *yyp = yyraw_;
414 return static_cast<T*> (yyp);
415 }
416
418 template <typename T>
419 const T*
420 yyas_ () const YY_NOEXCEPT
421 {
422 const void *yyp = yyraw_;
423 return static_cast<const T*> (yyp);
424 }
425
427 union union_type
428 {
429 // value
430 // map_value
431 // ncr_protocol_value
432 // control_socket_type_value
433 // auth_type_value
434 char dummy1[sizeof (ElementPtr)];
435
436 // "boolean"
437 char dummy2[sizeof (bool)];
438
439 // "floating point"
440 char dummy3[sizeof (double)];
441
442 // "integer"
443 char dummy4[sizeof (int64_t)];
444
445 // "constant string"
446 char dummy5[sizeof (std::string)];
447 };
448
450 enum { size = sizeof (union_type) };
451
453 union
454 {
456 long double yyalign_me_;
458 char yyraw_[size];
459 };
460
462 const std::type_info *yytypeid_;
463 };
464
465#endif
468
470 typedef location location_type;
471
473 struct syntax_error : std::runtime_error
474 {
475 syntax_error (const location_type& l, const std::string& m)
476 : std::runtime_error (m)
477 , location (l)
478 {}
479
481 : std::runtime_error (s.what ())
482 , location (s.location)
483 {}
484
486
488 };
489
491 struct token
492 {
494 {
496 TOKEN_END = 0, // "end of file"
497 TOKEN_D2_PARSER_error = 256, // error
498 TOKEN_D2_PARSER_UNDEF = 257, // "invalid token"
499 TOKEN_COMMA = 258, // ","
500 TOKEN_COLON = 259, // ":"
505 TOKEN_NULL_TYPE = 264, // "null"
506 TOKEN_DHCPDDNS = 265, // "DhcpDdns"
507 TOKEN_IP_ADDRESS = 266, // "ip-address"
508 TOKEN_PORT = 267, // "port"
509 TOKEN_DNS_SERVER_TIMEOUT = 268, // "dns-server-timeout"
510 TOKEN_NCR_PROTOCOL = 269, // "ncr-protocol"
511 TOKEN_UDP = 270, // "UDP"
512 TOKEN_TCP = 271, // "TCP"
513 TOKEN_NCR_FORMAT = 272, // "ncr-format"
514 TOKEN_JSON = 273, // "JSON"
515 TOKEN_USER_CONTEXT = 274, // "user-context"
516 TOKEN_COMMENT = 275, // "comment"
517 TOKEN_FORWARD_DDNS = 276, // "forward-ddns"
518 TOKEN_REVERSE_DDNS = 277, // "reverse-ddns"
519 TOKEN_DDNS_DOMAINS = 278, // "ddns-domains"
520 TOKEN_KEY_NAME = 279, // "key-name"
521 TOKEN_DNS_SERVERS = 280, // "dns-servers"
522 TOKEN_HOSTNAME = 281, // "hostname"
523 TOKEN_TSIG_KEYS = 282, // "tsig-keys"
524 TOKEN_ALGORITHM = 283, // "algorithm"
525 TOKEN_DIGEST_BITS = 284, // "digest-bits"
526 TOKEN_SECRET = 285, // "secret"
527 TOKEN_SECRET_FILE = 286, // "secret-file"
528 TOKEN_CONTROL_SOCKETS = 287, // "control-sockets"
529 TOKEN_SOCKET_TYPE = 288, // "socket-type"
530 TOKEN_UNIX = 289, // "unix"
531 TOKEN_HTTP = 290, // "http"
532 TOKEN_HTTPS = 291, // "https"
533 TOKEN_SOCKET_NAME = 292, // "socket-name"
534 TOKEN_SOCKET_ADDRESS = 293, // "socket-address"
535 TOKEN_SOCKET_PORT = 294, // "socket-port"
536 TOKEN_AUTHENTICATION = 295, // "authentication"
537 TOKEN_TYPE = 296, // "type"
538 TOKEN_BASIC = 297, // "basic"
539 TOKEN_REALM = 298, // "realm"
540 TOKEN_DIRECTORY = 299, // "directory"
541 TOKEN_CLIENTS = 300, // "clients"
542 TOKEN_USER = 301, // "user"
543 TOKEN_USER_FILE = 302, // "user-file"
544 TOKEN_PASSWORD = 303, // "password"
545 TOKEN_PASSWORD_FILE = 304, // "password-file"
546 TOKEN_TRUST_ANCHOR = 305, // "trust-anchor"
547 TOKEN_CERT_FILE = 306, // "cert-file"
548 TOKEN_KEY_FILE = 307, // "key-file"
549 TOKEN_CERT_REQUIRED = 308, // "cert-required"
550 TOKEN_HOOKS_LIBRARIES = 309, // "hooks-libraries"
551 TOKEN_LIBRARY = 310, // "library"
552 TOKEN_PARAMETERS = 311, // "parameters"
553 TOKEN_LOGGERS = 312, // "loggers"
554 TOKEN_NAME = 313, // "name"
555 TOKEN_OUTPUT_OPTIONS = 314, // "output-options"
556 TOKEN_OUTPUT = 315, // "output"
557 TOKEN_DEBUGLEVEL = 316, // "debuglevel"
558 TOKEN_SEVERITY = 317, // "severity"
559 TOKEN_FLUSH = 318, // "flush"
560 TOKEN_MAXSIZE = 319, // "maxsize"
561 TOKEN_MAXVER = 320, // "maxver"
562 TOKEN_PATTERN = 321, // "pattern"
563 TOKEN_TOPLEVEL_JSON = 322, // TOPLEVEL_JSON
564 TOKEN_TOPLEVEL_DHCPDDNS = 323, // TOPLEVEL_DHCPDDNS
565 TOKEN_SUB_DHCPDDNS = 324, // SUB_DHCPDDNS
566 TOKEN_SUB_TSIG_KEY = 325, // SUB_TSIG_KEY
567 TOKEN_SUB_TSIG_KEYS = 326, // SUB_TSIG_KEYS
568 TOKEN_SUB_DDNS_DOMAIN = 327, // SUB_DDNS_DOMAIN
569 TOKEN_SUB_DDNS_DOMAINS = 328, // SUB_DDNS_DOMAINS
570 TOKEN_SUB_DNS_SERVER = 329, // SUB_DNS_SERVER
571 TOKEN_SUB_DNS_SERVERS = 330, // SUB_DNS_SERVERS
572 TOKEN_SUB_HOOKS_LIBRARY = 331, // SUB_HOOKS_LIBRARY
573 TOKEN_STRING = 332, // "constant string"
574 TOKEN_INTEGER = 333, // "integer"
575 TOKEN_FLOAT = 334, // "floating point"
576 TOKEN_BOOLEAN = 335 // "boolean"
577 };
578
580 };
581
584
587
590 {
592 {
595 S_YYEOF = 0, // "end of file"
596 S_YYerror = 1, // error
597 S_YYUNDEF = 2, // "invalid token"
598 S_COMMA = 3, // ","
599 S_COLON = 4, // ":"
604 S_NULL_TYPE = 9, // "null"
605 S_DHCPDDNS = 10, // "DhcpDdns"
606 S_IP_ADDRESS = 11, // "ip-address"
607 S_PORT = 12, // "port"
608 S_DNS_SERVER_TIMEOUT = 13, // "dns-server-timeout"
609 S_NCR_PROTOCOL = 14, // "ncr-protocol"
610 S_UDP = 15, // "UDP"
611 S_TCP = 16, // "TCP"
612 S_NCR_FORMAT = 17, // "ncr-format"
613 S_JSON = 18, // "JSON"
614 S_USER_CONTEXT = 19, // "user-context"
615 S_COMMENT = 20, // "comment"
616 S_FORWARD_DDNS = 21, // "forward-ddns"
617 S_REVERSE_DDNS = 22, // "reverse-ddns"
618 S_DDNS_DOMAINS = 23, // "ddns-domains"
619 S_KEY_NAME = 24, // "key-name"
620 S_DNS_SERVERS = 25, // "dns-servers"
621 S_HOSTNAME = 26, // "hostname"
622 S_TSIG_KEYS = 27, // "tsig-keys"
623 S_ALGORITHM = 28, // "algorithm"
624 S_DIGEST_BITS = 29, // "digest-bits"
625 S_SECRET = 30, // "secret"
626 S_SECRET_FILE = 31, // "secret-file"
627 S_CONTROL_SOCKETS = 32, // "control-sockets"
628 S_SOCKET_TYPE = 33, // "socket-type"
629 S_UNIX = 34, // "unix"
630 S_HTTP = 35, // "http"
631 S_HTTPS = 36, // "https"
632 S_SOCKET_NAME = 37, // "socket-name"
633 S_SOCKET_ADDRESS = 38, // "socket-address"
634 S_SOCKET_PORT = 39, // "socket-port"
635 S_AUTHENTICATION = 40, // "authentication"
636 S_TYPE = 41, // "type"
637 S_BASIC = 42, // "basic"
638 S_REALM = 43, // "realm"
639 S_DIRECTORY = 44, // "directory"
640 S_CLIENTS = 45, // "clients"
641 S_USER = 46, // "user"
642 S_USER_FILE = 47, // "user-file"
643 S_PASSWORD = 48, // "password"
644 S_PASSWORD_FILE = 49, // "password-file"
645 S_TRUST_ANCHOR = 50, // "trust-anchor"
646 S_CERT_FILE = 51, // "cert-file"
647 S_KEY_FILE = 52, // "key-file"
648 S_CERT_REQUIRED = 53, // "cert-required"
649 S_HOOKS_LIBRARIES = 54, // "hooks-libraries"
650 S_LIBRARY = 55, // "library"
651 S_PARAMETERS = 56, // "parameters"
652 S_LOGGERS = 57, // "loggers"
653 S_NAME = 58, // "name"
654 S_OUTPUT_OPTIONS = 59, // "output-options"
655 S_OUTPUT = 60, // "output"
656 S_DEBUGLEVEL = 61, // "debuglevel"
657 S_SEVERITY = 62, // "severity"
658 S_FLUSH = 63, // "flush"
659 S_MAXSIZE = 64, // "maxsize"
660 S_MAXVER = 65, // "maxver"
661 S_PATTERN = 66, // "pattern"
662 S_TOPLEVEL_JSON = 67, // TOPLEVEL_JSON
663 S_TOPLEVEL_DHCPDDNS = 68, // TOPLEVEL_DHCPDDNS
664 S_SUB_DHCPDDNS = 69, // SUB_DHCPDDNS
665 S_SUB_TSIG_KEY = 70, // SUB_TSIG_KEY
666 S_SUB_TSIG_KEYS = 71, // SUB_TSIG_KEYS
667 S_SUB_DDNS_DOMAIN = 72, // SUB_DDNS_DOMAIN
668 S_SUB_DDNS_DOMAINS = 73, // SUB_DDNS_DOMAINS
669 S_SUB_DNS_SERVER = 74, // SUB_DNS_SERVER
670 S_SUB_DNS_SERVERS = 75, // SUB_DNS_SERVERS
671 S_SUB_HOOKS_LIBRARY = 76, // SUB_HOOKS_LIBRARY
672 S_STRING = 77, // "constant string"
673 S_INTEGER = 78, // "integer"
674 S_FLOAT = 79, // "floating point"
675 S_BOOLEAN = 80, // "boolean"
676 S_YYACCEPT = 81, // $accept
677 S_start = 82, // start
678 S_83_1 = 83, // $@1
679 S_84_2 = 84, // $@2
680 S_85_3 = 85, // $@3
681 S_86_4 = 86, // $@4
682 S_87_5 = 87, // $@5
683 S_88_6 = 88, // $@6
684 S_89_7 = 89, // $@7
685 S_90_8 = 90, // $@8
686 S_91_9 = 91, // $@9
687 S_92_10 = 92, // $@10
688 S_value = 93, // value
689 S_sub_json = 94, // sub_json
690 S_map2 = 95, // map2
691 S_96_11 = 96, // $@11
692 S_map_value = 97, // map_value
693 S_map_content = 98, // map_content
694 S_not_empty_map = 99, // not_empty_map
695 S_list_generic = 100, // list_generic
696 S_101_12 = 101, // $@12
697 S_list_content = 102, // list_content
698 S_not_empty_list = 103, // not_empty_list
699 S_unknown_map_entry = 104, // unknown_map_entry
700 S_syntax_map = 105, // syntax_map
701 S_106_13 = 106, // $@13
702 S_global_object = 107, // global_object
703 S_108_14 = 108, // $@14
704 S_global_object_comma = 109, // global_object_comma
705 S_sub_dhcpddns = 110, // sub_dhcpddns
706 S_111_15 = 111, // $@15
707 S_dhcpddns_params = 112, // dhcpddns_params
708 S_dhcpddns_param = 113, // dhcpddns_param
709 S_ip_address = 114, // ip_address
710 S_115_16 = 115, // $@16
711 S_port = 116, // port
712 S_dns_server_timeout = 117, // dns_server_timeout
713 S_ncr_protocol = 118, // ncr_protocol
714 S_119_17 = 119, // $@17
715 S_ncr_protocol_value = 120, // ncr_protocol_value
716 S_ncr_format = 121, // ncr_format
717 S_122_18 = 122, // $@18
718 S_user_context = 123, // user_context
719 S_124_19 = 124, // $@19
720 S_comment = 125, // comment
721 S_126_20 = 126, // $@20
722 S_forward_ddns = 127, // forward_ddns
723 S_128_21 = 128, // $@21
724 S_reverse_ddns = 129, // reverse_ddns
725 S_130_22 = 130, // $@22
726 S_ddns_mgr_params = 131, // ddns_mgr_params
727 S_not_empty_ddns_mgr_params = 132, // not_empty_ddns_mgr_params
728 S_ddns_mgr_param = 133, // ddns_mgr_param
729 S_ddns_domains = 134, // ddns_domains
730 S_135_23 = 135, // $@23
731 S_sub_ddns_domains = 136, // sub_ddns_domains
732 S_137_24 = 137, // $@24
733 S_ddns_domain_list = 138, // ddns_domain_list
734 S_not_empty_ddns_domain_list = 139, // not_empty_ddns_domain_list
735 S_ddns_domain = 140, // ddns_domain
736 S_141_25 = 141, // $@25
737 S_sub_ddns_domain = 142, // sub_ddns_domain
738 S_143_26 = 143, // $@26
739 S_ddns_domain_params = 144, // ddns_domain_params
740 S_ddns_domain_param = 145, // ddns_domain_param
741 S_ddns_domain_name = 146, // ddns_domain_name
742 S_147_27 = 147, // $@27
743 S_ddns_key_name = 148, // ddns_key_name
744 S_149_28 = 149, // $@28
745 S_dns_servers = 150, // dns_servers
746 S_151_29 = 151, // $@29
747 S_sub_dns_servers = 152, // sub_dns_servers
748 S_153_30 = 153, // $@30
749 S_dns_server_list = 154, // dns_server_list
750 S_dns_server = 155, // dns_server
751 S_156_31 = 156, // $@31
752 S_sub_dns_server = 157, // sub_dns_server
753 S_158_32 = 158, // $@32
754 S_dns_server_params = 159, // dns_server_params
755 S_dns_server_param = 160, // dns_server_param
756 S_dns_server_hostname = 161, // dns_server_hostname
757 S_162_33 = 162, // $@33
758 S_dns_server_ip_address = 163, // dns_server_ip_address
759 S_164_34 = 164, // $@34
760 S_dns_server_port = 165, // dns_server_port
761 S_tsig_keys = 166, // tsig_keys
762 S_167_35 = 167, // $@35
763 S_sub_tsig_keys = 168, // sub_tsig_keys
764 S_169_36 = 169, // $@36
765 S_tsig_keys_list = 170, // tsig_keys_list
766 S_not_empty_tsig_keys_list = 171, // not_empty_tsig_keys_list
767 S_tsig_key = 172, // tsig_key
768 S_173_37 = 173, // $@37
769 S_sub_tsig_key = 174, // sub_tsig_key
770 S_175_38 = 175, // $@38
771 S_tsig_key_params = 176, // tsig_key_params
772 S_tsig_key_param = 177, // tsig_key_param
773 S_tsig_key_name = 178, // tsig_key_name
774 S_179_39 = 179, // $@39
775 S_tsig_key_algorithm = 180, // tsig_key_algorithm
776 S_181_40 = 181, // $@40
777 S_tsig_key_digest_bits = 182, // tsig_key_digest_bits
778 S_tsig_key_secret = 183, // tsig_key_secret
779 S_184_41 = 184, // $@41
780 S_tsig_key_secret_file = 185, // tsig_key_secret_file
781 S_186_42 = 186, // $@42
782 S_control_sockets = 187, // control_sockets
783 S_188_43 = 188, // $@43
784 S_control_socket_list = 189, // control_socket_list
785 S_not_empty_control_socket_list = 190, // not_empty_control_socket_list
786 S_control_socket_entry = 191, // control_socket_entry
787 S_192_44 = 192, // $@44
788 S_control_socket_params = 193, // control_socket_params
789 S_control_socket_param = 194, // control_socket_param
790 S_control_socket_type = 195, // control_socket_type
791 S_196_45 = 196, // $@45
792 S_control_socket_type_value = 197, // control_socket_type_value
793 S_control_socket_name = 198, // control_socket_name
794 S_199_46 = 199, // $@46
795 S_control_socket_address = 200, // control_socket_address
796 S_201_47 = 201, // $@47
797 S_control_socket_port = 202, // control_socket_port
798 S_trust_anchor = 203, // trust_anchor
799 S_204_48 = 204, // $@48
800 S_cert_file = 205, // cert_file
801 S_206_49 = 206, // $@49
802 S_key_file = 207, // key_file
803 S_208_50 = 208, // $@50
804 S_cert_required = 209, // cert_required
805 S_authentication = 210, // authentication
806 S_211_51 = 211, // $@51
807 S_auth_params = 212, // auth_params
808 S_auth_param = 213, // auth_param
809 S_auth_type = 214, // auth_type
810 S_215_52 = 215, // $@52
811 S_auth_type_value = 216, // auth_type_value
812 S_realm = 217, // realm
813 S_218_53 = 218, // $@53
814 S_directory = 219, // directory
815 S_220_54 = 220, // $@54
816 S_clients = 221, // clients
817 S_222_55 = 222, // $@55
818 S_clients_list = 223, // clients_list
819 S_not_empty_clients_list = 224, // not_empty_clients_list
820 S_basic_auth = 225, // basic_auth
821 S_226_56 = 226, // $@56
822 S_clients_params = 227, // clients_params
823 S_clients_param = 228, // clients_param
824 S_user = 229, // user
825 S_230_57 = 230, // $@57
826 S_user_file = 231, // user_file
827 S_232_58 = 232, // $@58
828 S_password = 233, // password
829 S_234_59 = 234, // $@59
830 S_password_file = 235, // password_file
831 S_236_60 = 236, // $@60
832 S_hooks_libraries = 237, // hooks_libraries
833 S_238_61 = 238, // $@61
834 S_hooks_libraries_list = 239, // hooks_libraries_list
835 S_not_empty_hooks_libraries_list = 240, // not_empty_hooks_libraries_list
836 S_hooks_library = 241, // hooks_library
837 S_242_62 = 242, // $@62
838 S_sub_hooks_library = 243, // sub_hooks_library
839 S_244_63 = 244, // $@63
840 S_hooks_params = 245, // hooks_params
841 S_hooks_param = 246, // hooks_param
842 S_library = 247, // library
843 S_248_64 = 248, // $@64
844 S_parameters = 249, // parameters
845 S_250_65 = 250, // $@65
846 S_loggers = 251, // loggers
847 S_252_66 = 252, // $@66
848 S_loggers_entries = 253, // loggers_entries
849 S_logger_entry = 254, // logger_entry
850 S_255_67 = 255, // $@67
851 S_logger_params = 256, // logger_params
852 S_logger_param = 257, // logger_param
853 S_name = 258, // name
854 S_259_68 = 259, // $@68
855 S_debuglevel = 260, // debuglevel
856 S_severity = 261, // severity
857 S_262_69 = 262, // $@69
858 S_output_options_list = 263, // output_options_list
859 S_264_70 = 264, // $@70
860 S_output_options_list_content = 265, // output_options_list_content
861 S_output_entry = 266, // output_entry
862 S_267_71 = 267, // $@71
863 S_output_params_list = 268, // output_params_list
864 S_output_params = 269, // output_params
865 S_output = 270, // output
866 S_271_72 = 271, // $@72
867 S_flush = 272, // flush
868 S_maxsize = 273, // maxsize
869 S_maxver = 274, // maxver
870 S_pattern = 275, // pattern
871 S_276_73 = 276 // $@73
872 };
873 };
874
877
880
887 template <typename Base>
888 struct basic_symbol : Base
889 {
891 typedef Base super_type;
892
895 : value ()
896 , location ()
897 {}
898
899#if 201103L <= YY_CPLUSPLUS
902 : Base (std::move (that))
903 , value ()
904 , location (std::move (that.location))
905 {
906 switch (this->kind ())
907 {
908 case symbol_kind::S_value: // value
909 case symbol_kind::S_map_value: // map_value
910 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
911 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
912 case symbol_kind::S_auth_type_value: // auth_type_value
913 value.move< ElementPtr > (std::move (that.value));
914 break;
915
916 case symbol_kind::S_BOOLEAN: // "boolean"
917 value.move< bool > (std::move (that.value));
918 break;
919
920 case symbol_kind::S_FLOAT: // "floating point"
921 value.move< double > (std::move (that.value));
922 break;
923
924 case symbol_kind::S_INTEGER: // "integer"
925 value.move< int64_t > (std::move (that.value));
926 break;
927
928 case symbol_kind::S_STRING: // "constant string"
929 value.move< std::string > (std::move (that.value));
930 break;
931
932 default:
933 break;
934 }
935
936 }
937#endif
938
941
943#if 201103L <= YY_CPLUSPLUS
944 basic_symbol (typename Base::kind_type t, location_type&& l)
945 : Base (t)
946 , location (std::move (l))
947 {}
948#else
949 basic_symbol (typename Base::kind_type t, const location_type& l)
950 : Base (t)
951 , location (l)
952 {}
953#endif
954
955#if 201103L <= YY_CPLUSPLUS
956 basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
957 : Base (t)
958 , value (std::move (v))
959 , location (std::move (l))
960 {}
961#else
962 basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
963 : Base (t)
964 , value (v)
965 , location (l)
966 {}
967#endif
968
969#if 201103L <= YY_CPLUSPLUS
970 basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
971 : Base (t)
972 , value (std::move (v))
973 , location (std::move (l))
974 {}
975#else
976 basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
977 : Base (t)
978 , value (v)
979 , location (l)
980 {}
981#endif
982
983#if 201103L <= YY_CPLUSPLUS
984 basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
985 : Base (t)
986 , value (std::move (v))
987 , location (std::move (l))
988 {}
989#else
990 basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
991 : Base (t)
992 , value (v)
993 , location (l)
994 {}
995#endif
996
997#if 201103L <= YY_CPLUSPLUS
998 basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
999 : Base (t)
1000 , value (std::move (v))
1001 , location (std::move (l))
1002 {}
1003#else
1004 basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
1005 : Base (t)
1006 , value (v)
1007 , location (l)
1008 {}
1009#endif
1010
1011#if 201103L <= YY_CPLUSPLUS
1012 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
1013 : Base (t)
1014 , value (std::move (v))
1015 , location (std::move (l))
1016 {}
1017#else
1018 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
1019 : Base (t)
1020 , value (v)
1021 , location (l)
1022 {}
1023#endif
1024
1027 {
1028 clear ();
1029 }
1030
1031
1032
1035 {
1036 // User destructor.
1037 symbol_kind_type yykind = this->kind ();
1038 basic_symbol<Base>& yysym = *this;
1039 (void) yysym;
1040 switch (yykind)
1041 {
1042 default:
1043 break;
1044 }
1045
1046 // Value type destructor.
1047switch (yykind)
1048 {
1049 case symbol_kind::S_value: // value
1050 case symbol_kind::S_map_value: // map_value
1051 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
1052 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
1053 case symbol_kind::S_auth_type_value: // auth_type_value
1054 value.template destroy< ElementPtr > ();
1055 break;
1056
1057 case symbol_kind::S_BOOLEAN: // "boolean"
1058 value.template destroy< bool > ();
1059 break;
1060
1061 case symbol_kind::S_FLOAT: // "floating point"
1062 value.template destroy< double > ();
1063 break;
1064
1065 case symbol_kind::S_INTEGER: // "integer"
1066 value.template destroy< int64_t > ();
1067 break;
1068
1069 case symbol_kind::S_STRING: // "constant string"
1070 value.template destroy< std::string > ();
1071 break;
1072
1073 default:
1074 break;
1075 }
1076
1077 Base::clear ();
1078 }
1079
1081 std::string name () const YY_NOEXCEPT
1082 {
1083 return D2Parser::symbol_name (this->kind ());
1084 }
1085
1088
1090 bool empty () const YY_NOEXCEPT;
1091
1094
1097
1100
1101 private:
1102#if YY_CPLUSPLUS < 201103L
1104 basic_symbol& operator= (const basic_symbol& that);
1105#endif
1106 };
1107
1109 struct by_kind
1110 {
1113
1116
1117#if 201103L <= YY_CPLUSPLUS
1119 by_kind (by_kind&& that) YY_NOEXCEPT;
1120#endif
1121
1123 by_kind (const by_kind& that) YY_NOEXCEPT;
1124
1127
1128
1129
1131 void clear () YY_NOEXCEPT;
1132
1134 void move (by_kind& that);
1135
1139
1142
1146 };
1147
1150
1153 {
1156
1159
1161#if 201103L <= YY_CPLUSPLUS
1162 symbol_type (int tok, location_type l)
1163 : super_type (token_kind_type (tok), std::move (l))
1164#else
1165 symbol_type (int tok, const location_type& l)
1166 : super_type (token_kind_type (tok), l)
1167#endif
1168 {
1169#if !defined _MSC_VER || defined __clang__
1172#endif
1173 }
1174#if 201103L <= YY_CPLUSPLUS
1175 symbol_type (int tok, bool v, location_type l)
1176 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1177#else
1178 symbol_type (int tok, const bool& v, const location_type& l)
1179 : super_type (token_kind_type (tok), v, l)
1180#endif
1181 {
1182#if !defined _MSC_VER || defined __clang__
1184#endif
1185 }
1186#if 201103L <= YY_CPLUSPLUS
1187 symbol_type (int tok, double v, location_type l)
1188 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1189#else
1190 symbol_type (int tok, const double& v, const location_type& l)
1191 : super_type (token_kind_type (tok), v, l)
1192#endif
1193 {
1194#if !defined _MSC_VER || defined __clang__
1196#endif
1197 }
1198#if 201103L <= YY_CPLUSPLUS
1199 symbol_type (int tok, int64_t v, location_type l)
1200 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1201#else
1202 symbol_type (int tok, const int64_t& v, const location_type& l)
1203 : super_type (token_kind_type (tok), v, l)
1204#endif
1205 {
1206#if !defined _MSC_VER || defined __clang__
1208#endif
1209 }
1210#if 201103L <= YY_CPLUSPLUS
1211 symbol_type (int tok, std::string v, location_type l)
1212 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1213#else
1214 symbol_type (int tok, const std::string& v, const location_type& l)
1215 : super_type (token_kind_type (tok), v, l)
1216#endif
1217 {
1218#if !defined _MSC_VER || defined __clang__
1220#endif
1221 }
1222 };
1223
1226 virtual ~D2Parser ();
1227
1228#if 201103L <= YY_CPLUSPLUS
1230 D2Parser (const D2Parser&) = delete;
1232 D2Parser& operator= (const D2Parser&) = delete;
1233#endif
1234
1237 int operator() ();
1238
1241 virtual int parse ();
1242
1243#if D2_PARSER_DEBUG
1245 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1247 void set_debug_stream (std::ostream &);
1248
1250 typedef int debug_level_type;
1252 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1254 void set_debug_level (debug_level_type l);
1255#endif
1256
1260 virtual void error (const location_type& loc, const std::string& msg);
1261
1263 void error (const syntax_error& err);
1264
1267 static std::string symbol_name (symbol_kind_type yysymbol);
1268
1269 // Implementation of make_symbol for each token kind.
1270#if 201103L <= YY_CPLUSPLUS
1271 static
1272 symbol_type
1273 make_END (location_type l)
1274 {
1275 return symbol_type (token::TOKEN_END, std::move (l));
1276 }
1277#else
1278 static
1279 symbol_type
1281 {
1282 return symbol_type (token::TOKEN_END, l);
1283 }
1284#endif
1285#if 201103L <= YY_CPLUSPLUS
1286 static
1287 symbol_type
1288 make_D2_PARSER_error (location_type l)
1289 {
1290 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1291 }
1292#else
1293 static
1294 symbol_type
1299#endif
1300#if 201103L <= YY_CPLUSPLUS
1301 static
1302 symbol_type
1303 make_D2_PARSER_UNDEF (location_type l)
1304 {
1305 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1306 }
1307#else
1308 static
1309 symbol_type
1314#endif
1315#if 201103L <= YY_CPLUSPLUS
1316 static
1317 symbol_type
1318 make_COMMA (location_type l)
1319 {
1320 return symbol_type (token::TOKEN_COMMA, std::move (l));
1321 }
1322#else
1323 static
1324 symbol_type
1326 {
1327 return symbol_type (token::TOKEN_COMMA, l);
1328 }
1329#endif
1330#if 201103L <= YY_CPLUSPLUS
1331 static
1332 symbol_type
1333 make_COLON (location_type l)
1334 {
1335 return symbol_type (token::TOKEN_COLON, std::move (l));
1336 }
1337#else
1338 static
1339 symbol_type
1341 {
1342 return symbol_type (token::TOKEN_COLON, l);
1343 }
1344#endif
1345#if 201103L <= YY_CPLUSPLUS
1346 static
1347 symbol_type
1348 make_LSQUARE_BRACKET (location_type l)
1349 {
1350 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1351 }
1352#else
1353 static
1354 symbol_type
1359#endif
1360#if 201103L <= YY_CPLUSPLUS
1361 static
1362 symbol_type
1363 make_RSQUARE_BRACKET (location_type l)
1364 {
1365 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1366 }
1367#else
1368 static
1369 symbol_type
1374#endif
1375#if 201103L <= YY_CPLUSPLUS
1376 static
1377 symbol_type
1378 make_LCURLY_BRACKET (location_type l)
1379 {
1380 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1381 }
1382#else
1383 static
1384 symbol_type
1389#endif
1390#if 201103L <= YY_CPLUSPLUS
1391 static
1392 symbol_type
1393 make_RCURLY_BRACKET (location_type l)
1394 {
1395 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1396 }
1397#else
1398 static
1399 symbol_type
1404#endif
1405#if 201103L <= YY_CPLUSPLUS
1406 static
1407 symbol_type
1408 make_NULL_TYPE (location_type l)
1409 {
1410 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1411 }
1412#else
1413 static
1414 symbol_type
1416 {
1418 }
1419#endif
1420#if 201103L <= YY_CPLUSPLUS
1421 static
1422 symbol_type
1423 make_DHCPDDNS (location_type l)
1424 {
1425 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1426 }
1427#else
1428 static
1429 symbol_type
1431 {
1433 }
1434#endif
1435#if 201103L <= YY_CPLUSPLUS
1436 static
1437 symbol_type
1438 make_IP_ADDRESS (location_type l)
1439 {
1440 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1441 }
1442#else
1443 static
1444 symbol_type
1446 {
1448 }
1449#endif
1450#if 201103L <= YY_CPLUSPLUS
1451 static
1452 symbol_type
1453 make_PORT (location_type l)
1454 {
1455 return symbol_type (token::TOKEN_PORT, std::move (l));
1456 }
1457#else
1458 static
1459 symbol_type
1461 {
1462 return symbol_type (token::TOKEN_PORT, l);
1463 }
1464#endif
1465#if 201103L <= YY_CPLUSPLUS
1466 static
1467 symbol_type
1468 make_DNS_SERVER_TIMEOUT (location_type l)
1469 {
1470 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1471 }
1472#else
1473 static
1474 symbol_type
1479#endif
1480#if 201103L <= YY_CPLUSPLUS
1481 static
1482 symbol_type
1483 make_NCR_PROTOCOL (location_type l)
1484 {
1485 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1486 }
1487#else
1488 static
1489 symbol_type
1491 {
1493 }
1494#endif
1495#if 201103L <= YY_CPLUSPLUS
1496 static
1497 symbol_type
1498 make_UDP (location_type l)
1499 {
1500 return symbol_type (token::TOKEN_UDP, std::move (l));
1501 }
1502#else
1503 static
1504 symbol_type
1506 {
1507 return symbol_type (token::TOKEN_UDP, l);
1508 }
1509#endif
1510#if 201103L <= YY_CPLUSPLUS
1511 static
1512 symbol_type
1513 make_TCP (location_type l)
1514 {
1515 return symbol_type (token::TOKEN_TCP, std::move (l));
1516 }
1517#else
1518 static
1519 symbol_type
1521 {
1522 return symbol_type (token::TOKEN_TCP, l);
1523 }
1524#endif
1525#if 201103L <= YY_CPLUSPLUS
1526 static
1527 symbol_type
1528 make_NCR_FORMAT (location_type l)
1529 {
1530 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1531 }
1532#else
1533 static
1534 symbol_type
1536 {
1538 }
1539#endif
1540#if 201103L <= YY_CPLUSPLUS
1541 static
1542 symbol_type
1543 make_JSON (location_type l)
1544 {
1545 return symbol_type (token::TOKEN_JSON, std::move (l));
1546 }
1547#else
1548 static
1549 symbol_type
1551 {
1552 return symbol_type (token::TOKEN_JSON, l);
1553 }
1554#endif
1555#if 201103L <= YY_CPLUSPLUS
1556 static
1557 symbol_type
1558 make_USER_CONTEXT (location_type l)
1559 {
1560 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1561 }
1562#else
1563 static
1564 symbol_type
1566 {
1568 }
1569#endif
1570#if 201103L <= YY_CPLUSPLUS
1571 static
1572 symbol_type
1573 make_COMMENT (location_type l)
1574 {
1575 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1576 }
1577#else
1578 static
1579 symbol_type
1581 {
1583 }
1584#endif
1585#if 201103L <= YY_CPLUSPLUS
1586 static
1587 symbol_type
1588 make_FORWARD_DDNS (location_type l)
1589 {
1590 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1591 }
1592#else
1593 static
1594 symbol_type
1596 {
1598 }
1599#endif
1600#if 201103L <= YY_CPLUSPLUS
1601 static
1602 symbol_type
1603 make_REVERSE_DDNS (location_type l)
1604 {
1605 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1606 }
1607#else
1608 static
1609 symbol_type
1611 {
1613 }
1614#endif
1615#if 201103L <= YY_CPLUSPLUS
1616 static
1617 symbol_type
1618 make_DDNS_DOMAINS (location_type l)
1619 {
1620 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1621 }
1622#else
1623 static
1624 symbol_type
1626 {
1628 }
1629#endif
1630#if 201103L <= YY_CPLUSPLUS
1631 static
1632 symbol_type
1633 make_KEY_NAME (location_type l)
1634 {
1635 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1636 }
1637#else
1638 static
1639 symbol_type
1641 {
1643 }
1644#endif
1645#if 201103L <= YY_CPLUSPLUS
1646 static
1647 symbol_type
1648 make_DNS_SERVERS (location_type l)
1649 {
1650 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1651 }
1652#else
1653 static
1654 symbol_type
1656 {
1658 }
1659#endif
1660#if 201103L <= YY_CPLUSPLUS
1661 static
1662 symbol_type
1663 make_HOSTNAME (location_type l)
1664 {
1665 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1666 }
1667#else
1668 static
1669 symbol_type
1671 {
1673 }
1674#endif
1675#if 201103L <= YY_CPLUSPLUS
1676 static
1677 symbol_type
1678 make_TSIG_KEYS (location_type l)
1679 {
1680 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1681 }
1682#else
1683 static
1684 symbol_type
1686 {
1688 }
1689#endif
1690#if 201103L <= YY_CPLUSPLUS
1691 static
1692 symbol_type
1693 make_ALGORITHM (location_type l)
1694 {
1695 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1696 }
1697#else
1698 static
1699 symbol_type
1701 {
1703 }
1704#endif
1705#if 201103L <= YY_CPLUSPLUS
1706 static
1707 symbol_type
1708 make_DIGEST_BITS (location_type l)
1709 {
1710 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1711 }
1712#else
1713 static
1714 symbol_type
1716 {
1718 }
1719#endif
1720#if 201103L <= YY_CPLUSPLUS
1721 static
1722 symbol_type
1723 make_SECRET (location_type l)
1724 {
1725 return symbol_type (token::TOKEN_SECRET, std::move (l));
1726 }
1727#else
1728 static
1729 symbol_type
1731 {
1732 return symbol_type (token::TOKEN_SECRET, l);
1733 }
1734#endif
1735#if 201103L <= YY_CPLUSPLUS
1736 static
1737 symbol_type
1738 make_SECRET_FILE (location_type l)
1739 {
1740 return symbol_type (token::TOKEN_SECRET_FILE, std::move (l));
1741 }
1742#else
1743 static
1744 symbol_type
1746 {
1748 }
1749#endif
1750#if 201103L <= YY_CPLUSPLUS
1751 static
1752 symbol_type
1753 make_CONTROL_SOCKETS (location_type l)
1754 {
1755 return symbol_type (token::TOKEN_CONTROL_SOCKETS, std::move (l));
1756 }
1757#else
1758 static
1759 symbol_type
1764#endif
1765#if 201103L <= YY_CPLUSPLUS
1766 static
1767 symbol_type
1768 make_SOCKET_TYPE (location_type l)
1769 {
1770 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1771 }
1772#else
1773 static
1774 symbol_type
1776 {
1778 }
1779#endif
1780#if 201103L <= YY_CPLUSPLUS
1781 static
1782 symbol_type
1783 make_UNIX (location_type l)
1784 {
1785 return symbol_type (token::TOKEN_UNIX, std::move (l));
1786 }
1787#else
1788 static
1789 symbol_type
1791 {
1792 return symbol_type (token::TOKEN_UNIX, l);
1793 }
1794#endif
1795#if 201103L <= YY_CPLUSPLUS
1796 static
1797 symbol_type
1798 make_HTTP (location_type l)
1799 {
1800 return symbol_type (token::TOKEN_HTTP, std::move (l));
1801 }
1802#else
1803 static
1804 symbol_type
1806 {
1807 return symbol_type (token::TOKEN_HTTP, l);
1808 }
1809#endif
1810#if 201103L <= YY_CPLUSPLUS
1811 static
1812 symbol_type
1813 make_HTTPS (location_type l)
1814 {
1815 return symbol_type (token::TOKEN_HTTPS, std::move (l));
1816 }
1817#else
1818 static
1819 symbol_type
1821 {
1822 return symbol_type (token::TOKEN_HTTPS, l);
1823 }
1824#endif
1825#if 201103L <= YY_CPLUSPLUS
1826 static
1827 symbol_type
1828 make_SOCKET_NAME (location_type l)
1829 {
1830 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1831 }
1832#else
1833 static
1834 symbol_type
1836 {
1838 }
1839#endif
1840#if 201103L <= YY_CPLUSPLUS
1841 static
1842 symbol_type
1843 make_SOCKET_ADDRESS (location_type l)
1844 {
1845 return symbol_type (token::TOKEN_SOCKET_ADDRESS, std::move (l));
1846 }
1847#else
1848 static
1849 symbol_type
1854#endif
1855#if 201103L <= YY_CPLUSPLUS
1856 static
1857 symbol_type
1858 make_SOCKET_PORT (location_type l)
1859 {
1860 return symbol_type (token::TOKEN_SOCKET_PORT, std::move (l));
1861 }
1862#else
1863 static
1864 symbol_type
1866 {
1868 }
1869#endif
1870#if 201103L <= YY_CPLUSPLUS
1871 static
1872 symbol_type
1873 make_AUTHENTICATION (location_type l)
1874 {
1875 return symbol_type (token::TOKEN_AUTHENTICATION, std::move (l));
1876 }
1877#else
1878 static
1879 symbol_type
1884#endif
1885#if 201103L <= YY_CPLUSPLUS
1886 static
1887 symbol_type
1888 make_TYPE (location_type l)
1889 {
1890 return symbol_type (token::TOKEN_TYPE, std::move (l));
1891 }
1892#else
1893 static
1894 symbol_type
1896 {
1897 return symbol_type (token::TOKEN_TYPE, l);
1898 }
1899#endif
1900#if 201103L <= YY_CPLUSPLUS
1901 static
1902 symbol_type
1903 make_BASIC (location_type l)
1904 {
1905 return symbol_type (token::TOKEN_BASIC, std::move (l));
1906 }
1907#else
1908 static
1909 symbol_type
1911 {
1912 return symbol_type (token::TOKEN_BASIC, l);
1913 }
1914#endif
1915#if 201103L <= YY_CPLUSPLUS
1916 static
1917 symbol_type
1918 make_REALM (location_type l)
1919 {
1920 return symbol_type (token::TOKEN_REALM, std::move (l));
1921 }
1922#else
1923 static
1924 symbol_type
1926 {
1927 return symbol_type (token::TOKEN_REALM, l);
1928 }
1929#endif
1930#if 201103L <= YY_CPLUSPLUS
1931 static
1932 symbol_type
1933 make_DIRECTORY (location_type l)
1934 {
1935 return symbol_type (token::TOKEN_DIRECTORY, std::move (l));
1936 }
1937#else
1938 static
1939 symbol_type
1941 {
1943 }
1944#endif
1945#if 201103L <= YY_CPLUSPLUS
1946 static
1947 symbol_type
1948 make_CLIENTS (location_type l)
1949 {
1950 return symbol_type (token::TOKEN_CLIENTS, std::move (l));
1951 }
1952#else
1953 static
1954 symbol_type
1956 {
1958 }
1959#endif
1960#if 201103L <= YY_CPLUSPLUS
1961 static
1962 symbol_type
1963 make_USER (location_type l)
1964 {
1965 return symbol_type (token::TOKEN_USER, std::move (l));
1966 }
1967#else
1968 static
1969 symbol_type
1971 {
1972 return symbol_type (token::TOKEN_USER, l);
1973 }
1974#endif
1975#if 201103L <= YY_CPLUSPLUS
1976 static
1977 symbol_type
1978 make_USER_FILE (location_type l)
1979 {
1980 return symbol_type (token::TOKEN_USER_FILE, std::move (l));
1981 }
1982#else
1983 static
1984 symbol_type
1986 {
1988 }
1989#endif
1990#if 201103L <= YY_CPLUSPLUS
1991 static
1992 symbol_type
1993 make_PASSWORD (location_type l)
1994 {
1995 return symbol_type (token::TOKEN_PASSWORD, std::move (l));
1996 }
1997#else
1998 static
1999 symbol_type
2001 {
2003 }
2004#endif
2005#if 201103L <= YY_CPLUSPLUS
2006 static
2007 symbol_type
2008 make_PASSWORD_FILE (location_type l)
2009 {
2010 return symbol_type (token::TOKEN_PASSWORD_FILE, std::move (l));
2011 }
2012#else
2013 static
2014 symbol_type
2019#endif
2020#if 201103L <= YY_CPLUSPLUS
2021 static
2022 symbol_type
2023 make_TRUST_ANCHOR (location_type l)
2024 {
2025 return symbol_type (token::TOKEN_TRUST_ANCHOR, std::move (l));
2026 }
2027#else
2028 static
2029 symbol_type
2031 {
2033 }
2034#endif
2035#if 201103L <= YY_CPLUSPLUS
2036 static
2037 symbol_type
2038 make_CERT_FILE (location_type l)
2039 {
2040 return symbol_type (token::TOKEN_CERT_FILE, std::move (l));
2041 }
2042#else
2043 static
2044 symbol_type
2046 {
2048 }
2049#endif
2050#if 201103L <= YY_CPLUSPLUS
2051 static
2052 symbol_type
2053 make_KEY_FILE (location_type l)
2054 {
2055 return symbol_type (token::TOKEN_KEY_FILE, std::move (l));
2056 }
2057#else
2058 static
2059 symbol_type
2061 {
2063 }
2064#endif
2065#if 201103L <= YY_CPLUSPLUS
2066 static
2067 symbol_type
2068 make_CERT_REQUIRED (location_type l)
2069 {
2070 return symbol_type (token::TOKEN_CERT_REQUIRED, std::move (l));
2071 }
2072#else
2073 static
2074 symbol_type
2079#endif
2080#if 201103L <= YY_CPLUSPLUS
2081 static
2082 symbol_type
2083 make_HOOKS_LIBRARIES (location_type l)
2084 {
2085 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
2086 }
2087#else
2088 static
2089 symbol_type
2094#endif
2095#if 201103L <= YY_CPLUSPLUS
2096 static
2097 symbol_type
2098 make_LIBRARY (location_type l)
2099 {
2100 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
2101 }
2102#else
2103 static
2104 symbol_type
2106 {
2108 }
2109#endif
2110#if 201103L <= YY_CPLUSPLUS
2111 static
2112 symbol_type
2113 make_PARAMETERS (location_type l)
2114 {
2115 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
2116 }
2117#else
2118 static
2119 symbol_type
2121 {
2123 }
2124#endif
2125#if 201103L <= YY_CPLUSPLUS
2126 static
2127 symbol_type
2128 make_LOGGERS (location_type l)
2129 {
2130 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
2131 }
2132#else
2133 static
2134 symbol_type
2136 {
2138 }
2139#endif
2140#if 201103L <= YY_CPLUSPLUS
2141 static
2142 symbol_type
2143 make_NAME (location_type l)
2144 {
2145 return symbol_type (token::TOKEN_NAME, std::move (l));
2146 }
2147#else
2148 static
2149 symbol_type
2151 {
2152 return symbol_type (token::TOKEN_NAME, l);
2153 }
2154#endif
2155#if 201103L <= YY_CPLUSPLUS
2156 static
2157 symbol_type
2158 make_OUTPUT_OPTIONS (location_type l)
2159 {
2160 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
2161 }
2162#else
2163 static
2164 symbol_type
2169#endif
2170#if 201103L <= YY_CPLUSPLUS
2171 static
2172 symbol_type
2173 make_OUTPUT (location_type l)
2174 {
2175 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
2176 }
2177#else
2178 static
2179 symbol_type
2181 {
2182 return symbol_type (token::TOKEN_OUTPUT, l);
2183 }
2184#endif
2185#if 201103L <= YY_CPLUSPLUS
2186 static
2187 symbol_type
2188 make_DEBUGLEVEL (location_type l)
2189 {
2190 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
2191 }
2192#else
2193 static
2194 symbol_type
2196 {
2198 }
2199#endif
2200#if 201103L <= YY_CPLUSPLUS
2201 static
2202 symbol_type
2203 make_SEVERITY (location_type l)
2204 {
2205 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
2206 }
2207#else
2208 static
2209 symbol_type
2211 {
2213 }
2214#endif
2215#if 201103L <= YY_CPLUSPLUS
2216 static
2217 symbol_type
2218 make_FLUSH (location_type l)
2219 {
2220 return symbol_type (token::TOKEN_FLUSH, std::move (l));
2221 }
2222#else
2223 static
2224 symbol_type
2226 {
2227 return symbol_type (token::TOKEN_FLUSH, l);
2228 }
2229#endif
2230#if 201103L <= YY_CPLUSPLUS
2231 static
2232 symbol_type
2233 make_MAXSIZE (location_type l)
2234 {
2235 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
2236 }
2237#else
2238 static
2239 symbol_type
2241 {
2243 }
2244#endif
2245#if 201103L <= YY_CPLUSPLUS
2246 static
2247 symbol_type
2248 make_MAXVER (location_type l)
2249 {
2250 return symbol_type (token::TOKEN_MAXVER, std::move (l));
2251 }
2252#else
2253 static
2254 symbol_type
2256 {
2257 return symbol_type (token::TOKEN_MAXVER, l);
2258 }
2259#endif
2260#if 201103L <= YY_CPLUSPLUS
2261 static
2262 symbol_type
2263 make_PATTERN (location_type l)
2264 {
2265 return symbol_type (token::TOKEN_PATTERN, std::move (l));
2266 }
2267#else
2268 static
2269 symbol_type
2271 {
2273 }
2274#endif
2275#if 201103L <= YY_CPLUSPLUS
2276 static
2277 symbol_type
2278 make_TOPLEVEL_JSON (location_type l)
2279 {
2280 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
2281 }
2282#else
2283 static
2284 symbol_type
2289#endif
2290#if 201103L <= YY_CPLUSPLUS
2291 static
2292 symbol_type
2293 make_TOPLEVEL_DHCPDDNS (location_type l)
2294 {
2295 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
2296 }
2297#else
2298 static
2299 symbol_type
2304#endif
2305#if 201103L <= YY_CPLUSPLUS
2306 static
2307 symbol_type
2308 make_SUB_DHCPDDNS (location_type l)
2309 {
2310 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
2311 }
2312#else
2313 static
2314 symbol_type
2316 {
2318 }
2319#endif
2320#if 201103L <= YY_CPLUSPLUS
2321 static
2322 symbol_type
2323 make_SUB_TSIG_KEY (location_type l)
2324 {
2325 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
2326 }
2327#else
2328 static
2329 symbol_type
2331 {
2333 }
2334#endif
2335#if 201103L <= YY_CPLUSPLUS
2336 static
2337 symbol_type
2338 make_SUB_TSIG_KEYS (location_type l)
2339 {
2340 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
2341 }
2342#else
2343 static
2344 symbol_type
2349#endif
2350#if 201103L <= YY_CPLUSPLUS
2351 static
2352 symbol_type
2353 make_SUB_DDNS_DOMAIN (location_type l)
2354 {
2355 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
2356 }
2357#else
2358 static
2359 symbol_type
2364#endif
2365#if 201103L <= YY_CPLUSPLUS
2366 static
2367 symbol_type
2368 make_SUB_DDNS_DOMAINS (location_type l)
2369 {
2370 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
2371 }
2372#else
2373 static
2374 symbol_type
2379#endif
2380#if 201103L <= YY_CPLUSPLUS
2381 static
2382 symbol_type
2383 make_SUB_DNS_SERVER (location_type l)
2384 {
2385 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
2386 }
2387#else
2388 static
2389 symbol_type
2394#endif
2395#if 201103L <= YY_CPLUSPLUS
2396 static
2397 symbol_type
2398 make_SUB_DNS_SERVERS (location_type l)
2399 {
2400 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2401 }
2402#else
2403 static
2404 symbol_type
2409#endif
2410#if 201103L <= YY_CPLUSPLUS
2411 static
2412 symbol_type
2413 make_SUB_HOOKS_LIBRARY (location_type l)
2414 {
2415 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2416 }
2417#else
2418 static
2419 symbol_type
2424#endif
2425#if 201103L <= YY_CPLUSPLUS
2426 static
2427 symbol_type
2428 make_STRING (std::string v, location_type l)
2429 {
2430 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2431 }
2432#else
2433 static
2434 symbol_type
2435 make_STRING (const std::string& v, const location_type& l)
2436 {
2437 return symbol_type (token::TOKEN_STRING, v, l);
2438 }
2439#endif
2440#if 201103L <= YY_CPLUSPLUS
2441 static
2442 symbol_type
2443 make_INTEGER (int64_t v, location_type l)
2444 {
2445 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2446 }
2447#else
2448 static
2449 symbol_type
2450 make_INTEGER (const int64_t& v, const location_type& l)
2451 {
2452 return symbol_type (token::TOKEN_INTEGER, v, l);
2453 }
2454#endif
2455#if 201103L <= YY_CPLUSPLUS
2456 static
2457 symbol_type
2458 make_FLOAT (double v, location_type l)
2459 {
2460 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2461 }
2462#else
2463 static
2464 symbol_type
2465 make_FLOAT (const double& v, const location_type& l)
2466 {
2467 return symbol_type (token::TOKEN_FLOAT, v, l);
2468 }
2469#endif
2470#if 201103L <= YY_CPLUSPLUS
2471 static
2472 symbol_type
2473 make_BOOLEAN (bool v, location_type l)
2474 {
2475 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2476 }
2477#else
2478 static
2479 symbol_type
2480 make_BOOLEAN (const bool& v, const location_type& l)
2481 {
2482 return symbol_type (token::TOKEN_BOOLEAN, v, l);
2483 }
2484#endif
2485
2486
2488 {
2489 public:
2490 context (const D2Parser& yyparser, const symbol_type& yyla);
2491 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
2492 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
2493 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
2494
2498 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
2499
2500 private:
2501 const D2Parser& yyparser_;
2502 const symbol_type& yyla_;
2503 };
2504
2505 private:
2506#if YY_CPLUSPLUS < 201103L
2508 D2Parser (const D2Parser&);
2510 D2Parser& operator= (const D2Parser&);
2511#endif
2512
2513
2515 typedef short state_type;
2516
2518 int yy_syntax_error_arguments_ (const context& yyctx,
2519 symbol_kind_type yyarg[], int yyargn) const;
2520
2523 virtual std::string yysyntax_error_ (const context& yyctx) const;
2527 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
2528
2531 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
2532
2535 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
2536
2537 static const short yypact_ninf_;
2538 static const signed char yytable_ninf_;
2539
2543 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
2544
2546 static std::string yytnamerr_ (const char *yystr);
2547
2549 static const char* const yytname_[];
2550
2551
2552 // Tables.
2553 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2554 // STATE-NUM.
2555 static const short yypact_[];
2556
2557 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2558 // Performed when YYTABLE does not specify something else to do. Zero
2559 // means the default is an error.
2560 static const short yydefact_[];
2561
2562 // YYPGOTO[NTERM-NUM].
2563 static const short yypgoto_[];
2564
2565 // YYDEFGOTO[NTERM-NUM].
2566 static const short yydefgoto_[];
2567
2568 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2569 // positive, shift that token. If negative, reduce the rule whose
2570 // number is the opposite. If YYTABLE_NINF, syntax error.
2571 static const short yytable_[];
2572
2573 static const short yycheck_[];
2574
2575 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2576 // state STATE-NUM.
2577 static const short yystos_[];
2578
2579 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
2580 static const short yyr1_[];
2581
2582 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
2583 static const signed char yyr2_[];
2584
2585
2586#if D2_PARSER_DEBUG
2587 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
2588 static const short yyrline_[];
2590 virtual void yy_reduce_print_ (int r) const;
2592 virtual void yy_stack_print_ () const;
2593
2595 int yydebug_;
2597 std::ostream* yycdebug_;
2598
2602 template <typename Base>
2603 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
2604#endif
2605
2610 template <typename Base>
2611 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
2612
2613 private:
2615 struct by_state
2616 {
2618 by_state () YY_NOEXCEPT;
2619
2621 typedef state_type kind_type;
2622
2624 by_state (kind_type s) YY_NOEXCEPT;
2625
2627 by_state (const by_state& that) YY_NOEXCEPT;
2628
2630 void clear () YY_NOEXCEPT;
2631
2633 void move (by_state& that);
2634
2637 symbol_kind_type kind () const YY_NOEXCEPT;
2638
2641 enum { empty_state = 0 };
2642
2645 state_type state;
2646 };
2647
2649 struct stack_symbol_type : basic_symbol<by_state>
2650 {
2652 typedef basic_symbol<by_state> super_type;
2654 stack_symbol_type ();
2656 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2658 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2659#if YY_CPLUSPLUS < 201103L
2662 stack_symbol_type& operator= (stack_symbol_type& that);
2663
2666 stack_symbol_type& operator= (const stack_symbol_type& that);
2667#endif
2668 };
2669
2671 template <typename T, typename S = std::vector<T> >
2672 class stack
2673 {
2674 public:
2675 // Hide our reversed order.
2676 typedef typename S::iterator iterator;
2677 typedef typename S::const_iterator const_iterator;
2678 typedef typename S::size_type size_type;
2679 typedef typename std::ptrdiff_t index_type;
2680
2681 stack (size_type n = 200) YY_NOEXCEPT
2682 : seq_ (n)
2683 {}
2684
2685#if 201103L <= YY_CPLUSPLUS
2687 stack (const stack&) = delete;
2689 stack& operator= (const stack&) = delete;
2690#endif
2691
2695 const T&
2696 operator[] (index_type i) const
2697 {
2698 return seq_[size_type (size () - 1 - i)];
2699 }
2700
2704 T&
2705 operator[] (index_type i)
2706 {
2707 return seq_[size_type (size () - 1 - i)];
2708 }
2709
2713 void
2714 push (YY_MOVE_REF (T) t)
2715 {
2716 seq_.push_back (T ());
2717 operator[] (0).move (t);
2718 }
2719
2721 void
2722 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2723 {
2724 for (; 0 < n; --n)
2725 seq_.pop_back ();
2726 }
2727
2729 void
2730 clear () YY_NOEXCEPT
2731 {
2732 seq_.clear ();
2733 }
2734
2736 index_type
2737 size () const YY_NOEXCEPT
2738 {
2739 return index_type (seq_.size ());
2740 }
2741
2743 const_iterator
2744 begin () const YY_NOEXCEPT
2745 {
2746 return seq_.begin ();
2747 }
2748
2750 const_iterator
2751 end () const YY_NOEXCEPT
2752 {
2753 return seq_.end ();
2754 }
2755
2757 class slice
2758 {
2759 public:
2760 slice (const stack& stack, index_type range) YY_NOEXCEPT
2761 : stack_ (stack)
2762 , range_ (range)
2763 {}
2764
2765 const T&
2766 operator[] (index_type i) const
2767 {
2768 return stack_[range_ - i];
2769 }
2770
2771 private:
2772 const stack& stack_;
2773 index_type range_;
2774 };
2775
2776 private:
2777#if YY_CPLUSPLUS < 201103L
2779 stack (const stack&);
2781 stack& operator= (const stack&);
2782#endif
2784 S seq_;
2785 };
2786
2787
2789 typedef stack<stack_symbol_type> stack_type;
2790
2792 stack_type yystack_;
2793
2799 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2800
2807 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2808
2810 void yypop_ (int n = 1) YY_NOEXCEPT;
2811
2813 enum
2814 {
2815 yylast_ = 456,
2816 yynnts_ = 196,
2817 yyfinal_ = 22
2818 };
2819
2820
2821 // User arguments.
2823
2824 };
2825
2826 inline
2828 D2Parser::yytranslate_ (int t) YY_NOEXCEPT
2829 {
2830 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2831 // TOKEN-NUM as returned by yylex.
2832 static
2833 const signed char
2834 translate_table[] =
2835 {
2836 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2840 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2861 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2862 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2863 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2864 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2865 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2866 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2867 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2868 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2869 75, 76, 77, 78, 79, 80
2870 };
2871 // Last valid token kind.
2872 const int code_max = 335;
2873
2874 if (t <= 0)
2875 return symbol_kind::S_YYEOF;
2876 else if (t <= code_max)
2877 return static_cast <symbol_kind_type> (translate_table[t]);
2878 else
2880 }
2881
2882 // basic_symbol.
2883 template <typename Base>
2885 : Base (that)
2886 , value ()
2887 , location (that.location)
2888 {
2889 switch (this->kind ())
2890 {
2891 case symbol_kind::S_value: // value
2892 case symbol_kind::S_map_value: // map_value
2893 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2894 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
2895 case symbol_kind::S_auth_type_value: // auth_type_value
2896 value.copy< ElementPtr > (YY_MOVE (that.value));
2897 break;
2898
2899 case symbol_kind::S_BOOLEAN: // "boolean"
2900 value.copy< bool > (YY_MOVE (that.value));
2901 break;
2902
2903 case symbol_kind::S_FLOAT: // "floating point"
2904 value.copy< double > (YY_MOVE (that.value));
2905 break;
2906
2907 case symbol_kind::S_INTEGER: // "integer"
2908 value.copy< int64_t > (YY_MOVE (that.value));
2909 break;
2910
2911 case symbol_kind::S_STRING: // "constant string"
2912 value.copy< std::string > (YY_MOVE (that.value));
2913 break;
2914
2915 default:
2916 break;
2917 }
2918
2919 }
2920
2921
2922
2923
2924 template <typename Base>
2927 {
2928 return this->kind ();
2929 }
2930
2931
2932 template <typename Base>
2933 bool
2935 {
2936 return this->kind () == symbol_kind::S_YYEMPTY;
2937 }
2938
2939 template <typename Base>
2940 void
2942 {
2943 super_type::move (s);
2944 switch (this->kind ())
2945 {
2946 case symbol_kind::S_value: // value
2947 case symbol_kind::S_map_value: // map_value
2948 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2949 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
2950 case symbol_kind::S_auth_type_value: // auth_type_value
2951 value.move< ElementPtr > (YY_MOVE (s.value));
2952 break;
2953
2954 case symbol_kind::S_BOOLEAN: // "boolean"
2955 value.move< bool > (YY_MOVE (s.value));
2956 break;
2957
2958 case symbol_kind::S_FLOAT: // "floating point"
2959 value.move< double > (YY_MOVE (s.value));
2960 break;
2961
2962 case symbol_kind::S_INTEGER: // "integer"
2963 value.move< int64_t > (YY_MOVE (s.value));
2964 break;
2965
2966 case symbol_kind::S_STRING: // "constant string"
2967 value.move< std::string > (YY_MOVE (s.value));
2968 break;
2969
2970 default:
2971 break;
2972 }
2973
2975 }
2976
2977 // by_kind.
2978 inline
2982
2983#if 201103L <= YY_CPLUSPLUS
2984 inline
2986 : kind_ (that.kind_)
2987 {
2988 that.clear ();
2989 }
2990#endif
2991
2992 inline
2994 : kind_ (that.kind_)
2995 {}
2996
2997 inline
2999 : kind_ (yytranslate_ (t))
3000 {}
3001
3002
3003
3004 inline
3005 void
3010
3011 inline
3012 void
3014 {
3015 kind_ = that.kind_;
3016 that.clear ();
3017 }
3018
3019 inline
3022 {
3023 return kind_;
3024 }
3025
3026
3027 inline
3030 {
3031 return this->kind ();
3032 }
3033
3034
3035#line 14 "d2_parser.yy"
3036} } // isc::d2
3037#line 3038 "d2_parser.h"
3038
3039
3040
3041
3042#endif // !YY_D2_PARSER_D2_PARSER_H_INCLUDED
Evaluation context, an interface to the expression evaluation.
context(const D2Parser &yyparser, const symbol_type &yyla)
const symbol_type & lookahead() const YY_NOEXCEPT
Definition d2_parser.h:2491
symbol_kind_type token() const YY_NOEXCEPT
Definition d2_parser.h:2492
const location_type & location() const YY_NOEXCEPT
Definition d2_parser.h:2493
slice(const stack &stack, index_type range) YY_NOEXCEPT
Definition d2_parser.h:2760
A buffer to store and retrieve objects.
Definition d2_parser.h:231
value_type self_type
Type of *this.
Definition d2_parser.h:234
T & emplace(const T &t)
Instantiate a T in here from t.
Definition d2_parser.h:290
T & emplace()
Instantiate an empty T in here.
Definition d2_parser.h:279
T & build()
Instantiate an empty T in here.
Definition d2_parser.h:303
void copy(const self_type &that)
Copy the content of that to this.
Definition d2_parser.h:386
long double yyalign_me_
Strongest alignment constraints.
Definition d2_parser.h:456
T & as() YY_NOEXCEPT
Accessor to a built T.
Definition d2_parser.h:320
value_type(YY_RVREF(T) t)
Construct and fill.
Definition d2_parser.h:244
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
Definition d2_parser.h:331
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
Definition d2_parser.h:259
T & build(const T &t)
Instantiate a T in here from t.
Definition d2_parser.h:312
void destroy()
Destroy the stored T.
Definition d2_parser.h:394
char yyraw_[size]
A buffer large enough to store any of the semantic values.
Definition d2_parser.h:458
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
Definition d2_parser.h:349
void move(self_type &that)
Move the content of that to this.
Definition d2_parser.h:361
value_type() YY_NOEXCEPT
Empty construction.
Definition d2_parser.h:237
A Bison parser.
Definition d2_parser.h:217
static symbol_type make_COMMENT(const location_type &l)
Definition d2_parser.h:1580
static symbol_type make_AUTHENTICATION(const location_type &l)
Definition d2_parser.h:1880
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition d2_parser.h:2435
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition d2_parser.h:876
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition d2_parser.h:2360
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition d2_parser.h:2420
static symbol_type make_LOGGERS(const location_type &l)
Definition d2_parser.h:2135
static symbol_type make_KEY_NAME(const location_type &l)
Definition d2_parser.h:1640
static symbol_type make_PARAMETERS(const location_type &l)
Definition d2_parser.h:2120
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition d2_parser.h:2345
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition d2_parser.h:1595
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
Definition d2_parser.h:2405
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition d2_parser.h:2300
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition d2_parser.h:1775
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:2375
static symbol_type make_TCP(const location_type &l)
Definition d2_parser.h:1520
static symbol_type make_NAME(const location_type &l)
Definition d2_parser.h:2150
location location_type
Symbol locations.
Definition d2_parser.h:470
static symbol_type make_MAXSIZE(const location_type &l)
Definition d2_parser.h:2240
static symbol_type make_PASSWORD_FILE(const location_type &l)
Definition d2_parser.h:2015
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
Definition d2_parser.h:1310
static symbol_type make_HTTPS(const location_type &l)
Definition d2_parser.h:1820
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition d2_parser.h:2165
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition d2_parser.h:1355
static symbol_type make_PASSWORD(const location_type &l)
Definition d2_parser.h:2000
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition d2_parser.h:2195
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition d2_parser.h:1385
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition d2_parser.h:1715
static symbol_type make_SOCKET_ADDRESS(const location_type &l)
Definition d2_parser.h:1850
static symbol_type make_CERT_FILE(const location_type &l)
Definition d2_parser.h:2045
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition d2_parser.h:2285
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition d2_parser.h:1835
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition d2_parser.h:1475
static symbol_type make_NULL_TYPE(const location_type &l)
Definition d2_parser.h:1415
static symbol_type make_LIBRARY(const location_type &l)
Definition d2_parser.h:2105
static symbol_type make_UDP(const location_type &l)
Definition d2_parser.h:1505
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition d2_parser.h:2090
static symbol_type make_COLON(const location_type &l)
Definition d2_parser.h:1340
static symbol_type make_COMMA(const location_type &l)
Definition d2_parser.h:1325
static symbol_type make_SECRET(const location_type &l)
Definition d2_parser.h:1730
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition d2_parser.h:2330
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition d2_parser.h:1400
static symbol_type make_UNIX(const location_type &l)
Definition d2_parser.h:1790
static symbol_type make_OUTPUT(const location_type &l)
Definition d2_parser.h:2180
value_type semantic_type
Backward compatibility (Bison 3.8).
Definition d2_parser.h:467
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
Definition d2_parser.h:2315
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition d2_parser.h:879
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition d2_parser.h:2450
static symbol_type make_DHCPDDNS(const location_type &l)
Definition d2_parser.h:1430
by_kind by_type
Backward compatibility for a private implementation detail (Bison 3.6).
Definition d2_parser.h:1149
static symbol_type make_D2_PARSER_error(const location_type &l)
Definition d2_parser.h:1295
static symbol_type make_CONTROL_SOCKETS(const location_type &l)
Definition d2_parser.h:1760
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition d2_parser.h:2390
static symbol_type make_MAXVER(const location_type &l)
Definition d2_parser.h:2255
static symbol_type make_SECRET_FILE(const location_type &l)
Definition d2_parser.h:1745
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition d2_parser.h:1625
static symbol_type make_SEVERITY(const location_type &l)
Definition d2_parser.h:2210
static symbol_type make_REALM(const location_type &l)
Definition d2_parser.h:1925
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition d2_parser.h:1370
static symbol_type make_HTTP(const location_type &l)
Definition d2_parser.h:1805
static symbol_type make_HOSTNAME(const location_type &l)
Definition d2_parser.h:1670
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition d2_parser.h:1565
static symbol_type make_USER(const location_type &l)
Definition d2_parser.h:1970
static symbol_type make_SOCKET_PORT(const location_type &l)
Definition d2_parser.h:1865
static symbol_type make_BASIC(const location_type &l)
Definition d2_parser.h:1910
static symbol_type make_FLUSH(const location_type &l)
Definition d2_parser.h:2225
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition d2_parser.h:1610
static symbol_type make_PATTERN(const location_type &l)
Definition d2_parser.h:2270
static symbol_type make_KEY_FILE(const location_type &l)
Definition d2_parser.h:2060
static symbol_type make_ALGORITHM(const location_type &l)
Definition d2_parser.h:1700
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition d2_parser.h:583
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition d2_parser.h:1445
static symbol_type make_PORT(const location_type &l)
Definition d2_parser.h:1460
static symbol_type make_CLIENTS(const location_type &l)
Definition d2_parser.h:1955
static symbol_type make_CERT_REQUIRED(const location_type &l)
Definition d2_parser.h:2075
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
static symbol_type make_TYPE(const location_type &l)
Definition d2_parser.h:1895
static symbol_type make_TRUST_ANCHOR(const location_type &l)
Definition d2_parser.h:2030
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition d2_parser.h:2465
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition d2_parser.h:2480
static symbol_type make_DIRECTORY(const location_type &l)
Definition d2_parser.h:1940
static symbol_type make_JSON(const location_type &l)
Definition d2_parser.h:1550
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition d2_parser.h:586
static symbol_type make_END(const location_type &l)
Definition d2_parser.h:1280
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition d2_parser.h:1490
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition d2_parser.h:1655
static symbol_type make_USER_FILE(const location_type &l)
Definition d2_parser.h:1985
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition d2_parser.h:1685
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition d2_parser.h:1535
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:110
#define YY_RVREF(Type)
Definition d2_parser.h:87
#define YY_MOVE_REF(Type)
Definition d2_parser.h:86
#define YY_NOEXCEPT
Definition d2_parser.h:96
#define YY_ATTRIBUTE_PURE
Definition d2_parser.h:118
#define YY_MOVE
Definition d2_parser.h:84
#define YY_NOTHROW
Definition d2_parser.h:97
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
Defines the logger used by the top-level component of kea-lfc.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
Definition d2_parser.h:1081
basic_symbol() YY_NOEXCEPT
Default constructor.
Definition d2_parser.h:894
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
Definition d2_parser.h:990
Base super_type
Alias to Base.
Definition d2_parser.h:891
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
Definition d2_parser.h:1018
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Definition d2_parser.h:949
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
Definition d2_parser.h:1004
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition d2_parser.h:2926
~basic_symbol()
Destroy the symbol.
Definition d2_parser.h:1026
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Definition d2_parser.h:976
basic_symbol(const basic_symbol &that)
Copy constructor.
Definition d2_parser.h:2884
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
Definition d2_parser.h:962
Type access provider for token (enum) based symbols.
Definition d2_parser.h:1110
void clear() YY_NOEXCEPT
Record that this symbol is empty.
Definition d2_parser.h:3006
by_kind() YY_NOEXCEPT
Default constructor.
Definition d2_parser.h:2979
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition d2_parser.h:1112
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition d2_parser.h:3029
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Definition d2_parser.h:3021
void move(by_kind &that)
Steal the symbol kind from that.
Definition d2_parser.h:3013
symbol_kind_type kind_
The symbol kind.
Definition d2_parser.h:1145
@ YYNTOKENS
Number of tokens.
Definition d2_parser.h:593
"External" symbols: returned by the scanner.
Definition d2_parser.h:1153
basic_symbol< by_kind > super_type
Superclass.
Definition d2_parser.h:1155
symbol_type() YY_NOEXCEPT
Empty symbol.
Definition d2_parser.h:1158
syntax_error(const location_type &l, const std::string &m)
Definition d2_parser.h:475
~syntax_error() YY_NOEXCEPT YY_NOTHROW
Definition d2_parser.cc:165
syntax_error(const syntax_error &s)
Definition d2_parser.h:480
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition d2_parser.h:579