Module Gramlib.Plexing

type 'te lexer_func = ?⁠loc:Loc.t -> char Stdlib.Stream.t -> 'te Stdlib.Stream.t * location_function
and location_function = int -> Loc.t

The type of a function giving the location of a token in the source from the token number in the stream (starting from zero).

module type S = sig ... end