Method: ANTLR3::CommonTokenStream#reset

Defined in:
lib/antlr3/streams.rb

#resetObject

rewind the stream to its initial state



858
859
860
861
862
863
864
# File 'lib/antlr3/streams.rb', line 858

def reset
  @position = 0
  @position += 1 while token = @tokens[ @position ] and
                       token.channel != @channel
  @last_marker = nil
  return self
end