1signature ParseDoc =
2sig
3
4  type substring = Substring.substring
5
6  datatype markup = PARA
7                  | TEXT of substring
8                  | BRKT of substring
9                  | EMPH of substring
10                  | XMPL of substring
11
12  datatype section = TYPE of substring
13                   | FIELD of string * markup list
14                   | SEEALSO of substring list
15
16  val parse_file : string -> section list
17  exception ParseError of string
18
19  val find_docfiles : string -> string Binaryset.set
20  val core_dname : string -> string
21
22end;
23
24(*
25
26  [parse_file fname] takes fname, the name of a Doc-file, and parses it
27  into a list of "sections", as per the datatypes above.
28
29  [find_docfiles dirname] scans the directory given by dirname, and
30  returns a set of all the .doc files.  The doc files are stored in
31  the set in an appropriate order, and stripped of their .doc suffix.
32
33  [core_dname docfilename] takes docfilename, which must have been
34  stripped of its .doc suffix and returns the "core" part of the name.
35  For names of the form "struct.value", the core part is value.  For
36  names of the form "value", the core part is simply value.  The latter
37  sort of name occurs when .doc entries describe whole structures (e.g.,
38  Absyn).
39
40
41*)
42