Ejemplo n.º 1
0
 /// <summary>
 /// Scans the input and invokes the action for each nested parser that is considered.
 /// </summary>
 /// <param name="input">The input source.</param>
 /// <param name="beforeAction">The action to take just before the search considers a parser or any of its nested parsers.</param>
 /// <param name="afterAction">The action to take after a parser and all its nested parsers have been considered.</param>
 public SearchResult Search(Source <TInput> input, SearchAction <TInput> beforeAction, Action <Parser <TInput> > afterAction = null) =>
 Search(input, 0, false, beforeAction, afterAction);
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the number of source items that are successfully matched by this parser, or a negative number indicating failure.
 /// </summary>
 public abstract int Scan(Source <TInput> input, int inputStart);
Ejemplo n.º 3
0
 /// <summary>
 /// Scans the input and invokes the action for each nested parser that is considered.
 /// </summary>
 /// <param name="input">The input source.</param>
 /// <param name="inputStart">The starting offset within the input source.</param>
 /// <param name="prevWasMissing">True if the previous rule considered was required and determined to be missing.</param>
 /// <param name="beforeAction">The action to take just before the search considers a parser or any of its nested parsers.</param>
 /// <param name="afterAction">The action to take after a parser and all its nested parsers have been considered.</param>
 public SearchResult Search(Source <TInput> input, int inputStart, bool prevWasMissing, SearchAction <TInput> beforeAction, Action <Parser <TInput> > afterAction = null)
 {
     return(SafeSearcher.SearchSafe(this, input, inputStart, prevWasMissing, beforeAction, afterAction));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Parses input source items and produces zero or more output items.
 /// </summary>
 public abstract int Parse(Source <TInput> input, int inputStart, List <object> output, int outputStart);