| Module | Function |
| Output | Low level printing functions, independent of the document type |
| Cross | Cross references in Caml files |
| Pretty | Pretty-print of code and documentation |
| Web | Production of the whole document, including the index |
| Doclexer | Lexer to separate code and doc parts in Caml files |
| Main | Main program |
& or $.
output_symbol pretty-prints the Caml symbols,
like ® for ->.
output_type_variable s pretty-prints type variables, in particular
one-letter type variables are output as greek letters.
output_ascii_char n outputs the character of ASCII code n./*...*/.
'!'; '|'; '"'; '+' ]$ if necessary, and switch that boolean.'%' then output_string "\\";'^' or c = '~' then leave_math();'\\' ® '$' | '#' | '%' | '&' | '{' | '}' | '_' ® '\\'; output_char c'^' | '~' ® '\\'; output_char c; output_string "{}"'<' | '>' ®'A'..'Z' | '\192'..'\214' | '\216'..'\222' ® Upper'a'..'z' |'\223'..'\246' | '\248'..'\255' | '_' ® Lower'A'..'Z' ® \\ocwlowerid used instead. *)'a to 'd are printed as Greek
letters for the same reason.'}''\\'; output_string l; output_string "{}"'x' | 'X' ® base "hex" 'o' | 'O' ® base "oct"'b' | 'B' ® base "bin"'e' with Not_found ® String.index s 'E' inocwbeginindex and
ocwendindex.
The auxiliary function print_list is a generic function to print a
list with a given printing function and a given separator.\ocwrefindexentry, which takes
three arguments: the name of the entry and the two lists of labels where
it is defined and used, respectively.' ' '\013' '\009' '\012' ] + yacc/reader.c:nextc(),read_grammar() from the ocaml 3.04 distribution.',''\010''A'--'Z' 'a'--'z'] ['A'--'Z' 'a'--'z' '\'' '_' '0'--'9'] *'{' '|' ';' ':' '%' '<''%' '{' 'a'--'z'] +'{' '}' '"' '\\'] "'" '\\' ['\\' '\'' 'n' 't' 'b' 'r'] "'" '\\' ['0'--'9'] ['0'--'9'] ['0'--'9'] "'" '\010''>' '\010''"' '\\' [' ' '\013' '\009' '\012'] * '\010' [' ' '\013' '\009' '\012'] *'\\' ['\\' '"' 'n' 't' 'b' 'r'] '\\' ['0'--'9'] ['0'--'9'] ['0'--'9'] '\010''"' '\\' '\''] "'"'\\' '\'' 'n' 't' 'b' 'r'] "'"'0'--'9'] ['0'--'9'] ['0'--'9'] "'"'\010''\010''A'..'Z' ® true | _ ® false'$' then String.set buf i ' ''\t' then' ' '\t']'a'--'z' '\223'--'\246' '\248'--'\255' '_']'A'--'Z' '\192'--'\214' '\216'--'\222']'A'--'Z' 'a'--'z' '_' '\192'--'\214' '\216'--'\246' '\248'--'\255' '\'' '0'--'9']'!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~']'\\' '\''] | '\\' ['\\' '\'' 'n' 't' 'b' 'r'] '\\' ['0'--'9'] ['0'--'9'] ['0'--'9'] ) "'"'0'--'9'] +'0' ['x' 'X'] ['0'--'9' 'A'--'F' 'a'--'f'] +'0' ['o' 'O'] ['0'--'7'] +'0' ['b' 'B'] ['0'--'1'] +'0'--'9'] + ('.' ['0'--'9']*)? (['e' 'E'] ['+' '-']? ['0'--'9'] +)?'\n' '~'; pr_camlcode_inside lexbuf
}'"' '.')* identifier'_' '*' '+' '-' '|''\n' '~'; pr_lexcode_inside lexbuf
}'"' {
output_bs (); pr_code_string lexbuf; pr_lexcode_inside lexbuf
}'\n' '~'; pr_yacccode_inside lexbuf
}'%'? identifier'"' '[' '[''$' '\n' space* '*' ' ''[' {
if !user_math_mode then '[''$' {
user_math(); pr_yacc_comment lexbuf
}'"' {
output_es ()
}'\n' {
end_line_string (); pr_code_string lexbuf
}' ' {
output_vspace (); pr_code_string lexbuf
}'\\' ['"' 't' 'b' 'r']'\\'; '\\' '\n''\\'; end_line_string ();'\\' '\\''\\'; output_escaped_char '\\'; '-' {
output_ascii_char 45; pr_code_string lexbuf
}'[' {
output_char '['; incr bracket_depth; escaped_code lexbuf
}']' {
decr bracket_depth; ']'; escaped_code lexbuf'"' {
output_bs (); pr_code_string lexbuf; escaped_code lexbuf
}'~'; escaped_code lexbuf
}'[' '[''$' '[' '[''.''\192'..'\198' ® 'A''\199' ® 'C''\200'..'\203' ® 'E''\204'..'\207' ® 'I''\209' ® 'N''\210'..'\214' | '\216' ® 'O''\217'..'\220' ® 'U''\221' ® 'Y'\ocwrefindexentry.
When we are in WEB style, we can do a bit better, replacing a list
like 1,2,3,4,7,8,10 by 1--4,7,8,10, as in usual LATEX indexes.
The following function intervals is used to group together the lists
of at least three consecutive integers.--header has been
selected by the user.
{..}, to know in lex files whether we are in an action or
not. lexyacc_brace_start records the position of the starting brace
of the current action, to display an error message if this brace is
unclosed.
' ' '\r' '\t']' ' '\t' '\r' '\n']'\\' '\''] | '\\' ['\\' '\'' 'n' 't' 'b' 'r'] '\\' ['0'--'9'] ['0'--'9'] ['0'--'9'] ) "'"'*']* '*' (([^ '*' ')'] [^ '*']* '*') | '*')* ')''\n''*'* "*)" space* '\n''\n''*'* "*)" space* '\n''\n''*'* "*/" space* '\n''*'* "*)" space* '\n'"(*". If the first character is 's', then a new section is
started. After calling that entry, the parbuf buffer contains the
doc read.
's' | 'S') space_or_nl*'S');'p' up_to_end_of_comment'i' 's' | 'S') space_or_nl*'S');'p' up_to_end_of_comment'i' '\n' " * "'\n'; in_documentation lexbuf
}'"' '"'; in_string lexbuf; in_documentation lexbuf
}'\n' " * "'\n'; in_yacc_documentation lexbuf
}'"' '"'; in_string lexbuf; in_yacc_documentation lexbuf
}'\n' space* '\n' '"' {
comment_or_string_start := lexeme_start lexbuf;'"'; in_string lexbuf; caml_subparagraph lexbuf
}'{' {
incr brace_depth;'{';'}' '}';'\n' space* '\n' '}' '}';'\n' space* '\n' '}' '}';'\n' space* '\n' '"' {
comment_or_string_start := lexeme_start lexbuf;'"'; in_string lexbuf; lex_subparagraph lexbuf
}'{' '{';'\n' space* '\n' '"' {
comment_or_string_start := lexeme_start lexbuf;'"'; in_string lexbuf; yacc_subparagraph lexbuf
}'{' '{';'<' '<';'>''>'
}'\n'? {
()
}'"' '"'
}'\\' ['\\' '"' 'n' 't' 'b' 'r'] --warranty.
.ml
and .mli and LATEX files have suffix .tex.
' ' | '\t' | '\n' ®-dvi, -ps or -html is invoked, then
we make calls to latex, dvips and/or hevea
accordingly.
This document was translated from LATEX by HEVEA.