parse_aut: simplify the interface
* src/parseaut/public.hh, src/parseaut/parseaut.yy, src/parseaut/fmterror.cc: Add a raise_errors options. Remove the parse_strict() method. Store parse errors and filename in the output parsed_aut to simplify usage. * doc/org/tut20.org, doc/org/tut21.org, doc/org/tut30.org, src/bin/autfilt.cc, src/bin/common_hoaread.cc, src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tests/complementation.cc, src/tests/ikwiad.cc, src/tests/ltlcross3.test, src/tests/ltldo.test, wrap/python/spot.py, wrap/python/tests/parsetgba.py: Adjust usage. * NEWS: Mention the changes.
This commit is contained in:
parent
3d5d160635
commit
dee73ee342
18 changed files with 228 additions and 215 deletions
|
|
@ -577,13 +577,10 @@ checked_main(int argc, char** argv)
|
|||
{
|
||||
tm.start("reading -P's argument");
|
||||
|
||||
spot::parse_aut_error_list pel;
|
||||
spot::automaton_parser_options opts;
|
||||
opts.debug = debug_opt;
|
||||
auto daut = spot::parse_aut(argv[formula_index] + 2, pel,
|
||||
dict, env, opts);
|
||||
if (spot::format_parse_aut_errors(std::cerr,
|
||||
argv[formula_index] + 2, pel))
|
||||
auto daut = spot::parse_aut(argv[formula_index] + 2, dict, env, opts);
|
||||
if (daut->format_errors(std::cerr))
|
||||
return 2;
|
||||
daut->aut->merge_edges();
|
||||
system_aut = daut->aut;
|
||||
|
|
@ -929,13 +926,12 @@ checked_main(int argc, char** argv)
|
|||
|
||||
if (from_file)
|
||||
{
|
||||
spot::parse_aut_error_list pel;
|
||||
tm.start("parsing hoa");
|
||||
spot::automaton_parser_options opts;
|
||||
opts.debug = debug_opt;
|
||||
auto daut = spot::parse_aut(input, pel, dict, env, opts);
|
||||
auto daut = spot::parse_aut(input, dict, env, opts);
|
||||
tm.stop("parsing hoa");
|
||||
if (spot::format_parse_aut_errors(std::cerr, input, pel))
|
||||
if (daut->format_errors(std::cerr))
|
||||
return 2;
|
||||
daut->aut->merge_edges();
|
||||
a = daut->aut;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue