OpenCores
URL https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [compiler/] [src/] [cp_compiler/] [Preprocessor.h] - Rev 216

Compare with Previous | Blame | View Log

 
#include <string>
#include <map>
#include <vector>
using namespace std;
//-----------------------------------------------------------------------
#define MAX_MACRO_FUNCTION_LINE_COUNT 100
class TMacroFunction
{
public:
	vector<string> GetSubstitudedMacro( void );
	string mName;
	string mReturnSymbol;
	string mReturnValue;
	vector<string> mParamterSymbol;
	vector<string> mParamterValue;
	vector<string> mLines;
} ;
//--------------------------------------------------------
class Preprocessor
{
 public:
	Preprocessor();
	~Preprocessor();
public:
	void Execute( string aFile );
 
 private:
	void ScanLine( string & Line ,vector<string> & NewFile, ifstream & ifs, bool aAddLine);
	void IncludeFile(  string aPath, vector<string> & NewFile );
	vector<string> ScanFile(  ifstream & ifs );
	void SubstitudeMacros( vector<string> & aFile, ofstream & ofs );
	void PopulateMacroFunction(string aSignature,  ifstream & ifs, vector<string> & aNewFile);
 
	map<string, TMacroFunction> 	mMacroFunctions;
	map <string,string> 			mMacros;
	vector<string>					mIncludes;
 
};
//--------------------------------------------------------

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.