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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [compiler/] [src/] [vp_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
        vector<string> ScanFile(  ifstream & ifs );
30
        void SubstitudeMacros( vector<string> & aFile, ofstream & ofs );
31
        void PopulateMacroFunction(string aSignature,  ifstream & ifs, vector<string> & aNewFile);
32
 
33
        map<string, TMacroFunction>     mMacroFunctions;
34
        map <string,string>             mMacros;
35
 
36
};
37
//--------------------------------------------------------

powered by: WebSVN 2.1.0

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