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