diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
| commit | fb28f6800864176be2ffca29e8e664b641f33170 (patch) | |
| tree | ba9180ac442939edc4eacbe1fdae93c5a7f87cee /src/buildparser.h | |
| parent | 51e21a316be6e052251b3dfc7d671061ebd67cee (diff) | |
| download | build-fb28f6800864176be2ffca29e8e664b641f33170.tar.gz build-fb28f6800864176be2ffca29e8e664b641f33170.tar.bz2 build-fb28f6800864176be2ffca29e8e664b641f33170.tar.xz build-fb28f6800864176be2ffca29e8e664b641f33170.zip | |
m3 is copied into trunk, we should be good to go, now.
Diffstat (limited to '')
| -rw-r--r-- | src/buildparser.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/buildparser.h b/src/buildparser.h new file mode 100644 index 0000000..8e2af6c --- /dev/null +++ b/src/buildparser.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #ifndef BUILD_PARSER_H | ||
| 2 | #define BUILD_PARSER_H | ||
| 3 | |||
| 4 | #include "build.tab.h" | ||
| 5 | |||
| 6 | #include "bu/stack.h" | ||
| 7 | #include "bu/fstring.h" | ||
| 8 | #include "types.h" | ||
| 9 | |||
| 10 | class BuildParser | ||
| 11 | { | ||
| 12 | public: | ||
| 13 | BuildParser( class Ast &rAst ); | ||
| 14 | virtual ~BuildParser(); | ||
| 15 | |||
| 16 | void load( const Bu::FString &sFile ); | ||
| 17 | |||
| 18 | bool isKeyword( const Bu::FString &sStr ); | ||
| 19 | bool isCond( const Bu::FString &sStr ); | ||
| 20 | void include( const Bu::FString &sStr, void *scanner, YYLTYPE *loc ); | ||
| 21 | void endInclude( YYLTYPE *loc ); | ||
| 22 | |||
| 23 | void error( int iLine1, int iLine2, int iCol1, int iCol2, | ||
| 24 | const Bu::FString &sMsg ); | ||
| 25 | |||
| 26 | class Ast &xAst; | ||
| 27 | |||
| 28 | void addIncludePath( const Bu::FString &sPath ); | ||
| 29 | |||
| 30 | private: | ||
| 31 | Bu::Stack<Bu::FString> sFilename; | ||
| 32 | Bu::Stack<YYLTYPE> sLocation; | ||
| 33 | StrList lIncludePaths; | ||
| 34 | }; | ||
| 35 | |||
| 36 | typedef void * yyscan_t; | ||
| 37 | #define YY_DECL int build_lex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner, BuildParser &b ) | ||
| 38 | YY_DECL; | ||
| 39 | |||
| 40 | #endif | ||
