* configure.ac: Output src/ltlenv/Makefile.

* src/ltlenv/Makefile.am, src/ltlenv/defaultenv.cc,
src/ltlenv/defaultenv.hh, src/ltlenv/environment.hh: New files.
* src/ltlparse/public.hh (parse): Take an environment as third
argument.
* src/ltlparse/ltlparse.yy (ATOMIC_PROP, parse): Require the
atomic proposition via the environment.
* src/ltltest/readltl.cc (main): Adjust the call to parse().
* src/ltltest/Makefile.am (LDADD): Add ../ltlenv/libltlenv.a.
This commit is contained in:
Alexandre Duret-Lutz 2003-04-17 15:09:49 +00:00
parent ae7fdeba59
commit a30a0638b9
12 changed files with 141 additions and 7 deletions

26
src/ltlenv/defaultenv.hh Normal file
View file

@ -0,0 +1,26 @@
#ifndef SPOT_LTLENV_DEFAULT_ENVIRONMENT_HH
# define SPOT_LTLENV_DEFAULT_ENVIRONMENT_HH
# include "environment.hh"
namespace spot
{
namespace ltl
{
class default_environment : public environment
{
public:
virtual atomic_prop* require(const std::string& prop_str);
virtual const std::string& name();
/* This class is a singleton. */
static default_environment& instance();
protected:
default_environment();
};
}
}
#endif // SPOT_LTLENV_DEFAULT_ENVIRONMENT_HH