aboutsummaryrefslogtreecommitdiff
path: root/gramlib/grammar.mli
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2021-04-23 23:38:26 +0200
committerPierre-Marie Pédrot2021-04-23 23:38:26 +0200
commitd9e9a63f9f49768eee8b239812365ad1115b964f (patch)
tree0d608882d4aa094ee6c519005696f272f14a2d27 /gramlib/grammar.mli
parent528f8384dcd817e4e339719a5d99c30d48520a8e (diff)
parent4ca8b4aab1a6b4f55aab026e42a530fa125553c0 (diff)
Merge PR #14075: New level of abstraction for streams with (non-canonical) location function
Reviewed-by: ppedrot
Diffstat (limited to 'gramlib/grammar.mli')
-rw-r--r--gramlib/grammar.mli7
1 files changed, 4 insertions, 3 deletions
diff --git a/gramlib/grammar.mli b/gramlib/grammar.mli
index 33006f6f65..c1605486cf 100644
--- a/gramlib/grammar.mli
+++ b/gramlib/grammar.mli
@@ -27,7 +27,7 @@ module type S = sig
module Parsable : sig
type t
- val make : ?loc:Loc.t -> char Stream.t -> t
+ val make : ?source:Loc.source -> char Stream.t -> t
val comments : t -> ((int * int) * string) list
end
@@ -39,8 +39,9 @@ module type S = sig
val create : string -> 'a t (* compat *)
val parse : 'a t -> Parsable.t -> 'a
val name : 'a t -> string
- val of_parser : string -> (Plexing.location_function -> te Stream.t -> 'a) -> 'a t
- val parse_token_stream : 'a t -> te Stream.t -> 'a
+ type 'a parser_fun = { parser_fun : te LStream.t -> 'a }
+ val of_parser : string -> 'a parser_fun -> 'a t
+ val parse_token_stream : 'a t -> te LStream.t -> 'a
val print : Format.formatter -> 'a t -> unit
end