parseaut: keep track of the format of each parsed automaton

* src/parseaut/public.hh (parsed_aut): Add a type field.
* src/parseaut/parseaut.yy: Fill it.
* src/dstarparse/dstarparse.yy: Use this field instead of
the private enumeration.
This commit is contained in:
Alexandre Duret-Lutz 2015-09-06 17:07:32 +02:00
parent 6079b1dcdf
commit 14c0577650
3 changed files with 11 additions and 12 deletions

View file

@ -43,6 +43,8 @@ namespace spot
struct parse_aut_error_list {};
#endif
enum class parsed_aut_type { HOA, NeverClaim, LBTT, DRA, DSA, Unknown };
/// \brief Temporary encoding of an omega automaton produced by
/// the parser.
struct SPOT_API parsed_aut
@ -52,6 +54,7 @@ namespace spot
twa_graph_ptr aut;
bool aborted = false;
spot::location loc;
parsed_aut_type type = parsed_aut_type::Unknown;
};
typedef std::shared_ptr<parsed_aut> parsed_aut_ptr;