ltlparse: rename the main functions

parse         -> parse_infix_psl
parse_lbt     -> parse_prefix_ltl
parse_sere    -> parse_infix_sere
parse_boolean -> parse_infix_boolean

Fixes #87.

* src/ltlparse/ltlparse.yy, src/ltlparse/public.hh:
Do the above changes.
* doc/mainpage.dox, doc/org/tut01.org, iface/ltsmin/modelcheck.cc,
src/bin/common_finput.cc, src/hoaparse/hoaparse.yy,
src/kripkeparse/kripkeparse.yy, src/tests/checkpsl.cc,
src/tests/checkta.cc, src/tests/complementation.cc,
src/tests/consterm.cc, src/tests/emptchk.cc, src/tests/equalsf.cc,
src/tests/kind.cc, src/tests/length.cc, src/tests/ltl2tgba.cc,
src/tests/ltlprod.cc, src/tests/ltlrel.cc, src/tests/randtgba.cc,
src/tests/readltl.cc, src/tests/reduc.cc, src/tests/syntimpl.cc,
src/tests/tostring.cc, wrap/python/ajax/spot.in,
wrap/python/tests/alarm.py, wrap/python/tests/interdep.py,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-06-03 09:03:50 +02:00
parent aedce8101c
commit 98790f5345
29 changed files with 118 additions and 113 deletions

View file

@ -62,7 +62,7 @@ main(int argc, char** argv)
continue;
spot::ltl::parse_error_list pe;
auto fpos = spot::ltl::parse(s, pe);
auto fpos = spot::ltl::parse_infix_psl(s, pe);
if (spot::ltl::format_parse_errors(std::cerr, s, pe))
return 2;

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -85,7 +85,7 @@ main(int argc, char** argv)
continue;
spot::ltl::parse_error_list pe;
auto f = spot::ltl::parse(s, pe);
auto f = spot::ltl::parse_infix_psl(s, pe);
if (spot::ltl::format_parse_errors(std::cerr, s, pe))
return 2;

View file

@ -149,7 +149,7 @@ int main(int argc, char* argv[])
else if (print_formula)
{
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(file, p1);
auto* f1 = spot::ltl::parse_infix_psl(file, p1);
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
return 2;
@ -169,7 +169,7 @@ int main(int argc, char* argv[])
if (formula)
{
spot::ltl::parse_error_list p1;
f1 = spot::ltl::parse(file, p1);
f1 = spot::ltl::parse_infix_psl(file, p1);
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
return 2;
@ -227,7 +227,7 @@ int main(int argc, char* argv[])
else
{
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(file, p1);
auto* f1 = spot::ltl::parse_infix_psl(file, p1);
if (spot::ltl::format_parse_errors(std::cerr, file, p1))
return 2;

View file

@ -60,7 +60,7 @@ main(int argc, char **argv)
ss >> expected;
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse_sere(form, p1);
auto* f1 = spot::ltl::parse_infix_sere(form, p1);
if (spot::ltl::format_parse_errors(std::cerr, form, p1))
return 2;

View file

@ -91,7 +91,7 @@ main(int argc, char** argv)
int runs = atoi(tokens[0].c_str());
spot::ltl::parse_error_list pe;
auto f = spot::ltl::parse(tokens[1], pe);
auto f = spot::ltl::parse_infix_psl(tokens[1], pe);
if (spot::ltl::format_parse_errors(std::cerr, tokens[1], pe))
return 2;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014 Laboratoire de
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2015 Laboratoire de
// Recherche et Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
@ -100,7 +100,7 @@ main(int argc, char** argv)
}
spot::ltl::parse_error_list p2;
const spot::ltl::formula* f2 = spot::ltl::parse(formulas[size - 1], p2);
auto* f2 = spot::ltl::parse_infix_psl(formulas[size - 1], p2);
if (spot::ltl::format_parse_errors(std::cerr, formulas[size - 1], p2))
return 2;
@ -109,7 +109,7 @@ main(int argc, char** argv)
{
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(formulas[n], p1);
auto* f1 = spot::ltl::parse_infix_psl(formulas[n], p1);
if (check_first &&
spot::ltl::format_parse_errors(std::cerr, formulas[n], p1))

View file

@ -60,7 +60,7 @@ main(int argc, char **argv)
std::getline(ss, expected);
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(form, p1);
auto* f1 = spot::ltl::parse_infix_psl(form, p1);
if (spot::ltl::format_parse_errors(std::cerr, form, p1))
return 2;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Developement de
// Copyright (C) 2012, 2015 Laboratoire de Recherche et Developement de
// l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -46,7 +46,7 @@ main(int argc, char **argv)
}
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
auto* f1 = spot::ltl::parse_infix_psl(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;

View file

@ -958,7 +958,7 @@ checked_main(int argc, char** argv)
{
spot::ltl::parse_error_list pel;
tm.start("parsing formula");
f = spot::ltl::parse(input, pel, env, debug_opt);
f = spot::ltl::parse_infix_psl(input, pel, env, debug_opt);
tm.stop("parsing formula");
exit_code = spot::ltl::format_parse_errors(std::cerr, input, pel);
}

View file

@ -48,13 +48,13 @@ main(int argc, char** argv)
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::ltl::parse_error_list pel1;
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], pel1, env);
auto* f1 = spot::ltl::parse_infix_psl(argv[1], pel1, env);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], pel1))
return 2;
spot::ltl::parse_error_list pel2;
const spot::ltl::formula* f2 = spot::ltl::parse(argv[2], pel2, env);
auto* f2 = spot::ltl::parse_infix_psl(argv[2], pel2, env);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], pel2))
return 2;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Developement
// Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et Developement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -39,7 +39,7 @@ main(int argc, char **argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
auto* f1 = spot::ltl::parse_infix_psl(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;

View file

@ -872,7 +872,7 @@ main(int argc, char** argv)
else if (input == "")
break;
spot::ltl::parse_error_list pel;
const spot::ltl::formula* f = spot::ltl::parse(input, pel, env);
auto* f = spot::ltl::parse_infix_psl(input, pel, env);
if (spot::ltl::format_parse_errors(std::cerr, input, pel))
{
exit_code = 1;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2012 Laboratoire de Recherche et
// Copyright (C) 2008, 2009, 2012, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -75,8 +75,7 @@ main(int argc, char** argv)
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::ltl::parse_error_list pel;
const spot::ltl::formula* f = spot::ltl::parse(argv[formula_index],
pel, env, debug);
auto* f = spot::ltl::parse_infix_psl(argv[formula_index], pel, env, debug);
exit_code =
spot::ltl::format_parse_errors(std::cerr, argv[formula_index], pel);

View file

@ -180,14 +180,14 @@ main(int argc, char** argv)
while (input == "");
spot::ltl::parse_error_list p1;
f1 = spot::ltl::parse(input, p1);
f1 = spot::ltl::parse_infix_psl(input, p1);
if (spot::ltl::format_parse_errors(std::cerr, input, p1))
return 2;
}
else
{
spot::ltl::parse_error_list p1;
f1 = spot::ltl::parse(argv[2], p1);
f1 = spot::ltl::parse_infix_psl(argv[2], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
return 2;
}
@ -201,7 +201,7 @@ main(int argc, char** argv)
}
spot::ltl::parse_error_list p2;
f2 = spot::ltl::parse(argv[3], p2);
f2 = spot::ltl::parse_infix_psl(argv[3], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
return 2;
}

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014 Laboratoire de
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2015 Laboratoire de
// Recherche et Développement de l'Epita (LRDE).
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -48,13 +48,13 @@ main(int argc, char** argv)
int opt = atoi(argv[1]);
spot::ltl::parse_error_list p1;
const spot::ltl::formula* ftmp1 = spot::ltl::parse(argv[2], p1);
auto* ftmp1 = spot::ltl::parse_infix_psl(argv[2], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
return 2;
spot::ltl::parse_error_list p2;
const spot::ltl::formula* ftmp2 = spot::ltl::parse(argv[3], p2);
auto* ftmp2 = spot::ltl::parse_infix_psl(argv[3], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
return 2;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2012 Laboratoire de Recherche et
// Copyright (C) 2008, 2009, 2012, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -41,7 +41,7 @@ main(int argc, char **argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
auto* f1 = spot::ltl::parse_infix_psl(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;
@ -52,7 +52,7 @@ main(int argc, char **argv)
std::string f1s = spot::ltl::to_string(f1);
std::cout << f1s << std::endl;
const spot::ltl::formula* f2 = spot::ltl::parse(f1s, p1);
auto* f2 = spot::ltl::parse_infix_psl(f1s, p1);
if (spot::ltl::format_parse_errors(std::cerr, f1s, p1))
return 2;