Пример #1
0
 public ModuleParser(ExpressionParserFactory <T> expressionParserFactory)
 {
     _expressionParserFactory = expressionParserFactory ??
                                throw new ParserException("expressionParser cannot be null");
     _knownModules = new Dictionary <string, int>();
     _nextModuleId = 0;
 }
Пример #2
0
        public GeneratorParser(ExpressionParserFactory <T> expressionParserFactory)
        {
            if (expressionParserFactory == null)
            {
                throw new ArgumentException("expressionParser cannot be null");
            }

            ModuleParser = new ModuleParser <T>(expressionParserFactory);
            _ruleParser  = new RuleParser <T>(ModuleParser, expressionParserFactory);
        }
Пример #3
0
 public RuleParser(ModuleParser <T> moduleParser, ExpressionParserFactory <T> expressionParserFactory)
 {
     _moduleParser            = moduleParser ?? throw new ParserException("moduleParser cannot be null");
     _expressionParserFactory = expressionParserFactory ??
                                throw new ArgumentException("expressionParserFactory cannot be null");
 }