40 #ifndef YY_HOAYY_PARSEAUT_HH_INCLUDED
41 # define YY_HOAYY_PARSEAUT_HH_INCLUDED
43 #line 31 "parseaut.yy" // lalr1.cc:372
46 #include <spot/misc/common.hh>
50 #include <unordered_map>
52 #include <spot/twa/formula2bdd.hh>
53 #include <spot/parseaut/public.hh>
54 #include "spot/priv/accmap.hh"
55 #include <spot/tl/parse.hh>
57 #ifndef HAVE_STRVERSCMP
59 extern "C" int strverscmp(
const char *s1,
const char *s2);
64 #define PARSE_ERROR_LIST res.h->errors
68 typedef std::map<int, bdd> map_t;
75 typedef std::map<std::string, bdd> formula_cache;
77 typedef std::pair<int, std::string*> pair;
78 typedef spot::twa_graph::namer<std::string> named_tgba_t;
85 enum label_style_t { Mixed_Labels, State_Labels, Trans_Labels,
87 enum acc_style_t { Mixed_Acc, State_Acc, Trans_Acc };
93 bool declared =
false;
95 spot::location used_loc;
97 spot::parsed_aut_ptr h;
98 spot::twa_ptr aut_or_ks;
100 std::string format_version;
101 spot::location format_version_loc;
103 formula_cache fcache;
104 named_tgba_t* namer =
nullptr;
105 spot::acc_mapper_int* acc_mapper =
nullptr;
107 std::vector<bdd> guards;
108 std::vector<bdd>::const_iterator cur_guard;
110 std::vector<state_info> info_states;
111 std::vector<std::pair<spot::location, unsigned>> start;
112 std::unordered_map<std::string, bdd> alias;
117 operator bool()
const
122 std::unordered_map<std::string, prop_info> props;
123 spot::location states_loc;
124 spot::location ap_loc;
125 spot::location state_label_loc;
126 spot::location accset_loc;
132 std::vector<std::string>* state_names =
nullptr;
133 std::map<unsigned, unsigned>* highlight_edges =
nullptr;
134 std::map<unsigned, unsigned>* highlight_states =
nullptr;
135 std::map<unsigned, unsigned> states_map;
136 std::set<int> ap_set;
143 bool has_state_label =
false;
144 bool ignore_more_ap =
false;
146 bool ignore_acc =
false;
148 bool ignore_acc_silent =
false;
149 bool ignore_more_acc =
false;
152 label_style_t label_style = Mixed_Labels;
153 acc_style_t acc_style = Mixed_Acc;
155 bool accept_all_needed =
false;
156 bool accept_all_seen =
false;
157 bool aliased_states =
false;
160 bool complete =
false;
161 bool trans_acc_seen =
false;
163 std::map<std::string, spot::location> labels;
165 prop_info prop_is_true(
const std::string& p)
167 auto i = props.find(p);
168 if (i == props.end())
169 return prop_info{spot::location(),
false};
181 #line 182 "parseaut.hh" // lalr1.cc:372
186 # include <stdexcept>
193 # if (defined __GNUC__ \
194 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
195 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
196 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
198 # define YY_ATTRIBUTE(Spec)
202 #ifndef YY_ATTRIBUTE_PURE
203 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
206 #ifndef YY_ATTRIBUTE_UNUSED
207 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
210 #if !defined _Noreturn \
211 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
212 # if defined _MSC_VER && 1200 <= _MSC_VER
213 # define _Noreturn __declspec (noreturn)
215 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
220 #if ! defined lint || defined __GNUC__
221 # define YYUSE(E) ((void) (E))
226 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
228 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
229 _Pragma ("GCC diagnostic push") \
230 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
231 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
232 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
233 _Pragma ("GCC diagnostic pop")
235 # define YY_INITIAL_VALUE(Value) Value
237 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
238 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
239 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
241 #ifndef YY_INITIAL_VALUE
242 # define YY_INITIAL_VALUE(Value)
252 #line 253 "parseaut.hh" // lalr1.cc:372
266 #line 175 "parseaut.yy" // lalr1.cc:372
273 std::list<pair>* list;
276 #line 277 "parseaut.hh" // lalr1.cc:372
287 syntax_error (
const location_type& l,
const std::string& m);
288 location_type location;
310 SPOT_HIGHLIGHT_EDGES = 271,
311 SPOT_HIGHLIGHT_STATES = 272,
362 template <
typename Base>
376 const location_type& l);
380 const semantic_type& v,
381 const location_type& l);
419 symbol_number_type
type_get ()
const;
422 token_type
token ()
const;
436 parser (result_& res_yyarg, spot::location initial_loc_yyarg);
441 virtual int parse ();
452 debug_level_type
debug_level () const YY_ATTRIBUTE_PURE;
460 virtual void error (
const location_type& loc,
const std::string& msg);
471 typedef int state_type;
476 virtual std::string yysyntax_error_ (state_type yystate,
477 symbol_number_type yytoken)
const;
482 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
486 static bool yy_pact_value_is_default_ (
int yyvalue);
490 static bool yy_table_value_is_error_ (
int yyvalue);
492 static const short int yypact_ninf_;
493 static const signed char yytable_ninf_;
496 static token_number_type yytranslate_ (
int t);
501 static const short int yypact_[];
506 static const unsigned char yydefact_[];
509 static const short int yypgoto_[];
512 static const short int yydefgoto_[];
517 static const short int yytable_[];
519 static const short int yycheck_[];
523 static const unsigned char yystos_[];
526 static const unsigned char yyr1_[];
529 static const unsigned char yyr2_[];
533 static std::string yytnamerr_ (
const char *n);
537 static const char*
const yytname_[];
540 static const unsigned short int yyrline_[];
542 virtual void yy_reduce_print_ (
int r);
544 virtual void yystack_print_ ();
548 std::ostream* yycdebug_;
553 template <
typename Base>
561 template <
typename Base>
572 typedef state_type kind_type;
575 by_state (kind_type s);
578 by_state (
const by_state& other);
581 void move (by_state& that);
585 symbol_number_type type_get ()
const;
594 struct stack_symbol_type : basic_symbol<by_state>
597 typedef basic_symbol<by_state> super_type;
599 stack_symbol_type ();
601 stack_symbol_type (state_type s, symbol_type& sym);
603 stack_symbol_type& operator= (
const stack_symbol_type& that);
607 typedef stack<stack_symbol_type> stack_type;
617 void yypush_ (
const char* m, stack_symbol_type& s);
625 void yypush_ (
const char* m, state_type s, symbol_type& sym);
628 void yypop_ (
unsigned int n = 1);
646 spot::location initial_loc;
652 #line 653 "parseaut.hh" // lalr1.cc:372
657 #endif // !YY_HOAYY_PARSEAUT_HH_INCLUDED
token_number_type type
Definition: parseaut.hh:428
void move(by_type &that)
Steal the symbol type from that.
debug_level_type debug_level() const
The current debugging level.
Definition: parseaut.hh:89
An environment that describes atomic propositions.
Definition: environment.hh:32
Symbol semantic values.
Definition: parseaut.hh:264
semantic_type value
The semantic value.
Definition: parseaut.hh:389
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Syntax errors thrown from user actions.
Definition: parseaut.hh:285
void set_debug_level(debug_level_type l)
Set the current debugging level.
Definition: formula.hh:1652
Definition: parseaut.hh:91
virtual void error(const location_type &loc, const std::string &msg)
token_type token() const
The token.
token::yytokentype token_type
(External) token type, as returned by yylex.
Definition: parseaut.hh:348
Definition: parseaut.hh:251
Definition: parseaut.hh:113
Tokens.
Definition: parseaut.hh:292
std::ostream & debug_stream() const
The current debugging stream.
Type access provider for token (enum) based symbols.
Definition: parseaut.hh:400
token_type kind_type
The symbol type as needed by the constructor.
Definition: parseaut.hh:409
Base super_type
Alias to Base.
Definition: parseaut.hh:366
symbol_number_type type_get() const
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
Definition: parseaut.hh:354
A class implementing Kleene's three-valued logic.
Definition: trival.hh:33
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
Definition: parseaut.hh:432
basic_symbol()
Default constructor.
spot::location location_type
Symbol locations.
Definition: parseaut.hh:282
Definition: parseaut.hh:66
A Bison parser.
Definition: parseaut.hh:259
parser(result_ &res_yyarg, spot::location initial_loc_yyarg)
Build a parser object.
Definition: parseaut.hh:363
void set_debug_stream(std::ostream &)
Set the current debugging stream.
by_type()
Default constructor.
location_type location
The location.
Definition: parseaut.hh:392
int symbol_number_type
Internal symbol number.
Definition: parseaut.hh:351
int debug_level_type
Type for debugging levels.
Definition: parseaut.hh:450