|
g2o
|
#include <driver.h>

Public Member Functions | |
| Driver (class SlamContext &slamContext_) | |
| construct a new parser driver context | |
| bool | parse_stream (std::istream &in, const std::string &sname="stream input") |
| bool | parse_string (const std::string &input, const std::string &sname="string stream") |
| bool | parse_file (const std::string &filename) |
| void | error (const class location &l, const std::string &m) |
| void | error (const std::string &m) |
Public Attributes | |
| bool | trace_scanning |
| enable debug output in the flex scanner | |
| bool | trace_parsing |
| enable debug output in the bison parser | |
| std::string | streamname |
| stream name (file or input stream) used for error messages. | |
| class Scanner * | lexer |
| class SlamContext & | slamContext |
| SlamParser::Driver::Driver | ( | class SlamContext & | slamContext_ | ) |
construct a new parser driver context
Definition at line 37 of file driver.cpp.
| void SlamParser::Driver::error | ( | const class location & | l, |
| const std::string & | m | ||
| ) |
Error handling with associated line number. This can be modified to output the error e.g. to a dialog box.
Definition at line 68 of file driver.cpp.
| void SlamParser::Driver::error | ( | const std::string & | m | ) |
General error handling. This can be modified to output the error e.g. to a dialog box.
Definition at line 72 of file driver.cpp.
| bool SlamParser::Driver::parse_file | ( | const std::string & | filename | ) |
Invoke the scanner and parser on a file. Use parse_stream with a std::ifstream if detection of file reading errors is required.
| filename | input file name |
Definition at line 57 of file driver.cpp.
References parse_stream().
| bool SlamParser::Driver::parse_stream | ( | std::istream & | in, |
| const std::string & | sname = "stream input" |
||
| ) |
Invoke the scanner and parser for a stream.
| in | input stream |
| sname | stream name for error messages |
Definition at line 43 of file driver.cpp.
References lexer, SlamParser::Parser::parse(), SlamParser::Scanner::set_debug(), streamname, trace_parsing, and trace_scanning.
Referenced by main(), parse_file(), parse_string(), and SlamParser::ParserInterface::parseCommand().
| bool SlamParser::Driver::parse_string | ( | const std::string & | input, |
| const std::string & | sname = "string stream" |
||
| ) |
Invoke the scanner and parser on an input string.
| input | input string |
| sname | stream name for error messages |
Definition at line 63 of file driver.cpp.
References parse_stream().
| class Scanner* SlamParser::Driver::lexer |
Pointer to the current lexer instance, this is used to connect the parser to the scanner. It is used in the yylex macro.
Definition at line 88 of file driver.h.
Referenced by parse_stream().
| class SlamContext& SlamParser::Driver::slamContext |
Reference to the calculator context filled during parsing of the expressions.
Definition at line 92 of file driver.h.
Referenced by SlamParser::Parser::parse().
| std::string SlamParser::Driver::streamname |
stream name (file or input stream) used for error messages.
Definition at line 49 of file driver.h.
Referenced by SlamParser::Parser::parse(), and parse_stream().
| bool SlamParser::Driver::trace_parsing |
enable debug output in the bison parser
Definition at line 46 of file driver.h.
Referenced by main(), and parse_stream().
| bool SlamParser::Driver::trace_scanning |
enable debug output in the flex scanner
Definition at line 43 of file driver.h.
Referenced by main(), and parse_stream().