44 #ifndef YY_CFGYY_HOME_LSILVEST_REPOS_ZTSDB_GITHUB_SRC_CONFIG_PARSER_CFGPARSER_HPP_INCLUDED
45 # define YY_CFGYY_HOME_LSILVEST_REPOS_ZTSDB_GITHUB_SRC_CONFIG_PARSER_CFGPARSER_HPP_INCLUDED
47 #line 31 "cfgparser.y"
50 #include "../config.hpp"
54 typedef void *yyscan_t;
56 #line 57 "/home/lsilvest/repos/ztsdb_github/src/config_parser/cfgparser.hpp"
65 #if defined __cplusplus
66 # define YY_CPLUSPLUS __cplusplus
68 # define YY_CPLUSPLUS 199711L
72 #if 201103L <= YY_CPLUSPLUS
73 # define YY_MOVE std::move
74 # define YY_MOVE_OR_COPY move
75 # define YY_MOVE_REF(Type) Type&&
76 # define YY_RVREF(Type) Type&&
77 # define YY_COPY(Type) Type
80 # define YY_MOVE_OR_COPY copy
81 # define YY_MOVE_REF(Type) Type&
82 # define YY_RVREF(Type) const Type&
83 # define YY_COPY(Type) const Type&
87 #if 201103L <= YY_CPLUSPLUS
88 # define YY_NOEXCEPT noexcept
92 # define YY_NOTHROW throw ()
96 #if 201703 <= YY_CPLUSPLUS
97 # define YY_CONSTEXPR constexpr
101 # include "location.hh"
105 # define YY_ASSERT assert
109 #ifndef YY_ATTRIBUTE_PURE
110 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
111 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
113 # define YY_ATTRIBUTE_PURE
117 #ifndef YY_ATTRIBUTE_UNUSED
118 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
119 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
121 # define YY_ATTRIBUTE_UNUSED
126 #if ! defined lint || defined __GNUC__
127 # define YYUSE(E) ((void) (E))
132 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
134 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
135 _Pragma ("GCC diagnostic push") \
136 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
137 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
138 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
139 _Pragma ("GCC diagnostic pop")
141 # define YY_INITIAL_VALUE(Value) Value
143 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
144 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
145 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
147 #ifndef YY_INITIAL_VALUE
148 # define YY_INITIAL_VALUE(Value)
151 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
152 # define YY_IGNORE_USELESS_CAST_BEGIN \
153 _Pragma ("GCC diagnostic push") \
154 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
155 # define YY_IGNORE_USELESS_CAST_END \
156 _Pragma ("GCC diagnostic pop")
158 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
159 # define YY_IGNORE_USELESS_CAST_BEGIN
160 # define YY_IGNORE_USELESS_CAST_END
165 # define YY_CAST(Type, Val) static_cast<Type> (Val)
166 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
168 # define YY_CAST(Type, Val) ((Type) (Val))
169 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
173 # if defined __cplusplus
174 # if 201103L <= __cplusplus
175 # define YY_NULLPTR nullptr
177 # define YY_NULLPTR 0
180 # define YY_NULLPTR ((void*)0)
188 # define CFGYYDEBUG 1
190 # define CFGYYDEBUG 0
193 # define CFGYYDEBUG 1
198 #line 199 "/home/lsilvest/repos/ztsdb_github/src/config_parser/cfgparser.hpp"
222 , yytypeid_ (YY_NULLPTR)
226 template <
typename T>
228 : yytypeid_ (&typeid (T))
230 YY_ASSERT (
sizeof (T) <= size);
231 new (yyas_<T> ()) T (YY_MOVE (t));
237 YY_ASSERT (!yytypeid_);
240 # if 201103L <= YY_CPLUSPLUS
241 template <
typename T,
typename... U>
246 YY_ASSERT (!yytypeid_);
247 YY_ASSERT (
sizeof (T) <= size);
248 yytypeid_ = &
typeid (T);
249 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
252 template <
typename T>
257 YY_ASSERT (!yytypeid_);
258 YY_ASSERT (
sizeof (T) <= size);
259 yytypeid_ = &
typeid (T);
260 return *
new (yyas_<T> ()) T ();
264 template <
typename T>
268 YY_ASSERT (!yytypeid_);
269 YY_ASSERT (
sizeof (T) <= size);
270 yytypeid_ = &
typeid (T);
271 return *
new (yyas_<T> ()) T (t);
277 template <
typename T>
281 return emplace<T> ();
286 template <
typename T>
290 return emplace<T> (t);
294 template <
typename T>
298 YY_ASSERT (yytypeid_);
299 YY_ASSERT (*yytypeid_ ==
typeid (T));
300 YY_ASSERT (
sizeof (T) <= size);
305 template <
typename T>
307 as () const YY_NOEXCEPT
309 YY_ASSERT (yytypeid_);
310 YY_ASSERT (*yytypeid_ ==
typeid (T));
311 YY_ASSERT (
sizeof (T) <= size);
323 template <
typename T>
327 YY_ASSERT (yytypeid_);
328 YY_ASSERT (*yytypeid_ == *that.yytypeid_);
329 std::swap (as<T> (), that.as<T> ());
335 template <
typename T>
339 # if 201103L <= YY_CPLUSPLUS
340 emplace<T> (std::move (that.
as<T> ()));
348 # if 201103L <= YY_CPLUSPLUS
349 template <
typename T>
354 emplace<T> (std::move (that.as<T> ()));
360 template <
typename T>
364 emplace<T> (that.
as<T> ());
368 template <
typename T>
373 yytypeid_ = YY_NULLPTR;
382 template <
typename T>
386 void *yyp = yybuffer_.yyraw;
387 return static_cast<T*
> (yyp);
391 template <
typename T>
393 yyas_ () const YY_NOEXCEPT
395 const void *yyp = yybuffer_.yyraw;
396 return static_cast<const T*
> (yyp);
403 char dummy1[
sizeof (cfg::configmap_t)];
406 char dummy2[
sizeof (double)];
409 char dummy3[
sizeof (int64_t)];
412 char dummy4[
sizeof (std::pair<std::string, cfg::CfgVariant>)];
416 char dummy5[
sizeof (std::string)];
420 enum { size =
sizeof (union_type) };
432 const std::type_info *yytypeid_;
436 typedef CFGYYSTYPE semantic_type;
445 : std::runtime_error (m)
450 : std::runtime_error (s.what ())
465 STRING_LITERAL = 258,
481 enum { empty_symbol = -2 };
492 template <
typename Base>
504 #if 201103L <= YY_CPLUSPLUS
513 #if 201103L <= YY_CPLUSPLUS
524 #if 201103L <= YY_CPLUSPLUS
537 #if 201103L <= YY_CPLUSPLUS
550 #if 201103L <= YY_CPLUSPLUS
563 #if 201103L <= YY_CPLUSPLUS
576 #if 201103L <= YY_CPLUSPLUS
613 value.template destroy< cfg::configmap_t > ();
617 value.template destroy< double > ();
621 value.template destroy< int64_t > ();
625 value.template destroy< std::pair<std::string, cfg::CfgVariant> > ();
630 value.template destroy< std::string > ();
641 bool empty () const YY_NOEXCEPT;
653 #if YY_CPLUSPLUS < 201103L
665 #if 201103L <= YY_CPLUSPLUS
705 #if 201103L <= YY_CPLUSPLUS
707 : super_type(token_type (tok), std::
move (l))
709 YY_ASSERT (tok == token::END || tok == token::EQ || tok == token::NL);
715 YY_ASSERT (tok == token::END || tok == token::EQ || tok == token::NL);
718 #if 201103L <= YY_CPLUSPLUS
720 : super_type(token_type (tok), std::
move (v), std::
move (l))
722 YY_ASSERT (tok == token::DOUBLE);
725 symbol_type (
int tok,
const double& v,
const location_type& l)
728 YY_ASSERT (tok == token::DOUBLE);
731 #if 201103L <= YY_CPLUSPLUS
735 YY_ASSERT (tok == token::INTEGER);
738 symbol_type (
int tok,
const int64_t& v,
const location_type& l)
741 YY_ASSERT (tok == token::INTEGER);
744 #if 201103L <= YY_CPLUSPLUS
748 YY_ASSERT (tok == token::STRING_LITERAL || tok == token::SYMBOL);
751 symbol_type (
int tok,
const std::string& v,
const location_type& l)
754 YY_ASSERT (tok == token::STRING_LITERAL || tok == token::SYMBOL);
769 virtual int parse ();
794 #if 201103L <= YY_CPLUSPLUS
806 return symbol_type (token::END, l);
809 #if 201103L <= YY_CPLUSPLUS
814 return symbol_type (token::STRING_LITERAL, std::move (v), std::move (l));
819 make_STRING_LITERAL (
const std::string& v,
const location_type& l)
821 return symbol_type (token::STRING_LITERAL, v, l);
824 #if 201103L <= YY_CPLUSPLUS
829 return symbol_type (token::SYMBOL, std::move (v), std::move (l));
836 return symbol_type (token::SYMBOL, v, l);
839 #if 201103L <= YY_CPLUSPLUS
844 return symbol_type (token::INTEGER, std::move (v), std::move (l));
851 return symbol_type (token::INTEGER, v, l);
854 #if 201103L <= YY_CPLUSPLUS
859 return symbol_type (token::DOUBLE, std::move (v), std::move (l));
866 return symbol_type (token::DOUBLE, v, l);
869 #if 201103L <= YY_CPLUSPLUS
874 return symbol_type (token::EQ, std::move (l));
881 return symbol_type (token::EQ, l);
884 #if 201103L <= YY_CPLUSPLUS
889 return symbol_type (token::NL, std::move (l));
896 return symbol_type (token::NL, l);
907 typedef signed char state_type;
912 virtual std::string yysyntax_error_ (state_type yystate,
913 const symbol_type& yyla)
const;
918 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
922 static bool yy_pact_value_is_default_ (
int yyvalue);
926 static bool yy_table_value_is_error_ (
int yyvalue);
928 static const signed char yypact_ninf_;
929 static const signed char yytable_ninf_;
939 static const signed char yypact_[];
944 static const signed char yydefact_[];
947 static const signed char yypgoto_[];
950 static const signed char yydefgoto_[];
955 static const signed char yytable_[];
957 static const signed char yycheck_[];
961 static const signed char yystos_[];
964 static const signed char yyr1_[];
967 static const signed char yyr2_[];
971 static std::string yytnamerr_ (
const char *n);
975 static const char*
const yytname_[];
978 static const signed char yyrline_[];
980 virtual void yy_reduce_print_ (
int r);
982 virtual void yystack_print_ ();
987 std::ostream* yycdebug_;
992 template <
typename Base>
993 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
1000 template <
typename Base>
1001 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
1008 by_state () YY_NOEXCEPT;
1017 by_state (const by_state& that) YY_NOEXCEPT;
1020 void clear () YY_NOEXCEPT;
1023 void move (by_state& that);
1031 enum { empty_state = 0 };
1039 struct stack_symbol_type : basic_symbol<by_state>
1042 typedef basic_symbol<by_state> super_type;
1044 stack_symbol_type ();
1046 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
1048 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
1049 #if YY_CPLUSPLUS < 201103L
1050 stack_symbol_type& operator= (stack_symbol_type& that);
1056 stack_symbol_type& operator= (
const stack_symbol_type& that);
1061 template <
typename T,
typename S = std::vector<T> >
1066 typedef typename S::reverse_iterator iterator;
1067 typedef typename S::const_reverse_iterator const_iterator;
1068 typedef typename S::size_type size_type;
1069 typedef typename std::ptrdiff_t index_type;
1071 stack (size_type n = 200)
1079 operator[] (index_type i)
const
1081 return seq_[size_type (size () - 1 - i)];
1088 operator[] (index_type i)
1090 return seq_[size_type (size () - 1 - i)];
1097 push (YY_MOVE_REF (T) t)
1099 seq_.push_back (T ());
1100 operator[] (0).move (t);
1105 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
1113 clear () YY_NOEXCEPT
1120 size () const YY_NOEXCEPT
1122 return index_type (seq_.size ());
1126 ssize () const YY_NOEXCEPT
1128 return std::ptrdiff_t (size ());
1133 begin () const YY_NOEXCEPT
1135 return seq_.rbegin ();
1140 end () const YY_NOEXCEPT
1142 return seq_.rend ();
1149 slice (
const stack& stack, index_type range)
1155 operator[] (index_type i)
const
1157 return stack_[range_ - i];
1161 const stack& stack_;
1166 stack (
const stack&);
1167 stack& operator= (
const stack&);
1174 typedef stack<stack_symbol_type> stack_type;
1177 stack_type yystack_;
1184 void yypush_ (
const char* m, YY_MOVE_REF (stack_symbol_type) sym);
1192 void yypush_ (
const char* m, state_type s, YY_MOVE_REF (
symbol_type) sym);
1195 void yypop_ (
int n = 1);
1219 parser::yytranslate_ (
int t)
1227 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1234 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1237 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1239 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1240 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1241 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1242 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1243 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1245 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1246 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1247 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1248 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1249 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1251 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1252 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1255 const int user_token_number_max_ = 263;
1259 else if (t <= user_token_number_max_)
1260 return translate_table[t];
1262 return yy_undef_token_;
1266 #if 201103L <= YY_CPLUSPLUS
1267 template <
typename Base>
1269 : Base (std::move (that))
1271 , location (std::move (that.location))
1273 switch (this->type_get ())
1276 value.move< cfg::configmap_t > (std::move (that.value));
1280 value.move<
double > (std::move (that.value));
1284 value.move< int64_t > (std::move (that.value));
1288 value.move< std::pair<std::string, cfg::CfgVariant> > (std::move (that.value));
1293 value.move< std::string > (std::move (that.value));
1303 template <
typename Base>
1309 switch (this->type_get ())
1312 value.copy< cfg::configmap_t > (YY_MOVE (that.
value));
1316 value.copy<
double > (YY_MOVE (that.
value));
1320 value.copy< int64_t > (YY_MOVE (that.
value));
1324 value.copy< std::pair<std::string, cfg::CfgVariant> > (YY_MOVE (that.
value));
1329 value.copy< std::string > (YY_MOVE (that.
value));
1340 template <
typename Base>
1344 return Base::type_get () == empty_symbol;
1347 template <
typename Base>
1351 super_type::move (s);
1352 switch (this->type_get ())
1355 value.move< cfg::configmap_t > (YY_MOVE (s.
value));
1359 value.move<
double > (YY_MOVE (s.
value));
1363 value.move< int64_t > (YY_MOVE (s.
value));
1367 value.move< std::pair<std::string, cfg::CfgVariant> > (YY_MOVE (s.
value));
1372 value.move< std::string > (YY_MOVE (s.
value));
1384 parser::by_type::by_type ()
1385 : type (empty_symbol)
1388 #if 201103L <= YY_CPLUSPLUS
1404 : type (yytranslate_ (t))
1411 type = empty_symbol;
1430 #line 1431 "/home/lsilvest/repos/ztsdb_github/src/config_parser/cfgparser.hpp"
1436 #endif // !YY_CFGYY_HOME_LSILVEST_REPOS_ZTSDB_GITHUB_SRC_CONFIG_PARSER_CFGPARSER_HPP_INCLUDED