简单的例子:
根据指令跳到某个translate function里
根据MIPS 的protocol return binary
Hard Part: Symbol Table
In computer science, a symbol table is adata structureused by a languagetranslatorsuch as a compiler or interpreter, where each identifier(a.k.a.symbol) in a program's source code is associated with information relating to its declaration or appearance in the source
传入MIPS代码, PASS_1过滤comment, check一些Syntax有没有error, 比如arguments数量。 添加label进入Symbol Table. 然后Output a intermediate file
Intermediate file = 过滤了comments, labels过后的MIPS 代码,Pass2 是要把它变成Binary