Kea 2.0.2
netconf_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_NETCONF_NETCONF_PARSER_H_INCLUDED
46# define YY_NETCONF_NETCONF_PARSER_H_INCLUDED
47// "%code requires" blocks.
48#line 17 "netconf_parser.yy"
49
50#include <string>
51#include <cc/data.h>
52#include <boost/lexical_cast.hpp>
54
55using namespace isc::netconf;
56using namespace isc::data;
57using namespace std;
58
59#line 60 "netconf_parser.h"
60
61# include <cassert>
62# include <cstdlib> // std::abort
63# include <iostream>
64# include <stdexcept>
65# include <string>
66# include <vector>
67
68#if defined __cplusplus
69# define YY_CPLUSPLUS __cplusplus
70#else
71# define YY_CPLUSPLUS 199711L
72#endif
73
74// Support move semantics when possible.
75#if 201103L <= YY_CPLUSPLUS
76# define YY_MOVE std::move
77# define YY_MOVE_OR_COPY move
78# define YY_MOVE_REF(Type) Type&&
79# define YY_RVREF(Type) Type&&
80# define YY_COPY(Type) Type
81#else
82# define YY_MOVE
83# define YY_MOVE_OR_COPY copy
84# define YY_MOVE_REF(Type) Type&
85# define YY_RVREF(Type) const Type&
86# define YY_COPY(Type) const Type&
87#endif
88
89// Support noexcept when possible.
90#if 201103L <= YY_CPLUSPLUS
91# define YY_NOEXCEPT noexcept
92# define YY_NOTHROW
93#else
94# define YY_NOEXCEPT
95# define YY_NOTHROW throw ()
96#endif
97
98// Support constexpr when possible.
99#if 201703 <= YY_CPLUSPLUS
100# define YY_CONSTEXPR constexpr
101#else
102# define YY_CONSTEXPR
103#endif
104# include "location.hh"
105#include <typeinfo>
106#ifndef NETCONF__ASSERT
107# include <cassert>
108# define NETCONF__ASSERT assert
109#endif
110
111
112#ifndef YY_ATTRIBUTE_PURE
113# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
114# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
115# else
116# define YY_ATTRIBUTE_PURE
117# endif
118#endif
119
120#ifndef YY_ATTRIBUTE_UNUSED
121# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
122# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
123# else
124# define YY_ATTRIBUTE_UNUSED
125# endif
126#endif
127
128/* Suppress unused-variable warnings by "using" E. */
129#if ! defined lint || defined __GNUC__
130# define YY_USE(E) ((void) (E))
131#else
132# define YY_USE(E) /* empty */
133#endif
134
135/* Suppress an incorrect diagnostic about yylval being uninitialized. */
136#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
137# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
138# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
139 _Pragma ("GCC diagnostic push") \
140 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
141# else
142# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
143 _Pragma ("GCC diagnostic push") \
144 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
145 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
146# endif
147# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
148 _Pragma ("GCC diagnostic pop")
149#else
150# define YY_INITIAL_VALUE(Value) Value
151#endif
152#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
153# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
154# define YY_IGNORE_MAYBE_UNINITIALIZED_END
155#endif
156#ifndef YY_INITIAL_VALUE
157# define YY_INITIAL_VALUE(Value) /* Nothing. */
158#endif
159
160#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
161# define YY_IGNORE_USELESS_CAST_BEGIN \
162 _Pragma ("GCC diagnostic push") \
163 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
164# define YY_IGNORE_USELESS_CAST_END \
165 _Pragma ("GCC diagnostic pop")
166#endif
167#ifndef YY_IGNORE_USELESS_CAST_BEGIN
168# define YY_IGNORE_USELESS_CAST_BEGIN
169# define YY_IGNORE_USELESS_CAST_END
170#endif
171
172# ifndef YY_CAST
173# ifdef __cplusplus
174# define YY_CAST(Type, Val) static_cast<Type> (Val)
175# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
176# else
177# define YY_CAST(Type, Val) ((Type) (Val))
178# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
179# endif
180# endif
181# ifndef YY_NULLPTR
182# if defined __cplusplus
183# if 201103L <= __cplusplus
184# define YY_NULLPTR nullptr
185# else
186# define YY_NULLPTR 0
187# endif
188# else
189# define YY_NULLPTR ((void*)0)
190# endif
191# endif
192
193/* Debug traces. */
194#ifndef NETCONF_DEBUG
195# if defined YYDEBUG
196#if YYDEBUG
197# define NETCONF_DEBUG 1
198# else
199# define NETCONF_DEBUG 0
200# endif
201# else /* ! defined YYDEBUG */
202# define NETCONF_DEBUG 1
203# endif /* ! defined YYDEBUG */
204#endif /* ! defined NETCONF_DEBUG */
205
206#line 14 "netconf_parser.yy"
207namespace isc { namespace netconf {
208#line 209 "netconf_parser.h"
209
210
211
212
215 {
216 public:
217#ifdef NETCONF_STYPE
218# ifdef __GNUC__
219# pragma GCC message "bison: do not #define NETCONF_STYPE in C++, use %define api.value.type"
220# endif
221 typedef NETCONF_STYPE value_type;
222#else
229 {
230 public:
233
236 : yyraw_ ()
237 , yytypeid_ (YY_NULLPTR)
238 {}
239
241 template <typename T>
243 : yytypeid_ (&typeid (T))
244 {
245 NETCONF__ASSERT (sizeof (T) <= size);
246 new (yyas_<T> ()) T (YY_MOVE (t));
247 }
248
249#if 201103L <= YY_CPLUSPLUS
251 value_type (const self_type&) = delete;
253 self_type& operator= (const self_type&) = delete;
254#endif
255
258 {
259 NETCONF__ASSERT (!yytypeid_);
260 }
261
262# if 201103L <= YY_CPLUSPLUS
264 template <typename T, typename... U>
265 T&
266 emplace (U&&... u)
267 {
268 NETCONF__ASSERT (!yytypeid_);
269 NETCONF__ASSERT (sizeof (T) <= size);
270 yytypeid_ = & typeid (T);
271 return *new (yyas_<T> ()) T (std::forward <U>(u)...);
272 }
273# else
275 template <typename T>
276 T&
278 {
279 NETCONF__ASSERT (!yytypeid_);
280 NETCONF__ASSERT (sizeof (T) <= size);
281 yytypeid_ = & typeid (T);
282 return *new (yyas_<T> ()) T ();
283 }
284
286 template <typename T>
287 T&
288 emplace (const T& t)
289 {
290 NETCONF__ASSERT (!yytypeid_);
291 NETCONF__ASSERT (sizeof (T) <= size);
292 yytypeid_ = & typeid (T);
293 return *new (yyas_<T> ()) T (t);
294 }
295# endif
296
299 template <typename T>
300 T&
302 {
303 return emplace<T> ();
304 }
305
308 template <typename T>
309 T&
310 build (const T& t)
311 {
312 return emplace<T> (t);
313 }
314
316 template <typename T>
317 T&
319 {
320 NETCONF__ASSERT (yytypeid_);
321 NETCONF__ASSERT (*yytypeid_ == typeid (T));
322 NETCONF__ASSERT (sizeof (T) <= size);
323 return *yyas_<T> ();
324 }
325
327 template <typename T>
328 const T&
330 {
331 NETCONF__ASSERT (yytypeid_);
332 NETCONF__ASSERT (*yytypeid_ == typeid (T));
333 NETCONF__ASSERT (sizeof (T) <= size);
334 return *yyas_<T> ();
335 }
336
345 template <typename T>
346 void
348 {
349 NETCONF__ASSERT (yytypeid_);
350 NETCONF__ASSERT (*yytypeid_ == *that.yytypeid_);
351 std::swap (as<T> (), that.as<T> ());
352 }
353
357 template <typename T>
358 void
360 {
361# if 201103L <= YY_CPLUSPLUS
362 emplace<T> (std::move (that.as<T> ()));
363# else
364 emplace<T> ();
365 swap<T> (that);
366# endif
367 that.destroy<T> ();
368 }
369
370# if 201103L <= YY_CPLUSPLUS
372 template <typename T>
373 void
374 move (self_type&& that)
375 {
376 emplace<T> (std::move (that.as<T> ()));
377 that.destroy<T> ();
378 }
379#endif
380
382 template <typename T>
383 void
384 copy (const self_type& that)
385 {
386 emplace<T> (that.as<T> ());
387 }
388
390 template <typename T>
391 void
393 {
394 as<T> ().~T ();
395 yytypeid_ = YY_NULLPTR;
396 }
397
398 private:
399#if YY_CPLUSPLUS < 201103L
401 value_type (const self_type&);
403 self_type& operator= (const self_type&);
404#endif
405
407 template <typename T>
408 T*
409 yyas_ () YY_NOEXCEPT
410 {
411 void *yyp = yyraw_;
412 return static_cast<T*> (yyp);
413 }
414
416 template <typename T>
417 const T*
418 yyas_ () const YY_NOEXCEPT
419 {
420 const void *yyp = yyraw_;
421 return static_cast<const T*> (yyp);
422 }
423
425 union union_type
426 {
427 // value
428 // map_value
429 // socket_type_value
430 char dummy1[sizeof (ElementPtr)];
431
432 // "boolean"
433 char dummy2[sizeof (bool)];
434
435 // "floating point"
436 char dummy3[sizeof (double)];
437
438 // "integer"
439 char dummy4[sizeof (int64_t)];
440
441 // "constant string"
442 char dummy5[sizeof (std::string)];
443 };
444
446 enum { size = sizeof (union_type) };
447
449 union
450 {
452 long double yyalign_me_;
454 char yyraw_[size];
455 };
456
458 const std::type_info *yytypeid_;
459 };
460
461#endif
464
466 typedef location location_type;
467
469 struct syntax_error : std::runtime_error
470 {
471 syntax_error (const location_type& l, const std::string& m)
472 : std::runtime_error (m)
473 , location (l)
474 {}
475
477 : std::runtime_error (s.what ())
478 , location (s.location)
479 {}
480
482
484 };
485
487 struct token
488 {
490 {
491 TOKEN_NETCONF_EMPTY = -2,
492 TOKEN_END = 0, // "end of file"
493 TOKEN_NETCONF_error = 256, // error
494 TOKEN_NETCONF_UNDEF = 257, // "invalid token"
495 TOKEN_COMMA = 258, // ","
496 TOKEN_COLON = 259, // ":"
497 TOKEN_LSQUARE_BRACKET = 260, // "["
498 TOKEN_RSQUARE_BRACKET = 261, // "]"
499 TOKEN_LCURLY_BRACKET = 262, // "{"
500 TOKEN_RCURLY_BRACKET = 263, // "}"
501 TOKEN_NULL_TYPE = 264, // "null"
502 TOKEN_NETCONF = 265, // "Netconf"
503 TOKEN_USER_CONTEXT = 266, // "user-context"
504 TOKEN_COMMENT = 267, // "comment"
505 TOKEN_BOOT_UPDATE = 268, // "boot-update"
506 TOKEN_SUBSCRIBE_CHANGES = 269, // "subscribe-changes"
507 TOKEN_VALIDATE_CHANGES = 270, // "validate-changes"
508 TOKEN_MANAGED_SERVERS = 271, // "managed-servers"
509 TOKEN_DHCP4_SERVER = 272, // "dhcp4"
510 TOKEN_DHCP6_SERVER = 273, // "dhcp6"
511 TOKEN_D2_SERVER = 274, // "d2"
512 TOKEN_CA_SERVER = 275, // "ca"
513 TOKEN_MODEL = 276, // "model"
514 TOKEN_CONTROL_SOCKET = 277, // "control-socket"
515 TOKEN_SOCKET_TYPE = 278, // "socket-type"
516 TOKEN_UNIX = 279, // "unix"
517 TOKEN_HTTP = 280, // "http"
518 TOKEN_STDOUT = 281, // "stdout"
519 TOKEN_SOCKET_NAME = 282, // "socket-name"
520 TOKEN_SOCKET_URL = 283, // "socket-url"
521 TOKEN_HOOKS_LIBRARIES = 284, // "hooks-libraries"
522 TOKEN_LIBRARY = 285, // "library"
523 TOKEN_PARAMETERS = 286, // "parameters"
524 TOKEN_LOGGERS = 287, // "loggers"
525 TOKEN_NAME = 288, // "name"
526 TOKEN_OUTPUT_OPTIONS = 289, // "output_options"
527 TOKEN_OUTPUT = 290, // "output"
528 TOKEN_DEBUGLEVEL = 291, // "debuglevel"
529 TOKEN_SEVERITY = 292, // "severity"
530 TOKEN_FLUSH = 293, // "flush"
531 TOKEN_MAXSIZE = 294, // "maxsize"
532 TOKEN_MAXVER = 295, // "maxver"
533 TOKEN_PATTERN = 296, // "pattern"
534 TOKEN_START_JSON = 297, // START_JSON
535 TOKEN_START_NETCONF = 298, // START_NETCONF
536 TOKEN_START_SUB_NETCONF = 299, // START_SUB_NETCONF
537 TOKEN_STRING = 300, // "constant string"
538 TOKEN_INTEGER = 301, // "integer"
539 TOKEN_FLOAT = 302, // "floating point"
540 TOKEN_BOOLEAN = 303 // "boolean"
541 };
544 };
545
548
551
554 {
556 {
558 S_YYEMPTY = -2,
559 S_YYEOF = 0, // "end of file"
560 S_YYerror = 1, // error
561 S_YYUNDEF = 2, // "invalid token"
562 S_COMMA = 3, // ","
563 S_COLON = 4, // ":"
564 S_LSQUARE_BRACKET = 5, // "["
565 S_RSQUARE_BRACKET = 6, // "]"
566 S_LCURLY_BRACKET = 7, // "{"
567 S_RCURLY_BRACKET = 8, // "}"
568 S_NULL_TYPE = 9, // "null"
569 S_NETCONF = 10, // "Netconf"
570 S_USER_CONTEXT = 11, // "user-context"
571 S_COMMENT = 12, // "comment"
572 S_BOOT_UPDATE = 13, // "boot-update"
573 S_SUBSCRIBE_CHANGES = 14, // "subscribe-changes"
574 S_VALIDATE_CHANGES = 15, // "validate-changes"
575 S_MANAGED_SERVERS = 16, // "managed-servers"
576 S_DHCP4_SERVER = 17, // "dhcp4"
577 S_DHCP6_SERVER = 18, // "dhcp6"
578 S_D2_SERVER = 19, // "d2"
579 S_CA_SERVER = 20, // "ca"
580 S_MODEL = 21, // "model"
581 S_CONTROL_SOCKET = 22, // "control-socket"
582 S_SOCKET_TYPE = 23, // "socket-type"
583 S_UNIX = 24, // "unix"
584 S_HTTP = 25, // "http"
585 S_STDOUT = 26, // "stdout"
586 S_SOCKET_NAME = 27, // "socket-name"
587 S_SOCKET_URL = 28, // "socket-url"
588 S_HOOKS_LIBRARIES = 29, // "hooks-libraries"
589 S_LIBRARY = 30, // "library"
590 S_PARAMETERS = 31, // "parameters"
591 S_LOGGERS = 32, // "loggers"
592 S_NAME = 33, // "name"
593 S_OUTPUT_OPTIONS = 34, // "output_options"
594 S_OUTPUT = 35, // "output"
595 S_DEBUGLEVEL = 36, // "debuglevel"
596 S_SEVERITY = 37, // "severity"
597 S_FLUSH = 38, // "flush"
598 S_MAXSIZE = 39, // "maxsize"
599 S_MAXVER = 40, // "maxver"
600 S_PATTERN = 41, // "pattern"
601 S_START_JSON = 42, // START_JSON
602 S_START_NETCONF = 43, // START_NETCONF
603 S_START_SUB_NETCONF = 44, // START_SUB_NETCONF
604 S_STRING = 45, // "constant string"
605 S_INTEGER = 46, // "integer"
606 S_FLOAT = 47, // "floating point"
607 S_BOOLEAN = 48, // "boolean"
608 S_YYACCEPT = 49, // $accept
609 S_start = 50, // start
610 S_51_1 = 51, // $@1
611 S_52_2 = 52, // $@2
612 S_53_3 = 53, // $@3
613 S_sub_netconf = 54, // sub_netconf
614 S_55_4 = 55, // $@4
615 S_json = 56, // json
616 S_value = 57, // value
617 S_map = 58, // map
618 S_59_5 = 59, // $@5
619 S_map_value = 60, // map_value
620 S_map_content = 61, // map_content
621 S_not_empty_map = 62, // not_empty_map
622 S_list_generic = 63, // list_generic
623 S_64_6 = 64, // $@6
624 S_list_content = 65, // list_content
625 S_not_empty_list = 66, // not_empty_list
626 S_unknown_map_entry = 67, // unknown_map_entry
627 S_netconf_syntax_map = 68, // netconf_syntax_map
628 S_69_7 = 69, // $@7
629 S_global_object = 70, // global_object
630 S_71_8 = 71, // $@8
631 S_global_params = 72, // global_params
632 S_not_empty_global_params = 73, // not_empty_global_params
633 S_global_param = 74, // global_param
634 S_boot_update = 75, // boot_update
635 S_subscribe_changes = 76, // subscribe_changes
636 S_validate_changes = 77, // validate_changes
637 S_user_context = 78, // user_context
638 S_79_9 = 79, // $@9
639 S_comment = 80, // comment
640 S_81_10 = 81, // $@10
641 S_hooks_libraries = 82, // hooks_libraries
642 S_83_11 = 83, // $@11
643 S_hooks_libraries_list = 84, // hooks_libraries_list
644 S_not_empty_hooks_libraries_list = 85, // not_empty_hooks_libraries_list
645 S_hooks_library = 86, // hooks_library
646 S_87_12 = 87, // $@12
647 S_hooks_params = 88, // hooks_params
648 S_hooks_param = 89, // hooks_param
649 S_library = 90, // library
650 S_91_13 = 91, // $@13
651 S_parameters = 92, // parameters
652 S_93_14 = 93, // $@14
653 S_managed_servers = 94, // managed_servers
654 S_95_15 = 95, // $@15
655 S_servers_entries = 96, // servers_entries
656 S_not_empty_servers_entries = 97, // not_empty_servers_entries
657 S_server_entry = 98, // server_entry
658 S_dhcp4_server = 99, // dhcp4_server
659 S_100_16 = 100, // $@16
660 S_dhcp6_server = 101, // dhcp6_server
661 S_102_17 = 102, // $@17
662 S_d2_server = 103, // d2_server
663 S_104_18 = 104, // $@18
664 S_ca_server = 105, // ca_server
665 S_106_19 = 106, // $@19
666 S_managed_server_params = 107, // managed_server_params
667 S_managed_server_param = 108, // managed_server_param
668 S_model = 109, // model
669 S_110_20 = 110, // $@20
670 S_control_socket = 111, // control_socket
671 S_112_21 = 112, // $@21
672 S_control_socket_params = 113, // control_socket_params
673 S_control_socket_param = 114, // control_socket_param
674 S_socket_type = 115, // socket_type
675 S_116_22 = 116, // $@22
676 S_socket_type_value = 117, // socket_type_value
677 S_socket_name = 118, // socket_name
678 S_119_23 = 119, // $@23
679 S_socket_url = 120, // socket_url
680 S_121_24 = 121, // $@24
681 S_loggers = 122, // loggers
682 S_123_25 = 123, // $@25
683 S_loggers_entries = 124, // loggers_entries
684 S_logger_entry = 125, // logger_entry
685 S_126_26 = 126, // $@26
686 S_logger_params = 127, // logger_params
687 S_logger_param = 128, // logger_param
688 S_name = 129, // name
689 S_130_27 = 130, // $@27
690 S_debuglevel = 131, // debuglevel
691 S_severity = 132, // severity
692 S_133_28 = 133, // $@28
693 S_output_options_list = 134, // output_options_list
694 S_135_29 = 135, // $@29
695 S_output_options_list_content = 136, // output_options_list_content
696 S_output_entry = 137, // output_entry
697 S_138_30 = 138, // $@30
698 S_output_params_list = 139, // output_params_list
699 S_output_params = 140, // output_params
700 S_output = 141, // output
701 S_142_31 = 142, // $@31
702 S_flush = 143, // flush
703 S_maxsize = 144, // maxsize
704 S_maxver = 145, // maxver
705 S_pattern = 146, // pattern
706 S_147_32 = 147 // $@32
707 };
708 };
709
712
715
722 template <typename Base>
723 struct basic_symbol : Base
724 {
726 typedef Base super_type;
727
730 : value ()
731 , location ()
732 {}
733
734#if 201103L <= YY_CPLUSPLUS
737 : Base (std::move (that))
738 , value ()
739 , location (std::move (that.location))
740 {
741 switch (this->kind ())
742 {
743 case symbol_kind::S_value: // value
744 case symbol_kind::S_map_value: // map_value
745 case symbol_kind::S_socket_type_value: // socket_type_value
746 value.move< ElementPtr > (std::move (that.value));
747 break;
748
749 case symbol_kind::S_BOOLEAN: // "boolean"
750 value.move< bool > (std::move (that.value));
751 break;
752
753 case symbol_kind::S_FLOAT: // "floating point"
754 value.move< double > (std::move (that.value));
755 break;
756
757 case symbol_kind::S_INTEGER: // "integer"
758 value.move< int64_t > (std::move (that.value));
759 break;
760
761 case symbol_kind::S_STRING: // "constant string"
762 value.move< std::string > (std::move (that.value));
763 break;
764
765 default:
766 break;
767 }
768
769 }
770#endif
771
773 basic_symbol (const basic_symbol& that);
774
776#if 201103L <= YY_CPLUSPLUS
777 basic_symbol (typename Base::kind_type t, location_type&& l)
778 : Base (t)
779 , location (std::move (l))
780 {}
781#else
782 basic_symbol (typename Base::kind_type t, const location_type& l)
783 : Base (t)
784 , location (l)
785 {}
786#endif
787
788#if 201103L <= YY_CPLUSPLUS
789 basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
790 : Base (t)
791 , value (std::move (v))
792 , location (std::move (l))
793 {}
794#else
795 basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
796 : Base (t)
797 , value (v)
798 , location (l)
799 {}
800#endif
801
802#if 201103L <= YY_CPLUSPLUS
803 basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
804 : Base (t)
805 , value (std::move (v))
806 , location (std::move (l))
807 {}
808#else
809 basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
810 : Base (t)
811 , value (v)
812 , location (l)
813 {}
814#endif
815
816#if 201103L <= YY_CPLUSPLUS
817 basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
818 : Base (t)
819 , value (std::move (v))
820 , location (std::move (l))
821 {}
822#else
823 basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
824 : Base (t)
825 , value (v)
826 , location (l)
827 {}
828#endif
829
830#if 201103L <= YY_CPLUSPLUS
831 basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
832 : Base (t)
833 , value (std::move (v))
834 , location (std::move (l))
835 {}
836#else
837 basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
838 : Base (t)
839 , value (v)
840 , location (l)
841 {}
842#endif
843
844#if 201103L <= YY_CPLUSPLUS
845 basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
846 : Base (t)
847 , value (std::move (v))
848 , location (std::move (l))
849 {}
850#else
851 basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
852 : Base (t)
853 , value (v)
854 , location (l)
855 {}
856#endif
857
860 {
861 clear ();
862 }
863
864
865
868 {
869 // User destructor.
870 symbol_kind_type yykind = this->kind ();
871 basic_symbol<Base>& yysym = *this;
872 (void) yysym;
873 switch (yykind)
874 {
875 default:
876 break;
877 }
878
879 // Value type destructor.
880switch (yykind)
881 {
882 case symbol_kind::S_value: // value
883 case symbol_kind::S_map_value: // map_value
884 case symbol_kind::S_socket_type_value: // socket_type_value
885 value.template destroy< ElementPtr > ();
886 break;
887
888 case symbol_kind::S_BOOLEAN: // "boolean"
889 value.template destroy< bool > ();
890 break;
891
892 case symbol_kind::S_FLOAT: // "floating point"
893 value.template destroy< double > ();
894 break;
895
896 case symbol_kind::S_INTEGER: // "integer"
897 value.template destroy< int64_t > ();
898 break;
899
900 case symbol_kind::S_STRING: // "constant string"
901 value.template destroy< std::string > ();
902 break;
903
904 default:
905 break;
906 }
907
908 Base::clear ();
909 }
910
912 std::string name () const YY_NOEXCEPT
913 {
914 return NetconfParser::symbol_name (this->kind ());
915 }
916
918 symbol_kind_type type_get () const YY_NOEXCEPT;
919
921 bool empty () const YY_NOEXCEPT;
922
924 void move (basic_symbol& s);
925
928
931
932 private:
933#if YY_CPLUSPLUS < 201103L
935 basic_symbol& operator= (const basic_symbol& that);
936#endif
937 };
938
940 struct by_kind
941 {
944
947
948#if 201103L <= YY_CPLUSPLUS
950 by_kind (by_kind&& that) YY_NOEXCEPT;
951#endif
952
954 by_kind (const by_kind& that) YY_NOEXCEPT;
955
958
959
960
962 void clear () YY_NOEXCEPT;
963
965 void move (by_kind& that);
966
969 symbol_kind_type kind () const YY_NOEXCEPT;
970
972 symbol_kind_type type_get () const YY_NOEXCEPT;
973
977 };
978
981
984 {
987
990
992#if 201103L <= YY_CPLUSPLUS
993 symbol_type (int tok, location_type l)
994 : super_type (token_kind_type (tok), std::move (l))
995#else
996 symbol_type (int tok, const location_type& l)
997 : super_type (token_kind_type (tok), l)
998#endif
999 {
1000#if !defined _MSC_VER || defined __clang__
1003#endif
1004 }
1005#if 201103L <= YY_CPLUSPLUS
1006 symbol_type (int tok, bool v, location_type l)
1007 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1008#else
1009 symbol_type (int tok, const bool& v, const location_type& l)
1010 : super_type (token_kind_type (tok), v, l)
1011#endif
1012 {
1013#if !defined _MSC_VER || defined __clang__
1015#endif
1016 }
1017#if 201103L <= YY_CPLUSPLUS
1018 symbol_type (int tok, double v, location_type l)
1019 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1020#else
1021 symbol_type (int tok, const double& v, const location_type& l)
1022 : super_type (token_kind_type (tok), v, l)
1023#endif
1024 {
1025#if !defined _MSC_VER || defined __clang__
1027#endif
1028 }
1029#if 201103L <= YY_CPLUSPLUS
1030 symbol_type (int tok, int64_t v, location_type l)
1031 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1032#else
1033 symbol_type (int tok, const int64_t& v, const location_type& l)
1034 : super_type (token_kind_type (tok), v, l)
1035#endif
1036 {
1037#if !defined _MSC_VER || defined __clang__
1039#endif
1040 }
1041#if 201103L <= YY_CPLUSPLUS
1042 symbol_type (int tok, std::string v, location_type l)
1043 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1044#else
1045 symbol_type (int tok, const std::string& v, const location_type& l)
1046 : super_type (token_kind_type (tok), v, l)
1047#endif
1048 {
1049#if !defined _MSC_VER || defined __clang__
1051#endif
1052 }
1053 };
1054
1057 virtual ~NetconfParser ();
1058
1059#if 201103L <= YY_CPLUSPLUS
1061 NetconfParser (const NetconfParser&) = delete;
1063 NetconfParser& operator= (const NetconfParser&) = delete;
1064#endif
1065
1068 int operator() ();
1069
1072 virtual int parse ();
1073
1074#if NETCONF_DEBUG
1076 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
1078 void set_debug_stream (std::ostream &);
1079
1081 typedef int debug_level_type;
1086#endif
1087
1091 virtual void error (const location_type& loc, const std::string& msg);
1092
1094 void error (const syntax_error& err);
1095
1098 static std::string symbol_name (symbol_kind_type yysymbol);
1099
1100 // Implementation of make_symbol for each token kind.
1101#if 201103L <= YY_CPLUSPLUS
1102 static
1105 {
1106 return symbol_type (token::TOKEN_END, std::move (l));
1107 }
1108#else
1109 static
1110 symbol_type
1112 {
1113 return symbol_type (token::TOKEN_END, l);
1114 }
1115#endif
1116#if 201103L <= YY_CPLUSPLUS
1117 static
1118 symbol_type
1120 {
1121 return symbol_type (token::TOKEN_NETCONF_error, std::move (l));
1122 }
1123#else
1124 static
1125 symbol_type
1127 {
1129 }
1130#endif
1131#if 201103L <= YY_CPLUSPLUS
1132 static
1133 symbol_type
1135 {
1136 return symbol_type (token::TOKEN_NETCONF_UNDEF, std::move (l));
1137 }
1138#else
1139 static
1140 symbol_type
1142 {
1144 }
1145#endif
1146#if 201103L <= YY_CPLUSPLUS
1147 static
1148 symbol_type
1150 {
1151 return symbol_type (token::TOKEN_COMMA, std::move (l));
1152 }
1153#else
1154 static
1155 symbol_type
1157 {
1158 return symbol_type (token::TOKEN_COMMA, l);
1159 }
1160#endif
1161#if 201103L <= YY_CPLUSPLUS
1162 static
1163 symbol_type
1165 {
1166 return symbol_type (token::TOKEN_COLON, std::move (l));
1167 }
1168#else
1169 static
1170 symbol_type
1172 {
1173 return symbol_type (token::TOKEN_COLON, l);
1174 }
1175#endif
1176#if 201103L <= YY_CPLUSPLUS
1177 static
1178 symbol_type
1180 {
1181 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1182 }
1183#else
1184 static
1185 symbol_type
1187 {
1189 }
1190#endif
1191#if 201103L <= YY_CPLUSPLUS
1192 static
1193 symbol_type
1195 {
1196 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1197 }
1198#else
1199 static
1200 symbol_type
1202 {
1204 }
1205#endif
1206#if 201103L <= YY_CPLUSPLUS
1207 static
1208 symbol_type
1210 {
1211 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1212 }
1213#else
1214 static
1215 symbol_type
1217 {
1219 }
1220#endif
1221#if 201103L <= YY_CPLUSPLUS
1222 static
1223 symbol_type
1225 {
1226 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1227 }
1228#else
1229 static
1230 symbol_type
1232 {
1234 }
1235#endif
1236#if 201103L <= YY_CPLUSPLUS
1237 static
1238 symbol_type
1240 {
1241 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1242 }
1243#else
1244 static
1245 symbol_type
1247 {
1249 }
1250#endif
1251#if 201103L <= YY_CPLUSPLUS
1252 static
1253 symbol_type
1255 {
1256 return symbol_type (token::TOKEN_NETCONF, std::move (l));
1257 }
1258#else
1259 static
1260 symbol_type
1262 {
1264 }
1265#endif
1266#if 201103L <= YY_CPLUSPLUS
1267 static
1268 symbol_type
1270 {
1271 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1272 }
1273#else
1274 static
1275 symbol_type
1277 {
1279 }
1280#endif
1281#if 201103L <= YY_CPLUSPLUS
1282 static
1283 symbol_type
1285 {
1286 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1287 }
1288#else
1289 static
1290 symbol_type
1292 {
1294 }
1295#endif
1296#if 201103L <= YY_CPLUSPLUS
1297 static
1298 symbol_type
1300 {
1301 return symbol_type (token::TOKEN_BOOT_UPDATE, std::move (l));
1302 }
1303#else
1304 static
1305 symbol_type
1307 {
1309 }
1310#endif
1311#if 201103L <= YY_CPLUSPLUS
1312 static
1313 symbol_type
1315 {
1316 return symbol_type (token::TOKEN_SUBSCRIBE_CHANGES, std::move (l));
1317 }
1318#else
1319 static
1320 symbol_type
1322 {
1324 }
1325#endif
1326#if 201103L <= YY_CPLUSPLUS
1327 static
1328 symbol_type
1330 {
1331 return symbol_type (token::TOKEN_VALIDATE_CHANGES, std::move (l));
1332 }
1333#else
1334 static
1335 symbol_type
1337 {
1339 }
1340#endif
1341#if 201103L <= YY_CPLUSPLUS
1342 static
1343 symbol_type
1345 {
1346 return symbol_type (token::TOKEN_MANAGED_SERVERS, std::move (l));
1347 }
1348#else
1349 static
1350 symbol_type
1352 {
1354 }
1355#endif
1356#if 201103L <= YY_CPLUSPLUS
1357 static
1358 symbol_type
1360 {
1361 return symbol_type (token::TOKEN_DHCP4_SERVER, std::move (l));
1362 }
1363#else
1364 static
1365 symbol_type
1367 {
1369 }
1370#endif
1371#if 201103L <= YY_CPLUSPLUS
1372 static
1373 symbol_type
1375 {
1376 return symbol_type (token::TOKEN_DHCP6_SERVER, std::move (l));
1377 }
1378#else
1379 static
1380 symbol_type
1382 {
1384 }
1385#endif
1386#if 201103L <= YY_CPLUSPLUS
1387 static
1388 symbol_type
1390 {
1391 return symbol_type (token::TOKEN_D2_SERVER, std::move (l));
1392 }
1393#else
1394 static
1395 symbol_type
1397 {
1399 }
1400#endif
1401#if 201103L <= YY_CPLUSPLUS
1402 static
1403 symbol_type
1405 {
1406 return symbol_type (token::TOKEN_CA_SERVER, std::move (l));
1407 }
1408#else
1409 static
1410 symbol_type
1412 {
1414 }
1415#endif
1416#if 201103L <= YY_CPLUSPLUS
1417 static
1418 symbol_type
1420 {
1421 return symbol_type (token::TOKEN_MODEL, std::move (l));
1422 }
1423#else
1424 static
1425 symbol_type
1427 {
1428 return symbol_type (token::TOKEN_MODEL, l);
1429 }
1430#endif
1431#if 201103L <= YY_CPLUSPLUS
1432 static
1433 symbol_type
1435 {
1436 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1437 }
1438#else
1439 static
1440 symbol_type
1442 {
1444 }
1445#endif
1446#if 201103L <= YY_CPLUSPLUS
1447 static
1448 symbol_type
1450 {
1451 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1452 }
1453#else
1454 static
1455 symbol_type
1457 {
1459 }
1460#endif
1461#if 201103L <= YY_CPLUSPLUS
1462 static
1463 symbol_type
1465 {
1466 return symbol_type (token::TOKEN_UNIX, std::move (l));
1467 }
1468#else
1469 static
1470 symbol_type
1472 {
1473 return symbol_type (token::TOKEN_UNIX, l);
1474 }
1475#endif
1476#if 201103L <= YY_CPLUSPLUS
1477 static
1478 symbol_type
1480 {
1481 return symbol_type (token::TOKEN_HTTP, std::move (l));
1482 }
1483#else
1484 static
1485 symbol_type
1487 {
1488 return symbol_type (token::TOKEN_HTTP, l);
1489 }
1490#endif
1491#if 201103L <= YY_CPLUSPLUS
1492 static
1493 symbol_type
1495 {
1496 return symbol_type (token::TOKEN_STDOUT, std::move (l));
1497 }
1498#else
1499 static
1500 symbol_type
1502 {
1503 return symbol_type (token::TOKEN_STDOUT, l);
1504 }
1505#endif
1506#if 201103L <= YY_CPLUSPLUS
1507 static
1508 symbol_type
1510 {
1511 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1512 }
1513#else
1514 static
1515 symbol_type
1517 {
1519 }
1520#endif
1521#if 201103L <= YY_CPLUSPLUS
1522 static
1523 symbol_type
1525 {
1526 return symbol_type (token::TOKEN_SOCKET_URL, std::move (l));
1527 }
1528#else
1529 static
1530 symbol_type
1532 {
1534 }
1535#endif
1536#if 201103L <= YY_CPLUSPLUS
1537 static
1538 symbol_type
1540 {
1541 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1542 }
1543#else
1544 static
1545 symbol_type
1547 {
1549 }
1550#endif
1551#if 201103L <= YY_CPLUSPLUS
1552 static
1553 symbol_type
1555 {
1556 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1557 }
1558#else
1559 static
1560 symbol_type
1562 {
1564 }
1565#endif
1566#if 201103L <= YY_CPLUSPLUS
1567 static
1568 symbol_type
1570 {
1571 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1572 }
1573#else
1574 static
1575 symbol_type
1577 {
1579 }
1580#endif
1581#if 201103L <= YY_CPLUSPLUS
1582 static
1583 symbol_type
1585 {
1586 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1587 }
1588#else
1589 static
1590 symbol_type
1592 {
1594 }
1595#endif
1596#if 201103L <= YY_CPLUSPLUS
1597 static
1598 symbol_type
1600 {
1601 return symbol_type (token::TOKEN_NAME, std::move (l));
1602 }
1603#else
1604 static
1605 symbol_type
1607 {
1608 return symbol_type (token::TOKEN_NAME, l);
1609 }
1610#endif
1611#if 201103L <= YY_CPLUSPLUS
1612 static
1613 symbol_type
1615 {
1616 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1617 }
1618#else
1619 static
1620 symbol_type
1622 {
1624 }
1625#endif
1626#if 201103L <= YY_CPLUSPLUS
1627 static
1628 symbol_type
1630 {
1631 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1632 }
1633#else
1634 static
1635 symbol_type
1637 {
1638 return symbol_type (token::TOKEN_OUTPUT, l);
1639 }
1640#endif
1641#if 201103L <= YY_CPLUSPLUS
1642 static
1643 symbol_type
1645 {
1646 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1647 }
1648#else
1649 static
1650 symbol_type
1652 {
1654 }
1655#endif
1656#if 201103L <= YY_CPLUSPLUS
1657 static
1658 symbol_type
1660 {
1661 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1662 }
1663#else
1664 static
1665 symbol_type
1667 {
1669 }
1670#endif
1671#if 201103L <= YY_CPLUSPLUS
1672 static
1673 symbol_type
1675 {
1676 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1677 }
1678#else
1679 static
1680 symbol_type
1682 {
1683 return symbol_type (token::TOKEN_FLUSH, l);
1684 }
1685#endif
1686#if 201103L <= YY_CPLUSPLUS
1687 static
1688 symbol_type
1690 {
1691 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1692 }
1693#else
1694 static
1695 symbol_type
1697 {
1699 }
1700#endif
1701#if 201103L <= YY_CPLUSPLUS
1702 static
1703 symbol_type
1705 {
1706 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1707 }
1708#else
1709 static
1710 symbol_type
1712 {
1713 return symbol_type (token::TOKEN_MAXVER, l);
1714 }
1715#endif
1716#if 201103L <= YY_CPLUSPLUS
1717 static
1718 symbol_type
1720 {
1721 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1722 }
1723#else
1724 static
1725 symbol_type
1727 {
1729 }
1730#endif
1731#if 201103L <= YY_CPLUSPLUS
1732 static
1733 symbol_type
1735 {
1736 return symbol_type (token::TOKEN_START_JSON, std::move (l));
1737 }
1738#else
1739 static
1740 symbol_type
1742 {
1744 }
1745#endif
1746#if 201103L <= YY_CPLUSPLUS
1747 static
1748 symbol_type
1750 {
1751 return symbol_type (token::TOKEN_START_NETCONF, std::move (l));
1752 }
1753#else
1754 static
1755 symbol_type
1757 {
1759 }
1760#endif
1761#if 201103L <= YY_CPLUSPLUS
1762 static
1763 symbol_type
1765 {
1766 return symbol_type (token::TOKEN_START_SUB_NETCONF, std::move (l));
1767 }
1768#else
1769 static
1770 symbol_type
1772 {
1774 }
1775#endif
1776#if 201103L <= YY_CPLUSPLUS
1777 static
1778 symbol_type
1779 make_STRING (std::string v, location_type l)
1780 {
1781 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
1782 }
1783#else
1784 static
1785 symbol_type
1786 make_STRING (const std::string& v, const location_type& l)
1787 {
1788 return symbol_type (token::TOKEN_STRING, v, l);
1789 }
1790#endif
1791#if 201103L <= YY_CPLUSPLUS
1792 static
1793 symbol_type
1794 make_INTEGER (int64_t v, location_type l)
1795 {
1796 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
1797 }
1798#else
1799 static
1800 symbol_type
1801 make_INTEGER (const int64_t& v, const location_type& l)
1802 {
1803 return symbol_type (token::TOKEN_INTEGER, v, l);
1804 }
1805#endif
1806#if 201103L <= YY_CPLUSPLUS
1807 static
1808 symbol_type
1809 make_FLOAT (double v, location_type l)
1810 {
1811 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
1812 }
1813#else
1814 static
1815 symbol_type
1816 make_FLOAT (const double& v, const location_type& l)
1817 {
1818 return symbol_type (token::TOKEN_FLOAT, v, l);
1819 }
1820#endif
1821#if 201103L <= YY_CPLUSPLUS
1822 static
1823 symbol_type
1824 make_BOOLEAN (bool v, location_type l)
1825 {
1826 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
1827 }
1828#else
1829 static
1830 symbol_type
1831 make_BOOLEAN (const bool& v, const location_type& l)
1832 {
1833 return symbol_type (token::TOKEN_BOOLEAN, v, l);
1834 }
1835#endif
1836
1837
1839 {
1840 public:
1841 context (const NetconfParser& yyparser, const symbol_type& yyla);
1842 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
1843 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
1844 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
1845
1849 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
1850
1851 private:
1852 const NetconfParser& yyparser_;
1853 const symbol_type& yyla_;
1854 };
1855
1856 private:
1857#if YY_CPLUSPLUS < 201103L
1861 NetconfParser& operator= (const NetconfParser&);
1862#endif
1863
1864
1866 typedef short state_type;
1867
1869 int yy_syntax_error_arguments_ (const context& yyctx,
1870 symbol_kind_type yyarg[], int yyargn) const;
1871
1874 virtual std::string yysyntax_error_ (const context& yyctx) const;
1878 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
1879
1882 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
1883
1886 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
1887
1888 static const signed char yypact_ninf_;
1889 static const signed char yytable_ninf_;
1890
1894 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
1895
1897 static std::string yytnamerr_ (const char *yystr);
1898
1900 static const char* const yytname_[];
1901
1902
1903 // Tables.
1904 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1905 // STATE-NUM.
1906 static const short yypact_[];
1907
1908 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1909 // Performed when YYTABLE does not specify something else to do. Zero
1910 // means the default is an error.
1911 static const unsigned char yydefact_[];
1912
1913 // YYPGOTO[NTERM-NUM].
1914 static const short yypgoto_[];
1915
1916 // YYDEFGOTO[NTERM-NUM].
1917 static const short yydefgoto_[];
1918
1919 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1920 // positive, shift that token. If negative, reduce the rule whose
1921 // number is the opposite. If YYTABLE_NINF, syntax error.
1922 static const short yytable_[];
1923
1924 static const short yycheck_[];
1925
1926 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1927 // state STATE-NUM.
1928 static const unsigned char yystos_[];
1929
1930 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
1931 static const unsigned char yyr1_[];
1932
1933 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
1934 static const signed char yyr2_[];
1935
1936
1937#if NETCONF_DEBUG
1938 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
1939 static const short yyrline_[];
1941 virtual void yy_reduce_print_ (int r) const;
1943 virtual void yy_stack_print_ () const;
1944
1946 int yydebug_;
1948 std::ostream* yycdebug_;
1949
1953 template <typename Base>
1954 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
1955#endif
1956
1961 template <typename Base>
1962 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
1963
1964 private:
1966 struct by_state
1967 {
1969 by_state () YY_NOEXCEPT;
1970
1972 typedef state_type kind_type;
1973
1975 by_state (kind_type s) YY_NOEXCEPT;
1976
1978 by_state (const by_state& that) YY_NOEXCEPT;
1979
1981 void clear () YY_NOEXCEPT;
1982
1984 void move (by_state& that);
1985
1988 symbol_kind_type kind () const YY_NOEXCEPT;
1989
1992 enum { empty_state = 0 };
1993
1996 state_type state;
1997 };
1998
2000 struct stack_symbol_type : basic_symbol<by_state>
2001 {
2003 typedef basic_symbol<by_state> super_type;
2005 stack_symbol_type ();
2007 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
2009 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
2010#if YY_CPLUSPLUS < 201103L
2013 stack_symbol_type& operator= (stack_symbol_type& that);
2014
2017 stack_symbol_type& operator= (const stack_symbol_type& that);
2018#endif
2019 };
2020
2022 template <typename T, typename S = std::vector<T> >
2023 class stack
2024 {
2025 public:
2026 // Hide our reversed order.
2027 typedef typename S::iterator iterator;
2028 typedef typename S::const_iterator const_iterator;
2029 typedef typename S::size_type size_type;
2030 typedef typename std::ptrdiff_t index_type;
2031
2032 stack (size_type n = 200) YY_NOEXCEPT
2033 : seq_ (n)
2034 {}
2035
2036#if 201103L <= YY_CPLUSPLUS
2038 stack (const stack&) = delete;
2040 stack& operator= (const stack&) = delete;
2041#endif
2042
2046 const T&
2047 operator[] (index_type i) const
2048 {
2049 return seq_[size_type (size () - 1 - i)];
2050 }
2051
2055 T&
2056 operator[] (index_type i)
2057 {
2058 return seq_[size_type (size () - 1 - i)];
2059 }
2060
2064 void
2065 push (YY_MOVE_REF (T) t)
2066 {
2067 seq_.push_back (T ());
2068 operator[] (0).move (t);
2069 }
2070
2072 void
2073 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2074 {
2075 for (; 0 < n; --n)
2076 seq_.pop_back ();
2077 }
2078
2080 void
2081 clear () YY_NOEXCEPT
2082 {
2083 seq_.clear ();
2084 }
2085
2087 index_type
2088 size () const YY_NOEXCEPT
2089 {
2090 return index_type (seq_.size ());
2091 }
2092
2094 const_iterator
2095 begin () const YY_NOEXCEPT
2096 {
2097 return seq_.begin ();
2098 }
2099
2101 const_iterator
2102 end () const YY_NOEXCEPT
2103 {
2104 return seq_.end ();
2105 }
2106
2108 class slice
2109 {
2110 public:
2111 slice (const stack& stack, index_type range) YY_NOEXCEPT
2112 : stack_ (stack)
2113 , range_ (range)
2114 {}
2115
2116 const T&
2117 operator[] (index_type i) const
2118 {
2119 return stack_[range_ - i];
2120 }
2121
2122 private:
2123 const stack& stack_;
2124 index_type range_;
2125 };
2126
2127 private:
2128#if YY_CPLUSPLUS < 201103L
2130 stack (const stack&);
2132 stack& operator= (const stack&);
2133#endif
2135 S seq_;
2136 };
2137
2138
2140 typedef stack<stack_symbol_type> stack_type;
2141
2143 stack_type yystack_;
2144
2150 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2151
2158 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2159
2161 void yypop_ (int n = 1) YY_NOEXCEPT;
2162
2164 enum
2165 {
2166 yylast_ = 219,
2167 yynnts_ = 99,
2168 yyfinal_ = 8
2169 };
2170
2171
2172 // User arguments.
2174
2175 };
2176
2177 inline
2179 NetconfParser::yytranslate_ (int t) YY_NOEXCEPT
2180 {
2181 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2182 // TOKEN-NUM as returned by yylex.
2183 static
2184 const signed char
2185 translate_table[] =
2186 {
2187 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2196 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2197 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2198 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2199 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2205 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2212 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2213 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2214 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2215 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2216 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2217 45, 46, 47, 48
2218 };
2219 // Last valid token kind.
2220 const int code_max = 303;
2221
2222 if (t <= 0)
2223 return symbol_kind::S_YYEOF;
2224 else if (t <= code_max)
2225 return static_cast <symbol_kind_type> (translate_table[t]);
2226 else
2228 }
2229
2230 // basic_symbol.
2231 template <typename Base>
2233 : Base (that)
2234 , value ()
2235 , location (that.location)
2236 {
2237 switch (this->kind ())
2238 {
2239 case symbol_kind::S_value: // value
2240 case symbol_kind::S_map_value: // map_value
2241 case symbol_kind::S_socket_type_value: // socket_type_value
2242 value.copy< ElementPtr > (YY_MOVE (that.value));
2243 break;
2244
2245 case symbol_kind::S_BOOLEAN: // "boolean"
2246 value.copy< bool > (YY_MOVE (that.value));
2247 break;
2248
2249 case symbol_kind::S_FLOAT: // "floating point"
2250 value.copy< double > (YY_MOVE (that.value));
2251 break;
2252
2253 case symbol_kind::S_INTEGER: // "integer"
2254 value.copy< int64_t > (YY_MOVE (that.value));
2255 break;
2256
2257 case symbol_kind::S_STRING: // "constant string"
2258 value.copy< std::string > (YY_MOVE (that.value));
2259 break;
2260
2261 default:
2262 break;
2263 }
2264
2265 }
2266
2267
2268
2269
2270 template <typename Base>
2273 {
2274 return this->kind ();
2275 }
2276
2277
2278 template <typename Base>
2279 bool
2281 {
2282 return this->kind () == symbol_kind::S_YYEMPTY;
2283 }
2284
2285 template <typename Base>
2286 void
2288 {
2289 super_type::move (s);
2290 switch (this->kind ())
2291 {
2292 case symbol_kind::S_value: // value
2293 case symbol_kind::S_map_value: // map_value
2294 case symbol_kind::S_socket_type_value: // socket_type_value
2295 value.move< ElementPtr > (YY_MOVE (s.value));
2296 break;
2297
2298 case symbol_kind::S_BOOLEAN: // "boolean"
2299 value.move< bool > (YY_MOVE (s.value));
2300 break;
2301
2302 case symbol_kind::S_FLOAT: // "floating point"
2303 value.move< double > (YY_MOVE (s.value));
2304 break;
2305
2306 case symbol_kind::S_INTEGER: // "integer"
2307 value.move< int64_t > (YY_MOVE (s.value));
2308 break;
2309
2310 case symbol_kind::S_STRING: // "constant string"
2311 value.move< std::string > (YY_MOVE (s.value));
2312 break;
2313
2314 default:
2315 break;
2316 }
2317
2318 location = YY_MOVE (s.location);
2319 }
2320
2321 // by_kind.
2322 inline
2324 : kind_ (symbol_kind::S_YYEMPTY)
2325 {}
2326
2327#if 201103L <= YY_CPLUSPLUS
2328 inline
2330 : kind_ (that.kind_)
2331 {
2332 that.clear ();
2333 }
2334#endif
2335
2336 inline
2338 : kind_ (that.kind_)
2339 {}
2340
2341 inline
2343 : kind_ (yytranslate_ (t))
2344 {}
2345
2346
2347
2348 inline
2349 void
2351 {
2352 kind_ = symbol_kind::S_YYEMPTY;
2353 }
2354
2355 inline
2356 void
2358 {
2359 kind_ = that.kind_;
2360 that.clear ();
2361 }
2362
2363 inline
2366 {
2367 return kind_;
2368 }
2369
2370
2371 inline
2374 {
2375 return this->kind ();
2376 }
2377
2378
2379#line 14 "netconf_parser.yy"
2380} } // isc::netconf
2381#line 2382 "netconf_parser.h"
2382
2383
2384
2385
2386#endif // !YY_NETCONF_NETCONF_PARSER_H_INCLUDED
const location_type & location() const YY_NOEXCEPT
symbol_kind_type token() const YY_NOEXCEPT
const symbol_type & lookahead() const YY_NOEXCEPT
Present a slice of the top of a stack.
slice(const stack &stack, index_type range) YY_NOEXCEPT
A buffer to store and retrieve objects.
long double yyalign_me_
Strongest alignment constraints.
void move(self_type &that)
Move the content of that to this.
T & build(const T &t)
Instantiate a T in here from t.
value_type(YY_RVREF(T) t)
Construct and fill.
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
char yyraw_[size]
A buffer large enough to store any of the semantic values.
T & as() YY_NOEXCEPT
Accessor to a built T.
void copy(const self_type &that)
Copy the content of that to this.
T & build()
Instantiate an empty T in here.
void destroy()
Destroy the stored T.
T & emplace(const T &t)
Instantiate a T in here from t.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
T & emplace()
Instantiate an empty T in here.
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
value_type() YY_NOEXCEPT
Empty construction.
static symbol_type make_NETCONF(const location_type &l)
static symbol_type make_SOCKET_URL(const location_type &l)
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
static symbol_type make_MAXSIZE(const location_type &l)
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
virtual int parse()
Parse.
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
static symbol_type make_CONTROL_SOCKET(const location_type &l)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
static symbol_type make_OUTPUT(const location_type &l)
static symbol_type make_DHCP6_SERVER(const location_type &l)
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
static symbol_type make_BOOT_UPDATE(const location_type &l)
static symbol_type make_NETCONF_UNDEF(const location_type &l)
static symbol_type make_NULL_TYPE(const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_HTTP(const location_type &l)
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
static symbol_type make_VALIDATE_CHANGES(const location_type &l)
static symbol_type make_END(const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_NETCONF_error(const location_type &l)
static symbol_type make_LCURLY_BRACKET(const location_type &l)
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
NetconfParser(isc::netconf::ParserContext &ctx_yyarg)
Build a parser object.
static symbol_type make_STDOUT(const location_type &l)
value_type semantic_type
Backward compatibility (Bison 3.8).
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static symbol_type make_SOCKET_TYPE(const location_type &l)
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
static symbol_type make_DHCP4_SERVER(const location_type &l)
int debug_level_type
Type for debugging levels.
static symbol_type make_D2_SERVER(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_NAME(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_START_JSON(const location_type &l)
static symbol_type make_UNIX(const location_type &l)
static symbol_type make_PATTERN(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
static const symbol_kind_type YYNTOKENS
The number of tokens.
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
static symbol_type make_MANAGED_SERVERS(const location_type &l)
location location_type
Symbol locations.
static symbol_type make_SUBSCRIBE_CHANGES(const location_type &l)
static symbol_type make_CA_SERVER(const location_type &l)
static symbol_type make_COLON(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)
void set_debug_level(debug_level_type l)
Set the current debugging level.
static symbol_type make_USER_CONTEXT(const location_type &l)
static symbol_type make_COMMA(const location_type &l)
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_START_NETCONF(const location_type &l)
static symbol_type make_MODEL(const location_type &l)
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
static symbol_type make_START_SUB_NETCONF(const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_FLOAT(const double &v, const location_type &l)
static symbol_type make_SOCKET_NAME(const location_type &l)
Parser context is a wrapper around flex/bison instances dedicated to Netconf-agent config file parser...
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
Defines the logger used by the top-level component of kea-lfc.
Forward declaration of the ParserContext class.
#define YY_RVREF(Type)
#define NETCONF__ASSERT
#define YY_MOVE_REF(Type)
#define YY_NOEXCEPT
#define YY_ATTRIBUTE_PURE
#define YY_MOVE
#define YY_NOTHROW
bool empty() const YY_NOEXCEPT
Whether empty.
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
basic_symbol() YY_NOEXCEPT
Default constructor.
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
value_type value
The semantic value.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Type access provider for token (enum) based symbols.
token_kind_type kind_type
The symbol kind as needed by the constructor.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
by_kind() YY_NOEXCEPT
Default constructor.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
symbol_kind_type kind_
The symbol kind.
void move(by_kind &that)
Steal the symbol kind from that.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
"External" symbols: returned by the scanner.
symbol_type() YY_NOEXCEPT
Empty symbol.
basic_symbol< by_kind > super_type
Superclass.
Syntax errors thrown from user actions.
syntax_error(const location_type &l, const std::string &m)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).