Kea 3.2.0-git
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
38
39// C++ LALR(1) parser skeleton written by Akim Demaille.
40
41// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
42// especially those whose name start with YY_ or yy_. They are
43// private implementation details that can be changed or removed.
44
45#ifndef YY_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 <cc/data.h>
52
53#include <boost/lexical_cast.hpp>
54
55#include <sstream>
56#include <string>
57
58using namespace isc::netconf;
59using namespace isc::data;
60using namespace std;
61
62#line 63 "netconf_parser.h"
63
64# include <cassert>
65# include <cstdlib> // std::abort
66# include <iostream>
67# include <stdexcept>
68# include <string>
69# include <vector>
70
71#if defined __cplusplus
72# define YY_CPLUSPLUS __cplusplus
73#else
74# define YY_CPLUSPLUS 199711L
75#endif
76
77// Support move semantics when possible.
78#if 201103L <= YY_CPLUSPLUS
79# define YY_MOVE std::move
80# define YY_MOVE_OR_COPY move
81# define YY_MOVE_REF(Type) Type&&
82# define YY_RVREF(Type) Type&&
83# define YY_COPY(Type) Type
84#else
85# define YY_MOVE
86# define YY_MOVE_OR_COPY copy
87# define YY_MOVE_REF(Type) Type&
88# define YY_RVREF(Type) const Type&
89# define YY_COPY(Type) const Type&
90#endif
91
92// Support noexcept when possible.
93#if 201103L <= YY_CPLUSPLUS
94# define YY_NOEXCEPT noexcept
95# define YY_NOTHROW
96#else
97# define YY_NOEXCEPT
98# define YY_NOTHROW throw ()
99#endif
100
101// Support constexpr when possible.
102#if 201703 <= YY_CPLUSPLUS
103# define YY_CONSTEXPR constexpr
104#else
105# define YY_CONSTEXPR
106#endif
107# include "location.hh"
108#include <typeinfo>
109#ifndef NETCONF__ASSERT
110# include <cassert>
111# define NETCONF__ASSERT assert
112#endif
113
114
115#ifndef YY_ATTRIBUTE_PURE
116# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
117# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
118# else
119# define YY_ATTRIBUTE_PURE
120# endif
121#endif
122
123#ifndef YY_ATTRIBUTE_UNUSED
124# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
125# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
126# else
127# define YY_ATTRIBUTE_UNUSED
128# endif
129#endif
130
131/* Suppress unused-variable warnings by "using" E. */
132#if ! defined lint || defined __GNUC__
133# define YY_USE(E) ((void) (E))
134#else
135# define YY_USE(E) /* empty */
136#endif
137
138/* Suppress an incorrect diagnostic about yylval being uninitialized. */
139#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
140# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
141# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
142 _Pragma ("GCC diagnostic push") \
143 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
144# else
145# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
146 _Pragma ("GCC diagnostic push") \
147 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
148 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
149# endif
150# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
151 _Pragma ("GCC diagnostic pop")
152#else
153# define YY_INITIAL_VALUE(Value) Value
154#endif
155#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
156# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
157# define YY_IGNORE_MAYBE_UNINITIALIZED_END
158#endif
159#ifndef YY_INITIAL_VALUE
160# define YY_INITIAL_VALUE(Value) /* Nothing. */
161#endif
162
163#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
164# define YY_IGNORE_USELESS_CAST_BEGIN \
165 _Pragma ("GCC diagnostic push") \
166 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
167# define YY_IGNORE_USELESS_CAST_END \
168 _Pragma ("GCC diagnostic pop")
169#endif
170#ifndef YY_IGNORE_USELESS_CAST_BEGIN
171# define YY_IGNORE_USELESS_CAST_BEGIN
172# define YY_IGNORE_USELESS_CAST_END
173#endif
174
175# ifndef YY_CAST
176# ifdef __cplusplus
177# define YY_CAST(Type, Val) static_cast<Type> (Val)
178# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
179# else
180# define YY_CAST(Type, Val) ((Type) (Val))
181# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
182# endif
183# endif
184# ifndef YY_NULLPTR
185# if defined __cplusplus
186# if 201103L <= __cplusplus
187# define YY_NULLPTR nullptr
188# else
189# define YY_NULLPTR 0
190# endif
191# else
192# define YY_NULLPTR ((void*)0)
193# endif
194# endif
195
196/* Debug traces. */
197#ifndef NETCONF_DEBUG
198# if defined YYDEBUG
199#if YYDEBUG
200# define NETCONF_DEBUG 1
201# else
202# define NETCONF_DEBUG 0
203# endif
204# else /* ! defined YYDEBUG */
205# define NETCONF_DEBUG 1
206# endif /* ! defined YYDEBUG */
207#endif /* ! defined NETCONF_DEBUG */
208
209#line 14 "netconf_parser.yy"
210namespace isc { namespace netconf {
211#line 212 "netconf_parser.h"
212
213
214
215
218 {
219 public:
220#ifdef NETCONF_STYPE
221# ifdef __GNUC__
222# pragma GCC message "bison: do not #define NETCONF_STYPE in C++, use %define api.value.type"
223# endif
224 typedef NETCONF_STYPE value_type;
225#else
232 {
233 public:
236
239 : yyraw_ ()
240 , yytypeid_ (YY_NULLPTR)
241 {}
242
244 template <typename T>
246 : yytypeid_ (&typeid (T))
247 {
248 NETCONF__ASSERT (sizeof (T) <= size);
249 new (yyas_<T> ()) T (YY_MOVE (t));
250 }
251
252#if 201103L <= YY_CPLUSPLUS
254 value_type (const self_type&) = delete;
256 self_type& operator= (const self_type&) = delete;
257#endif
258
261 {
262 NETCONF__ASSERT (!yytypeid_);
263 }
264
265# if 201103L <= YY_CPLUSPLUS
267 template <typename T, typename... U>
268 T&
269 emplace (U&&... u)
270 {
271 NETCONF__ASSERT (!yytypeid_);
272 NETCONF__ASSERT (sizeof (T) <= size);
273 yytypeid_ = & typeid (T);
274 return *new (yyas_<T> ()) T (std::forward <U>(u)...);
275 }
276# else
278 template <typename T>
279 T&
281 {
282 NETCONF__ASSERT (!yytypeid_);
283 NETCONF__ASSERT (sizeof (T) <= size);
284 yytypeid_ = & typeid (T);
285 return *new (yyas_<T> ()) T ();
286 }
287
289 template <typename T>
290 T&
291 emplace (const T& t)
292 {
293 NETCONF__ASSERT (!yytypeid_);
294 NETCONF__ASSERT (sizeof (T) <= size);
295 yytypeid_ = & typeid (T);
296 return *new (yyas_<T> ()) T (t);
297 }
298# endif
299
302 template <typename T>
303 T&
305 {
306 return emplace<T> ();
307 }
308
311 template <typename T>
312 T&
313 build (const T& t)
314 {
315 return emplace<T> (t);
316 }
317
319 template <typename T>
320 T&
322 {
323 NETCONF__ASSERT (yytypeid_);
324 NETCONF__ASSERT (*yytypeid_ == typeid (T));
325 NETCONF__ASSERT (sizeof (T) <= size);
326 return *yyas_<T> ();
327 }
328
330 template <typename T>
331 const T&
333 {
334 NETCONF__ASSERT (yytypeid_);
335 NETCONF__ASSERT (*yytypeid_ == typeid (T));
336 NETCONF__ASSERT (sizeof (T) <= size);
337 return *yyas_<T> ();
338 }
339
348 template <typename T>
349 void
351 {
352 NETCONF__ASSERT (yytypeid_);
353 NETCONF__ASSERT (*yytypeid_ == *that.yytypeid_);
354 std::swap (as<T> (), that.as<T> ());
355 }
356
360 template <typename T>
361 void
363 {
364# if 201103L <= YY_CPLUSPLUS
365 emplace<T> (std::move (that.as<T> ()));
366# else
367 emplace<T> ();
368 swap<T> (that);
369# endif
370 that.destroy<T> ();
371 }
372
373# if 201103L <= YY_CPLUSPLUS
375 template <typename T>
376 void
377 move (self_type&& that)
378 {
379 emplace<T> (std::move (that.as<T> ()));
380 that.destroy<T> ();
381 }
382#endif
383
385 template <typename T>
386 void
387 copy (const self_type& that)
388 {
389 emplace<T> (that.as<T> ());
390 }
391
393 template <typename T>
394 void
396 {
397 as<T> ().~T ();
398 yytypeid_ = YY_NULLPTR;
399 }
400
401 private:
402#if YY_CPLUSPLUS < 201103L
404 value_type (const self_type&);
406 self_type& operator= (const self_type&);
407#endif
408
410 template <typename T>
411 T*
412 yyas_ () YY_NOEXCEPT
413 {
414 void *yyp = yyraw_;
415 return static_cast<T*> (yyp);
416 }
417
419 template <typename T>
420 const T*
421 yyas_ () const YY_NOEXCEPT
422 {
423 const void *yyp = yyraw_;
424 return static_cast<const T*> (yyp);
425 }
426
428 union union_type
429 {
430 // value
431 // map_value
432 // socket_type_value
433 char dummy1[sizeof (ElementPtr)];
434
435 // "boolean"
436 char dummy2[sizeof (bool)];
437
438 // "floating point"
439 char dummy3[sizeof (double)];
440
441 // "integer"
442 char dummy4[sizeof (int64_t)];
443
444 // "constant string"
445 char dummy5[sizeof (string)];
446 };
447
449 enum { size = sizeof (union_type) };
450
452 union
453 {
455 long double yyalign_me_;
457 char yyraw_[size];
458 };
459
461 const std::type_info *yytypeid_;
462 };
463
464#endif
467
469 typedef location location_type;
470
472 struct syntax_error : std::runtime_error
473 {
474 syntax_error (const location_type& l, const std::string& m)
475 : std::runtime_error (m)
476 , location (l)
477 {}
478
480 : std::runtime_error (s.what ())
481 , location (s.location)
482 {}
483
485
487 };
488
490 struct token
491 {
493 {
495 TOKEN_END = 0, // "end of file"
496 TOKEN_NETCONF_error = 256, // error
497 TOKEN_NETCONF_UNDEF = 257, // "invalid token"
498 TOKEN_COMMA = 258, // ","
499 TOKEN_COLON = 259, // ":"
504 TOKEN_NULL_TYPE = 264, // "null"
505 TOKEN_NETCONF = 265, // "Netconf"
506 TOKEN_USER_CONTEXT = 266, // "user-context"
507 TOKEN_COMMENT = 267, // "comment"
508 TOKEN_BOOT_UPDATE = 268, // "boot-update"
509 TOKEN_SUBSCRIBE_CHANGES = 269, // "subscribe-changes"
510 TOKEN_VALIDATE_CHANGES = 270, // "validate-changes"
511 TOKEN_MANAGED_SERVERS = 271, // "managed-servers"
512 TOKEN_DHCP4_SERVER = 272, // "dhcp4"
513 TOKEN_DHCP6_SERVER = 273, // "dhcp6"
514 TOKEN_D2_SERVER = 274, // "d2"
515 TOKEN_MODEL = 275, // "model"
516 TOKEN_CONTROL_SOCKET = 276, // "control-socket"
517 TOKEN_SOCKET_TYPE = 277, // "socket-type"
518 TOKEN_UNIX = 278, // "unix"
519 TOKEN_HTTP = 279, // "http"
520 TOKEN_STDOUT = 280, // "stdout"
521 TOKEN_SOCKET_NAME = 281, // "socket-name"
522 TOKEN_SOCKET_URL = 282, // "socket-url"
523 TOKEN_HOOKS_LIBRARIES = 283, // "hooks-libraries"
524 TOKEN_LIBRARY = 284, // "library"
525 TOKEN_PARAMETERS = 285, // "parameters"
526 TOKEN_LOGGERS = 286, // "loggers"
527 TOKEN_NAME = 287, // "name"
528 TOKEN_OUTPUT_OPTIONS = 288, // "output-options"
529 TOKEN_OUTPUT = 289, // "output"
530 TOKEN_DEBUGLEVEL = 290, // "debuglevel"
531 TOKEN_SEVERITY = 291, // "severity"
532 TOKEN_FLUSH = 292, // "flush"
533 TOKEN_MAXSIZE = 293, // "maxsize"
534 TOKEN_MAXVER = 294, // "maxver"
535 TOKEN_PATTERN = 295, // "pattern"
536 TOKEN_START_JSON = 296, // START_JSON
537 TOKEN_START_NETCONF = 297, // START_NETCONF
538 TOKEN_START_SUB_NETCONF = 298, // START_SUB_NETCONF
539 TOKEN_STRING = 299, // "constant string"
540 TOKEN_INTEGER = 300, // "integer"
541 TOKEN_FLOAT = 301, // "floating point"
542 TOKEN_BOOLEAN = 302 // "boolean"
543 };
544
546 };
547
550
553
556 {
558 {
561 S_YYEOF = 0, // "end of file"
562 S_YYerror = 1, // error
563 S_YYUNDEF = 2, // "invalid token"
564 S_COMMA = 3, // ","
565 S_COLON = 4, // ":"
570 S_NULL_TYPE = 9, // "null"
571 S_NETCONF = 10, // "Netconf"
572 S_USER_CONTEXT = 11, // "user-context"
573 S_COMMENT = 12, // "comment"
574 S_BOOT_UPDATE = 13, // "boot-update"
575 S_SUBSCRIBE_CHANGES = 14, // "subscribe-changes"
576 S_VALIDATE_CHANGES = 15, // "validate-changes"
577 S_MANAGED_SERVERS = 16, // "managed-servers"
578 S_DHCP4_SERVER = 17, // "dhcp4"
579 S_DHCP6_SERVER = 18, // "dhcp6"
580 S_D2_SERVER = 19, // "d2"
581 S_MODEL = 20, // "model"
582 S_CONTROL_SOCKET = 21, // "control-socket"
583 S_SOCKET_TYPE = 22, // "socket-type"
584 S_UNIX = 23, // "unix"
585 S_HTTP = 24, // "http"
586 S_STDOUT = 25, // "stdout"
587 S_SOCKET_NAME = 26, // "socket-name"
588 S_SOCKET_URL = 27, // "socket-url"
589 S_HOOKS_LIBRARIES = 28, // "hooks-libraries"
590 S_LIBRARY = 29, // "library"
591 S_PARAMETERS = 30, // "parameters"
592 S_LOGGERS = 31, // "loggers"
593 S_NAME = 32, // "name"
594 S_OUTPUT_OPTIONS = 33, // "output-options"
595 S_OUTPUT = 34, // "output"
596 S_DEBUGLEVEL = 35, // "debuglevel"
597 S_SEVERITY = 36, // "severity"
598 S_FLUSH = 37, // "flush"
599 S_MAXSIZE = 38, // "maxsize"
600 S_MAXVER = 39, // "maxver"
601 S_PATTERN = 40, // "pattern"
602 S_START_JSON = 41, // START_JSON
603 S_START_NETCONF = 42, // START_NETCONF
604 S_START_SUB_NETCONF = 43, // START_SUB_NETCONF
605 S_STRING = 44, // "constant string"
606 S_INTEGER = 45, // "integer"
607 S_FLOAT = 46, // "floating point"
608 S_BOOLEAN = 47, // "boolean"
609 S_YYACCEPT = 48, // $accept
610 S_start = 49, // start
611 S_50_1 = 50, // $@1
612 S_51_2 = 51, // $@2
613 S_52_3 = 52, // $@3
614 S_sub_netconf = 53, // sub_netconf
615 S_54_4 = 54, // $@4
616 S_json = 55, // json
617 S_value = 56, // value
618 S_map = 57, // map
619 S_58_5 = 58, // $@5
620 S_map_value = 59, // map_value
621 S_map_content = 60, // map_content
622 S_not_empty_map = 61, // not_empty_map
623 S_list_generic = 62, // list_generic
624 S_63_6 = 63, // $@6
625 S_list_content = 64, // list_content
626 S_not_empty_list = 65, // not_empty_list
627 S_unknown_map_entry = 66, // unknown_map_entry
628 S_netconf_syntax_map = 67, // netconf_syntax_map
629 S_68_7 = 68, // $@7
630 S_global_object = 69, // global_object
631 S_70_8 = 70, // $@8
632 S_global_object_comma = 71, // global_object_comma
633 S_global_params = 72, // global_params
634 S_not_empty_global_params = 73, // not_empty_global_params
635 S_global_param = 74, // global_param
636 S_boot_update = 75, // boot_update
637 S_subscribe_changes = 76, // subscribe_changes
638 S_validate_changes = 77, // validate_changes
639 S_user_context = 78, // user_context
640 S_79_9 = 79, // $@9
641 S_comment = 80, // comment
642 S_81_10 = 81, // $@10
643 S_hooks_libraries = 82, // hooks_libraries
644 S_83_11 = 83, // $@11
645 S_hooks_libraries_list = 84, // hooks_libraries_list
646 S_not_empty_hooks_libraries_list = 85, // not_empty_hooks_libraries_list
647 S_hooks_library = 86, // hooks_library
648 S_87_12 = 87, // $@12
649 S_hooks_params = 88, // hooks_params
650 S_hooks_param = 89, // hooks_param
651 S_library = 90, // library
652 S_91_13 = 91, // $@13
653 S_parameters = 92, // parameters
654 S_93_14 = 93, // $@14
655 S_managed_servers = 94, // managed_servers
656 S_95_15 = 95, // $@15
657 S_servers_entries = 96, // servers_entries
658 S_not_empty_servers_entries = 97, // not_empty_servers_entries
659 S_server_entry = 98, // server_entry
660 S_dhcp4_server = 99, // dhcp4_server
661 S_100_16 = 100, // $@16
662 S_dhcp6_server = 101, // dhcp6_server
663 S_102_17 = 102, // $@17
664 S_d2_server = 103, // d2_server
665 S_104_18 = 104, // $@18
666 S_managed_server_params = 105, // managed_server_params
667 S_managed_server_param = 106, // managed_server_param
668 S_model = 107, // model
669 S_108_19 = 108, // $@19
670 S_control_socket = 109, // control_socket
671 S_110_20 = 110, // $@20
672 S_control_socket_params = 111, // control_socket_params
673 S_control_socket_param = 112, // control_socket_param
674 S_socket_type = 113, // socket_type
675 S_114_21 = 114, // $@21
676 S_socket_type_value = 115, // socket_type_value
677 S_socket_name = 116, // socket_name
678 S_117_22 = 117, // $@22
679 S_socket_url = 118, // socket_url
680 S_119_23 = 119, // $@23
681 S_loggers = 120, // loggers
682 S_121_24 = 121, // $@24
683 S_loggers_entries = 122, // loggers_entries
684 S_logger_entry = 123, // logger_entry
685 S_124_25 = 124, // $@25
686 S_logger_params = 125, // logger_params
687 S_logger_param = 126, // logger_param
688 S_name = 127, // name
689 S_128_26 = 128, // $@26
690 S_debuglevel = 129, // debuglevel
691 S_severity = 130, // severity
692 S_131_27 = 131, // $@27
693 S_output_options_list = 132, // output_options_list
694 S_133_28 = 133, // $@28
695 S_output_options_list_content = 134, // output_options_list_content
696 S_output_entry = 135, // output_entry
697 S_136_29 = 136, // $@29
698 S_output_params_list = 137, // output_params_list
699 S_output_params = 138, // output_params
700 S_output = 139, // output
701 S_140_30 = 140, // $@30
702 S_flush = 141, // flush
703 S_maxsize = 142, // maxsize
704 S_maxver = 143, // maxver
705 S_pattern = 144, // pattern
706 S_145_31 = 145 // $@31
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< string > (std::move (that.value));
763 break;
764
765 default:
766 break;
767 }
768
769 }
770#endif
771
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, 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 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< 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
919
921 bool empty () const YY_NOEXCEPT;
922
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
970
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, 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 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;
1083 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1085 void set_debug_level (debug_level_type l);
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
1103 symbol_type
1104 make_END (location_type l)
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
1119 make_NETCONF_error (location_type l)
1120 {
1121 return symbol_type (token::TOKEN_NETCONF_error, std::move (l));
1122 }
1123#else
1124 static
1125 symbol_type
1130#endif
1131#if 201103L <= YY_CPLUSPLUS
1132 static
1133 symbol_type
1134 make_NETCONF_UNDEF (location_type l)
1135 {
1136 return symbol_type (token::TOKEN_NETCONF_UNDEF, std::move (l));
1137 }
1138#else
1139 static
1140 symbol_type
1145#endif
1146#if 201103L <= YY_CPLUSPLUS
1147 static
1148 symbol_type
1149 make_COMMA (location_type l)
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
1164 make_COLON (location_type l)
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
1179 make_LSQUARE_BRACKET (location_type l)
1180 {
1181 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1182 }
1183#else
1184 static
1185 symbol_type
1190#endif
1191#if 201103L <= YY_CPLUSPLUS
1192 static
1193 symbol_type
1194 make_RSQUARE_BRACKET (location_type l)
1195 {
1196 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1197 }
1198#else
1199 static
1200 symbol_type
1205#endif
1206#if 201103L <= YY_CPLUSPLUS
1207 static
1208 symbol_type
1209 make_LCURLY_BRACKET (location_type l)
1210 {
1211 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1212 }
1213#else
1214 static
1215 symbol_type
1220#endif
1221#if 201103L <= YY_CPLUSPLUS
1222 static
1223 symbol_type
1224 make_RCURLY_BRACKET (location_type l)
1225 {
1226 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1227 }
1228#else
1229 static
1230 symbol_type
1235#endif
1236#if 201103L <= YY_CPLUSPLUS
1237 static
1238 symbol_type
1239 make_NULL_TYPE (location_type l)
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
1254 make_NETCONF (location_type l)
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
1269 make_USER_CONTEXT (location_type l)
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
1284 make_COMMENT (location_type l)
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
1299 make_BOOT_UPDATE (location_type l)
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
1314 make_SUBSCRIBE_CHANGES (location_type l)
1315 {
1316 return symbol_type (token::TOKEN_SUBSCRIBE_CHANGES, std::move (l));
1317 }
1318#else
1319 static
1320 symbol_type
1325#endif
1326#if 201103L <= YY_CPLUSPLUS
1327 static
1328 symbol_type
1329 make_VALIDATE_CHANGES (location_type l)
1330 {
1331 return symbol_type (token::TOKEN_VALIDATE_CHANGES, std::move (l));
1332 }
1333#else
1334 static
1335 symbol_type
1340#endif
1341#if 201103L <= YY_CPLUSPLUS
1342 static
1343 symbol_type
1344 make_MANAGED_SERVERS (location_type l)
1345 {
1346 return symbol_type (token::TOKEN_MANAGED_SERVERS, std::move (l));
1347 }
1348#else
1349 static
1350 symbol_type
1355#endif
1356#if 201103L <= YY_CPLUSPLUS
1357 static
1358 symbol_type
1359 make_DHCP4_SERVER (location_type l)
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
1374 make_DHCP6_SERVER (location_type l)
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
1389 make_D2_SERVER (location_type l)
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
1404 make_MODEL (location_type l)
1405 {
1406 return symbol_type (token::TOKEN_MODEL, std::move (l));
1407 }
1408#else
1409 static
1410 symbol_type
1412 {
1413 return symbol_type (token::TOKEN_MODEL, l);
1414 }
1415#endif
1416#if 201103L <= YY_CPLUSPLUS
1417 static
1418 symbol_type
1419 make_CONTROL_SOCKET (location_type l)
1420 {
1421 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1422 }
1423#else
1424 static
1425 symbol_type
1430#endif
1431#if 201103L <= YY_CPLUSPLUS
1432 static
1433 symbol_type
1434 make_SOCKET_TYPE (location_type l)
1435 {
1436 return symbol_type (token::TOKEN_SOCKET_TYPE, 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
1449 make_UNIX (location_type l)
1450 {
1451 return symbol_type (token::TOKEN_UNIX, std::move (l));
1452 }
1453#else
1454 static
1455 symbol_type
1457 {
1458 return symbol_type (token::TOKEN_UNIX, l);
1459 }
1460#endif
1461#if 201103L <= YY_CPLUSPLUS
1462 static
1463 symbol_type
1464 make_HTTP (location_type l)
1465 {
1466 return symbol_type (token::TOKEN_HTTP, std::move (l));
1467 }
1468#else
1469 static
1470 symbol_type
1472 {
1473 return symbol_type (token::TOKEN_HTTP, l);
1474 }
1475#endif
1476#if 201103L <= YY_CPLUSPLUS
1477 static
1478 symbol_type
1479 make_STDOUT (location_type l)
1480 {
1481 return symbol_type (token::TOKEN_STDOUT, std::move (l));
1482 }
1483#else
1484 static
1485 symbol_type
1487 {
1488 return symbol_type (token::TOKEN_STDOUT, l);
1489 }
1490#endif
1491#if 201103L <= YY_CPLUSPLUS
1492 static
1493 symbol_type
1494 make_SOCKET_NAME (location_type l)
1495 {
1496 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1497 }
1498#else
1499 static
1500 symbol_type
1502 {
1504 }
1505#endif
1506#if 201103L <= YY_CPLUSPLUS
1507 static
1508 symbol_type
1509 make_SOCKET_URL (location_type l)
1510 {
1511 return symbol_type (token::TOKEN_SOCKET_URL, 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
1524 make_HOOKS_LIBRARIES (location_type l)
1525 {
1526 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1527 }
1528#else
1529 static
1530 symbol_type
1535#endif
1536#if 201103L <= YY_CPLUSPLUS
1537 static
1538 symbol_type
1539 make_LIBRARY (location_type l)
1540 {
1541 return symbol_type (token::TOKEN_LIBRARY, 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
1554 make_PARAMETERS (location_type l)
1555 {
1556 return symbol_type (token::TOKEN_PARAMETERS, 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
1569 make_LOGGERS (location_type l)
1570 {
1571 return symbol_type (token::TOKEN_LOGGERS, 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
1584 make_NAME (location_type l)
1585 {
1586 return symbol_type (token::TOKEN_NAME, std::move (l));
1587 }
1588#else
1589 static
1590 symbol_type
1592 {
1593 return symbol_type (token::TOKEN_NAME, l);
1594 }
1595#endif
1596#if 201103L <= YY_CPLUSPLUS
1597 static
1598 symbol_type
1599 make_OUTPUT_OPTIONS (location_type l)
1600 {
1601 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1602 }
1603#else
1604 static
1605 symbol_type
1610#endif
1611#if 201103L <= YY_CPLUSPLUS
1612 static
1613 symbol_type
1614 make_OUTPUT (location_type l)
1615 {
1616 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1617 }
1618#else
1619 static
1620 symbol_type
1622 {
1623 return symbol_type (token::TOKEN_OUTPUT, l);
1624 }
1625#endif
1626#if 201103L <= YY_CPLUSPLUS
1627 static
1628 symbol_type
1629 make_DEBUGLEVEL (location_type l)
1630 {
1631 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1632 }
1633#else
1634 static
1635 symbol_type
1637 {
1639 }
1640#endif
1641#if 201103L <= YY_CPLUSPLUS
1642 static
1643 symbol_type
1644 make_SEVERITY (location_type l)
1645 {
1646 return symbol_type (token::TOKEN_SEVERITY, 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
1659 make_FLUSH (location_type l)
1660 {
1661 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1662 }
1663#else
1664 static
1665 symbol_type
1667 {
1668 return symbol_type (token::TOKEN_FLUSH, l);
1669 }
1670#endif
1671#if 201103L <= YY_CPLUSPLUS
1672 static
1673 symbol_type
1674 make_MAXSIZE (location_type l)
1675 {
1676 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1677 }
1678#else
1679 static
1680 symbol_type
1682 {
1684 }
1685#endif
1686#if 201103L <= YY_CPLUSPLUS
1687 static
1688 symbol_type
1689 make_MAXVER (location_type l)
1690 {
1691 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1692 }
1693#else
1694 static
1695 symbol_type
1697 {
1698 return symbol_type (token::TOKEN_MAXVER, l);
1699 }
1700#endif
1701#if 201103L <= YY_CPLUSPLUS
1702 static
1703 symbol_type
1704 make_PATTERN (location_type l)
1705 {
1706 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1707 }
1708#else
1709 static
1710 symbol_type
1712 {
1714 }
1715#endif
1716#if 201103L <= YY_CPLUSPLUS
1717 static
1718 symbol_type
1719 make_START_JSON (location_type l)
1720 {
1721 return symbol_type (token::TOKEN_START_JSON, 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
1734 make_START_NETCONF (location_type l)
1735 {
1736 return symbol_type (token::TOKEN_START_NETCONF, std::move (l));
1737 }
1738#else
1739 static
1740 symbol_type
1745#endif
1746#if 201103L <= YY_CPLUSPLUS
1747 static
1748 symbol_type
1749 make_START_SUB_NETCONF (location_type l)
1750 {
1751 return symbol_type (token::TOKEN_START_SUB_NETCONF, std::move (l));
1752 }
1753#else
1754 static
1755 symbol_type
1760#endif
1761#if 201103L <= YY_CPLUSPLUS
1762 static
1763 symbol_type
1764 make_STRING (string v, location_type l)
1765 {
1766 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
1767 }
1768#else
1769 static
1770 symbol_type
1771 make_STRING (const string& v, const location_type& l)
1772 {
1773 return symbol_type (token::TOKEN_STRING, v, l);
1774 }
1775#endif
1776#if 201103L <= YY_CPLUSPLUS
1777 static
1778 symbol_type
1779 make_INTEGER (int64_t v, location_type l)
1780 {
1781 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
1782 }
1783#else
1784 static
1785 symbol_type
1786 make_INTEGER (const int64_t& v, const location_type& l)
1787 {
1788 return symbol_type (token::TOKEN_INTEGER, v, l);
1789 }
1790#endif
1791#if 201103L <= YY_CPLUSPLUS
1792 static
1793 symbol_type
1794 make_FLOAT (double v, location_type l)
1795 {
1796 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
1797 }
1798#else
1799 static
1800 symbol_type
1801 make_FLOAT (const double& v, const location_type& l)
1802 {
1803 return symbol_type (token::TOKEN_FLOAT, v, l);
1804 }
1805#endif
1806#if 201103L <= YY_CPLUSPLUS
1807 static
1808 symbol_type
1809 make_BOOLEAN (bool v, location_type l)
1810 {
1811 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
1812 }
1813#else
1814 static
1815 symbol_type
1816 make_BOOLEAN (const bool& v, const location_type& l)
1817 {
1818 return symbol_type (token::TOKEN_BOOLEAN, v, l);
1819 }
1820#endif
1821
1822
1824 {
1825 public:
1826 context (const NetconfParser& yyparser, const symbol_type& yyla);
1827 const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
1828 symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
1829 const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
1830
1834 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
1835
1836 private:
1837 const NetconfParser& yyparser_;
1838 const symbol_type& yyla_;
1839 };
1840
1841 private:
1842#if YY_CPLUSPLUS < 201103L
1846 NetconfParser& operator= (const NetconfParser&);
1847#endif
1848
1849
1851 typedef short state_type;
1852
1854 int yy_syntax_error_arguments_ (const context& yyctx,
1855 symbol_kind_type yyarg[], int yyargn) const;
1856
1859 virtual std::string yysyntax_error_ (const context& yyctx) const;
1863 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
1864
1867 static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
1868
1871 static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
1872
1873 static const signed char yypact_ninf_;
1874 static const signed char yytable_ninf_;
1875
1879 static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
1880
1882 static std::string yytnamerr_ (const char *yystr);
1883
1885 static const char* const yytname_[];
1886
1887
1888 // Tables.
1889 // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1890 // STATE-NUM.
1891 static const short yypact_[];
1892
1893 // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1894 // Performed when YYTABLE does not specify something else to do. Zero
1895 // means the default is an error.
1896 static const unsigned char yydefact_[];
1897
1898 // YYPGOTO[NTERM-NUM].
1899 static const signed char yypgoto_[];
1900
1901 // YYDEFGOTO[NTERM-NUM].
1902 static const short yydefgoto_[];
1903
1904 // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1905 // positive, shift that token. If negative, reduce the rule whose
1906 // number is the opposite. If YYTABLE_NINF, syntax error.
1907 static const short yytable_[];
1908
1909 static const short yycheck_[];
1910
1911 // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1912 // state STATE-NUM.
1913 static const unsigned char yystos_[];
1914
1915 // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
1916 static const unsigned char yyr1_[];
1917
1918 // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
1919 static const signed char yyr2_[];
1920
1921
1922#if NETCONF_DEBUG
1923 // YYRLINE[YYN] -- Source line where rule number YYN was defined.
1924 static const short yyrline_[];
1926 virtual void yy_reduce_print_ (int r) const;
1928 virtual void yy_stack_print_ () const;
1929
1931 int yydebug_;
1933 std::ostream* yycdebug_;
1934
1938 template <typename Base>
1939 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
1940#endif
1941
1946 template <typename Base>
1947 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
1948
1949 private:
1951 struct by_state
1952 {
1954 by_state () YY_NOEXCEPT;
1955
1957 typedef state_type kind_type;
1958
1960 by_state (kind_type s) YY_NOEXCEPT;
1961
1963 by_state (const by_state& that) YY_NOEXCEPT;
1964
1966 void clear () YY_NOEXCEPT;
1967
1969 void move (by_state& that);
1970
1973 symbol_kind_type kind () const YY_NOEXCEPT;
1974
1977 enum { empty_state = 0 };
1978
1981 state_type state;
1982 };
1983
1985 struct stack_symbol_type : basic_symbol<by_state>
1986 {
1988 typedef basic_symbol<by_state> super_type;
1990 stack_symbol_type ();
1992 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
1994 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
1995#if YY_CPLUSPLUS < 201103L
1998 stack_symbol_type& operator= (stack_symbol_type& that);
1999
2002 stack_symbol_type& operator= (const stack_symbol_type& that);
2003#endif
2004 };
2005
2007 template <typename T, typename S = std::vector<T> >
2008 class stack
2009 {
2010 public:
2011 // Hide our reversed order.
2012 typedef typename S::iterator iterator;
2013 typedef typename S::const_iterator const_iterator;
2014 typedef typename S::size_type size_type;
2015 typedef typename std::ptrdiff_t index_type;
2016
2017 stack (size_type n = 200) YY_NOEXCEPT
2018 : seq_ (n)
2019 {}
2020
2021#if 201103L <= YY_CPLUSPLUS
2023 stack (const stack&) = delete;
2025 stack& operator= (const stack&) = delete;
2026#endif
2027
2031 const T&
2032 operator[] (index_type i) const
2033 {
2034 return seq_[size_type (size () - 1 - i)];
2035 }
2036
2040 T&
2041 operator[] (index_type i)
2042 {
2043 return seq_[size_type (size () - 1 - i)];
2044 }
2045
2049 void
2050 push (YY_MOVE_REF (T) t)
2051 {
2052 seq_.push_back (T ());
2053 operator[] (0).move (t);
2054 }
2055
2057 void
2058 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2059 {
2060 for (; 0 < n; --n)
2061 seq_.pop_back ();
2062 }
2063
2065 void
2066 clear () YY_NOEXCEPT
2067 {
2068 seq_.clear ();
2069 }
2070
2072 index_type
2073 size () const YY_NOEXCEPT
2074 {
2075 return index_type (seq_.size ());
2076 }
2077
2079 const_iterator
2080 begin () const YY_NOEXCEPT
2081 {
2082 return seq_.begin ();
2083 }
2084
2086 const_iterator
2087 end () const YY_NOEXCEPT
2088 {
2089 return seq_.end ();
2090 }
2091
2093 class slice
2094 {
2095 public:
2096 slice (const stack& stack, index_type range) YY_NOEXCEPT
2097 : stack_ (stack)
2098 , range_ (range)
2099 {}
2100
2101 const T&
2102 operator[] (index_type i) const
2103 {
2104 return stack_[range_ - i];
2105 }
2106
2107 private:
2108 const stack& stack_;
2109 index_type range_;
2110 };
2111
2112 private:
2113#if YY_CPLUSPLUS < 201103L
2115 stack (const stack&);
2117 stack& operator= (const stack&);
2118#endif
2120 S seq_;
2121 };
2122
2123
2125 typedef stack<stack_symbol_type> stack_type;
2126
2128 stack_type yystack_;
2129
2135 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
2136
2143 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
2144
2146 void yypop_ (int n = 1) YY_NOEXCEPT;
2147
2149 enum
2150 {
2151 yylast_ = 215,
2152 yynnts_ = 98,
2153 yyfinal_ = 8
2154 };
2155
2156
2157 // User arguments.
2159
2160 };
2161
2162 inline
2164 NetconfParser::yytranslate_ (int t) YY_NOEXCEPT
2165 {
2166 // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
2167 // TOKEN-NUM as returned by yylex.
2168 static
2169 const signed char
2170 translate_table[] =
2171 {
2172 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2173 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2174 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2175 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2177 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2187 2, 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, 1, 2, 3, 4,
2198 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2199 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2200 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2201 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2202 45, 46, 47
2203 };
2204 // Last valid token kind.
2205 const int code_max = 302;
2206
2207 if (t <= 0)
2208 return symbol_kind::S_YYEOF;
2209 else if (t <= code_max)
2210 return static_cast <symbol_kind_type> (translate_table[t]);
2211 else
2213 }
2214
2215 // basic_symbol.
2216 template <typename Base>
2218 : Base (that)
2219 , value ()
2220 , location (that.location)
2221 {
2222 switch (this->kind ())
2223 {
2224 case symbol_kind::S_value: // value
2225 case symbol_kind::S_map_value: // map_value
2226 case symbol_kind::S_socket_type_value: // socket_type_value
2227 value.copy< ElementPtr > (YY_MOVE (that.value));
2228 break;
2229
2230 case symbol_kind::S_BOOLEAN: // "boolean"
2231 value.copy< bool > (YY_MOVE (that.value));
2232 break;
2233
2234 case symbol_kind::S_FLOAT: // "floating point"
2235 value.copy< double > (YY_MOVE (that.value));
2236 break;
2237
2238 case symbol_kind::S_INTEGER: // "integer"
2239 value.copy< int64_t > (YY_MOVE (that.value));
2240 break;
2241
2242 case symbol_kind::S_STRING: // "constant string"
2243 value.copy< string > (YY_MOVE (that.value));
2244 break;
2245
2246 default:
2247 break;
2248 }
2249
2250 }
2251
2252
2253
2254
2255 template <typename Base>
2258 {
2259 return this->kind ();
2260 }
2261
2262
2263 template <typename Base>
2264 bool
2266 {
2267 return this->kind () == symbol_kind::S_YYEMPTY;
2268 }
2269
2270 template <typename Base>
2271 void
2273 {
2274 super_type::move (s);
2275 switch (this->kind ())
2276 {
2277 case symbol_kind::S_value: // value
2278 case symbol_kind::S_map_value: // map_value
2279 case symbol_kind::S_socket_type_value: // socket_type_value
2280 value.move< ElementPtr > (YY_MOVE (s.value));
2281 break;
2282
2283 case symbol_kind::S_BOOLEAN: // "boolean"
2284 value.move< bool > (YY_MOVE (s.value));
2285 break;
2286
2287 case symbol_kind::S_FLOAT: // "floating point"
2288 value.move< double > (YY_MOVE (s.value));
2289 break;
2290
2291 case symbol_kind::S_INTEGER: // "integer"
2292 value.move< int64_t > (YY_MOVE (s.value));
2293 break;
2294
2295 case symbol_kind::S_STRING: // "constant string"
2296 value.move< string > (YY_MOVE (s.value));
2297 break;
2298
2299 default:
2300 break;
2301 }
2302
2304 }
2305
2306 // by_kind.
2307 inline
2311
2312#if 201103L <= YY_CPLUSPLUS
2313 inline
2315 : kind_ (that.kind_)
2316 {
2317 that.clear ();
2318 }
2319#endif
2320
2321 inline
2323 : kind_ (that.kind_)
2324 {}
2325
2326 inline
2330
2331
2332
2333 inline
2334 void
2339
2340 inline
2341 void
2343 {
2344 kind_ = that.kind_;
2345 that.clear ();
2346 }
2347
2348 inline
2351 {
2352 return kind_;
2353 }
2354
2355
2356 inline
2359 {
2360 return this->kind ();
2361 }
2362
2363
2364#line 14 "netconf_parser.yy"
2365} } // isc::netconf
2366#line 2367 "netconf_parser.h"
2367
2368
2369
2370
2371#endif // !YY_NETCONF_NETCONF_PARSER_H_INCLUDED
const location_type & location() const YY_NOEXCEPT
symbol_kind_type token() const YY_NOEXCEPT
context(const NetconfParser &yyparser, const symbol_type &yyla)
const symbol_type & lookahead() const YY_NOEXCEPT
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)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
static symbol_type make_CONTROL_SOCKET(const location_type &l)
static symbol_type make_OUTPUT(const location_type &l)
static symbol_type make_DHCP6_SERVER(const location_type &l)
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)
static symbol_type make_STRING(const string &v, 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).
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)
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 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)
by_kind by_type
Backward compatibility for a private implementation detail (Bison 3.6).
static symbol_type make_COLON(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)
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)
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...
#define YY_RVREF(Type)
Definition d2_parser.h:87
#define YY_MOVE_REF(Type)
Definition d2_parser.h:86
#define YY_NOEXCEPT
Definition d2_parser.h:96
#define YY_ATTRIBUTE_PURE
Definition d2_parser.h:118
#define YY_MOVE
Definition d2_parser.h:84
#define YY_NOTHROW
Definition d2_parser.h:97
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
Defines the logger used by the top-level component of kea-lfc.
Forward declaration of the ParserContext class.
#define NETCONF__ASSERT
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)
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(const basic_symbol &that)
Copy constructor.
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)
basic_symbol(typename Base::kind_type t, const string &v, const location_type &l)
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
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_error(const location_type &l, const std::string &m)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).