Added bytecode output.

This commit is contained in:
David Anderson
2004-08-08 10:15:08 +00:00
parent 023f9b43ea
commit 7b111a179e
25 changed files with 534 additions and 59 deletions

View File

@ -43,12 +43,7 @@ public:
class Symbol
{
public:
Symbol(SymbolType t, const char *s, int l);
const char *GetSymbol() { return sym.c_str(); }
SymbolType GetType() { return type; }
int GetLine() { return line; }
int IsEqual(std::string &s);
private:
bool IsEqual(std::string &s);
SymbolType type;
std::string sym;
int line;
@ -56,9 +51,11 @@ public:
public:
~SymbolList();
SymbolList::Symbol* AddSymbol(const char *s, SymbolType type, int line);
SymbolList::Symbol* AddSymbol(std::string &sym, SymbolType type, int line);
SymbolList::Symbol* AddSymbol(const char *szSym, SymbolType type, int line);
SymbolList::Symbol* FindSymbol(std::string &sym);
void PrintTable();
void Clear();
private:
std::vector<Symbol*> List;
};