diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-10-12 07:35:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-10-12 07:35:08 +0000 |
commit | 0981b9d6a12bd7aadbf9286459e033ac1a2ba910 (patch) | |
tree | fa461761086f182e43f94637a9c8df040333e8a4 /src/lexer.h | |
parent | 1ee5f374ed986333d5cdbbf41390f1c4c755a8e3 (diff) | |
download | libbu++-0981b9d6a12bd7aadbf9286459e033ac1a2ba910.tar.gz libbu++-0981b9d6a12bd7aadbf9286459e033ac1a2ba910.tar.bz2 libbu++-0981b9d6a12bd7aadbf9286459e033ac1a2ba910.tar.xz libbu++-0981b9d6a12bd7aadbf9286459e033ac1a2ba910.zip |
Ok, libbu++ compiles again, the basic parser system is getting there, I think,
it's still a little tricky becasue you have to do the non-terminal prime
seperation yourself (I forget what it's really called), but it's going quite
well. After a few tweaks to the core of it, we should be able to do some
math :)
Diffstat (limited to 'src/lexer.h')
-rw-r--r-- | src/lexer.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lexer.h b/src/lexer.h index 37d268f..5847269 100644 --- a/src/lexer.h +++ b/src/lexer.h | |||
@@ -19,19 +19,21 @@ namespace Bu | |||
19 | Lexer(); | 19 | Lexer(); |
20 | virtual ~Lexer(); | 20 | virtual ~Lexer(); |
21 | 21 | ||
22 | typedef int32_t TokenType; | ||
23 | |||
22 | class Token | 24 | class Token |
23 | { | 25 | { |
24 | public: | 26 | public: |
25 | Token(); | 27 | Token(); |
26 | Token( int iToken ); | 28 | Token( TokenType iToken ); |
27 | 29 | ||
28 | template<class t> | 30 | template<class t> |
29 | Token( int iToken, const t &v ) : | 31 | Token( TokenType iToken, const t &v ) : |
30 | iToken( iToken ), | 32 | iToken( iToken ), |
31 | vExtra( v ) | 33 | vExtra( v ) |
32 | { | 34 | { |
33 | } | 35 | } |
34 | int iToken; | 36 | TokenType iToken; |
35 | Bu::Variant vExtra; | 37 | Bu::Variant vExtra; |
36 | }; | 38 | }; |
37 | 39 | ||