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:
parent
aedce8101c
commit
98790f5345
29 changed files with 118 additions and 113 deletions
|
|
@ -91,7 +91,7 @@ using namespace spot::ltl;
|
|||
|
||||
enum parser_type { parser_ltl, parser_bool, parser_sere };
|
||||
|
||||
const formula*
|
||||
static const formula*
|
||||
try_recursive_parse(const std::string& str,
|
||||
const spot::location& location,
|
||||
spot::ltl::environment& env,
|
||||
|
|
@ -125,13 +125,13 @@ using namespace spot::ltl;
|
|||
switch (type)
|
||||
{
|
||||
case parser_sere:
|
||||
f = spot::ltl::parse_sere(str, suberror, env, debug, true);
|
||||
f = spot::ltl::parse_infix_sere(str, suberror, env, debug, true);
|
||||
break;
|
||||
case parser_bool:
|
||||
f = spot::ltl::parse_boolean(str, suberror, env, debug, true);
|
||||
f = spot::ltl::parse_infix_boolean(str, suberror, env, debug, true);
|
||||
break;
|
||||
case parser_ltl:
|
||||
f = spot::ltl::parse(str, suberror, env, debug, true);
|
||||
f = spot::ltl::parse_infix_psl(str, suberror, env, debug, true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -996,10 +996,10 @@ namespace spot
|
|||
namespace ltl
|
||||
{
|
||||
const formula*
|
||||
parse(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug, bool lenient)
|
||||
parse_infix_psl(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug, bool lenient)
|
||||
{
|
||||
const formula* result = 0;
|
||||
flex_set_buffer(ltl_string,
|
||||
|
|
@ -1013,10 +1013,10 @@ namespace spot
|
|||
}
|
||||
|
||||
const formula*
|
||||
parse_boolean(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug, bool lenient)
|
||||
parse_infix_boolean(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug, bool lenient)
|
||||
{
|
||||
const formula* result = 0;
|
||||
flex_set_buffer(ltl_string,
|
||||
|
|
@ -1030,7 +1030,7 @@ namespace spot
|
|||
}
|
||||
|
||||
const formula*
|
||||
parse_lbt(const std::string& ltl_string,
|
||||
parse_prefix_ltl(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug)
|
||||
|
|
@ -1047,11 +1047,11 @@ namespace spot
|
|||
}
|
||||
|
||||
const formula*
|
||||
parse_sere(const std::string& sere_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug,
|
||||
bool lenient)
|
||||
parse_infix_sere(const std::string& sere_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env,
|
||||
bool debug,
|
||||
bool lenient)
|
||||
{
|
||||
const formula* result = 0;
|
||||
flex_set_buffer(sere_string,
|
||||
|
|
@ -1068,12 +1068,12 @@ namespace spot
|
|||
parse_formula(const std::string& ltl_string, environment& env)
|
||||
{
|
||||
parse_error_list pel;
|
||||
const formula* f = parse(ltl_string, pel, env);
|
||||
const formula* f = parse_infix_psl(ltl_string, pel, env);
|
||||
std::ostringstream s;
|
||||
if (format_parse_errors(s, ltl_string, pel))
|
||||
{
|
||||
parse_error_list pel2;
|
||||
const formula* g = parse_lbt(ltl_string, pel2, env);
|
||||
const formula* g = parse_prefix_ltl(ltl_string, pel2, env);
|
||||
if (pel2.empty())
|
||||
return g;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -66,11 +66,12 @@ namespace spot
|
|||
///
|
||||
/// \warning This function is not reentrant.
|
||||
SPOT_API
|
||||
const formula* parse(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env = default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
const formula* parse_infix_psl(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
|
||||
/// \brief Build a Boolean formula from a string.
|
||||
/// \param ltl_string The string to parse.
|
||||
|
|
@ -91,12 +92,12 @@ namespace spot
|
|||
///
|
||||
/// \warning This function is not reentrant.
|
||||
SPOT_API
|
||||
const formula* parse_boolean(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
const formula* parse_infix_boolean(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
|
||||
/// \brief Build a formula from an LTL string in LBT's format.
|
||||
/// \param ltl_string The string to parse.
|
||||
|
|
@ -118,16 +119,18 @@ namespace spot
|
|||
///
|
||||
/// \warning This function is not reentrant.
|
||||
SPOT_API
|
||||
const formula* parse_lbt(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env = default_environment::instance(),
|
||||
bool debug = false);
|
||||
const formula* parse_prefix_ltl(const std::string& ltl_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false);
|
||||
|
||||
/// \brief A simple wrapper to parse() and parse_lbt().
|
||||
/// \brief A simple wrapper to parse_infix_psl() and parse_prefix_ltl().
|
||||
///
|
||||
/// This is mostly meant for interactive use. It first tries parse(); if
|
||||
/// this fails it tries parse_lbt(); and if both fails it returns the errors
|
||||
/// of the first call to parse() as a parse_error exception.
|
||||
/// This is mostly meant for interactive use. It first tries
|
||||
/// parse_infix_psl(); if this fails it tries parse_prefix_ltl();
|
||||
/// and if both fails it returns the errors of the first call to
|
||||
/// parse_infix_psl() as a parse_error exception.
|
||||
SPOT_API const formula*
|
||||
parse_formula(const std::string& ltl_string,
|
||||
environment& env = default_environment::instance());
|
||||
|
|
@ -151,12 +154,12 @@ namespace spot
|
|||
///
|
||||
/// \warning This function is not reentrant.
|
||||
SPOT_API
|
||||
const formula* parse_sere(const std::string& sere_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
const formula* parse_infix_sere(const std::string& sere_string,
|
||||
parse_error_list& error_list,
|
||||
environment& env =
|
||||
default_environment::instance(),
|
||||
bool debug = false,
|
||||
bool lenient = false);
|
||||
|
||||
/// \brief Format diagnostics produced by spot::ltl::parse
|
||||
/// or spot::ltl::ratexp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue