/**
 * 最初の著者:: トゥイー
 * リポジトリ情報:: $Id: ExprTreeParser.hpp 11 2011-05-14 02:11:18Z yutaka_at_home $
 * 著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
 * ライセンス:: CPL(Common Public Licence)
 */

#ifndef INC_ExprTreeParser_hpp_
#define INC_ExprTreeParser_hpp_

#include <antlr/config.hpp>
#include "ExprTreeParserTokenTypes.hpp"
/* $ANTLR 2.7.7 (20060930): "expr.g" -> "ExprTreeParser.hpp"$ */
#include <antlr/TreeParser.hpp>

#line 1 "expr.g"

#include "ExprTreeParserTokenTypes.hpp"

#include "tops/value/AllValues.hpp"

using namespace tops;

#line 18 "ExprTreeParser.hpp"
class CUSTOM_API ExprTreeParser : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public ExprTreeParserTokenTypes
{
#line 1 "expr.g"
#line 22 "ExprTreeParser.hpp"
public:
	ExprTreeParser();
	static void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory );
	int getNumTokens() const
	{
		return ExprTreeParser::NUM_TOKENS;
	}
	const char* getTokenName( int type ) const
	{
		if( type > getNumTokens() ) return 0;
		return ExprTreeParser::tokenNames[type];
	}
	const char* const* getTokenNames() const
	{
		return ExprTreeParser::tokenNames;
	}
	public: int  expr(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
		const Variables& variables
	);
	public: int  expr_variable(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
		const Variables& variables
	);
	public: int  expr_integer(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
	public: int  expr_sign(ANTLR_USE_NAMESPACE(antlr)RefAST _t);
public:
	ANTLR_USE_NAMESPACE(antlr)RefAST getAST()
	{
		return returnAST;
	}
	
protected:
	ANTLR_USE_NAMESPACE(antlr)RefAST returnAST;
	ANTLR_USE_NAMESPACE(antlr)RefAST _retTree;
private:
	static const char* tokenNames[];
#ifndef NO_STATIC_CONSTS
	static const int NUM_TOKENS = 42;
#else
	enum {
		NUM_TOKENS = 42
	};
#endif
	
};

#endif /*INC_ExprTreeParser_hpp_*/
