Limbo
3.5.4
Toggle main menu visibility
Loading...
Searching...
No Matches
limbo
parsers
gdf
bison
GdfDriver.h
Go to the documentation of this file.
1
7
8
#ifndef GDFPARSER_DRIVER_H
9
#define GDFPARSER_DRIVER_H
10
11
#include "
GdfDataBase.h
"
12
16
namespace
GdfParser
{
17
18
using
std::cout;
19
using
std::endl;
20
using
std::cerr;
21
using
std::string;
22
using
std::vector;
23
using
std::pair;
24
using
std::make_pair;
25
using
std::ostringstream;
26
35
class
Driver
36
{
37
public
:
40
Driver
(
GdfDataBase
& db);
41
43
bool
trace_scanning
;
44
46
bool
trace_parsing
;
47
49
string
streamname
;
50
56
bool
parse_stream
(std::istream& in,
57
const
string
& sname =
"stream input"
);
58
64
bool
parse_string
(
const
string
& input,
65
const
string
& sname =
"string stream"
);
66
72
bool
parse_file
(
const
string
& filename);
73
74
// To demonstrate pure handling of parse errors, instead of
75
// simply dumping them on the standard error output, we will pass
76
// them to the driver using the following two member functions.
77
80
void
error
(
const
class
location& l,
const
string
& m);
81
84
void
error
(
const
string
& m);
85
88
class
Scanner*
lexer
;
89
92
GdfDataBase
&
m_db
;
93
95
void
cellPortCbk(std::string& name,
CellPort::PortTypeEnum
type, std::string& layer,
double
x,
double
y);
96
void
cellInstanceCbk(std::string& name, std::string& cellType,
double
x,
double
y, int32_t orient);
97
void
textCbk(
Text::TextTypeEnum
textType, std::string
const
& name, std::string& content);
98
void
pathObjCbk(
PathObj::PathObjTypeEnum
pathObjType, std::string
const
& name, std::string& layer,
double
width,
double
xl,
double
yl,
double
xh,
double
yh);
99
void
pathCbk(std::string& name);
100
void
netPortCbk(std::string& name, std::string& instName);
101
void
netPortCbk(std::string& name);
102
void
netCbk(std::string& name);
104
107
void
cellCbk
(std::string& name);
108
109
protected
:
111
Cell
m_cell
;
112
};
113
118
bool
read
(
GdfDataBase
& db,
const
string
& filename);
119
120
}
// namespace example
121
122
#endif
// EXAMPLE_DRIVER_H
GdfDataBase.h
Database for Gdf parser.
GdfParser::Driver::Driver
Driver(GdfDataBase &db)
GdfParser::Driver::error
void error(const string &m)
GdfParser::Driver::parse_string
bool parse_string(const string &input, const string &sname="string stream")
GdfParser::Driver::trace_parsing
bool trace_parsing
enable debug output in the bison parser
Definition
GdfDriver.h:46
GdfParser::Driver::m_cell
Cell m_cell
temporary storage of cell
Definition
GdfDriver.h:111
GdfParser::Driver::streamname
string streamname
stream name (file or input stream) used for error messages.
Definition
GdfDriver.h:49
GdfParser::Driver::parse_file
bool parse_file(const string &filename)
GdfParser::Driver::error
void error(const class location &l, const string &m)
GdfParser::Driver::parse_stream
bool parse_stream(std::istream &in, const string &sname="stream input")
GdfParser::Driver::trace_scanning
bool trace_scanning
enable debug output in the flex scanner
Definition
GdfDriver.h:43
GdfParser::Driver::m_db
GdfDataBase & m_db
Definition
GdfDriver.h:92
GdfParser::Driver::cellCbk
void cellCbk(std::string &name)
GdfParser::Driver::lexer
class Scanner * lexer
Definition
GdfDriver.h:88
GdfParser::GdfDataBase
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this...
Definition
GdfDataBase.h:457
GdfParser
namespace for GdfParser
Definition
GdfDataBase.h:24
GdfParser::read
bool read(GdfDataBase &db, const string &filename)
API for GdfParser. Read GDF file and initialize database by calling user-defined callback functions.
GdfParser::Cell
the whole routing layout is describe by a cell
Definition
GdfDataBase.h:408
GdfParser::CellPort::PortTypeEnum
PortTypeEnum
type of port
Definition
GdfDataBase.h:158
GdfParser::PathObj::PathObjTypeEnum
PathObjTypeEnum
type of path object
Definition
GdfDataBase.h:253
GdfParser::Text::TextTypeEnum
TextTypeEnum
type of text
Definition
GdfDataBase.h:322
Generated on
for Limbo by
1.17.0