Limbo 3.5.4
Loading...
Searching...
No Matches
LefDriver.h
Go to the documentation of this file.
1
30
31#ifndef LEFPARSER_DRIVER_H
32#define LEFPARSER_DRIVER_H
33
34#include <iostream>
35#include <vector>
36#include <string>
38
42namespace LefParser {
43
44using std::cout;
45using std::endl;
46using std::cerr;
47using std::string;
48using std::vector;
49using std::pair;
50using std::make_pair;
51
53class LefDataBase;
54
63class Driver
64{
65public:
69 ~Driver();
70
73
76
78 string streamname;
79
85 bool parse_stream(std::istream& in,
86 const string& sname = "stream input");
87
93 bool parse_string(const string& input,
94 const string& sname = "string stream");
95
101 bool parse_file(const string& filename);
102
103 // To demonstrate pure handling of parse errors, instead of
104 // simply dumping them on the standard error output, we will pass
105 // them to the driver using the following two member functions.
106
107protected:
111};
112
117bool read(LefDataBase& db, const string& lefFile);
118
119} // namespace example
120
121#endif // EXAMPLE_DRIVER_H
Database for Lef parser.
bool parse_stream(std::istream &in, const string &sname="stream input")
bool trace_scanning
enable debug output in the flex scanner
Definition LefDriver.h:72
bool parse_file(const string &filename)
LefDataBase & m_db
Definition LefDriver.h:110
bool trace_parsing
enable debug output in the bison parser
Definition LefDriver.h:75
Driver(LefDataBase &db)
bool parse_string(const string &input, const string &sname="string stream")
string streamname
stream name (file or input stream) used for error messages.
Definition LefDriver.h:78
Base class for lef database. Only pure virtual functions are defined. User needs to inheritate this...
namespace for LefParser
Definition LefDataBase.h:24
bool read(LefDataBase &db, const string &lefFile)
API for LefParser. Read LEF file and initialize database by calling user-defined callback functions.