From 3a36e2ecea95fef06b959a2a0d5a44589dd2d728 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 13 Jun 2008 20:57:35 +0000 Subject: [PATCH] Documentation cleanups --- bitmatch_persistent.mli | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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: -- 1.8.3.1