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