Exemplo n.º 1
0
 public virtual ParserResults Parse(LookaheadTextReader input)
 {
     return ParseCore(new SeekableTextReader(input));
 }
Exemplo n.º 2
0
        public virtual void Parse(LookaheadTextReader input, ParserVisitor visitor)
        {
            var results = ParseCore(new SeekableTextReader(input));

            // Replay the results on the visitor
            visitor.Visit(results);
        }
Exemplo n.º 3
0
 protected void ReadToEnd(StringBuilder builder, LookaheadTextReader reader)
 {
     builder.Append(reader.ReadToEnd());
 }
Exemplo n.º 4
0
 private static void RunAll(Action<StringBuilder, LookaheadTextReader>[] readerCommands, StringBuilder builder, LookaheadTextReader reader)
 {
     foreach (Action<StringBuilder, LookaheadTextReader> readerCommand in readerCommands)
     {
         readerCommand(builder, reader);
     }
 }
Exemplo n.º 5
0
 private static void AdvanceReader(int offset, LookaheadTextReader reader)
 {
     for (int i = 0; i < offset; i++)
     {
         reader.Read();
     }
 }
Exemplo n.º 6
0
 protected void CancelBacktrack(StringBuilder builder, LookaheadTextReader reader)
 {
     reader.CancelBacktrack();
 }