summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/parser.h b/src/parser.h
index b0a1231..1e0d1c4 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -12,6 +12,7 @@ namespace Bu
12}; 12};
13 13
14class Lexer; 14class Lexer;
15class Expression;
15 16
16/** 17/**
17 * 18 *
@@ -45,10 +46,10 @@ class Lexer;
45class Parser 46class Parser
46{ 47{
47public: 48public:
48 Parser( Lexer &lex, Bu::Stream &rOut ); 49 Parser( Lexer &lex );
49 virtual ~Parser(); 50 virtual ~Parser();
50 51
51 void parse(); 52 Expression *parse();
52 53
53private: 54private:
54 void expr(); 55 void expr();
@@ -58,6 +59,7 @@ private:
58private: 59private:
59 void shift( const Token &t ); 60 void shift( const Token &t );
60 void reduce(); 61 void reduce();
62 void output( const Token &t );
61 int reqTokens( Token::Type eType ); 63 int reqTokens( Token::Type eType );
62 int getPriority( Token::Type eType ); 64 int getPriority( Token::Type eType );
63 65
@@ -65,10 +67,9 @@ private:
65 67
66private: 68private:
67 Lexer &lex; 69 Lexer &lex;
68 Bu::Stream &rOut;
69 typedef Bu::List<Token> TokenStack; 70 typedef Bu::List<Token> TokenStack;
70 TokenStack tsParse; 71 TokenStack tsParse;
71 TokenStack tsScript; 72 Expression *pCurExp;
72}; 73};
73 74
74#endif 75#endif