module BNFparseutil:Character parsing utilitiessig
..end
val s_and : ('a Stream.t -> 'b) list -> 'a Stream.t -> 'b list
Note: It is extremely important that you make all your conditions consume the
same amount of data from the stream. Otherwise, undefined results will occur.
val eof : 'a Stream.t -> unit
Stream.empty
.val insens : bool
i
arguments
to functions in this module take a bool specifying whether or not
to use case-insensitive comparisons. The default value for i
in
those functions is this value.type
repatt =
| |
C of |
(* | Match a single character | *) |
| |
R of |
(* | Match a single character within the inclusive range of the two characters given | *) |
val range : ?i:bool -> repatt list -> char Stream.t -> char
val range_n : ?i:bool -> repatt list -> char Stream.t -> char
val mstring : ?i:bool -> string -> char Stream.t -> string
val chr : int -> char
Char.chr
.val optparse : ('a -> char) -> 'a -> string
Streamutil.optparse
, but works only on
character strings and returns a string.func
: The parser function. Will be called repeatedly until
Stream.Failure is raised.args
: Passed to func.val optparse_1 : ('a -> char) -> 'a -> string
Streamutil.optparse_1
, but works only on character strings and
returns a string.funchead
: Function to apply to all argumentsargs
: Passed to the various functions