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

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

            objectAssembler = phaseParserKit.ObjectAssembler;        
            protoParser = phaseParserKit.ProtoParser;
            parser = phaseParserKit.Parser;
        }
Ejemplo n.º 5
0
 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;
        }
Ejemplo n.º 7
0
 public ParsingTests()
 {
     sut = CreateSut();
     protoResources = new ProtoInstructionResources(this);
     source = new InstructionResources(this);
 }
Ejemplo n.º 8
0
 public LabelInstructionParser(IInstructionParser nextParser, ISymbolParser labelParser)
 {
     _nextParser  = nextParser;
     _labelParser = labelParser;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 17
0
 public ComputeInstructionParser(IInstructionParser nextParser, IComputeDestinationParser destinationParser, IComputeJumpParser jumpParser)
 {
     _nextParser        = nextParser;
     _destinationParser = destinationParser;
     _jumpParser        = jumpParser;
 }
 public MarkupExtensionsParsingFromProtoToXaml()
 {
     sut = new InstructionParser(RuntimeTypeSource);
 }
Ejemplo n.º 19
0
 public void Setup()
 {
     instructionParser = new InstructionParser();
 }
Ejemplo n.º 20
0
 public ParsingTests()
 {
     sut            = CreateSut();
     protoResources = new ProtoInstructionResources(this);
     source         = new InstructionResources(this);
 }
Ejemplo n.º 21
0
 public IntcodeComputer(IInputSender inputSender, IOutputReceiver outputReceiver, IInstructionParser instructionParser)
 {
     _inputSender       = inputSender;
     _outputReceiver    = outputReceiver;
     _instructionParser = instructionParser;
 }
Ejemplo n.º 22
0
 public AddressInstructionParser(IInstructionParser nextParser)
 {
     _nextParser = nextParser;
 }
Ejemplo n.º 23
0
 public InstructionMapper(IInstructionParser instructionParser)
 {
     _instructionParser = instructionParser;
 }
Ejemplo n.º 24
0
 public PhaseParserKit(IProtoParser protoParser, IInstructionParser parser, IObjectAssembler objectAssembler)
 {
     this.protoParser = protoParser;
     this.parser = parser;
     this.objectAssembler = objectAssembler;
 }
Ejemplo n.º 25
0
 public MarkupExtensionsParsingFromProtoToXaml()
 {
     sut = new InstructionParser(RuntimeTypeSource);
 }
Ejemplo n.º 26
0
 public RoverService(IRoverFactory roverFactory, IInstructionParser parser)
 {
     _roverFactory = roverFactory;
     _parser       = parser;
 }
Ejemplo n.º 27
0
 public CentralProcessingUnit(IArithmeticLogicUnit arithmeticLogicUnit, IInstructionParser parser, IInstructionReader reader)
 {
     ALU    = arithmeticLogicUnit;
     Parser = parser;
     Reader = reader;
 }
Ejemplo n.º 28
0
 public PhaseParserKit(IProtoParser protoParser, IInstructionParser parser, IObjectAssembler objectAssembler)
 {
     this.protoParser     = protoParser;
     this.parser          = parser;
     this.objectAssembler = objectAssembler;
 }