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