private void FirstPass(LabelStore labelStore, MacroStore macroStore) { var instructionResolver = new InstructionResolver(labelStore, macroStore); var parser = new Parser(instructionResolver); parser.Parse(source); }
public MemoryImage Build() { var labelStore = new LabelStore(); var macroStore = new MacroStore(); FirstPass(labelStore, macroStore); return SecondPass(labelStore, macroStore); }
private MemoryImage SecondPass(LabelStore labelStore, MacroStore macroStore) { labelStore.ClearReferencedLabels(); var instructionResolver = new InstructionResolver(labelStore, macroStore); var parser = new Parser(instructionResolver); parser.Parse(source); return instructionResolver.CreateMemoryImage(); }
public InstructionResolver(LabelStore labelStore, MacroStore macroStore) { this.macroStore = macroStore; this.labelStore = labelStore; expressionResolver = new ExpressionResolver(labelStore); }
public ExpressionResolver(LabelStore labelStore) { this.labelStore = labelStore; }