aboutsummaryrefslogtreecommitdiff
path: root/src/builder.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-22 05:04:16 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-22 05:04:16 +0000
commitb78ea37a6f8d289b9adb2b5bc565716168a00060 (patch)
treea19fd9489e7c7170882c52edae5f532141bec2e8 /src/builder.cpp
parente95c31f841b67fc69d93ec650fe285d34f996a1e (diff)
downloadbuild-b78ea37a6f8d289b9adb2b5bc565716168a00060.tar.gz
build-b78ea37a6f8d289b9adb2b5bc565716168a00060.tar.bz2
build-b78ea37a6f8d289b9adb2b5bc565716168a00060.tar.xz
build-b78ea37a6f8d289b9adb2b5bc565716168a00060.zip
The basic outline for all of the initial functions and rules has been set. The
parser and scanner are using the new system so they actually match functions and whatnot and pass that data to the parser, it's very cool.
Diffstat (limited to 'src/builder.cpp')
-rw-r--r--src/builder.cpp38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/builder.cpp b/src/builder.cpp
index b6ae887..24e4536 100644
--- a/src/builder.cpp
+++ b/src/builder.cpp
@@ -1,8 +1,12 @@
1#include "builder.h" 1#include "builder.h"
2#include "functionfactory.h"
3#include "performfactory.h"
2 4
3subExceptionDef( BuildException ); 5subExceptionDef( BuildException );
4 6
5Builder::Builder() 7Builder::Builder() :
8 fFunction( FunctionFactory::getInstance() ),
9 fPerform( PerformFactory::getInstance() )
6{ 10{
7} 11}
8 12
@@ -17,7 +21,7 @@ void Builder::load( const std::string &sFile )
17{ 21{
18 file = sFile; 22 file = sFile;
19 scanBegin(); 23 scanBegin();
20 yydebug = 1; 24 //yydebug = 1;
21 yyparse( *this ); 25 yyparse( *this );
22 scanEnd(); 26 scanEnd();
23} 27}
@@ -45,8 +49,36 @@ int Builder::getTargetType( const char *sType )
45 return -1; 49 return -1;
46} 50}
47 51
52//
53// Function functions
54//
48bool Builder::isFunction( const char *sFunc ) 55bool Builder::isFunction( const char *sFunc )
49{ 56{
50 return true; 57 return fFunction.hasPlugin( sFunc );
58}
59
60void Builder::newFunctionCall( const char *sName )
61{
62
63}
64
65void Builder::addFunctionParam( const char *sParam )
66{
67}
68
69//
70// Perform functions
71//
72bool Builder::isPerform( const char *sPerf )
73{
74 return fPerform.hasPlugin( sPerf );
75}
76
77void Builder::newPerform( const char *sName )
78{
79}
80
81void Builder::addPerformParam( const char *sParam )
82{
51} 83}
52 84