From 51e21a316be6e052251b3dfc7d671061ebd67cee Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:03:28 +0000 Subject: Removed the old trunk contents. About to load up m3 --- src/buildparser.h | 192 ------------------------------------------------------ 1 file changed, 192 deletions(-) delete mode 100644 src/buildparser.h (limited to 'src/buildparser.h') diff --git a/src/buildparser.h b/src/buildparser.h deleted file mode 100644 index 516760c..0000000 --- a/src/buildparser.h +++ /dev/null @@ -1,192 +0,0 @@ -#ifndef BUILDER_H -#define BUILDER_H - -#include -#include -#include -#include -#include -#include "build.tab.h" -#include "parser.h" - -class Build; -class BuildParser; -class Function; -class FunctionFactory; -class Perform; -class PerformFactory; -class Target; -class TargetFactory; - -#define YY_DECL int yylex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, BuildParser &bld ) -YY_DECL; - -typedef std::list StringList; -typedef std::list FunctionList; -typedef std::list PerformList; -typedef std::map VarMap; - -template -class Triplet -{ -public: - Triplet( const tx &x, const ty &y, const tz &z ) : - first( x ), second( y ), third( z ) - {} - - Triplet( const Triplet &src ) : - first( src.first ), second( src.second ), third( src.third ) - {} - - tx first; - ty second; - tz third; -}; - -enum eSetHow -{ - setSet, - setAdd -}; - -class BuildParser : public Parser -{ - typedef std::pair BuildListItem; - typedef std::list BuildListCore; - typedef std::pair BuildList; - typedef Triplet SetVar; - typedef std::list SetVarList; -public: - BuildParser(); - virtual ~BuildParser(); - - Build *load( const std::string &sFile ); - -private: - void scanBegin(); - void scanEnd(); - - Build *genBuild(); - -public: // Target functions - bool isTarget( const char *sType ); - void newTarget(); - void setTargetRule( const char *sRule ); - void setTargetPrefix( const char *sPrefix ); - void setTargetType( const char *sType ); - void addTargetInput(); - void addTargetRequires(); - void addTargetSet( const char *sVar, const char *sVal, int nHow ); - void addTargetGroup( const char *sGroup ); - -private: // Target variables - TargetFactory &fTarget; - class TargetInfo - { - public: - std::string sRule; - std::string sPrefix; - std::string sType; - BuildList lInput; - BuildList lRequires; - StringList lGroups; - SetVarList lVar; - }; - typedef std::pair TargetTmp; - typedef std::list TargetTmpList; - TargetTmpList lTargetTmp; - -public: // Function functions - bool isFunction( const char *sFunc ); - void newFunctionCall( const char *sName ); - void addFunctionParam( const char *sParam ); - -private: // Function variables - Function *pTmpFunc; - FunctionFactory &fFunction; - -public: // Perform functions - bool isPerform( const char *sPerf ); - void newPerform( const char *sName ); - void addPerformParam( const char *sParam ); - -private: // Perform variables - Perform *pTmpPerform; - PerformFactory &fPerform; - -public: // List functions - void newList(); - void addListString( const char *str ); - void addListFunc(); - void filterList(); - - void buildListFilter( BuildList &lSrc ); - StringList buildToStringList( const BuildList &lSrc, const StringList &lIn, Build *pPass=NULL ); - StringList buildToStringListDup( const BuildList &lSrc, const StringList &lIn, Build &bld, const std::string &sCont, VarMap *mExtra, Build *pPass=NULL ); - -private: // List variables - BuildList lTmp; - -public: // Rules functions - void addRule( const char *sName ); - void addRuleMatches(); - void addRuleProduces(); - void addRuleRequires(); - void addRuleInputFilter(); - void addRulePerform(); - void setRuleAggregate(); - -private: // Rule variables - class RuleInfo - { - public: - std::string sName; - Function *pMatches; - BuildList lProduces; - BuildList lRequires; - FunctionList lFilter; - PerformList lPerform; - Function *pAggregate; - }; - - typedef std::list RuleTmpList; - RuleTmpList lRuleTmp; - -public: // Action functions - void addAction(); - void addAction( const char *sName ); - void addCommand( int nType ); - void addGrpCommand( const char *sGroup, int nType ); - -private: // Action variables - typedef struct ActionTmpCmd - { - ActionTmpCmd( int nAct, BuildList &l ) : - nAct( nAct ), bGroup( false ), lCmds( l ) { }; - ActionTmpCmd( int nAct, const char *s ) : - nAct( nAct ), bGroup( true ), sGroup( s ) { }; - int nAct; - bool bGroup; - BuildList lCmds; - std::string sGroup; - } ActionTmpCmd; - //typedef std::pair ActionTmpCmd; - //typedef std::pair ActionTmpGrpCmd - typedef std::list ActionTmpCmdList; - //typedef std::list ActionTmpGrpCmdList; - typedef std::pair ActionTmp; - typedef std::list ActionTmpList; - ActionTmpList lActions; - -public: // Global variable functions - void addGlobalSet( const char *sVar, const char *sValue, int nHow ); - -private: // Global variable variables - SetVarList lGlobalVars; - -public: // Debug - void debugDump(); - void printBuildList( const BuildList &lst ); -}; - -#endif -- cgit v1.2.3