public void Match(NonTerminal terminal, ref Queue <Token> tokens) { LanguageRule workingNowRule = this.getRuleByTokenAndNonTerminal(terminal, tokens.Peek()); workingNowRule.MatchRule(ref tokens, this); }
public void ParseTokens(IEnumerable <Token> tokens, ILanguage language) { Queue <Token> queue = new Queue <Token>(tokens); startRule.MatchRule(ref queue, new Matcher(rules)); }