From: Richard W.M. Jones Date: Fri, 13 Jun 2008 20:57:35 +0000 (+0000) Subject: Documentation cleanups X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=3a36e2ecea95fef06b959a2a0d5a44589dd2d728;p=ocaml-bitstring.git Documentation cleanups --- diff --git a/bitmatch_persistent.mli b/bitmatch_persistent.mli index ce6399d..d2057c6 100644 --- a/bitmatch_persistent.mli +++ b/bitmatch_persistent.mli @@ -53,6 +53,19 @@ let is_pascal_string bits = 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 @@ -99,7 +112,7 @@ v} [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: