summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
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