Library
Module
Module type
Parameter
Class
Class type
module Regexp : MParser_Sig.Regexp
val match_regexp : 's state -> Regexp.t -> Regexp.substrings option
match_regexp s rex
matches the regular expression rex
against the input. It returns Some substrings
if the match succeeds, where substrings
contains the matched substrings. If the match fails or if the current position is already behind the last position of the input, it returns None
.
If the input is read from a (large) file, rex
is not necessarily matched against the complete remaining substring. The minimum number of characters that are guaranteed to be used for matching is specified when creating the input character stream. See the documentation of the MParser_Char_Stream
module for more information.
val make_regexp : string -> Regexp.t
Creates a regular expression from a string.
regexp rex
parses any string matching the regular expression rex
and returns it.
If the input is read from a (large) file, rex
is not necessarily matched against the complete remaining substring. The minimum number of characters that are guaranteed to be used for matching is specified when creating the input character stream. See the documentation of the MParser_Char_Stream
module for more information.
regexp_substrings rex
parses any string matching the regular expression rex
and returns an array containing all matched substrings.
If the input is read from a (large) file, rex
is not necessarily matched against the complete remaining substring. The minimum number of characters that are guaranteed to be used for matching is specified when creating the input character stream. See the documentation of the MParser_Char_Stream
module for more information.
module Tokens : sig ... end
Predefined token parsers.