blob: b6ae8877d55e4dd9b639ed0c759917f7b89df4bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include "builder.h"
subExceptionDef( BuildException );
Builder::Builder()
{
}
Builder::~Builder()
{
}
void yyparse( Builder &bld );
extern int yydebug;
void Builder::load( const std::string &sFile )
{
file = sFile;
scanBegin();
yydebug = 1;
yyparse( *this );
scanEnd();
}
void Builder::error( YYLTYPE *locp, const char *msg )
{
fflush( stdout );
throw BuildException("%s: %d.%d-%d.%d: %s",
file.c_str(),
locp->first_line, locp->first_column,
locp->last_line, locp->last_column,
msg );
}
void Builder::error( const std::string &msg )
{
fflush( stdout );
throw BuildException("%s", msg.c_str() );
}
int Builder::getTargetType( const char *sType )
{
if( !strcmp( sType, "file" ) )
return 0;
return -1;
}
bool Builder::isFunction( const char *sFunc )
{
return true;
}
|