123456789101112131415161718192021222324252627 |
- #ifndef COMPILER_H
- #define COMPILER_H
- #include <string>
- #include "../data/ArrayList.h"
- #include "Token.h"
- #include "Tokenizer.h"
- #include "../code/Script.h"
- using namespace std;
- class Compiler
- {
- public:
- Compiler(string s);
- virtual ~Compiler();
- void compile(Script& sc);
- private:
- Tokenizer tokenizer;
-
- void compile(Script& sc, TokenList& tokens);
- void addInstruction(ArrayList<Instruction*>& code, Stack<Token*>& st, Token* t);
- };
- #endif
|