1 (* Extract some simple integers.
2 * $Id: 06_ints1.ml,v 1.2 2008-04-25 11:08:43 rjones Exp $
5 let bits = Bitmatch.make_bitstring 16 '\xcf' (* makes the string 0xcfcf *)
9 | { n0 : 4; n1 : 4; n2 : 4; n3 : 4;
10 rest : -1 : bitstring } ->
16 let _, off, len = rest in
17 assert (off = 16 && len = 0) (* no further data *)
20 failwith "error: did not match\n"