aboutsummaryrefslogtreecommitdiff
path: root/src/experimental/lexer.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/experimental/lexer.h
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/experimental/lexer.h')
-rw-r--r--src/experimental/lexer.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/experimental/lexer.h b/src/experimental/lexer.h
index 69f4106..273f3cf 100644
--- a/src/experimental/lexer.h
+++ b/src/experimental/lexer.h
@@ -12,47 +12,47 @@
12 12
13namespace Bu 13namespace Bu
14{ 14{
15 class Stream; 15 class Stream;
16 16
17 /** 17 /**
18 * The base class for creating a lexical analyzer. This is designed to work 18 * The base class for creating a lexical analyzer. This is designed to work
19 * in tandem with the Bu::Parser class, which uses this to tokenize textual 19 * in tandem with the Bu::Parser class, which uses this to tokenize textual
20 * input. It can be used by just about anything that cares about tokens 20 * input. It can be used by just about anything that cares about tokens
21 * more than raw input, though. 21 * more than raw input, though.
22 */ 22 */
23 class Lexer 23 class Lexer
24 { 24 {
25 public: 25 public:
26 Lexer(); 26 Lexer();
27 virtual ~Lexer(); 27 virtual ~Lexer();
28 28
29 typedef int TokenType; 29 typedef int TokenType;
30 30
31 class Token 31 class Token
32 { 32 {
33 public: 33 public:
34 Token(); 34 Token();
35 Token( TokenType iToken ); 35 Token( TokenType iToken );
36 36
37 template<class t> 37 template<class t>
38 Token( TokenType iToken, const t &v ) : 38 Token( TokenType iToken, const t &v ) :
39 iToken( iToken )//, 39 iToken( iToken )//,
40// vExtra( v ) 40// vExtra( v )
41 { 41 {
42 vExtra = v; 42 vExtra = v;
43 } 43 }
44 TokenType iToken; 44 TokenType iToken;
45 Bu::Variant vExtra; 45 Bu::Variant vExtra;
46 int iStartCol; 46 int iStartCol;
47 int iStartRow; 47 int iStartRow;
48 int iEndCol; 48 int iEndCol;
49 int iEndRow; 49 int iEndRow;
50 }; 50 };
51 51
52 virtual Token *nextToken()=0; 52 virtual Token *nextToken()=0;
53 53
54 virtual Bu::String tokenToString( const Token &t ); 54 virtual Bu::String tokenToString( const Token &t );
55 }; 55 };
56}; 56};
57 57
58#endif 58#endif