Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ltlparse/public.hh File Reference

#include "ltlast/formula.hh"
#include "location.hh"
#include "ltlenv/defaultenv.hh"
#include <string>
#include <list>
#include <utility>
#include <iosfwd>

Include dependency graph for public.hh:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  spot
namespace  spot::ltl

Typedefs

typedef std::pair< yy::Location,
std::string > 
parse_error
 A parse diagnostic with its location.
typedef std::list< parse_errorparse_error_list
 A list of parser diagnostics, as filled by parse.

Functions

formula * parse (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.
bool format_parse_errors (std::ostream &os, const std::string &ltl_string, parse_error_list &error_list)
 Format diagnostics produced by spot::ltl::parse.


Typedef Documentation

typedef std::pair<yy::Location, std::string> spot::ltl::parse_error
 

A parse diagnostic with its location.

typedef std::list<parse_error> spot::ltl::parse_error_list
 

A list of parser diagnostics, as filled by parse.


Function Documentation

bool format_parse_errors std::ostream &  os,
const std::string &  ltl_string,
parse_error_list error_list
 

Format diagnostics produced by spot::ltl::parse.

Parameters:
os Where diagnostics should be output.
ltl_string The string that were parsed.
error_list The error list filled by spot::ltl::parse while parsing ltl_string.
Returns:
true iff any diagnostic was output.

formula* parse 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.

Parameters:
ltl_string The string to parse.
error_list A list that will be filled with parse errors that occured during parsing.
env The environment into which parsing should take place.
debug When true, causes the parser to trace its execution.
Returns:
A pointer to the formula built from ltl_string, or 0 if the input was unparsable.
Note that the parser usually tries to recover from errors. It can return an non zero value even if it encountered error during the parsing of ltl_string. If you want to make sure ltl_string was parsed succesfully, check error_list for emptiness.

Warning:
This function is not reentrant.


Please comment this page and report errors about it on the RefDocComments page.
Generated on Fri Aug 13 14:42:32 2004 for spot by doxygen 1.3.8