Documentation cleanups
authorRichard W.M. Jones <rich@annexia.org>
Fri, 13 Jun 2008 20:57:35 +0000 (20:57 +0000)
committerRichard W.M. Jones <rich@annexia.org>
Fri, 13 Jun 2008 20:57:35 +0000 (20:57 +0000)
bitmatch_persistent.mli

index ce6399d..d2057c6 100644 (file)
@@ -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: