![]() |
Home | Libraries | People | FAQ | More |
The following elements can occur in a script:
term [regular-expression1 [regular-expression2 [category]]]
The term to index: this will form a primary entry in the Index with the section title(s) containing the term as secondary entries, and also will be used as a secondary entry beneath each of the section titles that the term occurs in.
An optional regular expression: each occurance of the regular expression in the text of the document will result in one index term being emitted.
If the regular expression is omitted or is "", then the term itself will be used as the search text - and only occurance of whole words matching term will be indexed.
A constraint that specifies which sections are indexed for term: only if the ID of the section matches regular-expression2 exactly will that section be indexed for occurances of term.
For example:
myclass ""
"mylib.examples.*"
Will index occurances of "myclass" as a whole word only in sections whose ID begins "mylib.examples", while:
myclass ""
"(?!mylib.introduction.*).*"
will index occurances of "myclass" in any section, except those whose ID's begin "mylib.introduction".
Optionally an index category to place occurances of term in. If you have multiple indexes then this is the name assigned to the indexes "type" attribute.
!scan source-file-name
Scans the C/C++ source file source-file-name for definitions of function's, class's, macro's or typedef's and makes each of these a term to be indexed. Terms found are assigned to the index category "function_name", "class_name", "macro_name" or "typedef_name" depending on how they were seen in the source file. These may then be included in a specialised index whose "type" attribute has the same category name.
!scan-path directory-name file-name-regex [recurse]
The directory to scan: this should be a path relative to the script file and should use all forward slashes in it's file name.
A regular expression: any file in the directory whose name matches the regular expression will be scanned for terms to index.
An optional boolian value - either "true" or "false" - that indicates whether to recurse into subdirectories.
!exclude term-list
Excludes all the terms in whitespace separated term-list from being indexed. This should be placed after any !scan or !scan-path rules which may result in the terms becoming included.
!rewrite-id regular-expression new-name
A regular expression: all section ID's that match the expression exactly will have index entries new-name instead of their title(s).
The name that the section will appear under in the index.
!rewrite-name regular-expression format-text
A regular expression: all sections whose titles match the regular expression exactly, will have index entries composed of the regular expression match combined with the regex format string format-text.
The Perl-style format string used to reformat the title.