When flen is a constant, use the constant integer value instead of flen expr.
[ocaml-bitstring.git] / TODO
1 $Id$
2 Major to-do items.
3
4 (1) DONE - In bitmatch operator, use patterns not expressions.
5
6 (2) DONE - Allow matching against strings.
7
8 (3) DONE - Change the syntax so { ... } surrounds match patterns.
9
10 (4) Provide UInt32 and UInt64 types.
11
12 (5) Allow for specific offsets and alignment.  Something like this:
13
14     { start : 16;
15       another : 16 : offset(256);   (* location would be 256 bits from start *)
16     }
17
18 (6) and:
19
20     { start : 16;
21       another : 16 : align(32);     (* implicit 16 bit gap before this *)
22     }
23
24 (7) Assertions:
25
26     { start : 16 : assert (offset = 0); }
27
28    (Q: Are these evaluated at compile time or at run time or selectable?)
29
30 (8) Named but unbound patterns to avoid "Warning Y: unused variable".
31
32 (9) DONE -
33     Make the error locations fine-grained, particularly so they point to
34     individual fields, not the whole match.
35
36 (10) Cross-module, persistent, named patterns, see:
37   http://caml.inria.fr/pub/ml-archives/caml-list/2008/04/25992c9c9fa999fe1d35d961dd9917a2.en.html
38
39 (11) Runtime endiannness expressions.  The suggested syntax is:
40
41     { field : len : endianness(expr) }
42
43     where expr would evaluate to something like `BigEndian or
44     `LittleEndian.
45
46     There are several protocols around where endianness is only
47     determined at runtime, examples are libpcap and TIFF.
48
49 (12) DONE - More constant field lengths.
50
51 (13) Implement native endian functions.
52
53 (14) A proper test suite.
54
55 (15) More examples:
56
57     ELF binaries
58     GIF images