Beispiel #1
0
        private void FirstPass(LabelStore labelStore, MacroStore macroStore)
        {
            var instructionResolver = new InstructionResolver(labelStore, macroStore);
            var parser = new Parser(instructionResolver);

            parser.Parse(source);
        }
Beispiel #2
0
        public MemoryImage Build()
        {
            var labelStore = new LabelStore();
            var macroStore = new MacroStore();

            FirstPass(labelStore, macroStore);
            return SecondPass(labelStore, macroStore);
        }
Beispiel #3
0
        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;
 }