Kea 2.6.0
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_SECRET_FILE = 286, // "secret-file"
525 TOKEN_CONTROL_SOCKET = 287, // "control-socket"
526 TOKEN_SOCKET_TYPE = 288, // "socket-type"
527 TOKEN_SOCKET_NAME = 289, // "socket-name"
528 TOKEN_HOOKS_LIBRARIES = 290, // "hooks-libraries"
529 TOKEN_LIBRARY = 291, // "library"
530 TOKEN_PARAMETERS = 292, // "parameters"
531 TOKEN_LOGGERS = 293, // "loggers"
532 TOKEN_NAME = 294, // "name"
533 TOKEN_OUTPUT_OPTIONS = 295, // "output-options"
534 TOKEN_OUTPUT = 296, // "output"
535 TOKEN_DEBUGLEVEL = 297, // "debuglevel"
536 TOKEN_SEVERITY = 298, // "severity"
537 TOKEN_FLUSH = 299, // "flush"
538 TOKEN_MAXSIZE = 300, // "maxsize"
539 TOKEN_MAXVER = 301, // "maxver"
540 TOKEN_PATTERN = 302, // "pattern"
541 TOKEN_TOPLEVEL_JSON = 303, // TOPLEVEL_JSON
542 TOKEN_TOPLEVEL_DHCPDDNS = 304, // TOPLEVEL_DHCPDDNS
543 TOKEN_SUB_DHCPDDNS = 305, // SUB_DHCPDDNS
544 TOKEN_SUB_TSIG_KEY = 306, // SUB_TSIG_KEY
545 TOKEN_SUB_TSIG_KEYS = 307, // SUB_TSIG_KEYS
546 TOKEN_SUB_DDNS_DOMAIN = 308, // SUB_DDNS_DOMAIN
547 TOKEN_SUB_DDNS_DOMAINS = 309, // SUB_DDNS_DOMAINS
548 TOKEN_SUB_DNS_SERVER = 310, // SUB_DNS_SERVER
549 TOKEN_SUB_DNS_SERVERS = 311, // SUB_DNS_SERVERS
550 TOKEN_SUB_HOOKS_LIBRARY = 312, // SUB_HOOKS_LIBRARY
551 TOKEN_STRING = 313, // "constant string"
552 TOKEN_INTEGER = 314, // "integer"
553 TOKEN_FLOAT = 315, // "floating point"
554 TOKEN_BOOLEAN = 316 // "boolean"
555 };
558 };
559
562
565
568 {
570 {
571 YYNTOKENS = 62,
572 S_YYEMPTY = -2,
573 S_YYEOF = 0, // "end of file"
574 S_YYerror = 1, // error
575 S_YYUNDEF = 2, // "invalid token"
576 S_COMMA = 3, // ","
577 S_COLON = 4, // ":"
578 S_LSQUARE_BRACKET = 5, // "["
579 S_RSQUARE_BRACKET = 6, // "]"
580 S_LCURLY_BRACKET = 7, // "{"
581 S_RCURLY_BRACKET = 8, // "}"
582 S_NULL_TYPE = 9, // "null"
583 S_DHCPDDNS = 10, // "DhcpDdns"
584 S_IP_ADDRESS = 11, // "ip-address"
585 S_PORT = 12, // "port"
586 S_DNS_SERVER_TIMEOUT = 13, // "dns-server-timeout"
587 S_NCR_PROTOCOL = 14, // "ncr-protocol"
588 S_UDP = 15, // "UDP"
589 S_TCP = 16, // "TCP"
590 S_NCR_FORMAT = 17, // "ncr-format"
591 S_JSON = 18, // "JSON"
592 S_USER_CONTEXT = 19, // "user-context"
593 S_COMMENT = 20, // "comment"
594 S_FORWARD_DDNS = 21, // "forward-ddns"
595 S_REVERSE_DDNS = 22, // "reverse-ddns"
596 S_DDNS_DOMAINS = 23, // "ddns-domains"
597 S_KEY_NAME = 24, // "key-name"
598 S_DNS_SERVERS = 25, // "dns-servers"
599 S_HOSTNAME = 26, // "hostname"
600 S_TSIG_KEYS = 27, // "tsig-keys"
601 S_ALGORITHM = 28, // "algorithm"
602 S_DIGEST_BITS = 29, // "digest-bits"
603 S_SECRET = 30, // "secret"
604 S_SECRET_FILE = 31, // "secret-file"
605 S_CONTROL_SOCKET = 32, // "control-socket"
606 S_SOCKET_TYPE = 33, // "socket-type"
607 S_SOCKET_NAME = 34, // "socket-name"
608 S_HOOKS_LIBRARIES = 35, // "hooks-libraries"
609 S_LIBRARY = 36, // "library"
610 S_PARAMETERS = 37, // "parameters"
611 S_LOGGERS = 38, // "loggers"
612 S_NAME = 39, // "name"
613 S_OUTPUT_OPTIONS = 40, // "output-options"
614 S_OUTPUT = 41, // "output"
615 S_DEBUGLEVEL = 42, // "debuglevel"
616 S_SEVERITY = 43, // "severity"
617 S_FLUSH = 44, // "flush"
618 S_MAXSIZE = 45, // "maxsize"
619 S_MAXVER = 46, // "maxver"
620 S_PATTERN = 47, // "pattern"
621 S_TOPLEVEL_JSON = 48, // TOPLEVEL_JSON
622 S_TOPLEVEL_DHCPDDNS = 49, // TOPLEVEL_DHCPDDNS
623 S_SUB_DHCPDDNS = 50, // SUB_DHCPDDNS
624 S_SUB_TSIG_KEY = 51, // SUB_TSIG_KEY
625 S_SUB_TSIG_KEYS = 52, // SUB_TSIG_KEYS
626 S_SUB_DDNS_DOMAIN = 53, // SUB_DDNS_DOMAIN
627 S_SUB_DDNS_DOMAINS = 54, // SUB_DDNS_DOMAINS
628 S_SUB_DNS_SERVER = 55, // SUB_DNS_SERVER
629 S_SUB_DNS_SERVERS = 56, // SUB_DNS_SERVERS
630 S_SUB_HOOKS_LIBRARY = 57, // SUB_HOOKS_LIBRARY
631 S_STRING = 58, // "constant string"
632 S_INTEGER = 59, // "integer"
633 S_FLOAT = 60, // "floating point"
634 S_BOOLEAN = 61, // "boolean"
635 S_YYACCEPT = 62, // $accept
636 S_start = 63, // start
637 S_64_1 = 64, // $@1
638 S_65_2 = 65, // $@2
639 S_66_3 = 66, // $@3
640 S_67_4 = 67, // $@4
641 S_68_5 = 68, // $@5
642 S_69_6 = 69, // $@6
643 S_70_7 = 70, // $@7
644 S_71_8 = 71, // $@8
645 S_72_9 = 72, // $@9
646 S_73_10 = 73, // $@10
647 S_value = 74, // value
648 S_sub_json = 75, // sub_json
649 S_map2 = 76, // map2
650 S_77_11 = 77, // $@11
651 S_map_value = 78, // map_value
652 S_map_content = 79, // map_content
653 S_not_empty_map = 80, // not_empty_map
654 S_list_generic = 81, // list_generic
655 S_82_12 = 82, // $@12
656 S_list_content = 83, // list_content
657 S_not_empty_list = 84, // not_empty_list
658 S_unknown_map_entry = 85, // unknown_map_entry
659 S_syntax_map = 86, // syntax_map
660 S_87_13 = 87, // $@13
661 S_global_object = 88, // global_object
662 S_89_14 = 89, // $@14
663 S_global_object_comma = 90, // global_object_comma
664 S_sub_dhcpddns = 91, // sub_dhcpddns
665 S_92_15 = 92, // $@15
666 S_dhcpddns_params = 93, // dhcpddns_params
667 S_dhcpddns_param = 94, // dhcpddns_param
668 S_ip_address = 95, // ip_address
669 S_96_16 = 96, // $@16
670 S_port = 97, // port
671 S_dns_server_timeout = 98, // dns_server_timeout
672 S_ncr_protocol = 99, // ncr_protocol
673 S_100_17 = 100, // $@17
674 S_ncr_protocol_value = 101, // ncr_protocol_value
675 S_ncr_format = 102, // ncr_format
676 S_103_18 = 103, // $@18
677 S_user_context = 104, // user_context
678 S_105_19 = 105, // $@19
679 S_comment = 106, // comment
680 S_107_20 = 107, // $@20
681 S_forward_ddns = 108, // forward_ddns
682 S_109_21 = 109, // $@21
683 S_reverse_ddns = 110, // reverse_ddns
684 S_111_22 = 111, // $@22
685 S_ddns_mgr_params = 112, // ddns_mgr_params
686 S_not_empty_ddns_mgr_params = 113, // not_empty_ddns_mgr_params
687 S_ddns_mgr_param = 114, // ddns_mgr_param
688 S_ddns_domains = 115, // ddns_domains
689 S_116_23 = 116, // $@23
690 S_sub_ddns_domains = 117, // sub_ddns_domains
691 S_118_24 = 118, // $@24
692 S_ddns_domain_list = 119, // ddns_domain_list
693 S_not_empty_ddns_domain_list = 120, // not_empty_ddns_domain_list
694 S_ddns_domain = 121, // ddns_domain
695 S_122_25 = 122, // $@25
696 S_sub_ddns_domain = 123, // sub_ddns_domain
697 S_124_26 = 124, // $@26
698 S_ddns_domain_params = 125, // ddns_domain_params
699 S_ddns_domain_param = 126, // ddns_domain_param
700 S_ddns_domain_name = 127, // ddns_domain_name
701 S_128_27 = 128, // $@27
702 S_ddns_key_name = 129, // ddns_key_name
703 S_130_28 = 130, // $@28
704 S_dns_servers = 131, // dns_servers
705 S_132_29 = 132, // $@29
706 S_sub_dns_servers = 133, // sub_dns_servers
707 S_134_30 = 134, // $@30
708 S_dns_server_list = 135, // dns_server_list
709 S_dns_server = 136, // dns_server
710 S_137_31 = 137, // $@31
711 S_sub_dns_server = 138, // sub_dns_server
712 S_139_32 = 139, // $@32
713 S_dns_server_params = 140, // dns_server_params
714 S_dns_server_param = 141, // dns_server_param
715 S_dns_server_hostname = 142, // dns_server_hostname
716 S_143_33 = 143, // $@33
717 S_dns_server_ip_address = 144, // dns_server_ip_address
718 S_145_34 = 145, // $@34
719 S_dns_server_port = 146, // dns_server_port
720 S_tsig_keys = 147, // tsig_keys
721 S_148_35 = 148, // $@35
722 S_sub_tsig_keys = 149, // sub_tsig_keys
723 S_150_36 = 150, // $@36
724 S_tsig_keys_list = 151, // tsig_keys_list
725 S_not_empty_tsig_keys_list = 152, // not_empty_tsig_keys_list
726 S_tsig_key = 153, // tsig_key
727 S_154_37 = 154, // $@37
728 S_sub_tsig_key = 155, // sub_tsig_key
729 S_156_38 = 156, // $@38
730 S_tsig_key_params = 157, // tsig_key_params
731 S_tsig_key_param = 158, // tsig_key_param
732 S_tsig_key_name = 159, // tsig_key_name
733 S_160_39 = 160, // $@39
734 S_tsig_key_algorithm = 161, // tsig_key_algorithm
735 S_162_40 = 162, // $@40
736 S_tsig_key_digest_bits = 163, // tsig_key_digest_bits
737 S_tsig_key_secret = 164, // tsig_key_secret
738 S_165_41 = 165, // $@41
739 S_tsig_key_secret_file = 166, // tsig_key_secret_file
740 S_167_42 = 167, // $@42
741 S_control_socket = 168, // control_socket
742 S_169_43 = 169, // $@43
743 S_control_socket_params = 170, // control_socket_params
744 S_control_socket_param = 171, // control_socket_param
745 S_control_socket_type = 172, // control_socket_type
746 S_173_44 = 173, // $@44
747 S_control_socket_name = 174, // control_socket_name
748 S_175_45 = 175, // $@45
749 S_hooks_libraries = 176, // hooks_libraries
750 S_177_46 = 177, // $@46
751 S_hooks_libraries_list = 178, // hooks_libraries_list
752 S_not_empty_hooks_libraries_list = 179, // not_empty_hooks_libraries_list
753 S_hooks_library = 180, // hooks_library
754 S_181_47 = 181, // $@47
755 S_sub_hooks_library = 182, // sub_hooks_library
756 S_183_48 = 183, // $@48
757 S_hooks_params = 184, // hooks_params
758 S_hooks_param = 185, // hooks_param
759 S_library = 186, // library
760 S_187_49 = 187, // $@49
761 S_parameters = 188, // parameters
762 S_189_50 = 189, // $@50
763 S_loggers = 190, // loggers
764 S_191_51 = 191, // $@51
765 S_loggers_entries = 192, // loggers_entries
766 S_logger_entry = 193, // logger_entry
767 S_194_52 = 194, // $@52
768 S_logger_params = 195, // logger_params
769 S_logger_param = 196, // logger_param
770 S_name = 197, // name
771 S_198_53 = 198, // $@53
772 S_debuglevel = 199, // debuglevel
773 S_severity = 200, // severity
774 S_201_54 = 201, // $@54
775 S_output_options_list = 202, // output_options_list
776 S_203_55 = 203, // $@55
777 S_output_options_list_content = 204, // output_options_list_content
778 S_output_entry = 205, // output_entry
779 S_206_56 = 206, // $@56
780 S_output_params_list = 207, // output_params_list
781 S_output_params = 208, // output_params
782 S_output = 209, // output
783 S_210_57 = 210, // $@57
784 S_flush = 211, // flush
785 S_maxsize = 212, // maxsize
786 S_maxver = 213, // maxver
787 S_pattern = 214, // pattern
788 S_215_58 = 215 // $@58
789 };
790 };
791
794
797
804 template <typename Base>
805 struct basic_symbol : Base
806 {
808 typedef Base super_type;
809
812 : value ()
813 , location ()
814 {}
815
816#if 201103L <= YY_CPLUSPLUS
819 : Base (std::move (that))
820 , value ()
821 , location (std::move (that.location))
822 {
823 switch (this->kind ())
824 {
825 case symbol_kind::S_value: // value
826 case symbol_kind::S_map_value: // map_value
827 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
828 value.move< ElementPtr > (std::move (that.value));
829 break;
830
831 case symbol_kind::S_BOOLEAN: // "boolean"
832 value.move< bool > (std::move (that.value));
833 break;
834
835 case symbol_kind::S_FLOAT: // "floating point"
836 value.move< double > (std::move (that.value));
837 break;
838
839 case symbol_kind::S_INTEGER: // "integer"
840 value.move< int64_t > (std::move (that.value));
841 break;
842
843 case symbol_kind::S_STRING: // "constant string"
844 value.move< std::string > (std::move (that.value));
845 break;
846
847 default:
848 break;
849 }
850
851 }
852#endif
853
855 basic_symbol (const basic_symbol& that);
856
858#if 201103L <= YY_CPLUSPLUS
859 basic_symbol (typename Base::kind_type t, location_type&& l)
860 : Base (t)
861 , location (std::move (l))
862 {}
863#else
864 basic_symbol (typename Base::kind_type t, const location_type& l)
865 : Base (t)
866 , location (l)
867 {}
868#endif
869
870#if 201103L <= YY_CPLUSPLUS
871 basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
872 : Base (t)
873 , value (std::move (v))
874 , location (std::move (l))
875 {}
876#else
877 basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
878 : Base (t)
879 , value (v)
880 , location (l)
881 {}
882#endif
883
884#if 201103L <= YY_CPLUSPLUS
885 basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
886 : Base (t)
887 , value (std::move (v))
888 , location (std::move (l))
889 {}
890#else
891 basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
892 : Base (t)
893 , value (v)
894 , location (l)
895 {}
896#endif
897
898#if 201103L <= YY_CPLUSPLUS
899 basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
900 : Base (t)
901 , value (std::move (v))
902 , location (std::move (l))
903 {}
904#else
905 basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
906 : Base (t)
907 , value (v)
908 , location (l)
909 {}
910#endif
911
912#if 201103L <= YY_CPLUSPLUS
913 basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
914 : Base (t)
915 , value (std::move (v))
916 , location (std::move (l))
917 {}
918#else
919 basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
920 : Base (t)
921 , value (v)
922 , location (l)
923 {}
924#endif
925
926#if 201103L <= YY_CPLUSPLUS
927 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
928 : Base (t)
929 , value (std::move (v))
930 , location (std::move (l))
931 {}
932#else
933 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
934 : Base (t)
935 , value (v)
936 , location (l)
937 {}
938#endif
939
942 {
943 clear ();
944 }
945
946
947
950 {
951 // User destructor.
952 symbol_kind_type yykind = this->kind ();
953 basic_symbol<Base>& yysym = *this;
954 (void) yysym;
955 switch (yykind)
956 {
957 default:
958 break;
959 }
960
961 // Value type destructor.
962switch (yykind)
963 {
964 case symbol_kind::S_value: // value
965 case symbol_kind::S_map_value: // map_value
966 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
967 value.template destroy< ElementPtr > ();
968 break;
969
970 case symbol_kind::S_BOOLEAN: // "boolean"
971 value.template destroy< bool > ();
972 break;
973
974 case symbol_kind::S_FLOAT: // "floating point"
975 value.template destroy< double > ();
976 break;
977
978 case symbol_kind::S_INTEGER: // "integer"
979 value.template destroy< int64_t > ();
980 break;
981
982 case symbol_kind::S_STRING: // "constant string"
983 value.template destroy< std::string > ();
984 break;
985
986 default:
987 break;
988 }
989
990 Base::clear ();
991 }
992
994 std::string name () const YY_NOEXCEPT
995 {
996 return D2Parser::symbol_name (this->kind ());
997 }
998
1000 symbol_kind_type type_get () const YY_NOEXCEPT;
1001
1003 bool empty () const YY_NOEXCEPT;
1004
1006 void move (basic_symbol& s);
1007
1010
1013
1014 private:
1015#if YY_CPLUSPLUS < 201103L
1017 basic_symbol& operator= (const basic_symbol& that);
1018#endif
1019 };
1020
1022 struct by_kind
1023 {
1026
1029
1030#if 201103L <= YY_CPLUSPLUS
1032 by_kind (by_kind&& that) YY_NOEXCEPT;
1033#endif
1034
1036 by_kind (const by_kind& that) YY_NOEXCEPT;
1037
1040
1041
1042
1044 void clear () YY_NOEXCEPT;
1045
1047 void move (by_kind& that);
1048
1051 symbol_kind_type kind () const YY_NOEXCEPT;
1052
1054 symbol_kind_type type_get () const YY_NOEXCEPT;
1055
1059 };
1060
1063
1066 {
1069
1072
1074#if 201103L <= YY_CPLUSPLUS
1075 symbol_type (int tok, location_type l)
1076 : super_type (token_kind_type (tok), std::move (l))
1077#else
1078 symbol_type (int tok, const location_type& l)
1079 : super_type (token_kind_type (tok), l)
1080#endif
1081 {
1082#if !defined _MSC_VER || defined __clang__
1083 D2_PARSER__ASSERT (tok == token::TOKEN_END
1084 || (token::TOKEN_D2_PARSER_error <= tok && tok <= token::TOKEN_SUB_HOOKS_LIBRARY));
1085#endif
1086 }
1087#if 201103L <= YY_CPLUSPLUS
1088 symbol_type (int tok, bool v, location_type l)
1089 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1090#else
1091 symbol_type (int tok, const bool& v, const location_type& l)
1092 : super_type (token_kind_type (tok), v, l)
1093#endif
1094 {
1095#if !defined _MSC_VER || defined __clang__
1096 D2_PARSER__ASSERT (tok == token::TOKEN_BOOLEAN);
1097#endif
1098 }
1099#if 201103L <= YY_CPLUSPLUS
1100 symbol_type (int tok, double v, location_type l)
1101 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1102#else
1103 symbol_type (int tok, const double& v, const location_type& l)
1104 : super_type (token_kind_type (tok), v, l)
1105#endif
1106 {
1107#if !defined _MSC_VER || defined __clang__
1108 D2_PARSER__ASSERT (tok == token::TOKEN_FLOAT);
1109#endif
1110 }
1111#if 201103L <= YY_CPLUSPLUS
1112 symbol_type (int tok, int64_t v, location_type l)
1113 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1114#else
1115 symbol_type (int tok, const int64_t& v, const location_type& l)
1116 : super_type (token_kind_type (tok), v, l)
1117#endif
1118 {
1119#if !defined _MSC_VER || defined __clang__
1120 D2_PARSER__ASSERT (tok == token::TOKEN_INTEGER);
1121#endif
1122 }
1123#if 201103L <= YY_CPLUSPLUS
1124 symbol_type (int tok, std::string v, location_type l)
1125 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1126#else
1127 symbol_type (int tok, const std::string& v, const location_type& l)
1128 : super_type (token_kind_type (tok), v, l)
1129#endif
1130 {
1131#if !defined _MSC_VER || defined __clang__
1132 D2_PARSER__ASSERT (tok == token::TOKEN_STRING);
1133#endif
1134 }
1135 };
1136
1139 virtual ~D2Parser ();
1140
1141#if 201103L <= YY_CPLUSPLUS
1143 D2Parser (const D2Parser&) = delete;
1145 D2Parser& operator= (const D2Parser&) = delete;
1146#endif
1147
1150 int operator() ();
1151
1154 virtual int parse ();
1155
1156#if D2_PARSER_DEBUG
1158 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1160 void set_debug_stream (std::ostream &);
1161
1163 typedef int debug_level_type;
1165 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1167 void set_debug_level (debug_level_type l);
1168#endif
1169
1173 virtual void error (const location_type& loc, const std::string& msg);
1174
1176 void error (const syntax_error& err);
1177
1180 static std::string symbol_name (symbol_kind_type yysymbol);
1181
1182 // Implementation of make_symbol for each token kind.
1183#if 201103L <= YY_CPLUSPLUS
1184 static
1185 symbol_type
1186 make_END (location_type l)
1187 {
1188 return symbol_type (token::TOKEN_END, std::move (l));
1189 }
1190#else
1191 static
1192 symbol_type
1194 {
1195 return symbol_type (token::TOKEN_END, l);
1196 }
1197#endif
1198#if 201103L <= YY_CPLUSPLUS
1199 static
1200 symbol_type
1201 make_D2_PARSER_error (location_type l)
1202 {
1203 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1204 }
1205#else
1206 static
1207 symbol_type
1209 {
1210 return symbol_type (token::TOKEN_D2_PARSER_error, l);
1211 }
1212#endif
1213#if 201103L <= YY_CPLUSPLUS
1214 static
1215 symbol_type
1216 make_D2_PARSER_UNDEF (location_type l)
1217 {
1218 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1219 }
1220#else
1221 static
1222 symbol_type
1224 {
1225 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, l);
1226 }
1227#endif
1228#if 201103L <= YY_CPLUSPLUS
1229 static
1230 symbol_type
1231 make_COMMA (location_type l)
1232 {
1233 return symbol_type (token::TOKEN_COMMA, std::move (l));
1234 }
1235#else
1236 static
1237 symbol_type
1239 {
1240 return symbol_type (token::TOKEN_COMMA, l);
1241 }
1242#endif
1243#if 201103L <= YY_CPLUSPLUS
1244 static
1245 symbol_type
1246 make_COLON (location_type l)
1247 {
1248 return symbol_type (token::TOKEN_COLON, std::move (l));
1249 }
1250#else
1251 static
1252 symbol_type
1254 {
1255 return symbol_type (token::TOKEN_COLON, l);
1256 }
1257#endif
1258#if 201103L <= YY_CPLUSPLUS
1259 static
1260 symbol_type
1261 make_LSQUARE_BRACKET (location_type l)
1262 {
1263 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1264 }
1265#else
1266 static
1267 symbol_type
1269 {
1270 return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
1271 }
1272#endif
1273#if 201103L <= YY_CPLUSPLUS
1274 static
1275 symbol_type
1276 make_RSQUARE_BRACKET (location_type l)
1277 {
1278 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1279 }
1280#else
1281 static
1282 symbol_type
1284 {
1285 return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
1286 }
1287#endif
1288#if 201103L <= YY_CPLUSPLUS
1289 static
1290 symbol_type
1291 make_LCURLY_BRACKET (location_type l)
1292 {
1293 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1294 }
1295#else
1296 static
1297 symbol_type
1299 {
1300 return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
1301 }
1302#endif
1303#if 201103L <= YY_CPLUSPLUS
1304 static
1305 symbol_type
1306 make_RCURLY_BRACKET (location_type l)
1307 {
1308 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1309 }
1310#else
1311 static
1312 symbol_type
1314 {
1315 return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
1316 }
1317#endif
1318#if 201103L <= YY_CPLUSPLUS
1319 static
1320 symbol_type
1321 make_NULL_TYPE (location_type l)
1322 {
1323 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1324 }
1325#else
1326 static
1327 symbol_type
1329 {
1330 return symbol_type (token::TOKEN_NULL_TYPE, l);
1331 }
1332#endif
1333#if 201103L <= YY_CPLUSPLUS
1334 static
1335 symbol_type
1336 make_DHCPDDNS (location_type l)
1337 {
1338 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1339 }
1340#else
1341 static
1342 symbol_type
1344 {
1345 return symbol_type (token::TOKEN_DHCPDDNS, l);
1346 }
1347#endif
1348#if 201103L <= YY_CPLUSPLUS
1349 static
1350 symbol_type
1351 make_IP_ADDRESS (location_type l)
1352 {
1353 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1354 }
1355#else
1356 static
1357 symbol_type
1359 {
1360 return symbol_type (token::TOKEN_IP_ADDRESS, l);
1361 }
1362#endif
1363#if 201103L <= YY_CPLUSPLUS
1364 static
1365 symbol_type
1366 make_PORT (location_type l)
1367 {
1368 return symbol_type (token::TOKEN_PORT, std::move (l));
1369 }
1370#else
1371 static
1372 symbol_type
1374 {
1375 return symbol_type (token::TOKEN_PORT, l);
1376 }
1377#endif
1378#if 201103L <= YY_CPLUSPLUS
1379 static
1380 symbol_type
1381 make_DNS_SERVER_TIMEOUT (location_type l)
1382 {
1383 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1384 }
1385#else
1386 static
1387 symbol_type
1389 {
1390 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l);
1391 }
1392#endif
1393#if 201103L <= YY_CPLUSPLUS
1394 static
1395 symbol_type
1396 make_NCR_PROTOCOL (location_type l)
1397 {
1398 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1399 }
1400#else
1401 static
1402 symbol_type
1404 {
1405 return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
1406 }
1407#endif
1408#if 201103L <= YY_CPLUSPLUS
1409 static
1410 symbol_type
1411 make_UDP (location_type l)
1412 {
1413 return symbol_type (token::TOKEN_UDP, std::move (l));
1414 }
1415#else
1416 static
1417 symbol_type
1419 {
1420 return symbol_type (token::TOKEN_UDP, l);
1421 }
1422#endif
1423#if 201103L <= YY_CPLUSPLUS
1424 static
1425 symbol_type
1426 make_TCP (location_type l)
1427 {
1428 return symbol_type (token::TOKEN_TCP, std::move (l));
1429 }
1430#else
1431 static
1432 symbol_type
1434 {
1435 return symbol_type (token::TOKEN_TCP, l);
1436 }
1437#endif
1438#if 201103L <= YY_CPLUSPLUS
1439 static
1440 symbol_type
1441 make_NCR_FORMAT (location_type l)
1442 {
1443 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1444 }
1445#else
1446 static
1447 symbol_type
1449 {
1450 return symbol_type (token::TOKEN_NCR_FORMAT, l);
1451 }
1452#endif
1453#if 201103L <= YY_CPLUSPLUS
1454 static
1455 symbol_type
1456 make_JSON (location_type l)
1457 {
1458 return symbol_type (token::TOKEN_JSON, std::move (l));
1459 }
1460#else
1461 static
1462 symbol_type
1464 {
1465 return symbol_type (token::TOKEN_JSON, l);
1466 }
1467#endif
1468#if 201103L <= YY_CPLUSPLUS
1469 static
1470 symbol_type
1471 make_USER_CONTEXT (location_type l)
1472 {
1473 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1474 }
1475#else
1476 static
1477 symbol_type
1479 {
1480 return symbol_type (token::TOKEN_USER_CONTEXT, l);
1481 }
1482#endif
1483#if 201103L <= YY_CPLUSPLUS
1484 static
1485 symbol_type
1486 make_COMMENT (location_type l)
1487 {
1488 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1489 }
1490#else
1491 static
1492 symbol_type
1494 {
1495 return symbol_type (token::TOKEN_COMMENT, l);
1496 }
1497#endif
1498#if 201103L <= YY_CPLUSPLUS
1499 static
1500 symbol_type
1501 make_FORWARD_DDNS (location_type l)
1502 {
1503 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1504 }
1505#else
1506 static
1507 symbol_type
1509 {
1510 return symbol_type (token::TOKEN_FORWARD_DDNS, l);
1511 }
1512#endif
1513#if 201103L <= YY_CPLUSPLUS
1514 static
1515 symbol_type
1516 make_REVERSE_DDNS (location_type l)
1517 {
1518 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1519 }
1520#else
1521 static
1522 symbol_type
1524 {
1525 return symbol_type (token::TOKEN_REVERSE_DDNS, l);
1526 }
1527#endif
1528#if 201103L <= YY_CPLUSPLUS
1529 static
1530 symbol_type
1531 make_DDNS_DOMAINS (location_type l)
1532 {
1533 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1534 }
1535#else
1536 static
1537 symbol_type
1539 {
1540 return symbol_type (token::TOKEN_DDNS_DOMAINS, l);
1541 }
1542#endif
1543#if 201103L <= YY_CPLUSPLUS
1544 static
1545 symbol_type
1546 make_KEY_NAME (location_type l)
1547 {
1548 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1549 }
1550#else
1551 static
1552 symbol_type
1554 {
1555 return symbol_type (token::TOKEN_KEY_NAME, l);
1556 }
1557#endif
1558#if 201103L <= YY_CPLUSPLUS
1559 static
1560 symbol_type
1561 make_DNS_SERVERS (location_type l)
1562 {
1563 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1564 }
1565#else
1566 static
1567 symbol_type
1569 {
1570 return symbol_type (token::TOKEN_DNS_SERVERS, l);
1571 }
1572#endif
1573#if 201103L <= YY_CPLUSPLUS
1574 static
1575 symbol_type
1576 make_HOSTNAME (location_type l)
1577 {
1578 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1579 }
1580#else
1581 static
1582 symbol_type
1584 {
1585 return symbol_type (token::TOKEN_HOSTNAME, l);
1586 }
1587#endif
1588#if 201103L <= YY_CPLUSPLUS
1589 static
1590 symbol_type
1591 make_TSIG_KEYS (location_type l)
1592 {
1593 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1594 }
1595#else
1596 static
1597 symbol_type
1599 {
1600 return symbol_type (token::TOKEN_TSIG_KEYS, l);
1601 }
1602#endif
1603#if 201103L <= YY_CPLUSPLUS
1604 static
1605 symbol_type
1606 make_ALGORITHM (location_type l)
1607 {
1608 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1609 }
1610#else
1611 static
1612 symbol_type
1614 {
1615 return symbol_type (token::TOKEN_ALGORITHM, l);
1616 }
1617#endif
1618#if 201103L <= YY_CPLUSPLUS
1619 static
1620 symbol_type
1621 make_DIGEST_BITS (location_type l)
1622 {
1623 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1624 }
1625#else
1626 static
1627 symbol_type
1629 {
1630 return symbol_type (token::TOKEN_DIGEST_BITS, l);
1631 }
1632#endif
1633#if 201103L <= YY_CPLUSPLUS
1634 static
1635 symbol_type
1636 make_SECRET (location_type l)
1637 {
1638 return symbol_type (token::TOKEN_SECRET, std::move (l));
1639 }
1640#else
1641 static
1642 symbol_type
1644 {
1645 return symbol_type (token::TOKEN_SECRET, l);
1646 }
1647#endif
1648#if 201103L <= YY_CPLUSPLUS
1649 static
1650 symbol_type
1651 make_SECRET_FILE (location_type l)
1652 {
1653 return symbol_type (token::TOKEN_SECRET_FILE, std::move (l));
1654 }
1655#else
1656 static
1657 symbol_type
1659 {
1660 return symbol_type (token::TOKEN_SECRET_FILE, l);
1661 }
1662#endif
1663#if 201103L <= YY_CPLUSPLUS
1664 static
1665 symbol_type
1666 make_CONTROL_SOCKET (location_type l)
1667 {
1668 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1669 }
1670#else
1671 static
1672 symbol_type
1674 {
1675 return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
1676 }
1677#endif
1678#if 201103L <= YY_CPLUSPLUS
1679 static
1680 symbol_type
1681 make_SOCKET_TYPE (location_type l)
1682 {
1683 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1684 }
1685#else
1686 static
1687 symbol_type
1689 {
1690 return symbol_type (token::TOKEN_SOCKET_TYPE, l);
1691 }
1692#endif
1693#if 201103L <= YY_CPLUSPLUS
1694 static
1695 symbol_type
1696 make_SOCKET_NAME (location_type l)
1697 {
1698 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1699 }
1700#else
1701 static
1702 symbol_type
1704 {
1705 return symbol_type (token::TOKEN_SOCKET_NAME, l);
1706 }
1707#endif
1708#if 201103L <= YY_CPLUSPLUS
1709 static
1710 symbol_type
1711 make_HOOKS_LIBRARIES (location_type l)
1712 {
1713 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1714 }
1715#else
1716 static
1717 symbol_type
1719 {
1720 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
1721 }
1722#endif
1723#if 201103L <= YY_CPLUSPLUS
1724 static
1725 symbol_type
1726 make_LIBRARY (location_type l)
1727 {
1728 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1729 }
1730#else
1731 static
1732 symbol_type
1734 {
1735 return symbol_type (token::TOKEN_LIBRARY, l);
1736 }
1737#endif
1738#if 201103L <= YY_CPLUSPLUS
1739 static
1740 symbol_type
1741 make_PARAMETERS (location_type l)
1742 {
1743 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1744 }
1745#else
1746 static
1747 symbol_type
1749 {
1750 return symbol_type (token::TOKEN_PARAMETERS, l);
1751 }
1752#endif
1753#if 201103L <= YY_CPLUSPLUS
1754 static
1755 symbol_type
1756 make_LOGGERS (location_type l)
1757 {
1758 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1759 }
1760#else
1761 static
1762 symbol_type
1764 {
1765 return symbol_type (token::TOKEN_LOGGERS, l);
1766 }
1767#endif
1768#if 201103L <= YY_CPLUSPLUS
1769 static
1770 symbol_type
1771 make_NAME (location_type l)
1772 {
1773 return symbol_type (token::TOKEN_NAME, std::move (l));
1774 }
1775#else
1776 static
1777 symbol_type
1779 {
1780 return symbol_type (token::TOKEN_NAME, l);
1781 }
1782#endif
1783#if 201103L <= YY_CPLUSPLUS
1784 static
1785 symbol_type
1786 make_OUTPUT_OPTIONS (location_type l)
1787 {
1788 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1789 }
1790#else
1791 static
1792 symbol_type
1794 {
1795 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
1796 }
1797#endif
1798#if 201103L <= YY_CPLUSPLUS
1799 static
1800 symbol_type
1801 make_OUTPUT (location_type l)
1802 {
1803 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1804 }
1805#else
1806 static
1807 symbol_type
1809 {
1810 return symbol_type (token::TOKEN_OUTPUT, l);
1811 }
1812#endif
1813#if 201103L <= YY_CPLUSPLUS
1814 static
1815 symbol_type
1816 make_DEBUGLEVEL (location_type l)
1817 {
1818 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1819 }
1820#else
1821 static
1822 symbol_type
1824 {
1825 return symbol_type (token::TOKEN_DEBUGLEVEL, l);
1826 }
1827#endif
1828#if 201103L <= YY_CPLUSPLUS
1829 static
1830 symbol_type
1831 make_SEVERITY (location_type l)
1832 {
1833 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1834 }
1835#else
1836 static
1837 symbol_type
1839 {
1840 return symbol_type (token::TOKEN_SEVERITY, l);
1841 }
1842#endif
1843#if 201103L <= YY_CPLUSPLUS
1844 static
1845 symbol_type
1846 make_FLUSH (location_type l)
1847 {
1848 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1849 }
1850#else
1851 static
1852 symbol_type
1854 {
1855 return symbol_type (token::TOKEN_FLUSH, l);
1856 }
1857#endif
1858#if 201103L <= YY_CPLUSPLUS
1859 static
1860 symbol_type
1861 make_MAXSIZE (location_type l)
1862 {
1863 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1864 }
1865#else
1866 static
1867 symbol_type
1869 {
1870 return symbol_type (token::TOKEN_MAXSIZE, l);
1871 }
1872#endif
1873#if 201103L <= YY_CPLUSPLUS
1874 static
1875 symbol_type
1876 make_MAXVER (location_type l)
1877 {
1878 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1879 }
1880#else
1881 static
1882 symbol_type
1884 {
1885 return symbol_type (token::TOKEN_MAXVER, l);
1886 }
1887#endif
1888#if 201103L <= YY_CPLUSPLUS
1889 static
1890 symbol_type
1891 make_PATTERN (location_type l)
1892 {
1893 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1894 }
1895#else
1896 static
1897 symbol_type
1899 {
1900 return symbol_type (token::TOKEN_PATTERN, l);
1901 }
1902#endif
1903#if 201103L <= YY_CPLUSPLUS
1904 static
1905 symbol_type
1906 make_TOPLEVEL_JSON (location_type l)
1907 {
1908 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1909 }
1910#else
1911 static
1912 symbol_type
1914 {
1915 return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
1916 }
1917#endif
1918#if 201103L <= YY_CPLUSPLUS
1919 static
1920 symbol_type
1921 make_TOPLEVEL_DHCPDDNS (location_type l)
1922 {
1923 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1924 }
1925#else
1926 static
1927 symbol_type
1929 {
1930 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l);
1931 }
1932#endif
1933#if 201103L <= YY_CPLUSPLUS
1934 static
1935 symbol_type
1936 make_SUB_DHCPDDNS (location_type l)
1937 {
1938 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1939 }
1940#else
1941 static
1942 symbol_type
1944 {
1945 return symbol_type (token::TOKEN_SUB_DHCPDDNS, l);
1946 }
1947#endif
1948#if 201103L <= YY_CPLUSPLUS
1949 static
1950 symbol_type
1951 make_SUB_TSIG_KEY (location_type l)
1952 {
1953 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1954 }
1955#else
1956 static
1957 symbol_type
1959 {
1960 return symbol_type (token::TOKEN_SUB_TSIG_KEY, l);
1961 }
1962#endif
1963#if 201103L <= YY_CPLUSPLUS
1964 static
1965 symbol_type
1966 make_SUB_TSIG_KEYS (location_type l)
1967 {
1968 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1969 }
1970#else
1971 static
1972 symbol_type
1974 {
1975 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l);
1976 }
1977#endif
1978#if 201103L <= YY_CPLUSPLUS
1979 static
1980 symbol_type
1981 make_SUB_DDNS_DOMAIN (location_type l)
1982 {
1983 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1984 }
1985#else
1986 static
1987 symbol_type
1989 {
1990 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l);
1991 }
1992#endif
1993#if 201103L <= YY_CPLUSPLUS
1994 static
1995 symbol_type
1996 make_SUB_DDNS_DOMAINS (location_type l)
1997 {
1998 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
1999 }
2000#else
2001 static
2002 symbol_type
2004 {
2005 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l);
2006 }
2007#endif
2008#if 201103L <= YY_CPLUSPLUS
2009 static
2010 symbol_type
2011 make_SUB_DNS_SERVER (location_type l)
2012 {
2013 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
2014 }
2015#else
2016 static
2017 symbol_type
2019 {
2020 return symbol_type (token::TOKEN_SUB_DNS_SERVER, l);
2021 }
2022#endif
2023#if 201103L <= YY_CPLUSPLUS
2024 static
2025 symbol_type
2026 make_SUB_DNS_SERVERS (location_type l)
2027 {
2028 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2029 }
2030#else
2031 static
2032 symbol_type
2034 {
2035 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l);
2036 }
2037#endif
2038#if 201103L <= YY_CPLUSPLUS
2039 static
2040 symbol_type
2041 make_SUB_HOOKS_LIBRARY (location_type l)
2042 {
2043 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2044 }
2045#else
2046 static
2047 symbol_type
2049 {
2050 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
2051 }
2052#endif
2053#if 201103L <= YY_CPLUSPLUS
2054 static
2055 symbol_type
2056 make_STRING (std::string v, location_type l)
2057 {
2058 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2059 }
2060#else
2061 static
2062 symbol_type
2063 make_STRING (const std::string& v, const location_type& l)
2064 {
2065 return symbol_type (token::TOKEN_STRING, v, l);
2066 }
2067#endif
2068#if 201103L <= YY_CPLUSPLUS
2069 static
2070 symbol_type
2071 make_INTEGER (int64_t v, location_type l)
2072 {
2073 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2074 }
2075#else
2076 static
2077 symbol_type
2078 make_INTEGER (const int64_t& v, const location_type& l)
2079 {
2080 return symbol_type (token::TOKEN_INTEGER, v, l);
2081 }
2082#endif
2083#if 201103L <= YY_CPLUSPLUS
2084 static
2085 symbol_type
2086 make_FLOAT (double v, location_type l)
2087 {
2088 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2089 }
2090#else
2091 static
2092 symbol_type
2093 make_FLOAT (const double& v, const location_type& l)
2094 {
2095 return symbol_type (token::TOKEN_FLOAT, v, l);
2096 }
2097#endif
2098#if 201103L <= YY_CPLUSPLUS
2099 static
2100 symbol_type
2101 make_BOOLEAN (bool v, location_type l)
2102 {
2103 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2104 }
2105#else
2106 static
2107 symbol_type
2108 make_BOOLEAN (const bool& v, const location_type& l)
2109 {
2110 return symbol_type (token::TOKEN_BOOLEAN, v, l);
2111 }
2112#endif
2113
2114
2116 {
2117 public:
2118 context (const D2Parser& yyparser, const symbol_type& yyla);
2119 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
2120 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
2121 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
2122
2126 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
2127
2128 private:
2129 const D2Parser& yyparser_;
2130 const symbol_type& yyla_;
2131 };
2132
2133 private:
2134#if YY_CPLUSPLUS < 201103L
2136 D2Parser (const D2Parser&);
2138 D2Parser& operator= (const D2Parser&);
2139#endif
2140
2141
2143 typedef short state_type;
2144
2146 int yy_syntax_error_arguments_ (const context& yyctx,
2147 symbol_kind_type yyarg[], int yyargn) const;
2148
2151 virtual std::string yysyntax_error_ (const context& yyctx) const;
2155 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
2156
2159 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
2160
2163 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
2164
2165 static const short yypact_ninf_;
2166 static const signed char yytable_ninf_;
2167
2171 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
2172
2174 static std::string yytnamerr_ (const char *yystr);
2175
2177 static const char* const yytname_[];
2178
2179
2180 // Tables.
2181 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2182 // STATE-NUM.
2183 static const short yypact_[];
2184
2185 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2186 // Performed when YYTABLE does not specify something else to do. Zero
2187 // means the default is an error.
2188 static const short yydefact_[];
2189
2190 // YYPGOTO[NTERM-NUM].
2191 static const short yypgoto_[];
2192
2193 // YYDEFGOTO[NTERM-NUM].
2194 static const short yydefgoto_[];
2195
2196 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2197 // positive, shift that token. If negative, reduce the rule whose
2198 // number is the opposite. If YYTABLE_NINF, syntax error.
2199 static const short yytable_[];
2200
2201 static const short yycheck_[];
2202
2203 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2204 // state STATE-NUM.
2205 static const unsigned char yystos_[];
2206
2207 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
2208 static const unsigned char yyr1_[];
2209
2210 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
2211 static const signed char yyr2_[];
2212
2213
2214#if D2_PARSER_DEBUG
2215 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
2216 static const short yyrline_[];
2218 virtual void yy_reduce_print_ (int r) const;
2220 virtual void yy_stack_print_ () const;
2221
2223 int yydebug_;
2225 std::ostream* yycdebug_;
2226
2230 template <typename Base>
2231 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
2232#endif
2233
2238 template <typename Base>
2239 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
2240
2241 private:
2243 struct by_state
2244 {
2246 by_state () YY_NOEXCEPT;
2247
2249 typedef state_type kind_type;
2250
2252 by_state (kind_type s) YY_NOEXCEPT;
2253
2255 by_state (const by_state& that) YY_NOEXCEPT;
2256
2258 void clear () YY_NOEXCEPT;
2259
2261 void move (by_state& that);
2262
2265 symbol_kind_type kind () const YY_NOEXCEPT;
2266
2269 enum { empty_state = 0 };
2270
2273 state_type state;
2274 };
2275
2277 struct stack_symbol_type : basic_symbol<by_state>
2278 {
2280 typedef basic_symbol<by_state> super_type;
2282 stack_symbol_type ();
2284 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2286 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2287#if YY_CPLUSPLUS < 201103L
2290 stack_symbol_type& operator= (stack_symbol_type& that);
2291
2294 stack_symbol_type& operator= (const stack_symbol_type& that);
2295#endif
2296 };
2297
2299 template <typename T, typename S = std::vector<T> >
2300 class stack
2301 {
2302 public:
2303 // Hide our reversed order.
2304 typedef typename S::iterator iterator;
2305 typedef typename S::const_iterator const_iterator;
2306 typedef typename S::size_type size_type;
2307 typedef typename std::ptrdiff_t index_type;
2308
2309 stack (size_type n = 200) YY_NOEXCEPT
2310 : seq_ (n)
2311 {}
2312
2313#if 201103L <= YY_CPLUSPLUS
2315 stack (const stack&) = delete;
2317 stack& operator= (const stack&) = delete;
2318#endif
2319
2323 const T&
2324 operator[] (index_type i) const
2325 {
2326 return seq_[size_type (size () - 1 - i)];
2327 }
2328
2332 T&
2333 operator[] (index_type i)
2334 {
2335 return seq_[size_type (size () - 1 - i)];
2336 }
2337
2341 void
2342 push (YY_MOVE_REF (T) t)
2343 {
2344 seq_.push_back (T ());
2345 operator[] (0).move (t);
2346 }
2347
2349 void
2350 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2351 {
2352 for (; 0 < n; --n)
2353 seq_.pop_back ();
2354 }
2355
2357 void
2358 clear () YY_NOEXCEPT
2359 {
2360 seq_.clear ();
2361 }
2362
2364 index_type
2365 size () const YY_NOEXCEPT
2366 {
2367 return index_type (seq_.size ());
2368 }
2369
2371 const_iterator
2372 begin () const YY_NOEXCEPT
2373 {
2374 return seq_.begin ();
2375 }
2376
2378 const_iterator
2379 end () const YY_NOEXCEPT
2380 {
2381 return seq_.end ();
2382 }
2383
2385 class slice
2386 {
2387 public:
2388 slice (const stack& stack, index_type range) YY_NOEXCEPT
2389 : stack_ (stack)
2390 , range_ (range)
2391 {}
2392
2393 const T&
2394 operator[] (index_type i) const
2395 {
2396 return stack_[range_ - i];
2397 }
2398
2399 private:
2400 const stack& stack_;
2401 index_type range_;
2402 };
2403
2404 private:
2405#if YY_CPLUSPLUS < 201103L
2407 stack (const stack&);
2409 stack& operator= (const stack&);
2410#endif
2412 S seq_;
2413 };
2414
2415
2417 typedef stack<stack_symbol_type> stack_type;
2418
2420 stack_type yystack_;
2421
2427 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2428
2435 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2436
2438 void yypop_ (int n = 1) YY_NOEXCEPT;
2439
2441 enum
2442 {
2443 yylast_ = 312,
2444 yynnts_ = 154,
2445 yyfinal_ = 22
2446 };
2447
2448
2449 // User arguments.
2451
2452 };
2453
2454 inline
2456 D2Parser::yytranslate_ (int t) YY_NOEXCEPT
2457 {
2458 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2459 // TOKEN-NUM as returned by yylex.
2460 static
2461 const signed char
2462 translate_table[] =
2463 {
2464 0, 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, 2, 2, 2, 2,
2471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2489 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2490 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2491 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2492 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2493 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2494 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2495 55, 56, 57, 58, 59, 60, 61
2496 };
2497 // Last valid token kind.
2498 const int code_max = 316;
2499
2500 if (t <= 0)
2501 return symbol_kind::S_YYEOF;
2502 else if (t <= code_max)
2503 return static_cast <symbol_kind_type> (translate_table[t]);
2504 else
2506 }
2507
2508 // basic_symbol.
2509 template <typename Base>
2511 : Base (that)
2512 , value ()
2513 , location (that.location)
2514 {
2515 switch (this->kind ())
2516 {
2517 case symbol_kind::S_value: // value
2518 case symbol_kind::S_map_value: // map_value
2519 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2520 value.copy< ElementPtr > (YY_MOVE (that.value));
2521 break;
2522
2523 case symbol_kind::S_BOOLEAN: // "boolean"
2524 value.copy< bool > (YY_MOVE (that.value));
2525 break;
2526
2527 case symbol_kind::S_FLOAT: // "floating point"
2528 value.copy< double > (YY_MOVE (that.value));
2529 break;
2530
2531 case symbol_kind::S_INTEGER: // "integer"
2532 value.copy< int64_t > (YY_MOVE (that.value));
2533 break;
2534
2535 case symbol_kind::S_STRING: // "constant string"
2536 value.copy< std::string > (YY_MOVE (that.value));
2537 break;
2538
2539 default:
2540 break;
2541 }
2542
2543 }
2544
2545
2546
2547
2548 template <typename Base>
2551 {
2552 return this->kind ();
2553 }
2554
2555
2556 template <typename Base>
2557 bool
2559 {
2560 return this->kind () == symbol_kind::S_YYEMPTY;
2561 }
2562
2563 template <typename Base>
2564 void
2566 {
2567 super_type::move (s);
2568 switch (this->kind ())
2569 {
2570 case symbol_kind::S_value: // value
2571 case symbol_kind::S_map_value: // map_value
2572 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
2573 value.move< ElementPtr > (YY_MOVE (s.value));
2574 break;
2575
2576 case symbol_kind::S_BOOLEAN: // "boolean"
2577 value.move< bool > (YY_MOVE (s.value));
2578 break;
2579
2580 case symbol_kind::S_FLOAT: // "floating point"
2581 value.move< double > (YY_MOVE (s.value));
2582 break;
2583
2584 case symbol_kind::S_INTEGER: // "integer"
2585 value.move< int64_t > (YY_MOVE (s.value));
2586 break;
2587
2588 case symbol_kind::S_STRING: // "constant string"
2589 value.move< std::string > (YY_MOVE (s.value));
2590 break;
2591
2592 default:
2593 break;
2594 }
2595
2596 location = YY_MOVE (s.location);
2597 }
2598
2599 // by_kind.
2600 inline
2602 : kind_ (symbol_kind::S_YYEMPTY)
2603 {}
2604
2605#if 201103L <= YY_CPLUSPLUS
2606 inline
2608 : kind_ (that.kind_)
2609 {
2610 that.clear ();
2611 }
2612#endif
2613
2614 inline
2616 : kind_ (that.kind_)
2617 {}
2618
2619 inline
2621 : kind_ (yytranslate_ (t))
2622 {}
2623
2624
2625
2626 inline
2627 void
2629 {
2630 kind_ = symbol_kind::S_YYEMPTY;
2631 }
2632
2633 inline
2634 void
2636 {
2637 kind_ = that.kind_;
2638 that.clear ();
2639 }
2640
2641 inline
2644 {
2645 return kind_;
2646 }
2647
2648
2649 inline
2652 {
2653 return this->kind ();
2654 }
2655
2656
2657#line 14 "d2_parser.yy"
2658} } // isc::d2
2659#line 2660 "d2_parser.h"
2660
2661
2662
2663
2664#endif // !YY_D2_PARSER_D2_PARSER_H_INCLUDED
#define YY_RVREF(Type)
Definition: agent_parser.h:85
#define YY_MOVE_REF(Type)
Definition: agent_parser.h:84
#define YY_NOEXCEPT
Definition: agent_parser.h:94
#define YY_ATTRIBUTE_PURE
Definition: agent_parser.h:116
#define YY_MOVE
Definition: agent_parser.h:82
#define YY_NOTHROW
Definition: agent_parser.h:95
Evaluation context, an interface to the expression evaluation.
const symbol_type & lookahead() const YY_NOEXCEPT
Definition: d2_parser.h:2119
symbol_kind_type token() const YY_NOEXCEPT
Definition: d2_parser.h:2120
const location_type & location() const YY_NOEXCEPT
Definition: d2_parser.h:2121
Present a slice of the top of a stack.
Definition: d2_parser.h:2386
slice(const stack &stack, index_type range) YY_NOEXCEPT
Definition: d2_parser.h:2388
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:1493
static symbol_type make_STRING(const std::string &v, const location_type &l)
Definition: d2_parser.h:2063
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: d2_parser.h:793
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
Definition: d2_parser.h:1988
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
Definition: d2_parser.h:2048
static symbol_type make_LOGGERS(const location_type &l)
Definition: d2_parser.h:1763
static symbol_type make_KEY_NAME(const location_type &l)
Definition: d2_parser.h:1553
static symbol_type make_PARAMETERS(const location_type &l)
Definition: d2_parser.h:1748
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1973
static symbol_type make_FORWARD_DDNS(const location_type &l)
Definition: d2_parser.h:1508
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:2033
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1928
static symbol_type make_SOCKET_TYPE(const location_type &l)
Definition: d2_parser.h:1688
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:2003
static symbol_type make_TCP(const location_type &l)
Definition: d2_parser.h:1433
static symbol_type make_NAME(const location_type &l)
Definition: d2_parser.h:1778
location location_type
Symbol locations.
Definition: d2_parser.h:467
static symbol_type make_MAXSIZE(const location_type &l)
Definition: d2_parser.h:1868
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
Definition: d2_parser.h:1223
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
Definition: d2_parser.h:1793
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1268
static symbol_type make_DEBUGLEVEL(const location_type &l)
Definition: d2_parser.h:1823
static symbol_type make_LCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1298
static symbol_type make_DIGEST_BITS(const location_type &l)
Definition: d2_parser.h:1628
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
Definition: d2_parser.h:1913
static symbol_type make_SOCKET_NAME(const location_type &l)
Definition: d2_parser.h:1703
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
Definition: d2_parser.h:1388
static symbol_type make_NULL_TYPE(const location_type &l)
Definition: d2_parser.h:1328
static symbol_type make_LIBRARY(const location_type &l)
Definition: d2_parser.h:1733
static symbol_type make_UDP(const location_type &l)
Definition: d2_parser.h:1418
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
Definition: d2_parser.h:1718
static symbol_type make_COLON(const location_type &l)
Definition: d2_parser.h:1253
static symbol_type make_COMMA(const location_type &l)
Definition: d2_parser.h:1238
static symbol_type make_SECRET(const location_type &l)
Definition: d2_parser.h:1643
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
Definition: d2_parser.h:1958
static symbol_type make_RCURLY_BRACKET(const location_type &l)
Definition: d2_parser.h:1313
static symbol_type make_OUTPUT(const location_type &l)
Definition: d2_parser.h:1808
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:1943
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition: d2_parser.h:796
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Definition: d2_parser.h:2078
static symbol_type make_DHCPDDNS(const location_type &l)
Definition: d2_parser.h:1343
static symbol_type make_D2_PARSER_error(const location_type &l)
Definition: d2_parser.h:1208
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
Definition: d2_parser.h:2018
static symbol_type make_MAXVER(const location_type &l)
Definition: d2_parser.h:1883
static symbol_type make_SECRET_FILE(const location_type &l)
Definition: d2_parser.h:1658
static symbol_type make_DDNS_DOMAINS(const location_type &l)
Definition: d2_parser.h:1538
static symbol_type make_SEVERITY(const location_type &l)
Definition: d2_parser.h:1838
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
Definition: d2_parser.h:1283
static symbol_type make_HOSTNAME(const location_type &l)
Definition: d2_parser.h:1583
static symbol_type make_USER_CONTEXT(const location_type &l)
Definition: d2_parser.h:1478
static symbol_type make_FLUSH(const location_type &l)
Definition: d2_parser.h:1853
static symbol_type make_REVERSE_DDNS(const location_type &l)
Definition: d2_parser.h:1523
static symbol_type make_PATTERN(const location_type &l)
Definition: d2_parser.h:1898
static symbol_type make_ALGORITHM(const location_type &l)
Definition: d2_parser.h:1613
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition: d2_parser.h:561
static symbol_type make_IP_ADDRESS(const location_type &l)
Definition: d2_parser.h:1358
static symbol_type make_PORT(const location_type &l)
Definition: d2_parser.h:1373
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:2307
static symbol_type make_FLOAT(const double &v, const location_type &l)
Definition: d2_parser.h:2093
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
Definition: d2_parser.h:2108
static symbol_type make_JSON(const location_type &l)
Definition: d2_parser.h:1463
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: d2_parser.h:564
static symbol_type make_END(const location_type &l)
Definition: d2_parser.h:1193
static symbol_type make_CONTROL_SOCKET(const location_type &l)
Definition: d2_parser.h:1673
static symbol_type make_NCR_PROTOCOL(const location_type &l)
Definition: d2_parser.h:1403
static symbol_type make_DNS_SERVERS(const location_type &l)
Definition: d2_parser.h:1568
static symbol_type make_TSIG_KEYS(const location_type &l)
Definition: d2_parser.h:1598
static symbol_type make_NCR_FORMAT(const location_type &l)
Definition: d2_parser.h:1448
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
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:1009
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
Definition: d2_parser.h:994
basic_symbol() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:811
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
Definition: d2_parser.h:905
bool empty() const YY_NOEXCEPT
Whether empty.
Definition: d2_parser.h:2558
Base super_type
Alias to Base.
Definition: d2_parser.h:808
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
Definition: d2_parser.h:933
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Definition: d2_parser.h:864
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
Definition: d2_parser.h:919
location_type location
The location.
Definition: d2_parser.h:1012
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2550
~basic_symbol()
Destroy the symbol.
Definition: d2_parser.h:941
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Definition: d2_parser.h:891
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Definition: d2_parser.h:2565
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Definition: d2_parser.h:949
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
Definition: d2_parser.h:877
Type access provider for token (enum) based symbols.
Definition: d2_parser.h:1023
void clear() YY_NOEXCEPT
Record that this symbol is empty.
Definition: d2_parser.h:2628
by_kind() YY_NOEXCEPT
Default constructor.
Definition: d2_parser.h:2601
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition: d2_parser.h:1025
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
Definition: d2_parser.h:2651
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
Definition: d2_parser.h:2643
void move(by_kind &that)
Steal the symbol kind from that.
Definition: d2_parser.h:2635
symbol_kind_type kind_
The symbol kind.
Definition: d2_parser.h:1058
@ YYNTOKENS
Number of tokens.
Definition: d2_parser.h:571
"External" symbols: returned by the scanner.
Definition: d2_parser.h:1066
basic_symbol< by_kind > super_type
Superclass.
Definition: d2_parser.h:1068
symbol_type() YY_NOEXCEPT
Empty symbol.
Definition: d2_parser.h:1071
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:557