The general form of [bitmatch] is:
- [bitmatch {] {i bitstring-expression} [} with]
+ [bitmatch] {i bitstring-expression} [with]
[| {] {i pattern} [} ->] {i code}
length expression in the field is a compile-time constant or a
computed expression.
- Detection of compile-time constants is quite simplistic so only an
+ Detection of compile-time constants is quite simplistic so only
simple integer literals and simple expressions (eg. [5*8]) are
recognized as constants.
{v
ocamlc -I +bitmatch \
- -pp "camlp4o `ocamlc -where`/bitmatch/pa_bitmatch.cmo" \
+ -pp "camlp4o bitmatch.cma bitmatch_persistent.cma \
+ `ocamlc -where`/bitmatch/pa_bitmatch.cmo" \
bitmatch.cma test.ml -o test
v}
let len = read_untrusted_source () in
let buffer = allocate_bitstring () in
BITSTRING {
- buffer : len : bitstring
+ buffer : len : bitstring
}
]}