Limbo 3.5.4
Loading...
Searching...
No Matches
DefParser::Driver Class Reference

#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

DefDataBasem_db
Row m_row
 temporary row
Component m_comp
 temporary component
Pin m_pin
 temporary pin
Net m_net
 temporary net
Region m_region
 temporary region
Group m_group
 temporary group
Track m_track
GCellGrid m_gcellgrid
Via m_via
SNet m_snet

Detailed Description

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 42 of file DefDriver.h.

Constructor & Destructor Documentation

◆ Driver()

DefParser::Driver::Driver ( DefDataBase & db)

construct a new parser driver context

Parameters
dbreference to database

Member Function Documentation

◆ parse_file()

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.

Parameters
filenameinput file name
Returns
true if successfully parsed

◆ parse_stream()

bool DefParser::Driver::parse_stream ( std::istream & in,
const string & sname = "stream input" )

Invoke the scanner and parser for a stream.

Parameters
ininput stream
snamestream name for error messages
Returns
true if successfully parsed

◆ parse_string()

bool DefParser::Driver::parse_string ( const string & input,
const string & sname = "string stream" )

Invoke the scanner and parser on an input string.

Parameters
inputinput string
snamestream name for error messages
Returns
true if successfully parsed

Member Data Documentation

◆ m_comp

Component DefParser::Driver::m_comp
protected

temporary component

Definition at line 112 of file DefDriver.h.

◆ m_db

DefDataBase& DefParser::Driver::m_db
protected

accessors for temporary data members Reference to the database filled during parsing of the expressions.

Definition at line 107 of file DefDriver.h.

◆ m_gcellgrid

GCellGrid DefParser::Driver::m_gcellgrid
protected

Definition at line 124 of file DefDriver.h.

◆ m_group

Group DefParser::Driver::m_group
protected

temporary group

Definition at line 120 of file DefDriver.h.

◆ m_net

Net DefParser::Driver::m_net
protected

temporary net

Definition at line 116 of file DefDriver.h.

◆ m_pin

Pin DefParser::Driver::m_pin
protected

temporary pin

Definition at line 114 of file DefDriver.h.

◆ m_region

Region DefParser::Driver::m_region
protected

temporary region

Definition at line 118 of file DefDriver.h.

◆ m_row

Row DefParser::Driver::m_row
protected

temporary row

Definition at line 110 of file DefDriver.h.

◆ m_snet

SNet DefParser::Driver::m_snet
protected

Definition at line 128 of file DefDriver.h.

◆ m_track

Track DefParser::Driver::m_track
protected

Definition at line 122 of file DefDriver.h.

◆ m_via

Via DefParser::Driver::m_via
protected

Definition at line 126 of file DefDriver.h.

◆ streamname

string DefParser::Driver::streamname

stream name (file or input stream) used for error messages.

Definition at line 56 of file DefDriver.h.

◆ trace_parsing

bool DefParser::Driver::trace_parsing

enable debug output in the bison parser

Definition at line 53 of file DefDriver.h.

◆ trace_scanning

bool DefParser::Driver::trace_scanning

enable debug output in the flex scanner

Definition at line 50 of file DefDriver.h.


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