diff options
author | Mike Buland <mike@xagasoft.com> | 2013-04-22 13:05:22 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2013-04-22 13:05:22 -0600 |
commit | 2909f50d008920568f0e50da760b266388ccc124 (patch) | |
tree | 6789c162a2b950c2006c944e9d21e6ed9bda7069 /src/lexer.h | |
parent | d7ccd9c4d8e5a5bb4f12b36b3e4ad3105c5a9317 (diff) | |
download | clic-2909f50d008920568f0e50da760b266388ccc124.tar.gz clic-2909f50d008920568f0e50da760b266388ccc124.tar.bz2 clic-2909f50d008920568f0e50da760b266388ccc124.tar.xz clic-2909f50d008920568f0e50da760b266388ccc124.zip |
There is now a parser & calculator interface.
Diffstat (limited to 'src/lexer.h')
-rw-r--r-- | src/lexer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lexer.h b/src/lexer.h new file mode 100644 index 0000000..4e6d73d --- /dev/null +++ b/src/lexer.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef LEXER_H | ||
2 | #define LEXER_H | ||
3 | |||
4 | #include <bu/stream.h> | ||
5 | |||
6 | class Token; | ||
7 | |||
8 | class Lexer | ||
9 | { | ||
10 | public: | ||
11 | Lexer( Bu::Stream &rIn ); | ||
12 | virtual ~Lexer(); | ||
13 | |||
14 | Token nextToken(); | ||
15 | |||
16 | int getScale() const { return iScale; } | ||
17 | void setScale( int i ) { iScale = i; } | ||
18 | |||
19 | int getRadix() const { return iRadix; } | ||
20 | void setRadix( int i ); | ||
21 | |||
22 | private: | ||
23 | Bu::Stream &rIn; | ||
24 | Bu::String sBuf; | ||
25 | int iBufPos; | ||
26 | int iScale; | ||
27 | int iRadix; | ||
28 | char numRangeTop; | ||
29 | char ascRangeTop; | ||
30 | }; | ||
31 | |||
32 | #endif | ||