VFileLineParseXs.h
| 1 |
#include "VParse.h" |
|---|---|
| 2 |
#include "VSymTable.h" |
| 3 |
#include "VAst.h" |
| 4 |
#include "My_Parser.h" |
| 5 |
#include <cstring> |
| 6 |
#include <deque> |
| 7 |
|
| 8 |
/* Perl */
|
| 9 |
# include <EXTERN.h> |
| 10 |
# include <perl.h> |
| 11 |
# include <XSUB.h> |
| 12 |
|
| 13 |
class VFileLineParseXs : public VFileLine {
|
| 14 |
My_Parser* m_vParserp; // Parser handling the errors
|
| 15 |
|
| 16 |
public:
|
| 17 |
VFileLineParseXs(My_Parser* pp) : VFileLine(true), m_vParserp(pp) { if (pp) pushFl(); }; |
| 18 |
|
| 19 |
virtual ~VFileLineParseXs(); |
| 20 |
|
| 21 |
virtual VFileLine* create(const string& filename, int lineno){ |
| 22 |
VFileLineParseXs* filelp = new VFileLineParseXs(m_vParserp); |
| 23 |
filelp->init(filename, lineno); |
| 24 |
return filelp;
|
| 25 |
}; |
| 26 |
|
| 27 |
virtual void error(const string& msg); // Report a error at given location |
| 28 |
|
| 29 |
void setParser(My_Parser* pp){
|
| 30 |
m_vParserp=pp; |
| 31 |
pushFl(); // The very first construction used pp=NULL, as pp wasn't created yet so make it now
|
| 32 |
}; |
| 33 |
// Record the structure so we can delete it later
|
| 34 |
void pushFl(){
|
| 35 |
m_vParserp->m_filelineps.push_back(this); |
| 36 |
}; |
| 37 |
}; |
![[logo]](/img/veripool_small.png)