2 (***********************************************************************)
5 (* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 2001 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
15 let print_DEBUG2 s = print_string s ; print_newline ()
17 (** the lexer for special comments. *)
22 let buf = Buffer.create 32
27 [' ' '\013' '\009' '\012'] +
29 print_DEBUG2 "[' ' '\013' '\009' '\012'] +";
35 print_DEBUG2 " [ '\010' ] ";
41 print_DEBUG2 "call url lexbuf" ;
47 print_DEBUG2 "call doc lexbuf" ;
54 print_DEBUG2 "call file lexbuf" ;
67 Buffer.add_string buf (Lexing.lexeme lexbuf);
74 let s = Lexing.lexeme lexbuf in
75 print_DEBUG2 ("([^'>'] | '\n')+ \">\" with "^s) ;
76 See_url (String.sub s 0 ((String.length s) -1))
81 | ([^'"'] | '\n' | "\\'")* "\""
83 let s = Lexing.lexeme lexbuf in
84 See_doc (String.sub s 0 ((String.length s) -1))
88 | ([^'\''] | '\n' | "\\\"")* "'"
90 let s = Lexing.lexeme lexbuf in
91 See_file (String.sub s 0 ((String.length s) -1))
97 { Desc (Buffer.contents buf) }
100 Buffer.add_string buf (Lexing.lexeme lexbuf);