blob: 24e453655ff8823c77ed9c1b84b734941bebd27f (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#include "builder.h"
#include "functionfactory.h"
#include "performfactory.h"
subExceptionDef( BuildException );
Builder::Builder() :
fFunction( FunctionFactory::getInstance() ),
fPerform( PerformFactory::getInstance() )
{
}
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;
}
//
// Function functions
//
bool Builder::isFunction( const char *sFunc )
{
return fFunction.hasPlugin( sFunc );
}
void Builder::newFunctionCall( const char *sName )
{
}
void Builder::addFunctionParam( const char *sParam )
{
}
//
// Perform functions
//
bool Builder::isPerform( const char *sPerf )
{
return fPerform.hasPlugin( sPerf );
}
void Builder::newPerform( const char *sName )
{
}
void Builder::addPerformParam( const char *sParam )
{
}
|