Limbo 3.5.4
Loading...
Searching...
No Matches
EbeamDriver.h
Go to the documentation of this file.
1
7
8#ifndef EBEAMPARSER_DRIVER_H
9#define EBEAMPARSER_DRIVER_H
10
11#include "EbeamDataBase.h"
12
16namespace EbeamParser {
17
18using std::cout;
19using std::endl;
20using std::cerr;
21using std::string;
22using std::vector;
23using std::pair;
24using std::make_pair;
25using std::ostringstream;
26
35class Driver
36{
37public:
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
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
91 void units_cbk(int d1);
92 void ebeam_cbk();
93 void ebeam_cbk_offset(double d1);
94 void ebeam_cbk_width(double d1);
95 void ebeam_cbk_step(double d1);
96 void ebeam_cbk_layerid(vector<int> const& v1);
97 void ebeam_cbk_layer(vector<string> const& v1);
98 void macro_cbk(string const& s1);
99 void macro_cbk_name(string const& s1);
100 void macro_cbk_confsite_name(string const& s1);
101 void macro_cbk_confsite_layerid(int const& d1);
102 void macro_cbk_confsite_layer(string const& s1);
103 void macro_cbk_confsite_site(vector<int> const& v1);
104 void macro_cbk_confsite(string const& s1);
106protected:
110
115
116};
117
122bool read(EbeamDataBase& db, const string& ebeamFile);
123
124} // namespace example
125
126#endif // EXAMPLE_DRIVER_H
Database for Ebeam parser.
void error(const string &m)
class Scanner * lexer
Definition EbeamDriver.h:88
bool parse_stream(std::istream &in, const string &sname="stream input")
bool parse_file(const string &filename)
Macro m_macro
temporary storage of ebeam macro for a standard cell
bool parse_string(const string &input, const string &sname="string stream")
bool trace_parsing
enable debug output in the bison parser
Definition EbeamDriver.h:46
void error(const class location &l, const string &m)
EbeamDataBase & m_db
EbeamBoundary m_ebeam_boundary
temporary storage of ebeam boundary
Driver(EbeamDataBase &db)
bool trace_scanning
enable debug output in the flex scanner
Definition EbeamDriver.h:43
string streamname
stream name (file or input stream) used for error messages.
Definition EbeamDriver.h:49
Base class for ebeam database. Only pure virtual functions are defined. User needs to inheritate th...
namespace for EbeamParser
bool read(EbeamDataBase &db, const string &ebeamFile)
API for EbeamParser. Read Ebeam file and initialize database by calling user-defined callback functio...
describe ebeam boundary
describe conflict sites for each standard cell type