Interface to lattice file parser. More...
#include <config.h>
Public Member Functions | |
GLPSParser () | |
Construct an empty parser context. | |
void | setVar (const std::string &name, const Config::value_t &v) |
Pre-define variable. More... | |
void | setPrinter (std::ostream *) |
Set output for lexer/parser error messages. | |
Config * | parse_file (const char *fname, const bool have_lattice=true) |
Open and parse a file. More... | |
Config * | parse_file (const bool have_lattice, FILE *fp, const char *path=NULL) |
Parse from open FILE. More... | |
Config * | parse_byte (const char *s, size_t len, const char *path=NULL) |
Parse from byte buffer. More... | |
Config * | parse_byte (const std::string &s, const char *path=NULL) |
Parse from std::string. More... | |
Config * GLPSParser::parse_byte | ( | const char * | s, |
size_t | len, | ||
const char * | path = NULL |
||
) |
Parse from byte buffer.
Definition at line 405 of file config.cpp.
Config * GLPSParser::parse_byte | ( | const std::string & | s, |
const char * | path = NULL |
||
) |
Parse from std::string.
Definition at line 415 of file config.cpp.
Config * GLPSParser::parse_file | ( | const char * | fname, |
const bool | have_lattice = true |
||
) |
Open and parse a file.
A wrapper around parse_file(FILE*, const char*).
Definition at line 364 of file config.cpp.
Config * GLPSParser::parse_file | ( | const bool | have_lattice, |
FILE * | fp, | ||
const char * | path = NULL |
||
) |
Parse from open FILE.
std::runtime_error | For various error conditions |
Definition at line 395 of file config.cpp.
void GLPSParser::setVar | ( | const std::string & | name, |
const Config::value_t & | v | ||
) |
Pre-define variable.
Equivalent to inserting a variable definition at the beginning of a lattice file.
Definition at line 352 of file config.cpp.