* configure.ac: Output wrap/python/tests/Makefile
and wrap/python/tests/run. * wrap/python/Makefile.am (SUBDIRS): New variable. * wrap/python/spot.i: Include all formulae headers from ltlast/, as well as ltlvisit/destroy.hh. (spot::ltl::formula::__cmp__, spot::ltl::formula::__str__): New functions. * wrap/python/tests/Makefile.am, wrap/python/tests/ltlsimple.py, wrap/python/tests/run.in: New files.
This commit is contained in:
parent
99018935bb
commit
0c50e20ffd
9 changed files with 181 additions and 12 deletions
|
|
@ -4,59 +4,96 @@
|
|||
%include "std_list.i"
|
||||
|
||||
%{
|
||||
#include "ltlenv/environment.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
#include "ltlast/formula.hh"
|
||||
#include "ltlparse/public.hh"
|
||||
#include "ltlast/refformula.hh"
|
||||
#include "ltlast/atomic_prop.hh"
|
||||
#include "ltlast/binop.hh"
|
||||
#include "ltlast/constant.hh"
|
||||
#include "ltlast/multop.hh"
|
||||
#include "ltlast/unop.hh"
|
||||
#include "ltlast/visitor.hh"
|
||||
|
||||
#include "ltlenv/environment.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
|
||||
#include "ltlparse/public.hh"
|
||||
|
||||
#include "ltlvisit/clone.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlvisit/dotty.hh"
|
||||
#include "ltlvisit/dump.hh"
|
||||
#include "ltlvisit/lunabbrev.hh"
|
||||
#include "ltlvisit/tunabbrev.hh"
|
||||
#include "ltlvisit/nenoform.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/tunabbrev.hh"
|
||||
|
||||
using namespace spot::ltl;
|
||||
%}
|
||||
|
||||
%include "ltlenv/environment.hh"
|
||||
%include "ltlenv/defaultenv.hh"
|
||||
%include "ltlast/formula.hh"
|
||||
%include "ltlparse/public.hh"
|
||||
%include "ltlast/refformula.hh"
|
||||
%include "ltlast/atomic_prop.hh"
|
||||
%include "ltlast/binop.hh"
|
||||
%include "ltlast/constant.hh"
|
||||
%include "ltlast/multop.hh"
|
||||
%include "ltlast/unop.hh"
|
||||
%include "ltlast/visitor.hh"
|
||||
|
||||
%include "ltlenv/environment.hh"
|
||||
%include "ltlenv/defaultenv.hh"
|
||||
|
||||
%include "ltlparse/public.hh"
|
||||
|
||||
%include "ltlvisit/clone.hh"
|
||||
%include "ltlvisit/destroy.hh"
|
||||
%include "ltlvisit/dotty.hh"
|
||||
%include "ltlvisit/dump.hh"
|
||||
%include "ltlvisit/lunabbrev.hh"
|
||||
%include "ltlvisit/tunabbrev.hh"
|
||||
%include "ltlvisit/nenoform.hh"
|
||||
%include "ltlvisit/tostring.hh"
|
||||
%include "ltlvisit/tunabbrev.hh"
|
||||
|
||||
|
||||
%extend spot::ltl::formula {
|
||||
|
||||
// When comparing formula, make sure Python compare our
|
||||
// pointers, not the pointers to its wrappers.
|
||||
int
|
||||
__cmp__(const spot::ltl::formula* b)
|
||||
{
|
||||
return b - self;
|
||||
}
|
||||
|
||||
std::string
|
||||
__str__(void)
|
||||
{
|
||||
return spot::ltl::to_string(self);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%inline %{
|
||||
|
||||
spot::ltl::parse_error_list
|
||||
spot::ltl::parse_error_list
|
||||
empty_parse_error_list()
|
||||
{
|
||||
parse_error_list l;
|
||||
return l;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
std::ostream&
|
||||
get_cout()
|
||||
{
|
||||
return std::cout;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
std::ostream&
|
||||
get_cerr()
|
||||
{
|
||||
return std::cerr;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
print_on(std::ostream& on, const std::string& what)
|
||||
{
|
||||
on << what;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue