spot  1.99.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
public.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
3 // Recherche et Développement de l'Epita (LRDE).
4 // Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
5 // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
6 // Université Pierre et Marie Curie.
7 //
8 // This file is part of Spot, a model checking library.
9 //
10 // Spot is free software; you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Spot is distributed in the hope that it will be useful, but WITHOUT
16 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 // License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 
23 #pragma once
24 
25 #include "ltlast/formula.hh"
26 #include "misc/location.hh"
27 #include "ltlenv/defaultenv.hh"
28 #include <string>
29 #include <list>
30 #include <utility>
31 #include <iosfwd>
32 
33 namespace spot
34 {
35  namespace ltl
36  {
39 
40 #ifndef SWIG
41  typedef std::pair<location, std::string> one_parse_error;
44  typedef std::list<one_parse_error> parse_error_list;
45 #else
46  // Turn parse_error_list into an opaque type for Swig.
47  struct parse_error_list {};
48 #endif
49 
68  SPOT_API
69  const formula* parse_infix_psl(const std::string& ltl_string,
70  parse_error_list& error_list,
71  environment& env =
73  bool debug = false,
74  bool lenient = false);
75 
94  SPOT_API
95  const formula* parse_infix_boolean(const std::string& ltl_string,
96  parse_error_list& error_list,
97  environment& env =
99  bool debug = false,
100  bool lenient = false);
101 
121  SPOT_API
122  const formula* parse_prefix_ltl(const std::string& ltl_string,
123  parse_error_list& error_list,
124  environment& env =
126  bool debug = false);
127 
134  SPOT_API const formula*
135  parse_formula(const std::string& ltl_string,
136  environment& env = default_environment::instance());
137 
156  SPOT_API
157  const formula* parse_infix_sere(const std::string& sere_string,
158  parse_error_list& error_list,
159  environment& env =
161  bool debug = false,
162  bool lenient = false);
163 
177  SPOT_API
178  bool format_parse_errors(std::ostream& os,
179  const std::string& input_string,
180  const parse_error_list& error_list);
181 
205  SPOT_API
206  void
207  fix_utf8_locations(const std::string& input_string,
208  parse_error_list& error_list);
209 
211  }
212 }
SPOT_API void fix_utf8_locations(const std::string &input_string, parse_error_list &error_list)
Fix location of diagnostics assuming the input is utf8.
Definition: public.hh:31
SPOT_API bool format_parse_errors(std::ostream &os, const std::string &input_string, const parse_error_list &error_list)
Format diagnostics produced by spot::ltl::parse or spot::ltl::ratexp.
SPOT_API const formula * parse_prefix_ltl(const std::string &ltl_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false)
Build a formula from an LTL string in LBT's format.
LTL formula interface.
SPOT_API const formula * parse_infix_boolean(const std::string &ltl_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false)
Build a Boolean formula from a string.
std::list< one_parse_error > parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: public.hh:44
SPOT_API const formula * parse_infix_sere(const std::string &sere_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false)
Build a formula from a string representing a SERE.
SPOT_API const formula * parse_formula(const std::string &ltl_string, environment &env=default_environment::instance())
A simple wrapper to parse_infix_psl() and parse_prefix_ltl().
SPOT_API const formula * parse_infix_psl(const std::string &ltl_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false)
Build a formula from an LTL string.
std::pair< location, std::string > one_parse_error
A parse diagnostic with its location.
Definition: public.hh:42
static default_environment & instance()
Get the sole instance of spot::ltl::default_environment.

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Wed Aug 26 2015 08:42:37 for spot by doxygen 1.8.8