Updating GeSHi to latest version, 1.0.7.6
[viewsvn.git] / includes / geshi / geshi / ocaml.php
1 <?php
2 /*************************************************************************************
3 * ocaml.php
4 * ----------
5 * Author: Flaie (fireflaie@gmail.com)
6 * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
7 * Release Version: 1.0.7.6
8 * CVS Revision Version: $Revision: 1.4 $
9 * Date Started: 2005/08/27
10 * Last Modified: $Date: 2005/11/20 07:47:40 $
11 *
12 * OCaml (Objective Caml) language file for GeSHi.
13 *
14 * CHANGES
15 * -------
16 * 2005/08/27 (1.0.0)
17 * - First Release
18 *
19 * TODO (updated 2005/08/27)
20 * -------------------------
21 *
22 *************************************************************************************
23 *
24 * This file is part of GeSHi.
25 *
26 * GeSHi is free software; you can redistribute it and/or modify
27 * it under the terms of the GNU General Public License as published by
28 * the Free Software Foundation; either version 2 of the License, or
29 * (at your option) any later version.
30 *
31 * GeSHi is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
35 *
36 * You should have received a copy of the GNU General Public License
37 * along with GeSHi; if not, write to the Free Software
38 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 *
40 ************************************************************************************/
41
42 $language_data = array (
43 'LANG_NAME' => 'OCaml',
44 'COMMENT_SINGLE' => array(),
45 'COMMENT_MULTI' => array('(*' => '*)'),
46 'CASE_KEYWORDS' => 0,
47 'QUOTEMARKS' => array('"'),
48 'ESCAPE_CHAR' => "",
49 'KEYWORDS' => array(
50 /* main OCaml keywords */
51 1 => array(
52 'and', 'As', 'asr', 'begin', 'Class', 'Closed', 'constraint', 'do', 'done', 'downto', 'else',
53 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor',
54 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor',
55 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser',
56 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then',
57 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with'
58 ),
59 /* define names of main librarys, so we can link to it */
60 2 => array(
61 'Arg', 'Arith_status', 'Array', 'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback',
62 'CamlinternalOO', 'Char', 'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event',
63 'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11', 'Hashtbl', 'Int32', 'Int64',
64 'Lazy', 'Lexing', 'List', 'ListLabels', 'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint',
65 'Num', 'Obj', 'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue', 'Random', 'Scanf',
66 'Set', 'Sort', 'Stack', 'StdLabels', 'Str', 'Stream', 'String', 'StringLabels', 'Sys', 'Thread',
67 'ThreadUnix', 'Tk'
68 ),
69 /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */
70 3 => array(
71 'raise', 'invalid_arg', 'failwith', 'compare', 'min', 'max', 'succ', 'pred', 'mod', 'abs',
72 'max_int', 'min_int', 'sqrt', 'exp', 'log', 'log10', 'cos', 'sin', 'tan', 'acos', 'asin',
73 'atan', 'atan2', 'cosh', 'sinh', 'tanh', 'ceil', 'floor', 'abs_float', 'mod_float', 'frexp',
74 'ldexp', 'modf', 'float', 'float_of_int', 'truncate', 'int_of_float', 'infinity', 'nan',
75 'max_float', 'min_float', 'epsilon_float', 'classify_float', 'int_of_char', 'char_of_int',
76 'ignore', 'string_of_bool', 'bool_of_string', 'string_of_int', 'int_of_string',
77 'string_of_float', 'float_of_string', 'fst', 'snd', 'stdin', 'stdout', 'stderr', 'print_char',
78 'print_string', 'print_int', 'print_float', 'print_endline', 'print_newline', 'prerr_char',
79 'prerr_string', 'prerr_int', 'prerr_float', 'prerr_endline', 'prerr_newline', 'read_line',
80 'read_int', 'read_float', 'open_out', 'open_out_bin', 'open_out_gen', 'flush', 'flush_all',
81 'output_char', 'output_string', 'output', 'output_byte', 'output_binary_int', 'output_value',
82 'seek_out', 'pos_out', 'out_channel_length', 'close_out', 'close_out_noerr', 'set_binary_mode_out',
83 'open_in', 'open_in_bin', 'open_in_gen', 'input_char', 'input_line', 'input', 'really_input',
84 'input_byte', 'input_binary_int', 'input_value', 'seek_in', 'pos_in', 'in_channel_length',
85 'close_in', 'close_in_noerr', 'set_binary_mode_in', 'incr', 'decr', 'string_of_format',
86 'format_of_string', 'exit', 'at_exit'
87 ),
88 /* here Pervasives Types */
89 4 => array (
90 'fpclass', 'in_channel', 'out_channel', 'open_flag', 'Sys_error', 'ref', 'format'
91 ),
92 /* finally Pervasives Exceptions */
93 5 => array (
94 'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero'
95 )
96 ),
97 /* highlighting symbols is really important in OCaml */
98 'SYMBOLS' => array(
99 ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+',
100 '>', '<', '(', ')', '[', ']', '&', '|', '#', "'"
101 ),
102 'CASE_SENSITIVE' => array(
103 GESHI_COMMENTS => true,
104 1 => false,
105 2 => true, /* functions name are case seinsitive */
106 3 => true, /* types name too */
107 4 => true /* finally exceptions too */
108 ),
109 'STYLES' => array(
110 'KEYWORDS' => array(
111 1 => 'color: #06c; font-weight: bold;' /* nice blue */
112 ),
113 'COMMENTS' => array(
114 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */
115 ),
116 'ESCAPE_CHAR' => array(
117 ),
118 'BRACKETS' => array(
119 0 => 'color: #6c6;'
120 ),
121 'STRINGS' => array(
122 0 => 'color: #3cb371;' /* nice green */
123 ),
124 'NUMBERS' => array(
125 0 => 'color: #c6c;' /* pink */
126 ),
127 'METHODS' => array(
128 1 => 'color: #060;' /* dark green */
129 ),
130 'REGEXPS' => array(
131 ),
132 'SYMBOLS' => array(
133 0 => 'color: #a52a2a;' /* maroon */
134 ),
135 'SCRIPT' => array(
136 )
137 ),
138 'URLS' => array(
139 /* some of keywords are Pervasives functions (land, lxor, asr, ...) */
140 1 => '',
141 /* link to the wanted library */
142 2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html',
143 /* link to Pervasives functions */
144 3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}',
145 /* link to Pervasives type */
146 4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}',
147 /* link to Pervasives exceptions */
148 5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}'
149 ),
150 'OOLANG' => true,
151 'OBJECT_SPLITTERS' => array(
152 1 => '.'
153 ),
154 'REGEXPS' => array(
155 ),
156 'STRICT_MODE_APPLIES' => GESHI_NEVER,
157 'SCRIPT_DELIMITERS' => array(
158 ),
159 'HIGHLIGHT_STRICT_BLOCK' => array(
160 )
161 );
162
163 ?>