aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/extract_index.mll
diff options
context:
space:
mode:
authorGravatar filliatr <filliatr@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-02-24 16:52:14 +0000
committerGravatar filliatr <filliatr@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-02-24 16:52:14 +0000
commit3ae01fb7081658f9c2efaa24f4a7f69925dd6e95 (patch)
treedc7732e22471a3dd4baf0335f96694a2a4350b24 /ide/extract_index.mll
parentedca82b2ff6721b69c49533c40aadf10e5987816 (diff)
aide contextuelle / menus compilation + print + export
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3698 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/extract_index.mll')
-rw-r--r--ide/extract_index.mll22
1 files changed, 22 insertions, 0 deletions
diff --git a/ide/extract_index.mll b/ide/extract_index.mll
new file mode 100644
index 000000000..1eb2c13d6
--- /dev/null
+++ b/ide/extract_index.mll
@@ -0,0 +1,22 @@
+
+{
+ open Lexing
+}
+
+(* additional lexer to extract URL from Coq manual's index *)
+
+rule entry = parse
+ | "<LI><TT>" [^ ',']* "</TT>, "
+ { let s = lexeme lexbuf in
+ let n = String.length s in
+ String.sub s 8 (n - 15), extract_index_url lexbuf }
+ | "<LI>" [^ ',']* ", "
+ { let s = lexeme lexbuf in
+ let n = String.length s in
+ String.sub s 4 (n - 6), extract_index_url lexbuf }
+
+and extract_index_url = parse
+ | "<A HREF=\"" [^ '"']* '"'
+ { let s = lexeme lexbuf in
+ let n = String.length s in
+ String.sub s 9 (n - 10) }