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.h | |
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 '')
-rw-r--r-- | src/builder.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/builder.h b/src/builder.h index 3293108..529edc6 100644 --- a/src/builder.h +++ b/src/builder.h | |||
@@ -7,6 +7,10 @@ | |||
7 | #include "exceptions.h" | 7 | #include "exceptions.h" |
8 | 8 | ||
9 | class Builder; | 9 | class Builder; |
10 | class Function; | ||
11 | class FunctionFactory; | ||
12 | class Perform; | ||
13 | class PerformFactory; | ||
10 | 14 | ||
11 | #define YY_DECL int yylex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, Builder &bld ) | 15 | #define YY_DECL int yylex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, Builder &bld ) |
12 | YY_DECL; | 16 | YY_DECL; |
@@ -25,13 +29,39 @@ public: | |||
25 | void load( const std::string &sFile ); | 29 | void load( const std::string &sFile ); |
26 | 30 | ||
27 | int getTargetType( const char *sType ); | 31 | int getTargetType( const char *sType ); |
28 | bool isFunction( const char *sFunc ); | ||
29 | 32 | ||
30 | private: | 33 | private: |
31 | std::string file; | 34 | std::string file; |
32 | void scanBegin(); | 35 | void scanBegin(); |
33 | void scanEnd(); | 36 | void scanEnd(); |
34 | 37 | ||
38 | public: // Function functions | ||
39 | bool isFunction( const char *sFunc ); | ||
40 | void newFunctionCall( const char *sName ); | ||
41 | void addFunctionParam( const char *sParam ); | ||
42 | |||
43 | private: // Function variables | ||
44 | Function *pTmpFunc; | ||
45 | FunctionFactory &fFunction; | ||
46 | |||
47 | public: // Perform functions | ||
48 | bool isPerform( const char *sPerf ); | ||
49 | void newPerform( const char *sName ); | ||
50 | void addPerformParam( const char *sParam ); | ||
51 | |||
52 | private: // Perform variables | ||
53 | Perform *pTmpPerform; | ||
54 | PerformFactory &fPerform; | ||
55 | |||
56 | public: // List functions | ||
57 | void newList(); | ||
58 | void addListString( const char *str ); | ||
59 | void addListFunc(); | ||
60 | |||
61 | public: // Functions for dealing with rules | ||
62 | void addAction(); | ||
63 | void addAction( const char *sName ); | ||
64 | void addCommand( int nType ); | ||
35 | }; | 65 | }; |
36 | 66 | ||
37 | #endif | 67 | #endif |