diff options
Diffstat (limited to '')
-rw-r--r-- | src/parser.h | 9 |
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 | ||
14 | class Lexer; | 14 | class Lexer; |
15 | class Expression; | ||
15 | 16 | ||
16 | /** | 17 | /** |
17 | * | 18 | * |
@@ -45,10 +46,10 @@ class Lexer; | |||
45 | class Parser | 46 | class Parser |
46 | { | 47 | { |
47 | public: | 48 | public: |
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 | ||
53 | private: | 54 | private: |
54 | void expr(); | 55 | void expr(); |
@@ -58,6 +59,7 @@ private: | |||
58 | private: | 59 | private: |
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 | ||
66 | private: | 68 | private: |
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 |