Limbo
|
#include <DefDriver.h>
Public Member Functions | |
Driver (DefDataBase &db) | |
bool | parse_stream (std::istream &in, const string &sname="stream input") |
bool | parse_string (const string &input, const string &sname="string stream") |
bool | parse_file (const string &filename) |
Public Attributes | |
bool | trace_scanning |
enable debug output in the flex scanner | |
bool | trace_parsing |
enable debug output in the bison parser | |
string | streamname |
stream name (file or input stream) used for error messages. | |
Protected Attributes | |
DefDataBase & | m_db |
Row | m_row |
temporary row | |
Component | m_comp |
temporary component | |
Pin | m_pin |
temporary pin | |
Net | m_net |
temporary net | |
The Driver class brings together all components. It creates an instance of the Parser and Scanner classes and connects them. Then the input stream is fed into the scanner object and the parser gets it's token sequence. Furthermore the driver object is available in the grammar rules as a parameter. Therefore the driver class contains a reference to the structure into which the parsed data is saved.
Definition at line 35 of file DefDriver.h.
DefParser::Driver::Driver | ( | DefDataBase & | db | ) |
construct a new parser driver context
db | reference to database |
bool DefParser::Driver::parse_file | ( | const 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 |
bool DefParser::Driver::parse_stream | ( | std::istream & | in, |
const string & | sname = "stream input" |
||
) |
Invoke the scanner and parser for a stream.
in | input stream |
sname | stream name for error messages |
bool DefParser::Driver::parse_string | ( | const string & | input, |
const string & | sname = "string stream" |
||
) |
Invoke the scanner and parser on an input string.
input | input string |
sname | stream name for error messages |
|
protected |
accessors for temporary data members Reference to the database filled during parsing of the expressions.
Definition at line 88 of file DefDriver.h.