44 #ifndef YY_HOAYY_PARSEAUT_HH_INCLUDED 45 # define YY_HOAYY_PARSEAUT_HH_INCLUDED 47 #line 31 "parseaut.yy" // lalr1.cc:401 50 #include <spot/misc/common.hh> 54 #include <unordered_map> 56 #include <spot/twa/formula2bdd.hh> 57 #include <spot/parseaut/public.hh> 58 #include "spot/priv/accmap.hh" 59 #include <spot/tl/parse.hh> 60 #include <spot/twaalgos/alternation.hh> 62 #ifndef HAVE_STRVERSCMP 64 extern "C" int strverscmp(
const char *s1,
const char *s2);
69 #define PARSE_ERROR_LIST res.h->errors 73 typedef std::map<int, bdd> map_t;
80 typedef std::map<std::string, bdd> formula_cache;
82 typedef std::pair<int, std::string*> pair;
90 enum label_style_t { Mixed_Labels, State_Labels, Trans_Labels,
92 enum acc_style_t { Mixed_Acc, State_Acc, Trans_Acc };
98 bool declared =
false;
100 spot::location used_loc;
102 spot::parsed_aut_ptr h;
103 spot::twa_ptr aut_or_ks;
105 std::string format_version;
106 spot::location format_version_loc;
108 formula_cache fcache;
109 named_tgba_t* namer =
nullptr;
110 spot::acc_mapper_int* acc_mapper =
nullptr;
112 std::vector<bdd> guards;
113 std::vector<bdd>::const_iterator cur_guard;
115 std::vector<state_info> info_states;
116 std::vector<std::pair<spot::location,
117 std::vector<unsigned>>> start;
118 std::unordered_map<std::string, bdd> alias;
123 operator bool()
const 128 std::unordered_map<std::string, prop_info> props;
129 spot::location states_loc;
130 spot::location ap_loc;
131 spot::location state_label_loc;
132 spot::location accset_loc;
138 std::vector<std::string>* state_names =
nullptr;
139 std::map<unsigned, unsigned>* highlight_edges =
nullptr;
140 std::map<unsigned, unsigned>* highlight_states =
nullptr;
141 std::map<unsigned, unsigned> states_map;
142 std::set<int> ap_set;
149 bool has_state_label =
false;
150 bool ignore_more_ap =
false;
152 bool ignore_acc =
false;
154 bool ignore_acc_silent =
false;
155 bool ignore_more_acc =
false;
158 label_style_t label_style = Mixed_Labels;
159 acc_style_t acc_style = Mixed_Acc;
161 bool accept_all_needed =
false;
162 bool accept_all_seen =
false;
163 bool aliased_states =
false;
167 bool trans_acc_seen =
false;
169 std::map<std::string, spot::location> labels;
171 prop_info prop_is_true(
const std::string& p)
173 auto i = props.find(p);
174 if (i == props.end())
175 return prop_info{spot::location(),
false};
179 prop_info prop_is_false(
const std::string& p)
181 auto i = props.find(p);
182 if (i == props.end())
183 return prop_info{spot::location(),
false};
184 return prop_info{i->second.loc, !i->second.val};
195 #line 196 "parseaut.hh" // lalr1.cc:401 200 # include <stdexcept> 204 #if defined __cplusplus 205 # define YY_CPLUSPLUS __cplusplus 207 # define YY_CPLUSPLUS 199711L 211 #if 201103L <= YY_CPLUSPLUS 212 # define YY_MOVE std::move 213 # define YY_MOVE_OR_COPY move 214 # define YY_MOVE_REF(Type) Type&& 215 # define YY_RVREF(Type) Type&& 216 # define YY_COPY(Type) Type 219 # define YY_MOVE_OR_COPY copy 220 # define YY_MOVE_REF(Type) Type& 221 # define YY_RVREF(Type) const Type& 222 # define YY_COPY(Type) const Type& 226 #if 201103L <= YY_CPLUSPLUS 227 # define YY_NOEXCEPT noexcept 231 # define YY_NOTHROW throw () 235 #if 201703 <= YY_CPLUSPLUS 236 # define YY_CONSTEXPR constexpr 238 # define YY_CONSTEXPR 244 # if (defined __GNUC__ \ 245 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 246 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 247 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 249 # define YY_ATTRIBUTE(Spec) 253 #ifndef YY_ATTRIBUTE_PURE 254 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 257 #ifndef YY_ATTRIBUTE_UNUSED 258 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 262 #if ! defined lint || defined __GNUC__ 263 # define YYUSE(E) ((void) (E)) 268 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 270 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 271 _Pragma ("GCC diagnostic push") \ 272 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 273 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 274 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 275 _Pragma ("GCC diagnostic pop") 277 # define YY_INITIAL_VALUE(Value) Value 279 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 280 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 281 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 283 #ifndef YY_INITIAL_VALUE 284 # define YY_INITIAL_VALUE(Value) 288 # if defined __cplusplus 289 # if 201103L <= __cplusplus 290 # define YY_NULLPTR nullptr 292 # define YY_NULLPTR 0 295 # define YY_NULLPTR ((void*)0) 306 #line 307 "parseaut.hh" // lalr1.cc:401 318 #line 185 "parseaut.yy" // lalr1.cc:401 325 std::list<pair>* list;
327 std::vector<unsigned>* states;
329 #line 330 "parseaut.hh" // lalr1.cc:401 340 syntax_error (
const location_type& l,
const std::string& m)
341 : std::runtime_error (m)
346 : std::runtime_error (s.what ())
347 , location (s.location)
352 location_type location;
374 SPOT_HIGHLIGHT_EDGES = 271,
375 SPOT_HIGHLIGHT_STATES = 272,
418 enum { empty_symbol = -2 };
429 template <
typename Base>
441 #if 201103L <= YY_CPLUSPLUS 450 YY_MOVE_REF (location_type) l);
454 YY_RVREF (semantic_type) v,
455 YY_RVREF (location_type) l);
470 bool empty ()
const YY_NOEXCEPT;
482 #if YY_CPLUSPLUS < 201103L 494 #if 201103L <= YY_CPLUSPLUS 516 symbol_number_type type_get () const YY_NOEXCEPT;
519 token_type
token () const YY_NOEXCEPT;
532 parser (result_& res_yyarg, spot::location initial_loc_yyarg);
541 virtual int parse ();
544 std::ostream& debug_stream ()
const YY_ATTRIBUTE_PURE;
547 void set_debug_stream (std::ostream &);
552 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
554 void set_debug_level (debug_level_type l);
560 virtual void error (
const location_type& loc,
const std::string& msg);
573 typedef int state_type;
578 virtual std::string yysyntax_error_ (state_type yystate,
584 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
588 static bool yy_pact_value_is_default_ (
int yyvalue);
592 static bool yy_table_value_is_error_ (
int yyvalue);
594 static const short yypact_ninf_;
595 static const signed char yytable_ninf_;
598 static token_number_type yytranslate_ (
int t);
603 static const short yypact_[];
608 static const unsigned char yydefact_[];
611 static const short yypgoto_[];
614 static const short yydefgoto_[];
619 static const short yytable_[];
621 static const short yycheck_[];
625 static const unsigned char yystos_[];
628 static const unsigned char yyr1_[];
631 static const unsigned char yyr2_[];
635 static std::string yytnamerr_ (
const char *n);
639 static const char*
const yytname_[];
642 static const unsigned short yyrline_[];
644 virtual void yy_reduce_print_ (
int r);
646 virtual void yystack_print_ ();
651 std::ostream* yycdebug_;
656 template <
typename Base>
664 template <
typename Base>
672 by_state () YY_NOEXCEPT;
675 typedef state_type kind_type;
678 by_state (kind_type s) YY_NOEXCEPT;
681 by_state (const by_state& that) YY_NOEXCEPT;
684 void clear () YY_NOEXCEPT;
687 void move (by_state& that);
691 symbol_number_type type_get () const YY_NOEXCEPT;
694 enum { empty_state = -1 };
707 stack_symbol_type ();
709 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
711 stack_symbol_type (state_type s, YY_MOVE_REF (
symbol_type) sym);
712 #if YY_CPLUSPLUS < 201103L 713 stack_symbol_type& operator= (stack_symbol_type& that);
720 template <
typename T,
typename S = std::vector<T> >
725 typedef typename S::reverse_iterator iterator;
726 typedef typename S::const_reverse_iterator const_iterator;
727 typedef typename S::size_type size_type;
729 stack (size_type n = 200)
737 operator[] (size_type i)
739 return seq_[size () - 1 - i];
748 return operator[] (size_type (i));
755 operator[] (size_type i)
const 757 return seq_[size () - 1 - i];
764 operator[] (
int i)
const 766 return operator[] (size_type (i));
773 push (YY_MOVE_REF (T) t)
775 seq_.push_back (T ());
776 operator[] (0).move (t);
781 pop (
int n = 1) YY_NOEXCEPT
796 size () const YY_NOEXCEPT
803 begin () const YY_NOEXCEPT
805 return seq_.rbegin ();
810 end () const YY_NOEXCEPT
819 slice (
const stack& stack,
int range)
825 operator[] (
int i)
const 827 return stack_[range_ - i];
836 stack (
const stack&);
837 stack& operator= (
const stack&);
844 typedef stack<stack_symbol_type> stack_type;
854 void yypush_ (
const char* m, YY_MOVE_REF (stack_symbol_type) sym);
862 void yypush_ (
const char* m, state_type s, YY_MOVE_REF (
symbol_type) sym);
865 void yypop_ (
int n = 1);
882 spot::location initial_loc;
888 #line 889 "parseaut.hh" // lalr1.cc:401 893 #endif // !YY_HOAYY_PARSEAUT_HH_INCLUDED Definition: parseaut.hh:94
An environment that describes atomic propositions.
Definition: environment.hh:32
Symbol semantic values.
Definition: parseaut.hh:316
semantic_type value
The semantic value.
Definition: parseaut.hh:476
Syntax errors thrown from user actions.
Definition: parseaut.hh:338
Definition: parseaut.hh:96
token::yytokentype token_type
(External) token type, as returned by yylex.
Definition: parseaut.hh:412
Definition: parseaut.hh:305
Definition: parseaut.hh:119
Tokens.
Definition: parseaut.hh:356
Type access provider for token (enum) based symbols.
Definition: parseaut.hh:489
token_type kind_type
The symbol type as needed by the constructor.
Definition: parseaut.hh:503
Base super_type
Alias to Base.
Definition: parseaut.hh:433
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
Definition: parseaut.hh:421
A class implementing Kleene's three-valued logic.
Definition: trival.hh:33
~basic_symbol()
Destroy the symbol.
Definition: parseaut.hh:458
basic_symbol()
Default constructor.
Definition: parseaut.hh:436
spot::location location_type
Symbol locations.
Definition: parseaut.hh:335
Definition: parseaut.hh:71
A Bison parser.
Definition: parseaut.hh:311
"External" symbols: returned by the scanner.
Definition: parseaut.hh:528
Present a slice of the top of a stack.
Definition: parseaut.hh:816
void clear()
Destroy contents, and record that is empty.
Definition: parseaut.hh:464
Definition: parseaut.hh:430
location_type location
The location.
Definition: parseaut.hh:479
int symbol_number_type
Symbol type: an internal symbol number.
Definition: parseaut.hh:415
int debug_level_type
Type for debugging levels.
Definition: parseaut.hh:550