ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ocaml.php
Go to the documentation of this file.
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.9.0
8  * Date Started: 2005/08/27
9  *
10  * OCaml (Objective Caml) language file for GeSHi.
11  *
12  * CHANGES
13  * -------
14  * 2008/03/29 (1.0.7.22)
15  * - Fixed warnings resulting from missing style information
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  'COMMENT_REGEXP' => array(1 => '/\(\*(?:(?R)|.)+?\*\)/s'),
47  'CASE_KEYWORDS' => 0,
48  'QUOTEMARKS' => array('"'),
49  'ESCAPE_CHAR' => "",
50  'KEYWORDS' => array(
51  /* main OCaml keywords */
52  1 => array(
53  'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else',
54  'end', 'exception', 'external', 'failwith', 'false', 'for', 'fun', 'function', 'functor',
55  'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor',
56  'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser',
57  'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then',
58  'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with'
59  ),
60  /* define names of main librarys, so we can link to it */
61  2 => array(
62  'Arg', 'Arith_status', 'Array', //'Array1', 'Array2', 'Array3',
63  'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback',
64  'CamlinternalLazy', 'CamlinternalMod', 'CamlinternalOO', 'Char',
65  'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event',
66  'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11',
67  'Hashtbl', 'Int32', 'Int64', 'Lazy', 'Lexing', 'List', 'ListLabels',
68  'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint', 'Num', 'Obj',
69  'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue',
70  'Random', 'Scanf', 'Set', 'Sort', 'Stack', 'StdLabels', 'Str',
71  'Stream', 'String', 'StringLabels', 'Sys', 'Thread', 'ThreadUnix',
72  'Tk', 'Unix', 'UnixLabels', 'Weak'
73  ),
74  /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */
75  3 => array(
76  'abs', 'abs_float', 'acos', 'asin', 'at_exit', 'atan', 'atan2',
77  'bool_of_string', 'ceil', 'char_of_int', 'classify_float',
78  'close_in', 'close_in_noerr', 'close_out', 'close_out_noerr',
79  'compare', 'cos', 'cosh', 'decr', 'epsilon_float', 'exit', 'exp',
80  'float', 'float_of_int', 'float_of_string', 'floor', 'flush',
81  'flush_all', 'format_of_string', 'frexp', 'fst', 'ignore',
82  'in_channel_length', 'infinity', 'input', 'input_binary_int',
83  'input_byte', 'input_char', 'input_line', 'input_value',
84  'int_of_char', 'int_of_float', 'int_of_string', 'invalid_arg',
85  'ldexp', 'log', 'log10', 'max', 'max_float', 'max_int', 'min',
86  'min_float', 'min_int', 'mod_float', 'modf', 'nan', 'open_in',
87  'open_in_bin', 'open_in_gen', 'open_out', 'open_out_bin',
88  'open_out_gen', 'out_channel_length', 'output', 'output_binary_int',
89  'output_byte', 'output_char', 'output_string', 'output_value',
90  'pos_in', 'pos_out', 'pred', 'prerr_char', 'prerr_endline',
91  'prerr_float', 'prerr_int', 'prerr_newline', 'prerr_string',
92  'print_char', 'print_endline', 'print_float', 'print_int',
93  'print_newline', 'print_string', 'read_float', 'read_int',
94  'read_line', 'really_input', 'seek_in', 'seek_out',
95  'set_binary_mode_in', 'set_binary_mode_out', 'sin', 'sinh', 'snd',
96  'sqrt', 'string_of_bool', 'string_of_float', 'string_of_format',
97  'string_of_int', 'succ', 'tan', 'tanh', 'truncate'
98  ),
99  /* here Pervasives Types */
100  4 => array (
101  'array','bool','char','exn','file_descr','format','fpclass',
102  'in_channel','int','int32','int64','list','nativeint','open_flag',
103  'out_channel','string','Sys_error','unit'
104  ),
105  /* finally Pervasives Exceptions */
106  5 => array (
107  'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero'
108  )
109  ),
110  /* highlighting symbols is really important in OCaml */
111  'SYMBOLS' => array(
112  '+.', '-.', '*.', '/.', '[<', '>]',
113  ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+',
114  '>', '<', '(', ')', '[', ']', '&', '|', '#', "'",
115  ),
116  'CASE_SENSITIVE' => array(
117  GESHI_COMMENTS => false,
118  1 => false,
119  2 => true, /* functions name are case sensitive */
120  3 => true, /* types name too */
121  4 => true, /* pervasives types */
122  5 => true /* pervasives exceptions */
123  ),
124  'STYLES' => array(
125  'KEYWORDS' => array(
126  1 => 'color: #06c; font-weight: bold;', /* nice blue */
127  2 => 'color: #06c; font-weight: bold;', /* nice blue */
128  3 => 'color: #06c; font-weight: bold;', /* nice blue */
129  4 => 'color: #06c; font-weight: bold;', /* nice blue */
130  5 => 'color: #06c; font-weight: bold;' /* nice blue */
131  ),
132  'COMMENTS' => array(
133  'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */
134  1 => 'color: #5d478b; font-style: italic;' /* light purple */
135  ),
136  'ESCAPE_CHAR' => array(
137  ),
138  'BRACKETS' => array(
139  0 => 'color: #a52a2a;'
140  ),
141  'STRINGS' => array(
142  0 => 'color: #3cb371;' /* nice green */
143  ),
144  'NUMBERS' => array(
145  0 => 'color: #c6c;' /* pink */
146  ),
147  'METHODS' => array(
148  1 => 'color: #060;' /* dark green */
149  ),
150  'REGEXPS' => array(
151  1 => 'font-weight:bold; color:#339933;',
152  2 => 'font-weight:bold; color:#993399;'
153  ),
154  'SYMBOLS' => array(
155  0 => 'color: #a52a2a;' /* maroon */
156  ),
157  'SCRIPT' => array(
158  )
159  ),
160  'URLS' => array(
161  /* some of keywords are Pervasives functions (land, lxor, asr, ...) */
162  1 => '',
163  /* link to the wanted library */
164  2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html',
165  /* link to Pervasives functions */
166  3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}',
167  /* link to Pervasives type */
168  4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}',
169  /* link to Pervasives exceptions */
170  5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}'
171  ),
172  'OOLANG' => false,
173  'OBJECT_SPLITTERS' => array(
174  1 => '.'
175  ),
176  'REGEXPS' => array(
177  1 => '~\w+',
178  2 => '`(?=(?-i:[a-z]))\w*',
179  ),
180  'STRICT_MODE_APPLIES' => GESHI_NEVER,
181  'SCRIPT_DELIMITERS' => array(
182  ),
183  'HIGHLIGHT_STRICT_BLOCK' => array(
184  )
185 );
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:149
const GESHI_NEVER
#+ private
Definition: geshi.php:123
$language_data
Definition: ocaml.php:42