14 using System.Collections.Generic;
19 public delegate Token
MatchHandler(Terminal terminal, ParsingContext context, ISourceStream source);
24 Prefixes.AddRange(prefixes);
31 [System.Diagnostics.DebuggerStepThrough]
32 get {
return _handler;}
36 return _handler(
this, context, source);
38 [System.Diagnostics.DebuggerStepThrough]
Interface for Terminals to access the source stream and produce tokens.
override IList< string > GetFirsts()
CustomTerminal(string name, MatchHandler handler, params string[] prefixes)
Tokens are produced by scanner and fed to parser, optionally passing through Token filters in between...
override Token TryMatch(ParsingContext context, ISourceStream source)
delegate Token MatchHandler(Terminal terminal, ParsingContext context, ISourceStream source)