summaryrefslogtreecommitdiff
path: root/contrib/extraction/test/make_mli
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/extraction/test/make_mli')
-rwxr-xr-xcontrib/extraction/test/make_mli17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/extraction/test/make_mli b/contrib/extraction/test/make_mli
new file mode 100755
index 00000000..40ee496e
--- /dev/null
+++ b/contrib/extraction/test/make_mli
@@ -0,0 +1,17 @@
+#!/usr/bin/awk -We $0
+
+{ match($0,"^open")
+ if (RLENGTH>0) state=1
+ match($0,"^type")
+ if (RLENGTH>0) state=1
+ match($0,"^\(\*\* ")
+ if (RLENGTH>0) state=2
+ match($0,"^let")
+ if (RLENGTH>0) state=0
+ match($0,"^and")
+ if ((RLENGTH>0) && (state==2)) state=0
+ if ((RLENGTH>0) && (state==1)) state=1
+ gsub("\(\*\* ","")
+ gsub("\*\*\)","")
+ if (state>0) print
+}