45 #ifndef YY_TLYY_PARSETL_HH_INCLUDED
46 # define YY_TLYY_PARSETL_HH_INCLUDED
53 #include <spot/tl/parse.hh>
55 #include <spot/tl/print.hh>
68 #if defined __cplusplus
69 # define YY_CPLUSPLUS __cplusplus
71 # define YY_CPLUSPLUS 199711L
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
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&
90 #if 201103L <= YY_CPLUSPLUS
91 # define YY_NOEXCEPT noexcept
95 # define YY_NOTHROW throw ()
99 #if 201703 <= YY_CPLUSPLUS
100 # define YY_CONSTEXPR constexpr
102 # define YY_CONSTEXPR
107 #ifndef YY_ATTRIBUTE_PURE
108 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
109 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
111 # define YY_ATTRIBUTE_PURE
115 #ifndef YY_ATTRIBUTE_UNUSED
116 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
117 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
119 # define YY_ATTRIBUTE_UNUSED
124 #if ! defined lint || defined __GNUC__
125 # define YY_USE(E) ((void) (E))
131 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
132 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
133 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
134 _Pragma ("GCC diagnostic push") \
135 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
137 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
138 _Pragma ("GCC diagnostic push") \
139 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
140 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
143 _Pragma ("GCC diagnostic pop")
145 # define YY_INITIAL_VALUE(Value) Value
147 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
148 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
149 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
151 #ifndef YY_INITIAL_VALUE
152 # define YY_INITIAL_VALUE(Value)
155 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
156 # define YY_IGNORE_USELESS_CAST_BEGIN \
157 _Pragma ("GCC diagnostic push") \
158 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
159 # define YY_IGNORE_USELESS_CAST_END \
160 _Pragma ("GCC diagnostic pop")
162 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
163 # define YY_IGNORE_USELESS_CAST_BEGIN
164 # define YY_IGNORE_USELESS_CAST_END
169 # define YY_CAST(Type, Val) static_cast<Type> (Val)
170 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
172 # define YY_CAST(Type, Val) ((Type) (Val))
173 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
177 # if defined __cplusplus
178 # if 201103L <= __cplusplus
179 # define YY_NULLPTR nullptr
181 # define YY_NULLPTR 0
184 # define YY_NULLPTR ((void*)0)
202 #line 203 "parsetl.hh"
213 # pragma GCC message "bison: do not #define TLYYSTYPE in C++, use %define api.value.type"
220 #line 52 "parsetl.yy"
227 #line 228 "parsetl.hh"
241 : std::runtime_error (m)
246 : std::runtime_error (s.what ())
247 , location (s.location)
272 BRA_BANG_BLOCK = 266,
275 BRACE_BANG_CLOSE = 269,
303 OP_SQBKT_CLOSE = 297,
304 OP_SQBKT_STRONG_CLOSE = 298,
310 OP_UCONCAT_NONO = 304,
311 OP_ECONCAT_NONO = 305,
312 OP_FIRST_MATCH = 306,
354 S_BRA_BANG_BLOCK = 11,
357 S_BRACE_BANG_CLOSE = 14,
382 S_OP_FSTAR_OPEN = 39,
383 S_OP_EQUAL_OPEN = 40,
385 S_OP_SQBKT_CLOSE = 42,
386 S_OP_SQBKT_STRONG_CLOSE = 43,
392 S_OP_UCONCAT_NONO = 49,
393 S_OP_ECONCAT_NONO = 50,
394 S_OP_FIRST_MATCH = 51,
404 S_OP_DELAY_OPEN = 61,
405 S_OP_DELAY_PLUS = 62,
406 S_OP_DELAY_STAR = 63,
427 S_OP_SQBKT_SEP_unbounded = 84,
428 S_OP_SQBKT_SEP_opt = 85,
431 S_sqbracketargs = 88,
442 S_parenthesedsubformula = 99,
461 template <
typename Base>
473 #if 201103L <= YY_CPLUSPLUS
476 : Base (std::
move (that))
508 std::string
name () const YY_NOEXCEPT
529 #if YY_CPLUSPLUS < 201103L
544 #if 201103L <= YY_CPLUSPLUS
586 #if 201103L <= YY_CPLUSPLUS
633 const symbol_type& lookahead ()
const YY_NOEXCEPT {
return yyla_; }
635 const location_type& location ()
const YY_NOEXCEPT {
return yyla_.location; }
648 #if YY_CPLUSPLUS < 201103L
657 typedef short state_type;
660 int yy_syntax_error_arguments_ (
const context& yyctx,
665 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
669 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
673 static bool yy_pact_value_is_default_ (
int yyvalue) YY_NOEXCEPT;
677 static bool yy_table_value_is_error_ (
int yyvalue) YY_NOEXCEPT;
679 static const signed char yypact_ninf_;
680 static const signed char yytable_ninf_;
688 static std::string yytnamerr_ (
const char *yystr);
691 static const char*
const yytname_[];
697 static const short yypact_[];
702 static const unsigned char yydefact_[];
705 static const short yypgoto_[];
708 static const unsigned char yydefgoto_[];
713 static const short yytable_[];
715 static const short yycheck_[];
719 static const signed char yystos_[];
722 static const signed char yyr1_[];
725 static const signed char yyr2_[];
730 static const short yyrline_[];
732 virtual void yy_reduce_print_ (
int r)
const;
734 virtual void yy_stack_print_ ()
const;
739 std::ostream* yycdebug_;
744 template <
typename Base>
752 template <
typename Base>
760 by_state () YY_NOEXCEPT;
769 by_state (const by_state& that) YY_NOEXCEPT;
772 void clear () YY_NOEXCEPT;
775 void move (by_state& that);
783 enum { empty_state = 0 };
791 struct stack_symbol_type : basic_symbol<by_state>
794 typedef basic_symbol<by_state> super_type;
796 stack_symbol_type ();
798 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
800 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
801 #if YY_CPLUSPLUS < 201103L
804 stack_symbol_type& operator= (stack_symbol_type& that);
808 stack_symbol_type& operator= (
const stack_symbol_type& that);
813 template <
typename T,
typename S = std::vector<T> >
818 typedef typename S::iterator iterator;
819 typedef typename S::const_iterator const_iterator;
820 typedef typename S::size_type size_type;
821 typedef typename std::ptrdiff_t index_type;
823 stack (size_type n = 200) YY_NOEXCEPT
827 #if 201103L <= YY_CPLUSPLUS
829 stack (
const stack&) =
delete;
831 stack& operator= (
const stack&) =
delete;
838 operator[] (index_type i)
const
840 return seq_[size_type (size () - 1 - i)];
847 operator[] (index_type i)
849 return seq_[size_type (size () - 1 - i)];
856 push (YY_MOVE_REF (T) t)
858 seq_.push_back (T ());
859 operator[] (0).move (t);
864 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
879 size () const YY_NOEXCEPT
881 return index_type (seq_.size ());
886 begin () const YY_NOEXCEPT
888 return seq_.begin ();
893 end () const YY_NOEXCEPT
902 slice (
const stack& stack, index_type range) YY_NOEXCEPT
908 operator[] (index_type i)
const
910 return stack_[range_ - i];
919 #if YY_CPLUSPLUS < 201103L
921 stack (
const stack&);
923 stack& operator= (
const stack&);
931 typedef stack<stack_symbol_type> stack_type;
941 void yypush_ (
const char* m, YY_MOVE_REF (stack_symbol_type) sym);
949 void yypush_ (
const char* m, state_type s, YY_MOVE_REF (
symbol_type) sym);
952 void yypop_ (
int n = 1) YY_NOEXCEPT;
972 #line 973 "parsetl.hh"
An environment that describes atomic propositions.
Definition: environment.hh:33
Actual storage for formula nodes.
Definition: formula.hh:128
Definition: parsetl.hh:630
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:900
A Bison parser.
Definition: parsetl.hh:209
parser(spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg)
Build a parser object.
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition: parsetl.hh:331
void set_debug_level(debug_level_type l)
Set the current debugging level.
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition: parsetl.hh:453
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:608
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:450
value_type semantic_type
Backward compatibility (Bison 3.8).
Definition: parsetl.hh:232
virtual void error(const location_type &loc, const std::string &msg)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
debug_level_type debug_level() const
The current debugging level.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:334
std::ostream & debug_stream() const
The current debugging stream.
static std::string symbol_name(symbol_kind_type yysymbol)
spot::location location_type
Symbol locations.
Definition: parsetl.hh:235
void error(const syntax_error &err)
Report a syntax error.
std::list< one_parse_error > parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: parse.hh:42
Definition: parsetl.hh:57
Definition: parsetl.hh:463
basic_symbol(typename Base::kind_type t, location_type &l)
Constructor for valueless symbols.
basic_symbol(const basic_symbol &that)
Copy constructor.
value_type value
The semantic value.
Definition: parsetl.hh:523
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:502
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:508
basic_symbol(typename Base::kind_type t, const value_type &v, const location_type &l)
Constructor for symbols with semantic value.
location_type location
The location.
Definition: parsetl.hh:526
bool empty() const
Whether empty.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:494
Base super_type
Alias to Base.
Definition: parsetl.hh:465
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:468
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:537
symbol_kind_type kind_
Definition: parsetl.hh:572
void move(by_kind &that)
Steal the symbol kind from that.
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
symbol_kind_type kind() const
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition: parsetl.hh:539
by_kind(const by_kind &that)
Copy constructor.
by_kind()
Default constructor.
by_kind(kind_type t)
Constructor from (external) token numbers.
void clear()
Record that this symbol is empty.
Symbol kinds.
Definition: parsetl.hh:338
symbol_kind_type
Definition: parsetl.hh:340
@ YYNTOKENS
Number of tokens.
Definition: parsetl.hh:341
"External" symbols: returned by the scanner.
Definition: parsetl.hh:580
Syntax errors thrown from user actions.
Definition: parsetl.hh:239
Token kinds.
Definition: parsetl.hh:257
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:327
Symbol semantic values.
Definition: parsetl.hh:219