12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879(** Symbolic construction of emacs regexps.
[(describe-function 'rx)]
N.B. These bindings are incomplete only due to laziness (in the technical sense). *)open!Coreopen!ImportmoduleChar_class=structtypet=|Chars_inofstring(** [Chars_in s] matches characters in [s] (e.g., "[:digit:]" matches ':') *)|Rangeofchar*char(** [Range (c1, c2)] matches characters between [c1] and [c2] inclusive. *)[@@derivingsexp_of]endmoduleStart_or_end=structtypet=|End|Start[@@derivingsexp_of]endmoduleT=structtypet=|Any_char|Any_inofChar_class.tlist|Exactlyofstring(** [Exactly s] matches exactly the string [s] (e.g., '.' only matches '.') *)|LineofStart_or_end.t|None_inofChar_class.tlist|One_or_moreoft|Oroftlist|Patternofstring(** [Pattern s] interprets [s] as a regexp (e.g., '.' matches any character) *)|Point(** Matches zero characters, but only where the point is. *)|Repeatof{min:int;max:intoption;t:t}|Seqoftlist|Submatchoft(** Text matched by [Submatch] can be retrieved using [Regexp.Last_match.text_exn
~subexp:index].
[index] is the number of parentheses to the left of this submatch in the regexp
pattern. *)|Submatch_nof{index:int;t:t}(** Text matched by [Submatch_n] can be retrieved using [Regexp.Last_match.text_exn
~subexp:index].
[index] must be at least the number of parentheses left of this submatch in the
regexp pattern. If [index] is greater, it will shadow the submatch that would have
been assigned that index. If [index] is less, then it is an error to use the
resulting regexp. *)|Zero_or_moreoft|Zero_or_oneoft[@@derivingsexp_of]endmoduletypeRx=sigmoduleChar_class:moduletypeofstructincludeChar_classendmoduleStart_or_end:moduletypeofstructincludeStart_or_endendincludemoduletypeofTwithtypet=T.tvalpattern:t->stringend