Module Mfat_bos.PatSource

Sourcetype t

The type for named string patterns.

Sourcetype defs

The type for pattern variable definitions.

Sourceval of_string : string -> (t, [> `Msg of string ]) result

of_string s parses s as a named string pattern.

Sourceval v : string -> t

v s is like of_string but raises Invalid_argument on error.

Sourceval to_string : t -> string

to_string p is the string representation of p.

Sourceval matches : t -> string -> bool

matches p s is true iff s matches pattern p.

Sourceval query : ?init:defs -> t -> string -> defs option

query ~init p s matches s against p and returns the variable bindings added to init.