Fixed labels so they can be referenced before creation.
Cleaned up symbol parsing code. Reversed order of public table. Fixed bug with macro arguments.
This commit is contained in:
@ -29,17 +29,25 @@ public:
|
||||
class Label
|
||||
{
|
||||
public:
|
||||
Label();
|
||||
SymbolList::Symbol *sym;
|
||||
int cip;
|
||||
};
|
||||
public:
|
||||
~LabelMngr();
|
||||
LabelMngr() { CError = NULL; assert(CError!=NULL); }
|
||||
LabelMngr(ErrorMngr *e) { CError = e; }
|
||||
void AddLabel(SymbolList::Symbol *sym, int cip);
|
||||
LabelMngr::Label *FindLabel(std::string &sym);
|
||||
int GetCip(std::string &sym);
|
||||
void Clear();
|
||||
bool SetCip(std::string &sym, int cip);
|
||||
void QueueLabel(std::string &sym, Asm *ASM);
|
||||
void CompleteQueue();
|
||||
private:
|
||||
std::vector<LabelMngr::Label *> List;
|
||||
std::map<std::string, std::stack<Asm *> > LQ;
|
||||
ErrorMngr *CError;
|
||||
public:
|
||||
static const int ncip = -1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user