spot  1.99.7
parse.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 <spot/tl/formula.hh>
26 #include <spot/misc/location.hh>
27 #include <spot/tl/defaultenv.hh>
28 #include <string>
29 #include <list>
30 #include <utility>
31 #include <iosfwd>
32 
33 namespace spot
34 {
37 
38 #ifndef SWIG
39  typedef std::pair<location, std::string> one_parse_error;
42  typedef std::list<one_parse_error> parse_error_list;
43 #else
44  // Turn parse_error_list into an opaque type for Swig.
45  struct parse_error_list {};
46 #endif
47 
66  SPOT_API
67  formula parse_infix_psl(const std::string& ltl_string,
68  parse_error_list& error_list,
69  environment& env =
71  bool debug = false,
72  bool lenient = false);
73 
92  SPOT_API
93  formula parse_infix_boolean(const std::string& ltl_string,
94  parse_error_list& error_list,
95  environment& env =
97  bool debug = false,
98  bool lenient = false);
99 
119  SPOT_API
120  formula parse_prefix_ltl(const std::string& ltl_string,
121  parse_error_list& error_list,
122  environment& env =
124  bool debug = false);
125 
132  SPOT_API formula
133  parse_formula(const std::string& ltl_string,
134  environment& env = default_environment::instance());
135 
154  SPOT_API
155  formula parse_infix_sere(const std::string& sere_string,
156  parse_error_list& error_list,
157  environment& env =
159  bool debug = false,
160  bool lenient = false);
161 
175  SPOT_API
176  bool format_parse_errors(std::ostream& os,
177  const std::string& input_string,
178  const parse_error_list& error_list);
179 
202  SPOT_API
203  void
204  fix_utf8_locations(const std::string& input_string,
205  parse_error_list& error_list);
206 
208 }
Definition: graph.hh:32
static default_environment & instance()
Get the sole instance of spot::default_environment.
formula parse_formula(const std::string &ltl_string, environment &env=default_environment::instance())
A simple wrapper to parse_infix_psl() and parse_prefix_ltl().
std::pair< location, std::string > one_parse_error
A parse diagnostic with its location.
Definition: parse.hh:40
LTL/PSL formula interface.
bool format_parse_errors(std::ostream &os, const std::string &input_string, const parse_error_list &error_list)
Format diagnostics produced by spot::parse or spot::ratexp.
std::list< one_parse_error > parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: parse.hh:42
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.
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.
void fix_utf8_locations(const std::string &input_string, parse_error_list &error_list)
Fix location of diagnostics assuming the input is utf8.
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.
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.

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Jan 15 2016 13:01:50 for spot by doxygen 1.8.9.1