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))
130 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
132 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
133 _Pragma ("GCC diagnostic push") \
134 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
135 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
136 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
137 _Pragma ("GCC diagnostic pop")
139 # define YY_INITIAL_VALUE(Value) Value
141 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
143 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
145 #ifndef YY_INITIAL_VALUE
146 # define YY_INITIAL_VALUE(Value)
149 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
150 # define YY_IGNORE_USELESS_CAST_BEGIN \
151 _Pragma ("GCC diagnostic push") \
152 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
153 # define YY_IGNORE_USELESS_CAST_END \
154 _Pragma ("GCC diagnostic pop")
156 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
157 # define YY_IGNORE_USELESS_CAST_BEGIN
158 # define YY_IGNORE_USELESS_CAST_END
163 # define YY_CAST(Type, Val) static_cast<Type> (Val)
164 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
166 # define YY_CAST(Type, Val) ((Type) (Val))
167 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
171 # if defined __cplusplus
172 # if 201103L <= __cplusplus
173 # define YY_NULLPTR nullptr
175 # define YY_NULLPTR 0
178 # define YY_NULLPTR ((void*)0)
196 #line 197 "parsetl.hh"
209 #line 52 "parsetl.yy"
216 #line 217 "parsetl.hh"
229 : std::runtime_error (m)
234 : std::runtime_error (s.what ())
235 , location (s.location)
260 BRA_BANG_BLOCK = 266,
263 BRACE_BANG_CLOSE = 269,
291 OP_SQBKT_CLOSE = 297,
292 OP_SQBKT_STRONG_CLOSE = 298,
298 OP_UCONCAT_NONO = 304,
299 OP_ECONCAT_NONO = 305,
300 OP_FIRST_MATCH = 306,
342 S_BRA_BANG_BLOCK = 11,
345 S_BRACE_BANG_CLOSE = 14,
370 S_OP_FSTAR_OPEN = 39,
371 S_OP_EQUAL_OPEN = 40,
373 S_OP_SQBKT_CLOSE = 42,
374 S_OP_SQBKT_STRONG_CLOSE = 43,
380 S_OP_UCONCAT_NONO = 49,
381 S_OP_ECONCAT_NONO = 50,
382 S_OP_FIRST_MATCH = 51,
392 S_OP_DELAY_OPEN = 61,
393 S_OP_DELAY_PLUS = 62,
394 S_OP_DELAY_STAR = 63,
415 S_OP_SQBKT_SEP_unbounded = 84,
416 S_OP_SQBKT_SEP_opt = 85,
419 S_sqbracketargs = 88,
430 S_parenthesedsubformula = 99,
449 template <
typename Base>
461 #if 201103L <= YY_CPLUSPLUS
464 : Base (std::
move (that))
494 std::string
name () const YY_NOEXCEPT
515 #if YY_CPLUSPLUS < 201103L
527 #if 201103L <= YY_CPLUSPLUS
570 #if 201103L <= YY_CPLUSPLUS
617 const symbol_type& lookahead ()
const YY_NOEXCEPT {
return yyla_; }
619 const location_type& location ()
const YY_NOEXCEPT {
return yyla_.location; }
632 #if YY_CPLUSPLUS < 201103L
641 typedef short state_type;
644 int yy_syntax_error_arguments_ (
const context& yyctx,
649 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
653 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
657 static bool yy_pact_value_is_default_ (
int yyvalue);
661 static bool yy_table_value_is_error_ (
int yyvalue);
663 static const signed char yypact_ninf_;
664 static const signed char yytable_ninf_;
672 static std::string yytnamerr_ (
const char *yystr);
675 static const char*
const yytname_[];
681 static const short yypact_[];
686 static const unsigned char yydefact_[];
689 static const short yypgoto_[];
692 static const unsigned char yydefgoto_[];
697 static const short yytable_[];
699 static const short yycheck_[];
703 static const signed char yystos_[];
706 static const signed char yyr1_[];
709 static const signed char yyr2_[];
714 static const short yyrline_[];
716 virtual void yy_reduce_print_ (
int r)
const;
718 virtual void yy_stack_print_ ()
const;
723 std::ostream* yycdebug_;
728 template <
typename Base>
736 template <
typename Base>
744 by_state () YY_NOEXCEPT;
753 by_state (const by_state& that) YY_NOEXCEPT;
756 void clear () YY_NOEXCEPT;
759 void move (by_state& that);
767 enum { empty_state = 0 };
775 struct stack_symbol_type : basic_symbol<by_state>
778 typedef basic_symbol<by_state> super_type;
780 stack_symbol_type ();
782 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
784 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
785 #if YY_CPLUSPLUS < 201103L
788 stack_symbol_type& operator= (stack_symbol_type& that);
792 stack_symbol_type& operator= (
const stack_symbol_type& that);
797 template <
typename T,
typename S = std::vector<T> >
802 typedef typename S::iterator iterator;
803 typedef typename S::const_iterator const_iterator;
804 typedef typename S::size_type size_type;
805 typedef typename std::ptrdiff_t index_type;
807 stack (size_type n = 200)
811 #if 201103L <= YY_CPLUSPLUS
813 stack (
const stack&) =
delete;
815 stack& operator= (
const stack&) =
delete;
822 operator[] (index_type i)
const
824 return seq_[size_type (size () - 1 - i)];
831 operator[] (index_type i)
833 return seq_[size_type (size () - 1 - i)];
840 push (YY_MOVE_REF (T) t)
842 seq_.push_back (T ());
843 operator[] (0).move (t);
848 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
863 size () const YY_NOEXCEPT
865 return index_type (seq_.size ());
870 begin () const YY_NOEXCEPT
872 return seq_.begin ();
877 end () const YY_NOEXCEPT
886 slice (
const stack& stack, index_type range)
892 operator[] (index_type i)
const
894 return stack_[range_ - i];
903 #if YY_CPLUSPLUS < 201103L
905 stack (
const stack&);
907 stack& operator= (
const stack&);
915 typedef stack<stack_symbol_type> stack_type;
925 void yypush_ (
const char* m, YY_MOVE_REF (stack_symbol_type) sym);
933 void yypush_ (
const char* m, state_type s, YY_MOVE_REF (
symbol_type) sym);
936 void yypop_ (
int n = 1);
956 #line 957 "parsetl.hh"
An environment that describes atomic propositions.
Definition: environment.hh:33
Actual storage for formula nodes.
Definition: formula.hh:128
Definition: parsetl.hh:614
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:884
A Bison parser.
Definition: parsetl.hh:203
parser(spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg)
Build a parser object.
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:441
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:592
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:438
virtual void error(const location_type &loc, const std::string &msg)
void set_debug_stream(std::ostream &)
Set the current debugging stream.
token::yytokentype token_kind_type
Token kind, as returned by yylex.
Definition: parsetl.hh:319
debug_level_type debug_level() const
The current debugging level.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:322
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:223
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:451
basic_symbol(typename Base::kind_type t, location_type &l)
Constructor for valueless symbols.
basic_symbol(const basic_symbol &that)
Copy constructor.
semantic_type value
The semantic value.
Definition: parsetl.hh:509
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:488
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:494
location_type location
The location.
Definition: parsetl.hh:512
bool empty() const
Whether empty.
basic_symbol(typename Base::kind_type t, const semantic_type &v, const location_type &l)
Constructor for symbols with semantic value.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:482
Base super_type
Alias to Base.
Definition: parsetl.hh:453
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:456
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:523
symbol_kind_type kind_
Definition: parsetl.hh:556
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:536
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:326
symbol_kind_type
Definition: parsetl.hh:328
@ YYNTOKENS
Number of tokens.
Definition: parsetl.hh:329
"External" symbols: returned by the scanner.
Definition: parsetl.hh:564
Syntax errors thrown from user actions.
Definition: parsetl.hh:227
Token kinds.
Definition: parsetl.hh:245
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:315
Symbol semantic values.
Definition: parsetl.hh:208