Exemple #1
0
        public override ConsumeResult Consume(LeskContext context)
        {
            var result = new ConsumeResult();

            var match = RegexLookup[Pattern].Regex.Match(context.Input, context.Position);

            if (match.Success && match.Index == context.Position && match.Length > 0)
            {
                result.Success = true;
                result.Consumed = match.Value;
            }

            return result;
        }
Exemple #2
0
 public abstract ConsumeResult Consume(LeskContext context);