#ifndef PARSER_H #define PARSER_H #include #include "token.h" namespace Bu { class Stream; }; class Lexer; class Parser { public: Parser( Lexer &lex, Bu::Stream &rOut ); virtual ~Parser(); void parse(); private: void unwind(); int reqTokens( Token::Type eType ); int getPriority( Token::Type eType ); private: Lexer &lex; Bu::Stream &rOut; typedef Bu::List TokenStack; TokenStack tsTerminal; TokenStack tsNonTerminal; }; #endif