git.annexia.org
/
ocaml-bitstring.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e167b01
)
Documentation cleanups
author
Richard W.M. Jones
<rich@annexia.org>
Fri, 13 Jun 2008 20:57:35 +0000
(20:57 +0000)
committer
Richard W.M. Jones
<rich@annexia.org>
Fri, 13 Jun 2008 20:57:35 +0000
(20:57 +0000)
bitmatch_persistent.mli
patch
|
blob
|
history
diff --git
a/bitmatch_persistent.mli
b/bitmatch_persistent.mli
index
ce6399d
..
d2057c6
100644
(file)
--- a/
bitmatch_persistent.mli
+++ b/
bitmatch_persistent.mli
@@
-53,6
+53,19
@@
let is_pascal_string bits =
str strlen
v}
str strlen
v}
+ or:
+
+{v
+(* Load a persistent pattern from a file. *)
+open bitmatch "pascal.bmpp"
+
+let is_pascal_string bits =
+ bitmatch bits with
+ | \{ :pascal_string } ->
+ printf "matches a Pascal string %s, len %d bytes\n"
+ str strlen
+v}
+
{3 Important notes}
There are some important things you should know about
{3 Important notes}
There are some important things you should know about
@@
-99,7
+112,7
@@
v}
[bitmatch bits with { :name } -> ...]
[bitmatch bits with { :name } -> ...]
- You can
use named patterns within named patterns
.
+ You can
nest named patterns within named patterns to any depth
.
Currently the use of named patterns is somewhat limited.
The restrictions are:
Currently the use of named patterns is somewhat limited.
The restrictions are: