jablonka.czprosek.czf

websvn

Subversion Repositories:
[/] [lib/] [geshi/] [klonecpp.php] - Blame information for rev 2

 

Line No. Rev Author Line
11simandl<?php
2/*************************************************************************************
3 * klonecpp.php
4 * --------
5 * Author: AUGER Mickael
6 * Copyright: Synchronic
7 * Release Version: 1.0.8.1
8 * Date Started: 2008/04/16
9 *
10 * KLone with C++ language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2008/04/16 (1.0.8)
15 * - First Release
16 *
17 * TODO (updated 2008/04/16)
18 * -------------------------
19 * A tester et a completer si besoin
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' => 'KLone C++',
42 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C
43 'COMMENT_MULTI' => array('/*' => '*/', '<!--' => '-->' ),//comentaires C et KLone suivi de ceux pour HTML
44 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
45 'QUOTEMARKS' => array("'", '"'),
46 'ESCAPE_CHAR' => '\\',
47 'KEYWORDS' => array(
48 1 => array(//mots-cles C++
49 'if', 'return', 'while', 'case', 'continue', 'default',
50 'do', 'else', 'for', 'switch', 'goto',
51 'break', 'true', 'enum', 'extern', 'inline', 'false',
52 'errno', 'stdin', 'stdout', 'stderr',
53 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
54 'try', 'catch', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
55 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class',
56 'EDOM', 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
57 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
58 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
59 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
60 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
61 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
62 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
63 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
64 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
65 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX',
66 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC'
67 ),
68 2 => array(//mots-cles KLone
69 '&lt;%=', '&lt;%!', '&lt;%', '%&gt;', 'out', 'request', 'response',
70 ),
71 3 => array(//fonctions C++ usuelles
72 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
73 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
74 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
75 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
76 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
77 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
78 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
79 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
80 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
81 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
82 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
83 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
84 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
85 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
86 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
87 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
88 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
89 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
90 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
91 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
92 ),
93 4 => array(//fonctions KLone usuelles
94 'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg',
95 'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info',
96 'request_get_if_modified_since', 'request_get_http', 'request_get_client_request',
97 'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file',
98 'request_get_method', 'request_get_protocol', 'request_get_resolved_filename',
99 'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr',
100 'request_get_header', 'request_get_field', 'request_get_field_value',
101 'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching',
102 'response_set_cookie', 'response_set_method', 'response_get_method',
103 'response_print_header', 'response_set_field', 'response_del_field',
104 'response_set_content_type', 'response_set_date', 'response_set_last_modified',
105 'response_set_content_length', 'response_get_status', 'response_get_header',
106 'response_io', 'response_redirect', 'response_set_status',
107 'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del',
108 'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close',
109 'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc',
110 'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail',
111 'io_codecs_remove', 'io_name_set', 'io_name_get'
112 ),
113 5 => array(//types C++
114 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
115 'register', 'short', 'shortint', 'signed', 'static', 'struct',
116 'typedef', 'union', 'unsigned', 'void', 'volatile', 'jmp_buf',
117 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
118 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
119 'string', 'wchar_t'
120 ),
121 6 => array(//mots-cles HTML
122 'a', 'abbr', 'acronym', 'address', 'applet',
123 
124 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
125 
126 'caption', 'center', 'cite', 'code', 'colgroup', 'col',
127 
128 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
129 
130 'em',
131 
132 'fieldset', 'font', 'form', 'frame', 'frameset',
133 
134 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
135 
136 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
137 
138 'kbd',
139 
140 'label', 'legend', 'link', 'li',
141 
142 'map', 'meta',
143 
144 'noframes', 'noscript',
145 
146 'object', 'ol', 'optgroup', 'option',
147 
148 'param', 'pre', 'p',
149 
150 'q',
151 
152 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
153 
154 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
155 
156 'ul', 'u',
157 
158 'var',
159 ),
160 7 => array(//autres mots-cles HTML
161 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
162 'background', 'bgcolor', 'border',
163 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
164 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
165 'enctype',
166 'face', 'for', 'frame', 'frameborder',
167 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
168 'id', 'ismap',
169 'label', 'lang', 'language', 'link', 'longdesc',
170 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
171 'name', 'nohref', 'noresize', 'noshade', 'nowrap',
172 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
173 'profile', 'prompt',
174 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
175 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
176 'tabindex', 'target', 'text', 'title', 'type',
177 'usemap',
178 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
179 'width'
180 )
181 ),
182 'SYMBOLS' => array(
183 '(', ')', '[', ']', '{', '}',
184 '!', '%', '&', '|', '/',
185 '<', '>',
186 '=', '-', '+', '*',
187 '.', ':', ',', ';', '^'
188 ),
189 'CASE_SENSITIVE' => array(
190 GESHI_COMMENTS => false,
191 1 => false,
192 2 => false,
193 3 => false,
194 4 => false,
195 5 => false,
196 6 => false,
197 7 => false
198 ),
199 'STYLES' => array(
200 'KEYWORDS' => array(
201 1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C++
202 2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone
203 3 => 'color: #6600FF;',//pour les fonctions C++
204 4 => 'color: #6600FF;',//pour les fonctions Klone
205 5 => 'color: #0099FF; font-weight: bold;',//pour les types C++
206 6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML
207 7 => 'color: #000066;'//pour les autres mots-cles HTML
208 ),
209 'COMMENTS' => array(
210 1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C++ et KLone
211 2 => 'color: #339933;',//pour les #... en C++
212 'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C++ et KLone
213 ),
214 'ESCAPE_CHAR' => array(
215 
216 ),
217 'BRACKETS' => array(
218 
219 ),
220 'STRINGS' => array(
221 
222 ),
223 'NUMBERS' => array(
224 
225 ),
226 'METHODS' => array(
227 1 => 'color: #006600;',
228 2 => 'color: #006600;'
229 ),
230 'SYMBOLS' => array(
231 
232 ),
233 'REGEXPS' => array(),
234 'SCRIPT' => array(
235 
236 1 => '',
237 2 => '',
238 3 => 'color: #00bbdd; font-weight: bold;',
239 4 => 'color: #ddbb00;',
240 5 => 'color: #009900;'
241 )
242 ),
243 'URLS' => array(
244 1 => '',
245 2 => '',
246 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
247 4 => 'http://www.koanlogic.com/klone/api/html/globals.html',
248 5 => '',
249 6 => 'http://december.com/html/4/element/{FNAMEL}.html',
250 7 => ''
251 ),
252 'OOLANG' => true,
253 'OBJECT_SPLITTERS' => array(
254 1 => '.',
255 2 => '::'
256 ),
257 'REGEXPS' => array(
258 ),
259 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
260 'SCRIPT_DELIMITERS' => array(
261 //delimiteurs pour KLone
262 
263 '<%=' => '%>'
264 ),
265 1 => array(
266 '<%!' => '%>'
267 ),
268 2 => array(
269 '<%' => '%>'
270 ),
271 //delimiteur pour HTML
272 3 => array(
273 '<!DOCTYPE' => '>'
274 ),
275 4 => array(
276 '&' => ';'
277 ),
278 5 => array(
279 '<' => '>'
280 )
281 ),
282 'HIGHLIGHT_STRICT_BLOCK' => array(
283 
284 1 => true,
285 2 => true,
286 3 => false,
287 4 => false,
288 5 => true
289 ),
290 'TAB_WIDTH' => 4,
291 'PARSER_CONTROL' => array(
292 'KEYWORDS' => array(
293 6 => array(
294 'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
295 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
296 )
297 )
298 )
299);
300 
301?>

Powered by WebSVN 2.2.1