summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-23 11:47:01 -0600
committerMike Buland <mike@xagasoft.com>2013-04-23 11:47:01 -0600
commit04f56c12e82ea5228b2b65e68c46ed7f4563182b (patch)
tree89a8db02dae8aaafd70f91bb15f21209cd1fa0ed /src/parser.h
parent9f138260dafeb5a1b541fff8dd577422439feb0b (diff)
downloadclic-04f56c12e82ea5228b2b65e68c46ed7f4563182b.tar.gz
clic-04f56c12e82ea5228b2b65e68c46ed7f4563182b.tar.bz2
clic-04f56c12e82ea5228b2b65e68c46ed7f4563182b.tar.xz
clic-04f56c12e82ea5228b2b65e68c46ed7f4563182b.zip
Variables work.
Diffstat (limited to '')
-rw-r--r--src/parser.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index 5563613..2b1a4af 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -2,7 +2,9 @@
2#define PARSER_H 2#define PARSER_H
3 3
4#include <bu/list.h> 4#include <bu/list.h>
5#include <bu/hash.h>
5#include "token.h" 6#include "token.h"
7#include "number.h"
6 8
7namespace Bu 9namespace Bu
8{ 10{
@@ -23,13 +25,17 @@ private:
23 void unwind(); 25 void unwind();
24 int reqTokens( Token::Type eType ); 26 int reqTokens( Token::Type eType );
25 int getPriority( Token::Type eType ); 27 int getPriority( Token::Type eType );
28 Number &deref( Token &t );
26 29
27private: 30private:
28 Lexer &lex; 31 Lexer &lex;
29 Bu::Stream &rOut; 32 Bu::Stream &rOut;
30 typedef Bu::List<Token> TokenStack; 33 typedef Bu::List<Token> TokenStack;
34 typedef Bu::Hash<Bu::String, Number> VarHash;
31 TokenStack tsTerminal; 35 TokenStack tsTerminal;
32 TokenStack tsNonTerminal; 36 TokenStack tsNonTerminal;
37 Number nZero;
38 VarHash hVars;
33}; 39};
34 40
35#endif 41#endif