Ejemplo n.º 1
0
 /// <summary>
 /// Extracts expressions from the token stream and calls the corresponding handler.
 /// </summary>
 /// <param name="tokenSource">The source of SQL tokens.</param>
 /// <returns>The results of the parse.</returns>
 protected MatchResult GetResult(ITokenSource tokenSource)
 {
     Parser parser = new Parser(grammar);
     return parser.Parse(SqlGrammar.Start.Name, tokenSource);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of a ParseAttempt.
 /// </summary>
 /// <param name="parser">The parser containing</param>
 /// <param name="tokenSource">An object to retrieve the sequence of tokens from.</param>
 public ParseAttempt(Parser parser, ITokenSource tokenSource)
 {
     this.parser = parser;
     this.tokenSource = tokenSource;
     this.tokens = new List<TokenResult>();
 }