# File lib/kwalify/parser/yaml.rb, line 166
  def parse_stream(input, opts={}, &block)
    reset_scanner(input, opts[:filename], opts[:untabify])
    ydocs = block_given? ? nil : []
    while true
      ydoc = parse_next()
      ydocs ? (ydocs << ydoc) : (yield ydoc)
      break if eos? || stream_end?()
      document_start?() or raise "** internal error"
      scan(/.*\n/)
    end
    return ydocs
  end