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,
430 S_sqbracketargs = 87,
441 S_parenthesedsubformula = 98,
460 template <
typename Base>
472 #if 201103L <= YY_CPLUSPLUS
475 : Base (std::
move (that))
507 std::string
name () const YY_NOEXCEPT
528 #if YY_CPLUSPLUS < 201103L
543 #if 201103L <= YY_CPLUSPLUS
585 #if 201103L <= YY_CPLUSPLUS
632 const symbol_type& lookahead ()
const YY_NOEXCEPT {
return yyla_; }
634 const location_type& location ()
const YY_NOEXCEPT {
return yyla_.location; }
647 #if YY_CPLUSPLUS < 201103L
656 typedef short state_type;
659 int yy_syntax_error_arguments_ (
const context& yyctx,
664 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
668 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
672 static bool yy_pact_value_is_default_ (
int yyvalue) YY_NOEXCEPT;
676 static bool yy_table_value_is_error_ (
int yyvalue) YY_NOEXCEPT;
678 static const signed char yypact_ninf_;
679 static const signed char yytable_ninf_;
687 static std::string yytnamerr_ (
const char *yystr);
690 static const char*
const yytname_[];
696 static const short yypact_[];
701 static const unsigned char yydefact_[];
704 static const short yypgoto_[];
707 static const unsigned char yydefgoto_[];
712 static const short yytable_[];
714 static const short yycheck_[];
718 static const signed char yystos_[];
721 static const signed char yyr1_[];
724 static const signed char yyr2_[];
729 static const short yyrline_[];
731 virtual void yy_reduce_print_ (
int r)
const;
733 virtual void yy_stack_print_ ()
const;
738 std::ostream* yycdebug_;
743 template <
typename Base>
751 template <
typename Base>
759 by_state () YY_NOEXCEPT;
768 by_state (const by_state& that) YY_NOEXCEPT;
771 void clear () YY_NOEXCEPT;
774 void move (by_state& that);
782 enum { empty_state = 0 };
790 struct stack_symbol_type : basic_symbol<by_state>
793 typedef basic_symbol<by_state> super_type;
795 stack_symbol_type ();
797 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
799 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
800 #if YY_CPLUSPLUS < 201103L
803 stack_symbol_type& operator= (stack_symbol_type& that);
807 stack_symbol_type& operator= (
const stack_symbol_type& that);
812 template <
typename T,
typename S = std::vector<T> >
817 typedef typename S::iterator iterator;
818 typedef typename S::const_iterator const_iterator;
819 typedef typename S::size_type size_type;
820 typedef typename std::ptrdiff_t index_type;
822 stack (size_type n = 200) YY_NOEXCEPT
826 #if 201103L <= YY_CPLUSPLUS
828 stack (
const stack&) =
delete;
830 stack& operator= (
const stack&) =
delete;
837 operator[] (index_type i)
const
839 return seq_[size_type (size () - 1 - i)];
846 operator[] (index_type i)
848 return seq_[size_type (size () - 1 - i)];
855 push (YY_MOVE_REF (T) t)
857 seq_.push_back (T ());
858 operator[] (0).move (t);
863 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
878 size () const YY_NOEXCEPT
880 return index_type (seq_.size ());
885 begin () const YY_NOEXCEPT
887 return seq_.begin ();
892 end () const YY_NOEXCEPT
901 slice (
const stack& stack, index_type range) YY_NOEXCEPT
907 operator[] (index_type i)
const
909 return stack_[range_ - i];
918 #if YY_CPLUSPLUS < 201103L
920 stack (
const stack&);
922 stack& operator= (
const stack&);
930 typedef stack<stack_symbol_type> stack_type;
940 void yypush_ (
const char* m, YY_MOVE_REF (stack_symbol_type) sym);
948 void yypush_ (
const char* m, state_type s, YY_MOVE_REF (
symbol_type) sym);
951 void yypop_ (
int n = 1) YY_NOEXCEPT;
971 #line 972 "parsetl.hh"
An environment that describes atomic propositions.
Definition: environment.hh:33
Actual storage for formula nodes.
Definition: formula.hh:128
Definition: parsetl.hh:629
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:899
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:452
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:607
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:449
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:462
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:522
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:501
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:507
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:525
bool empty() const
Whether empty.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:493
Base super_type
Alias to Base.
Definition: parsetl.hh:464
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:467
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:536
symbol_kind_type kind_
Definition: parsetl.hh:571
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:538
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:579
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