Skip to content
Snippets Groups Projects
Select Git revision
  • fa0d5168b47000a37ce523940f148e171e5daba1
  • master default protected
  • fix-words-ann
  • wccl-rules-migration
  • develop
5 results

ANTLRParserResult.h

Blame
  • user avatar
    Adam Wardynski authored
    ce248cb6
    History
    ANTLRParserResult.h 715 B
    #ifndef LIBWCCL_ANTLRPARSERRESULT_H
    #define LIBWCCL_ANTLRPARSERRESULT_H
    
    #include <boost/shared_ptr.hpp>
    
    #include <libwccl/variables.h>
    #include <libwccl/ops/function.h>
    
    
    template<class T>
    class ANTLRParserResult;
    
    class ANTLRParserResultBase
    {
    public:
    	ANTLRParserResultBase()
    		: variables(new Wccl::Variables())
    	{
    	}
    
    	boost::shared_ptr<Wccl::Variables> variables;
    
    	virtual boost::shared_ptr<Wccl::FunctionBase> get_op_base() const = 0;
    };
    
    template<class T>
    class ANTLRParserResult : public ANTLRParserResultBase
    {
    public:
    	ANTLRParserResult()
    	{
    	}
    
    	boost::shared_ptr<Wccl::Function<T> > op;
    
    	boost::shared_ptr<Wccl::FunctionBase> get_op_base() const
    	{
    		return op;
    	}
    };
    
    #endif // ANTLRPARSERRESULT_H