ltlparse: move in parsetl/, and declare in tl/parse.hh

* src/ltlparse/public.hh: Rename as...
* src/tl/parse.hh: ... this.
* src/ltlparse/: Rename as...
* src/parsetl/: ... this.
* NEWS: Mention the change.
* README, configure.ac, doc/org/tut01.org, doc/org/tut02.org,
doc/org/tut03.org, doc/org/tut10.org, src/Makefile.am,
src/bin/common_finput.cc, src/bin/common_finput.hh, src/bin/ltl2tgta.cc,
src/kripkeparse/kripkeparse.yy, src/parseaut/parseaut.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/ikwiad.cc,
src/tests/kind.cc, src/tests/length.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,
src/tl/Makefile.am, src/twaalgos/lbtt.cc, wrap/python/spot_impl.i,
iface/ltsmin/modelcheck.cc: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-09-30 17:11:48 +02:00
parent 25b0153633
commit ae6cd92142
40 changed files with 86 additions and 90 deletions

View file

@ -25,8 +25,8 @@ AUTOMAKE_OPTIONS = subdir-objects
# List directories in the order they must be built. Keep tests at the
# end, after building '.' (since the current directory contains
# libspot.la needed by the tests)
SUBDIRS = misc priv tl ltlparse graph twa twaalgos ta taalgos kripke \
kripkeparse parseaut . bin tests sanity
SUBDIRS = misc priv tl graph twa twaalgos ta taalgos kripke \
kripkeparse parseaut parsetl . bin tests sanity
lib_LTLIBRARIES = libspot.la
libspot_la_SOURCES =
@ -34,9 +34,9 @@ libspot_la_LDFLAGS = $(BUDDY_LDFLAGS) -no-undefined
libspot_la_LIBADD = \
kripke/libkripke.la \
kripkeparse/libkripkeparse.la \
ltlparse/libltlparse.la \
misc/libmisc.la \
parseaut/libparseaut.la \
parsetl/libparsetl.la \
priv/libpriv.la \
taalgos/libtaalgos.la \
ta/libta.la \

View file

@ -19,7 +19,6 @@
#include "common_finput.hh"
#include "error.h"
#include "ltlparse/public.hh"
#include <fstream>
#include <cstring>

View file

@ -23,7 +23,7 @@
#include <argp.h>
#include <vector>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
struct job
{

View file

@ -32,7 +32,7 @@
#include "common_finput.hh"
#include "common_post.hh"
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/print.hh"
#include "tl/simplify.hh"
#include "twaalgos/dot.hh"

View file

@ -54,7 +54,7 @@ typedef std::map<std::string, bdd> formula_cache;
%code
{
#include "kripke/kripkeexplicit.hh"
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include <map>
/* twaparse.hh and parsedecl.hh include each other recursively.

View file

@ -37,7 +37,7 @@
#include "twa/formula2bdd.hh"
#include "public.hh"
#include "priv/accmap.hh"
#include "ltlparse/public.hh"
#include "tl/parse.hh"
inline namespace hoayy_support
{
@ -152,7 +152,6 @@
%code
{
#include <sstream>
#include "ltlparse/public.hh"
/* parseaut.hh and parsedecl.hh include each other recursively.
We must ensure that YYSTYPE is declared (by the above %union)

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8 -*-
## Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire
## de Recherche et Développement de l'Epita (LRDE).
## Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
## Laboratoire de Recherche et Développement de l'Epita (LRDE).
## Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris
## 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
## Université Pierre et Marie Curie.
@ -24,37 +24,32 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/.. -I.. -DYY_NO_INPUT
# Disable -Werror because too many versions of flex yield warnings.
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
ltlparsedir = $(pkgincludedir)/ltlparse
noinst_LTLIBRARIES = libparsetl.la
noinst_LTLIBRARIES = libltlparse.la
LTLPARSE_YY = ltlparse.yy
FROM_LTLPARSE_YY_MAIN = ltlparse.cc
FROM_LTLPARSE_YY_OTHERS = \
PARSETL_YY = parsetl.yy
FROM_PARSETL_YY_MAIN = parsetl.cc
FROM_PARSETL_YY_OTHERS = \
stack.hh \
ltlparse.hh
FROM_LTLPARSE_YY = $(FROM_LTLPARSE_YY_MAIN) $(FROM_LTLPARSE_YY_OTHERS)
parsetl.hh
FROM_PARSETL_YY = $(FROM_PARSETL_YY_MAIN) $(FROM_PARSETL_YY_OTHERS)
BUILT_SOURCES = $(FROM_LTLPARSE_YY)
MAINTAINERCLEANFILES = $(FROM_LTLPARSE_YY)
BUILT_SOURCES = $(FROM_PARSETL_YY)
MAINTAINERCLEANFILES = $(FROM_PARSETL_YY)
$(FROM_LTLPARSE_YY_MAIN): $(srcdir)/$(LTLPARSE_YY)
$(FROM_PARSETL_YY_MAIN): $(srcdir)/$(PARSETL_YY)
## We must cd into $(srcdir) first because if we tell bison to read
## $(srcdir)/$(LTLPARSE_YY), it will also use the value of $(srcdir)/
## $(srcdir)/$(PARSETL_YY), it will also use the value of $(srcdir)/
## in the generated include statements.
cd $(srcdir) && \
$(BISON) -Wall -Werror --report=all $(BISON_EXTRA_FLAGS) \
$(LTLPARSE_YY) -o $(FROM_LTLPARSE_YY_MAIN)
$(FROM_LTLPARSE_YY_OTHERS): $(LTLPARSE_YY)
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_LTLPARSE_YY_MAIN)
$(PARSETL_YY) -o $(FROM_PARSETL_YY_MAIN)
$(FROM_PARSETL_YY_OTHERS): $(PARSETL_YY)
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(FROM_PARSETL_YY_MAIN)
EXTRA_DIST = $(LTLPARSE_YY)
EXTRA_DIST = $(PARSETL_YY)
libltlparse_la_SOURCES = \
libparsetl_la_SOURCES = \
fmterror.cc \
$(FROM_LTLPARSE_YY) \
ltlscan.ll \
$(FROM_PARSETL_YY) \
scantl.ll \
parsedecl.hh
ltlparse_HEADERS = \
public.hh

View file

@ -20,7 +20,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "public.hh"
#include "tl/parse.hh"
#include <ostream>
#include <iterator>
#include <vector>

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2012, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2010, 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE)
// Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -22,13 +22,13 @@
#pragma once
#include "ltlparse.hh"
#include "parsetl.hh"
#include "misc/location.hh"
# define YY_DECL \
int ltlyylex (ltlyy::parser::semantic_type *yylval, \
spot::location *yylloc, \
spot::parse_error_list& error_list)
int tlyylex (tlyy::parser::semantic_type *yylval, \
spot::location *yylloc, \
spot::parse_error_list& error_list)
YY_DECL;
void flex_set_buffer(const std::string& buf, int start_tok, bool lenient);

View file

@ -23,7 +23,7 @@
%language "C++"
%locations
%defines
%name-prefix "ltlyy"
%name-prefix "tlyy"
%debug
%error-verbose
%expect 0
@ -34,7 +34,7 @@
{
#include <string>
#include <sstream>
#include "public.hh"
#include "tl/parse.hh"
#include "tl/formula.hh"
#include "tl/print.hh"
@ -53,7 +53,7 @@
}
%code {
/* ltlparse.hh and parsedecl.hh include each other recursively.
/* parsetl.hh and parsedecl.hh include each other recursively.
We mut ensure that YYSTYPE is declared (by the above %union)
before parsedecl.hh uses it. */
#include "parsedecl.hh"
@ -986,7 +986,7 @@ lbtformula: ATOMIC_PROP
%%
void
ltlyy::parser::error(const location_type& location, const std::string& message)
tlyy::parser::error(const location_type& location, const std::string& message)
{
error_list.emplace_back(location, message);
}
@ -1001,9 +1001,9 @@ namespace spot
{
formula result = nullptr;
flex_set_buffer(ltl_string,
ltlyy::parser::token::START_LTL,
tlyy::parser::token::START_LTL,
lenient);
ltlyy::parser parser(error_list, env, result);
tlyy::parser parser(error_list, env, result);
parser.set_debug_level(debug);
parser.parse();
flex_unset_buffer();
@ -1018,9 +1018,9 @@ namespace spot
{
formula result = nullptr;
flex_set_buffer(ltl_string,
ltlyy::parser::token::START_BOOL,
tlyy::parser::token::START_BOOL,
lenient);
ltlyy::parser parser(error_list, env, result);
tlyy::parser parser(error_list, env, result);
parser.set_debug_level(debug);
parser.parse();
flex_unset_buffer();
@ -1035,9 +1035,9 @@ namespace spot
{
formula result = nullptr;
flex_set_buffer(ltl_string,
ltlyy::parser::token::START_LBT,
tlyy::parser::token::START_LBT,
false);
ltlyy::parser parser(error_list, env, result);
tlyy::parser parser(error_list, env, result);
parser.set_debug_level(debug);
parser.parse();
flex_unset_buffer();
@ -1053,9 +1053,9 @@ namespace spot
{
formula result = nullptr;
flex_set_buffer(sere_string,
ltlyy::parser::token::START_SERE,
tlyy::parser::token::START_SERE,
lenient);
ltlyy::parser parser(error_list, env, result);
tlyy::parser parser(error_list, env, result);
parser.set_debug_level(debug);
parser.parse();
flex_unset_buffer();

View file

@ -21,7 +21,7 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
%option noyywrap warn 8bit batch
%option prefix="ltlyy"
%option prefix="tlyy"
%option outfile="lex.yy.c"
%option stack
%option never-interactive
@ -30,7 +30,7 @@
#include <cstdlib>
#include <string>
#include "ltlparse/parsedecl.hh"
#include "parsedecl.hh"
#include "misc/escape.hh"
#define YY_USER_ACTION \
@ -43,7 +43,7 @@ static bool lenient_mode = false;
static int orig_cond = 0;
static unsigned comment_level = 0;
typedef ltlyy::parser::token token;
typedef tlyy::parser::token token;
%}

View file

@ -22,7 +22,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/ltl2taa.hh"
#include "twaalgos/sccfilter.hh"

View file

@ -23,7 +23,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/sccfilter.hh"
#include "twaalgos/degen.hh"

View file

@ -25,7 +25,7 @@
#include "twa/twaproduct.hh"
#include "twaalgos/gtec/gtec.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/stats.hh"
#include "twaalgos/emptiness.hh"
#include "twaalgos/stats.hh"

View file

@ -22,7 +22,7 @@
#include <sstream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
void
syntax(char *prog)

View file

@ -22,7 +22,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/ltl2taa.hh"
#include "twaalgos/sccfilter.hh"

View file

@ -26,7 +26,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/unabbrev.hh"
#include "tl/nenoform.hh"
#include "tl/simplify.hh"

View file

@ -29,7 +29,7 @@
#include "tl/print.hh"
#include "tl/apcollect.hh"
#include "tl/formula.hh"
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/ltl2taa.hh"
#include "twa/bddprint.hh"

View file

@ -22,7 +22,7 @@
#include <sstream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
void
syntax(char *prog)

View file

@ -21,7 +21,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/length.hh"
void

View file

@ -23,7 +23,7 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "twaalgos/product.hh"
#include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/dot.hh"

View file

@ -20,7 +20,7 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/relabel.hh"
#include "tl/print.hh"

View file

@ -30,7 +30,7 @@
#include <utility>
#include <set>
#include <vector>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/apcollect.hh"
#include "tl/randomltl.hh"
#include "tl/print.hh"

View file

@ -24,7 +24,7 @@
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/dot.hh"
void

View file

@ -26,7 +26,7 @@
#include <cstdlib>
#include <string>
#include <cstring>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/print.hh"
#include "tl/simplify.hh"
#include "tl/length.hh"

View file

@ -23,7 +23,7 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/print.hh"
#include "tl/simplify.hh"
#include "tl/nenoform.hh"

View file

@ -23,7 +23,7 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "ltlparse/public.hh"
#include "tl/parse.hh"
#include "tl/print.hh"
void

View file

@ -34,6 +34,7 @@ tl_HEADERS = \
length.hh \
mutation.hh \
nenoform.hh \
parse.hh \
print.hh \
randomltl.hh \
relabel.hh \

View file

@ -29,7 +29,6 @@
#include "misc/bddlt.hh"
#include "priv/accmap.hh"
#include "tl/print.hh"
#include "ltlparse/public.hh"
namespace spot
{