From fb28f6800864176be2ffca29e8e664b641f33170 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:04:02 +0000 Subject: m3 is copied into trunk, we should be good to go, now. --- src/runner.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/runner.h (limited to 'src/runner.h') diff --git a/src/runner.h b/src/runner.h new file mode 100644 index 0000000..98894da --- /dev/null +++ b/src/runner.h @@ -0,0 +1,43 @@ +#ifndef RUNNER_H +#define RUNNER_H + +#include "astbranch.h" + +class Runner +{ +public: + Runner( class Ast &rAst, class Context &rCont ); + virtual ~Runner(); + + /** + * Run through and pull out all of the functions. Maybe more later. + */ + void initialize(); + class Variable execExpr( AstBranch::NodeList::const_iterator e ); + class Variable execExpr( AstBranch::NodeList::const_iterator e, + const class Variable &vIn ); + void run(); + Variable run( AstBranch::NodeList::const_iterator n ); + class Variable execFunc( const class AstBranch *pFunc, + class Variable &vIn ); + void execProfile( class Target *pTarget, const Bu::FString &sProfile ); + void execAction( const Bu::FString &sName ); + + Context &getContext(); + +private: + class Target *buildTarget( const Bu::FString &sOutput, + AstBranch::NodeList::const_iterator n ); + class Rule *buildRule( const Bu::FString &sName, + AstBranch::NodeList::const_iterator n ); + void attachDefaults(); + Variable doSet( const AstBranch *pRoot ); + +private: + class Ast &rAst; + class Context &rCont; + Target *pCurTarget; + Rule *pCurRule; +}; + +#endif -- cgit v1.2.3