Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DefDriver.h
Go to the documentation of this file.
1 
8 #ifndef DEFPARSER_DRIVER_H
9 #define DEFPARSER_DRIVER_H
10 
12 
16 namespace DefParser {
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(DefDataBase& db);
41 
44 
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 
76  Row const& row() const {return m_row;}
77  Row& row() {return m_row;}
78  Component const& component() const {return m_comp;}
79  Component& component() {return m_comp;}
80  Pin const& pin() const {return m_pin;}
81  Pin& pin() {return m_pin;}
82  Net const& net() const {return m_net;}
83  Net& net() {return m_net;}
85 protected:
89 
98 };
99 
104 bool read(DefDataBase& db, const string& defFile);
105 
106 } // namespace example
107 
108 #endif // EXAMPLE_DRIVER_H
Driver(DefDataBase &db)
net to describe interconnection of netlist
Definition: DefDataBase.h:158
pin of node/cell
Definition: DefDataBase.h:121
bool parse_stream(std::istream &in, const string &sname="stream input")
Pin m_pin
temporary pin
Definition: DefDriver.h:95
bool trace_scanning
enable debug output in the flex scanner
Definition: DefDriver.h:43
namespace for DefParser
Definition: DefDataBase.h:21
Net m_net
temporary net
Definition: DefDriver.h:97
Row m_row
temporary row
Definition: DefDriver.h:91
Base class for def database. Only pure virtual functions are defined. User needs to inheritate this c...
Definition: DefDataBase.h:187
placement row
Definition: DefDataBase.h:65
bool parse_string(const string &input, const string &sname="string stream")
DefDataBase & m_db
Definition: DefDriver.h:88
bool read(DefDataBase &db, const string &defFile)
API for DefParser. Read DEF file and initialize database by calling user-defined callback functions...
bool trace_parsing
enable debug output in the bison parser
Definition: DefDriver.h:46
string streamname
stream name (file or input stream) used for error messages.
Definition: DefDriver.h:49
Database for Def parser.
cell in placement
Definition: DefDataBase.h:95
Component m_comp
temporary component
Definition: DefDriver.h:93
bool parse_file(const string &filename)