hoaparse: rename to parseaut
Because this parser is not specific to HOA anymore. * src/hoaparse/Makefile.am, src/hoaparse/fmterror.cc, src/hoaparse/hoaparse.yy, src/hoaparse/parsedecl.hh, src/parseaut/public.hh, src/hoaparse/hoascan.ll, src/tests/hoaparse.test: Rename to... * src/parseaut/Makefile.am, src/parseaut/fmterror.cc, src/parseaut/parseaut.yy, src/parseaut/parsedecl.hh, src/hoaparse/public.hh, src/parseaut/scanaut.ll, src/tests/parseaut.test: ... these, and also adjust the name internally. For instance hoa_aut_ptr is now parsed_aut_ptr; hoa_stream_parser is now automaton_stream_parser, and hoa_parse() has become parse_aut(). * NEWS, README, configure.ac, doc/org/tut20.org, src/Makefile.am, src/bin/autfilt.cc, src/bin/common_aoutput.cc, src/bin/common_aoutput.hh, src/bin/common_conv.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tests/Makefile.am, src/tests/complementation.cc, src/tests/ltl2tgba.cc, src/tests/readsave.test, wrap/python/ajax/spot.in, wrap/python/spot.py, wrap/python/spot_impl.i, wrap/python/tests/automata-io.ipynb, wrap/python/tests/parsetgba.py: Adjust.
This commit is contained in:
parent
60bd9dd606
commit
a86391ab77
29 changed files with 158 additions and 156 deletions
|
|
@ -43,7 +43,7 @@
|
|||
#include "misc/optionmap.hh"
|
||||
#include "misc/timer.hh"
|
||||
#include "misc/random.hh"
|
||||
#include "hoaparse/public.hh"
|
||||
#include "parseaut/public.hh"
|
||||
#include "ltlvisit/exclusive.hh"
|
||||
#include "twaalgos/remprop.hh"
|
||||
#include "twaalgos/randomize.hh"
|
||||
|
|
@ -494,7 +494,7 @@ namespace
|
|||
}
|
||||
|
||||
int
|
||||
process_automaton(const spot::const_hoa_aut_ptr& haut,
|
||||
process_automaton(const spot::const_parsed_aut_ptr& haut,
|
||||
const char* filename)
|
||||
{
|
||||
spot::stopwatch sw;
|
||||
|
|
@ -618,7 +618,7 @@ namespace
|
|||
}
|
||||
|
||||
int
|
||||
aborted(const spot::const_hoa_aut_ptr& h, const char* filename)
|
||||
aborted(const spot::const_parsed_aut_ptr& h, const char* filename)
|
||||
{
|
||||
std::cerr << filename << ':' << h->loc << ": aborted input automaton\n";
|
||||
return 2;
|
||||
|
|
@ -627,8 +627,8 @@ namespace
|
|||
int
|
||||
process_file(const char* filename)
|
||||
{
|
||||
spot::hoa_parse_error_list pel;
|
||||
auto hp = spot::hoa_stream_parser(filename);
|
||||
spot::parse_aut_error_list pel;
|
||||
auto hp = spot::automaton_stream_parser(filename);
|
||||
|
||||
int err = 0;
|
||||
|
||||
|
|
@ -638,7 +638,7 @@ namespace
|
|||
auto haut = hp.parse(pel, opt->dict);
|
||||
if (!haut && pel.empty())
|
||||
break;
|
||||
if (spot::format_hoa_parse_errors(std::cerr, filename, pel))
|
||||
if (spot::format_parse_aut_errors(std::cerr, filename, pel))
|
||||
err = 2;
|
||||
if (!haut)
|
||||
error(2, 0, "failed to read automaton from %s", filename);
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ automaton_printer::print(const spot::twa_graph_ptr& aut,
|
|||
int loc,
|
||||
// Time and input automaton for statistics
|
||||
double time,
|
||||
const spot::const_hoa_aut_ptr& haut)
|
||||
const spot::const_parsed_aut_ptr& haut)
|
||||
{
|
||||
if (opt_check)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <argp.h>
|
||||
#include <memory>
|
||||
|
||||
#include "hoaparse/public.hh"
|
||||
#include "parseaut/public.hh"
|
||||
|
||||
#include "twaalgos/stats.hh"
|
||||
#include "twaalgos/sccinfo.hh"
|
||||
|
|
@ -105,7 +105,7 @@ public:
|
|||
/// The \a f argument is not needed if the Formula does not need
|
||||
/// to be output.
|
||||
std::ostream&
|
||||
print(const spot::const_hoa_aut_ptr& haut,
|
||||
print(const spot::const_parsed_aut_ptr& haut,
|
||||
const spot::const_twa_graph_ptr& aut,
|
||||
const spot::ltl::formula* f,
|
||||
const char* filename, int loc, double run_time)
|
||||
|
|
@ -231,7 +231,7 @@ public:
|
|||
int loc = -1,
|
||||
// Time and input automaton for statistics
|
||||
double time = 0.0,
|
||||
const spot::const_hoa_aut_ptr& haut = nullptr);
|
||||
const spot::const_parsed_aut_ptr& haut = nullptr);
|
||||
|
||||
void add_stat(char c, const spot::printable* p);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include "common_conv.hh"
|
||||
#include <cstdlib>
|
||||
#include "error.h"
|
||||
#include "hoaparse/public.hh"
|
||||
#include "parseaut/public.hh"
|
||||
|
||||
int
|
||||
to_int(const char* s)
|
||||
|
|
@ -73,9 +73,9 @@ to_probability(const char* s)
|
|||
spot::twa_graph_ptr
|
||||
read_automaton(const char* filename, spot::bdd_dict_ptr& dict)
|
||||
{
|
||||
spot::hoa_parse_error_list pel;
|
||||
auto p = spot::hoa_parse(filename, pel, dict);
|
||||
if (spot::format_hoa_parse_errors(std::cerr, filename, pel)
|
||||
spot::parse_aut_error_list pel;
|
||||
auto p = spot::parse_aut(filename, pel, dict);
|
||||
if (spot::format_parse_aut_errors(std::cerr, filename, pel)
|
||||
|| !p || p->aborted)
|
||||
error(2, 0, "failed to read automaton from %s", filename);
|
||||
return std::move(p->aut);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "common_file.hh"
|
||||
#include "common_finput.hh"
|
||||
#include "dstarparse/public.hh"
|
||||
#include "hoaparse/public.hh"
|
||||
#include "parseaut/public.hh"
|
||||
#include "ltlast/unop.hh"
|
||||
#include "ltlvisit/print.hh"
|
||||
#include "ltlvisit/apcollect.hh"
|
||||
|
|
@ -633,9 +633,9 @@ namespace
|
|||
}
|
||||
case printable_result_filename::Hoa: // Will also read neverclaims
|
||||
{
|
||||
spot::hoa_parse_error_list pel;
|
||||
spot::parse_aut_error_list pel;
|
||||
std::string filename = output.val()->name();
|
||||
auto aut = spot::hoa_parse(filename, pel, dict);
|
||||
auto aut = spot::parse_aut(filename, pel, dict);
|
||||
if (!pel.empty())
|
||||
{
|
||||
status_str = "parse error";
|
||||
|
|
@ -643,7 +643,7 @@ namespace
|
|||
es = -1;
|
||||
std::ostream& err = global_error();
|
||||
err << "error: failed to parse the produced automaton.\n";
|
||||
spot::format_hoa_parse_errors(err, filename, pel);
|
||||
spot::format_parse_aut_errors(err, filename, pel);
|
||||
end_error();
|
||||
res = nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#include "misc/timer.hh"
|
||||
#include "twaalgos/lbtt.hh"
|
||||
#include "twaalgos/relabel.hh"
|
||||
#include "hoaparse/public.hh"
|
||||
#include "parseaut/public.hh"
|
||||
#include "dstarparse/public.hh"
|
||||
|
||||
const char argp_program_doc[] ="\
|
||||
|
|
@ -192,15 +192,15 @@ namespace
|
|||
case printable_result_filename::Hoa:
|
||||
{
|
||||
// Will also read neverclaims/LBTT
|
||||
spot::hoa_parse_error_list pel;
|
||||
spot::parse_aut_error_list pel;
|
||||
std::string filename = output.val()->name();
|
||||
auto aut = spot::hoa_parse(filename, pel, dict);
|
||||
auto aut = spot::parse_aut(filename, pel, dict);
|
||||
if (!pel.empty())
|
||||
{
|
||||
problem = true;
|
||||
std::cerr << "error: failed to parse the automaton "
|
||||
"produced by \"" << cmd << "\".\n";
|
||||
spot::format_hoa_parse_errors(std::cerr, filename, pel);
|
||||
spot::format_parse_aut_errors(std::cerr, filename, pel);
|
||||
res = nullptr;
|
||||
}
|
||||
else if (!aut)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue