21#include <spot/twa/twagraph.hh>
22#include <spot/kripke/kripkegraph.hh>
23#include <spot/misc/location.hh>
24#include <spot/tl/defaultenv.hh>
29#include <spot/misc/bitvect.hh>
46 enum class parsed_aut_type {
76 parsed_aut_type type = parsed_aut_type::Unknown;
95 typedef std::shared_ptr<parsed_aut> parsed_aut_ptr;
96 typedef std::shared_ptr<const parsed_aut> const_parsed_aut_ptr;
135 spot::location last_loc;
136 std::string filename_;
163 const std::string& filename,
183 parsed_aut_ptr
parse(
const bdd_dict_ptr& dict,
204 SPOT_API parsed_aut_ptr
206 const bdd_dict_ptr& dict,
Parse a stream of automata.
Definition: public.hh:134
automaton_stream_parser(int fd, const std::string &filename, automaton_parser_options opts={})
Parse from an already opened file descriptor.
automaton_stream_parser(const std::string &filename, automaton_parser_options opts={})
Parse from a file.
parsed_aut_ptr parse(const bdd_dict_ptr &dict, environment &env=default_environment::instance())
Parse the next automaton in the stream.
automaton_stream_parser(const char *data, const std::string &filename, automaton_parser_options opts={})
Parse from a buffer.
static default_environment & instance()
Get the sole instance of spot::default_environment.
An environment that describes atomic propositions.
Definition: environment.hh:29
std::list< parse_aut_error > parse_aut_error_list
A list of parser diagnostics, as filled by parse.
Definition: public.hh:40
parsed_aut_ptr parse_aut(const std::string &filename, const bdd_dict_ptr &dict, environment &env=default_environment::instance(), automaton_parser_options opts={})
Read the first spot::twa_graph from a file.
std::pair< spot::location, std::string > parse_aut_error
A parse diagnostic with its location.
Definition: public.hh:38
Definition: automata.hh:26
bool trust_hoa
Trust properties in HOA files.
Definition: public.hh:102
bool debug
Run the parser in debug mode?
Definition: public.hh:101
bool want_kripke
Parse as a Kripke structure.
Definition: public.hh:104
bool ignore_abort
Skip aborted automata.
Definition: public.hh:100
bool drop_false_edges
Drop edges with false labels.
Definition: public.hh:105
bool raise_errors
Raise errors as exceptions.
Definition: public.hh:103
Result of the automaton parser.
Definition: public.hh:57
spot::location loc
Location of the automaton in the stream.
Definition: public.hh:74
kripke_graph_ptr ks
The parsed kripke structure.
Definition: public.hh:69
bool format_errors(std::ostream &os)
Format diagnostics produced by spot::parse_aut.
parse_aut_error_list errors
Syntax errors that occurred during parsing.
Definition: public.hh:83
std::string filename
Name of the stream (used for displaying syntax errors)
Definition: public.hh:78
twa_graph_ptr aut
The parsed automaton.
Definition: public.hh:64