python: add a spot.automata(filename) interface, yielding automata
* src/hoaparse/fmterror.cc, src/hoaparse/public.hh, src/hoaparse/hoaparse.yy (hoa_stream_parser::parse_strict): New method that raises an exception whenever a syntax error is encountered. * src/ltlparse/public.hh (parse_error): Move ... * src/misc/common.hh: ... here. * wrap/python/spot_impl.i: Wrap the hoa output. * wrap/python/spot.py: Implement spot.automata. * wrap/python/tests/automata-io.ipynb: New test. * wrap/python/tests/Makefile.am: Add it.
This commit is contained in:
parent
8e6b35e5e3
commit
25de479e12
9 changed files with 701 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
// Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -109,3 +109,15 @@
|
|||
// Useful when forwarding methods such as:
|
||||
// auto func(int param) SPOT_RETURN(implem_.func(param));
|
||||
#define SPOT_RETURN(code) -> decltype(code) { return code; }
|
||||
|
||||
|
||||
namespace spot
|
||||
{
|
||||
struct SPOT_API parse_error: public std::runtime_error
|
||||
{
|
||||
parse_error(const std::string& s)
|
||||
: std::runtime_error(s)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue