diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-22 05:04:16 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-22 05:04:16 +0000 |
commit | b78ea37a6f8d289b9adb2b5bc565716168a00060 (patch) | |
tree | a19fd9489e7c7170882c52edae5f532141bec2e8 /src/builder.cpp | |
parent | e95c31f841b67fc69d93ec650fe285d34f996a1e (diff) | |
download | build-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.cpp | 38 |
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 | ||
3 | subExceptionDef( BuildException ); | 5 | subExceptionDef( BuildException ); |
4 | 6 | ||
5 | Builder::Builder() | 7 | Builder::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 | // | ||
48 | bool Builder::isFunction( const char *sFunc ) | 55 | bool Builder::isFunction( const char *sFunc ) |
49 | { | 56 | { |
50 | return true; | 57 | return fFunction.hasPlugin( sFunc ); |
58 | } | ||
59 | |||
60 | void Builder::newFunctionCall( const char *sName ) | ||
61 | { | ||
62 | |||
63 | } | ||
64 | |||
65 | void Builder::addFunctionParam( const char *sParam ) | ||
66 | { | ||
67 | } | ||
68 | |||
69 | // | ||
70 | // Perform functions | ||
71 | // | ||
72 | bool Builder::isPerform( const char *sPerf ) | ||
73 | { | ||
74 | return fPerform.hasPlugin( sPerf ); | ||
75 | } | ||
76 | |||
77 | void Builder::newPerform( const char *sName ) | ||
78 | { | ||
79 | } | ||
80 | |||
81 | void Builder::addPerformParam( const char *sParam ) | ||
82 | { | ||
51 | } | 83 | } |
52 | 84 | ||