FLAME  devel
 All Classes Functions Variables Typedefs Enumerations Pages
Public Member Functions | List of all members
GLPSParser Class Reference

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.
 
Configparse_file (const char *fname)
 Open and parse a file. More...
 
Configparse_file (FILE *fp, const char *path=NULL)
 Parse from open FILE. More...
 
Configparse_byte (const char *s, size_t len, const char *path=NULL)
 Parse from byte buffer. More...
 
Configparse_byte (const std::string &s, const char *path=NULL)
 Parse from std::string. More...
 

Detailed Description

Interface to lattice file parser.

Definition at line 240 of file config.h.

Member Function Documentation

Config * GLPSParser::parse_byte ( const char *  s,
size_t  len,
const char *  path = NULL 
)

Parse from byte buffer.

  • s Byte array
  • len Length of byte array (in bytes) path A directory to use to expand relative paths when parsing
    Returns
    New Config or NULL

Definition at line 403 of file config.cpp.

Config * GLPSParser::parse_byte ( const std::string &  s,
const char *  path = NULL 
)

Parse from std::string.

  • s String path A directory to use to expand relative paths when parsing
    Returns
    New Config or NULL

Definition at line 413 of file config.cpp.

Config * GLPSParser::parse_file ( const char *  fname)

Open and parse a file.

A wrapper around parse_file(FILE*, const char*).

  • fname File name to open. If NULL or '-' then parse stdin * If stdin is parsed then it is not closed.

Definition at line 362 of file config.cpp.

Config * GLPSParser::parse_file ( FILE *  fp,
const char *  path = NULL 
)

Parse from open FILE.

  • fp an open file descriptor path The directory containing the open file (used to expand relative paths in the file)
    Postcondition
    fp is not closed.
    Returns
    New Config, which the caller must delete.
    Exceptions
    std::runtime_errorFor various error conditions

Definition at line 393 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 350 of file config.cpp.


The documentation for this class was generated from the following files: