public Parser(OperatorFactory operatorFactory, IOperandFactory operandFactory, IDictionary <string, int> symbols = null) { this.operatorFactory = operatorFactory; this.operandFactory = operandFactory; this.symbols = symbols; }
public Parser(OperatorFactory operatorFactory, IOperandFactory operandFactory, IDictionary<string, int> symbols = null) { this.operatorFactory = operatorFactory; this.operandFactory = operandFactory; this.symbols = symbols; }
/// <summary> /// Initializes a new instance of the <see cref="NameExpressionFactory"/> class /// </summary> /// <param name="operandFactory">A <see cref="IOperandFactory"/> used to build <see cref="IOperand"/> instances required by name expressions</param> /// <param name="profileCache">A <see cref="IProfileCache"/> used to fetch profiles</param> public NameExpressionFactory(IOperandFactory operandFactory, IProfileCache profileCache) { Guard.Argument(operandFactory, nameof(operandFactory)).NotNull(); Guard.Argument(profileCache, nameof(profileCache)).NotNull(); _operandFactory = operandFactory; _profileCache = profileCache; }
/// <summary> /// Initializes a new instance of the <see cref="NameExpressionFactory" /> class /// </summary> /// <param name="operandFactory"> /// A <see cref="IOperandFactory" /> used to build <see cref="IOperand" /> instances required /// by name expressions /// </param> /// <param name="profileCache">A <see cref="IProfileCache" /> used to fetch profiles</param> public NameExpressionFactory(IOperandFactory operandFactory, IProfileCache profileCache) { Contract.Requires(operandFactory != null); Contract.Requires(profileCache != null); _operandFactory = operandFactory; _profileCache = profileCache; }
public Parser(ILexer lexer, IOperandFactory directOperandFactory, IOperandFactory indirectOperandFactory) { this.lexer = lexer; this.indirectOperandFactory = indirectOperandFactory; this.directOperandFactory = directOperandFactory; lexer.ConsumeTokenStrategy = new PeekTokenStrategy(new IgnoreWhiteSpaceTokenStrategy()); this.statments = new List<Statment>(); }