let read0
?(start=Pos.(incr_line unknown))
?(allow_sharp_comments=true)
?(allow_semicolon_comments=false)
?(allow_empty_lines=false)
?max_line_length
?alphabet
r
=
let pos = ref start in
Stream.map (Lines.read r) ~f:(fun line ->
let current_pos = !pos in
pos := Pos.incr_line !pos;
parse_item0
line
~allow_sharp_comments
~allow_semicolon_comments
~allow_empty_lines
?max_line_length
?alphabet
|> fun x ->
Or_error.tag_arg x "position" current_pos Pos.sexp_of_t
)