ltlcross: replace %H,%T,%N by %O
Also get rid of the lbt_parser, and fix the LBT support of the HOA parser. * doc/org/ltlcross.org, doc/org/ltldo.org: Update. * src/bin/common_trans.cc, src/bin/common_trans.hh: Add support for %O, and keep %T,%N,%H as hidden aliases without disabling them. * src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tgbatest/ltl2tgba.cc: Call hoa_parse instead of lbt_parse. * src/hoaparse/hoaparse.yy: Improve error reporting from LBT. * src/hoaparse/hoascan.ll: Fix typos preventing parsing of LBT files with more than 10 states. * src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh: Delete the lbt parser. * src/tgbatest/lbttparse.test: Adjust the expected error message. * NEWS: Update.
This commit is contained in:
parent
dbd824c539
commit
847270b480
13 changed files with 264 additions and 540 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et Développement
|
||||
# de l'Epita (LRDE).
|
||||
# Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
|
|
@ -122,7 +122,7 @@ cat > input <<EOF
|
|||
-1
|
||||
EOF
|
||||
cat >expected <<EOF
|
||||
input:3.5-20: failed to parse guard
|
||||
input:3.5-20: failed to parse guard: & ! "a" ! "b" !
|
||||
input:3.20: syntax error, unexpected '!', expecting end of formula
|
||||
input:3.20: ignoring trailing garbage
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ checked_main(int argc, char** argv)
|
|||
bool accepting_run = false;
|
||||
bool accepting_run_replay = false;
|
||||
bool from_file = false;
|
||||
enum { ReadLbtt, ReadDstar, ReadHoa } readformat = ReadHoa;
|
||||
enum { ReadDstar, ReadHoa } readformat = ReadHoa;
|
||||
bool nra2nba = false;
|
||||
bool dra2dba = false;
|
||||
bool scc_filter = false;
|
||||
|
|
@ -883,7 +883,7 @@ checked_main(int argc, char** argv)
|
|||
else if (!strcmp(argv[formula_index], "-XL"))
|
||||
{
|
||||
from_file = true;
|
||||
readformat = ReadLbtt;
|
||||
readformat = ReadHoa;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-XN")) // now synonym for -XH
|
||||
{
|
||||
|
|
@ -967,31 +967,6 @@ checked_main(int argc, char** argv)
|
|||
{
|
||||
switch (readformat)
|
||||
{
|
||||
case ReadLbtt:
|
||||
{
|
||||
std::string error;
|
||||
std::istream* in = &std::cin;
|
||||
std::fstream* f = 0;
|
||||
if (input != "-")
|
||||
{
|
||||
in = f = new std::fstream(input.c_str());
|
||||
if (!*f)
|
||||
{
|
||||
std::cerr << "cannot open " << input << std::endl;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
tm.start("parsing lbtt");
|
||||
a = spot::lbtt_parse(*in, error, dict, env);
|
||||
tm.stop("parsing lbtt");
|
||||
delete f;
|
||||
if (!a)
|
||||
{
|
||||
std::cerr << error << std::endl;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ReadDstar:
|
||||
{
|
||||
spot::dstar_parse_error_list pel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue