public Assembler(ISanitiser sanitiser, IInstructionParser instructionParser, IBinaryAssembler binaryAssembler, ISymbolResolver symbolResolver)
 {
     _sanitiser = sanitiser;
     _instructionParser = instructionParser;
     _binaryAssembler = binaryAssembler;
     _symbolResolver = symbolResolver;
 }
Example #2
0
 public Assembler(ISanitiser sanitiser, IInstructionParser instructionParser, IBinaryAssembler binaryAssembler, ISymbolResolver symbolResolver)
 {
     _sanitiser         = sanitiser;
     _instructionParser = instructionParser;
     _binaryAssembler   = binaryAssembler;
     _symbolResolver    = symbolResolver;
 }
Example #3
0
        public XmlParser(PhaseParserKit phaseParserKit)
        {
            Guard.ThrowIfNull(phaseParserKit, nameof(phaseParserKit));

            objectAssembler = phaseParserKit.ObjectAssembler;
            protoParser     = phaseParserKit.ProtoParser;
            parser          = phaseParserKit.Parser;
        }
Example #4
0
        public XmlParser(PhaseParserKit phaseParserKit)  
        {
            Guard.ThrowIfNull(phaseParserKit, nameof(phaseParserKit));

            objectAssembler = phaseParserKit.ObjectAssembler;        
            protoParser = phaseParserKit.ProtoParser;
            parser = phaseParserKit.Parser;
        }
 public AssignmentGraphIndexer(IInstructionParser instructionParser,
                               ITripleStore tripleStore,
                               ILogOutput logOutput)
 {
     _instructionParser = instructionParser;
     _tripleStore       = tripleStore;
     _logOutput         = logOutput;
 }
        public FileSystemDatabase(
            ILoader loader,
            IInstructionParser instructionParser,
            IQueryParser queryParser,
            IDatabaseEngine databaseEngine)
        {
            //todo: assertion
            Debug.Assert(loader != null, "An instance of loader must be provided.");
            Debug.Assert(instructionParser != null, "An instance of instructions parse must be provided.");
            Debug.Assert(queryParser != null, "An instance of query parser must be provided.");
            Debug.Assert(databaseEngine != null, "An instance of database engine must be provided.");

            if (loader == null)
            {
                throw new ArgumentNullException("loader", "Must provide an instance of ILoader.");
            }

            if (instructionParser == null)
            {
                throw new ArgumentNullException("instructionParser", "Must provide an instance of IInstructionParser.");
            }

            if (queryParser == null)
            {
                throw new ArgumentNullException("queryParser", "Must provide an instance of IQueryParser.");
            }

            if (databaseEngine == null)
            {
                throw new ArgumentNullException("databaseEngine", "Must provide an instance of IDatabaseEngine.");
            }

            fileLoader                   = loader;
            this.instructionParser       = instructionParser;
            this.queryParser             = queryParser;
            this.databaseEngine          = databaseEngine;
            this.databaseEngine.Database = this;
        }
Example #7
0
 public ParsingTests()
 {
     sut = CreateSut();
     protoResources = new ProtoInstructionResources(this);
     source = new InstructionResources(this);
 }
 public LabelInstructionParser(IInstructionParser nextParser, ISymbolParser labelParser)
 {
     _nextParser  = nextParser;
     _labelParser = labelParser;
 }
Example #9
0
 public Satellite(IInstructionParser instructionParser, IRoverFactory roverFactory)
 {
     this.instructionParser = instructionParser;
     this.roverFactory      = roverFactory;
 }
 public OrderAwareInstructionParser(IInstructionParser parser)
 {
     this.parser = parser;
 }
        public IntcodeComputerBuilder WithInstructionParser(IInstructionParser instructionParser)
        {
            _instructionParser = instructionParser;

            return(this);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SpiderMovementStrategy"/> class.
 /// </summary>
 /// <param name="robotState"> The robot state Finite State Machine. </param>
 /// <param name="updateLocationStrategy"> The strategy used to update the location. </param>
 /// <param name="instructionParser"> The instance of <see cref="instructionParser"/> that cn convert the char based instruction set. </param>
 public SpiderMovementStrategy(IFiniteStateMachine robotState, IUpdateLocationStrategy updateLocationStrategy, IInstructionParser instructionParser)
 {
     this._robotState             = robotState ?? throw new ArgumentNullException(nameof(robotState));
     this._updateLocationStrategy = updateLocationStrategy ?? throw new ArgumentNullException(nameof(updateLocationStrategy));
     this._instructionParser      = instructionParser ?? throw new ArgumentNullException(nameof(instructionParser));
 }
 public VariableInstructionParser(IInstructionParser nextParser, ISymbolParser labelParser)
 {
     _nextParser = nextParser;
     _labelParser = labelParser;
 }
 public AddressInstructionParser(IInstructionParser nextParser)
 {
     _nextParser = nextParser;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MovementStrategyFactory"/> class.
 /// </summary>
 /// <param name="locationStrategy">  The location strategy. </param>
 /// <param name="instructionParser"> The instructionParser. </param>
 public MovementStrategyFactory(IUpdateLocationStrategy locationStrategy, IInstructionParser instructionParser)
 {
     this._locationStrategy  = locationStrategy ?? throw new ArgumentNullException(nameof(locationStrategy));
     this._instructionParser = instructionParser ?? throw new ArgumentNullException(nameof(instructionParser));
 }
 public OrderAwareInstructionParser(IInstructionParser parser)
 {
     this.parser = parser;
 }
 public ComputeInstructionParser(IInstructionParser nextParser, IComputeDestinationParser destinationParser, IComputeJumpParser jumpParser)
 {
     _nextParser        = nextParser;
     _destinationParser = destinationParser;
     _jumpParser        = jumpParser;
 }
 public MarkupExtensionsParsingFromProtoToXaml()
 {
     sut = new InstructionParser(RuntimeTypeSource);
 }
Example #19
0
 public void Setup()
 {
     instructionParser = new InstructionParser();
 }
Example #20
0
 public ParsingTests()
 {
     sut            = CreateSut();
     protoResources = new ProtoInstructionResources(this);
     source         = new InstructionResources(this);
 }
 public IntcodeComputer(IInputSender inputSender, IOutputReceiver outputReceiver, IInstructionParser instructionParser)
 {
     _inputSender       = inputSender;
     _outputReceiver    = outputReceiver;
     _instructionParser = instructionParser;
 }
Example #22
0
 public AddressInstructionParser(IInstructionParser nextParser)
 {
     _nextParser = nextParser;
 }
Example #23
0
 public InstructionMapper(IInstructionParser instructionParser)
 {
     _instructionParser = instructionParser;
 }
Example #24
0
 public PhaseParserKit(IProtoParser protoParser, IInstructionParser parser, IObjectAssembler objectAssembler)
 {
     this.protoParser = protoParser;
     this.parser = parser;
     this.objectAssembler = objectAssembler;
 }
Example #25
0
 public MarkupExtensionsParsingFromProtoToXaml()
 {
     sut = new InstructionParser(RuntimeTypeSource);
 }
 public RoverService(IRoverFactory roverFactory, IInstructionParser parser)
 {
     _roverFactory = roverFactory;
     _parser       = parser;
 }
 public CentralProcessingUnit(IArithmeticLogicUnit arithmeticLogicUnit, IInstructionParser parser, IInstructionReader reader)
 {
     ALU    = arithmeticLogicUnit;
     Parser = parser;
     Reader = reader;
 }
Example #28
0
 public PhaseParserKit(IProtoParser protoParser, IInstructionParser parser, IObjectAssembler objectAssembler)
 {
     this.protoParser     = protoParser;
     this.parser          = parser;
     this.objectAssembler = objectAssembler;
 }