public Tokenizer(SourceReader source, ParsingContext context) { Require.NotNull(source, "source"); Require.NotNull(context, "context"); _source = source; _context = context; }
public Expression Parse(string source, IEnumerable<string> registeredComparisonOperators) { Require.NotNullOrEmpty(source, "source"); _context = new ParsingContext(registeredComparisonOperators); _tokenzier = new Tokenizer(source, _context); var exp = Expression(); if (_context.Errors.Count > 0) throw new ParserException("Failed parsing condition expression.", _context.Errors); _context = null; _tokenzier = null; return exp; }
public Tokenizer(string source, ParsingContext context) : this(new SourceReader(source), context) { }