2-M.matcher
A class
for creating matcher objects from patterns. A matcher object has a mismatch
method that takes a character and produces a mismatch bitvector.
The pattern must have length less than or equal 63 so that all mismatches fit into the 63-bit bitvector.
A mismatch bitvector is an Int63.t
, with the least significant bit represeting the 0
-th bit, and the most significant bit representing the 63
-rd bit. It uses a 0
to in indicate a match and a 1
to indicate a mismatch. For a pattern p_0,...,p_n
and a character c
, the mismatch bitvector contains a 0
in the i-th bit if p_i = c
and 1
otherwise.
method mismatch : P.elem -> Optint.Int63.t