Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LefDriver.h
Go to the documentation of this file.
1 
31 #ifndef LEFPARSER_DRIVER_H
32 #define LEFPARSER_DRIVER_H
33 
34 #include <iostream>
35 #include <vector>
36 #include <string>
38 
42 namespace LefParser {
43 
44 using std::cout;
45 using std::endl;
46 using std::cerr;
47 using std::string;
48 using std::vector;
49 using std::pair;
50 using std::make_pair;
51 
53 class LefDataBase;
54 
63 class Driver
64 {
65 public:
68  Driver(LefDataBase& db);
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 
107 protected:
111 };
112 
117 bool read(LefDataBase& db, const string& lefFile);
118 
119 } // namespace example
120 
121 #endif // EXAMPLE_DRIVER_H
bool parse_file(const string &filename)
namespace for LefParser
Definition: LefDataBase.h:24
bool parse_stream(std::istream &in, const string &sname="stream input")
string streamname
stream name (file or input stream) used for error messages.
Definition: LefDriver.h:78
bool read(LefDataBase &db, const string &lefFile)
API for LefParser. Read LEF file and initialize database by calling user-defined callback functions...
Custom class that inheritates LefParser::LefDataBase with all the required callbacks defined...
Definition: test_adapt.cpp:25
bool trace_scanning
enable debug output in the flex scanner
Definition: LefDriver.h:72
LefDataBase & m_db
Definition: LefDriver.h:110
Database for Lef parser.
Driver(LefDataBase &db)
bool trace_parsing
enable debug output in the bison parser
Definition: LefDriver.h:75
Base class for lef database. Only pure virtual functions are defined. User needs to inheritate this c...
Definition: LefDataBase.h:123
bool parse_string(const string &input, const string &sname="string stream")