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] - Blame information for rev 216

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 216 diegovalve
 
2
#include <string>
3
#include <map>
4
#include <vector>
5
using namespace std;
6
//-----------------------------------------------------------------------
7
#define MAX_MACRO_FUNCTION_LINE_COUNT 100
8
class TMacroFunction
9
{
10
public:
11
        vector<string> GetSubstitudedMacro( void );
12
        string mName;
13
        string mReturnSymbol;
14
        string mReturnValue;
15
        vector<string> mParamterSymbol;
16
        vector<string> mParamterValue;
17
        vector<string> mLines;
18
} ;
19
//--------------------------------------------------------
20
class Preprocessor
21
{
22
 public:
23
        Preprocessor();
24
        ~Preprocessor();
25
public:
26
        void Execute( string aFile );
27
 
28
 private:
29
        void ScanLine( string & Line ,vector<string> & NewFile, ifstream & ifs, bool aAddLine);
30
        void IncludeFile(  string aPath, vector<string> & NewFile );
31
        vector<string> ScanFile(  ifstream & ifs );
32
        void SubstitudeMacros( vector<string> & aFile, ofstream & ofs );
33
        void PopulateMacroFunction(string aSignature,  ifstream & ifs, vector<string> & aNewFile);
34
 
35
        map<string, TMacroFunction>     mMacroFunctions;
36
        map <string,string>                     mMacros;
37
        vector<string>                                  mIncludes;
38
 
39
};
40
//--------------------------------------------------------

powered by: WebSVN 2.1.0

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