port from perforce
This commit is contained in:
35
bp10-4k/src/SemAnalyzer.h
Normal file
35
bp10-4k/src/SemAnalyzer.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "LexAnalyzer.h"
|
||||
|
||||
|
||||
struct VmCall
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
FunctionCall,
|
||||
Label
|
||||
};
|
||||
|
||||
CString name;
|
||||
Type type;
|
||||
std::vector<int> arguments;
|
||||
CString labelReference;
|
||||
};
|
||||
|
||||
class SemAnalyzer
|
||||
{
|
||||
public:
|
||||
LanguageSpecifier language;
|
||||
std::vector<CString> texts;
|
||||
std::vector<VmCall> vmCalls;
|
||||
std::map<CString, int> usedFunctions;
|
||||
|
||||
SemAnalyzer();
|
||||
virtual ~SemAnalyzer();
|
||||
|
||||
void Parse(const CString& fileName, std::vector<Keyword> keywords);
|
||||
|
||||
private:
|
||||
int ParseFunction(const CString& fileName, std::vector<Keyword>::iterator& iter, std::vector<int>& args, CString& labelReference);
|
||||
};
|
||||
Reference in New Issue
Block a user