openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

cpp.php (6461B)


      1 <?php
      2 /*************************************************************************************
      3  * cpp.php
      4  * -------
      5  * Author: Dennis Bayer (Dennis.Bayer@mnifh-giessen.de)
      6  * Contributors:
      7  *  - M. Uli Kusterer (witness.of.teachtext@gmx.net)
      8  *  - Jack Lloyd (lloyd@randombit.net)
      9  * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter)
     10  * Release Version: 1.0.7.20
     11  * Date Started: 2004/09/27
     12  *
     13  * C++ language file for GeSHi.
     14  *
     15  * CHANGES
     16  * -------
     17  * 2004/XX/XX (1.0.2)
     18  *  -  Added several new keywords (Jack Lloyd)
     19  * 2004/11/27 (1.0.1)
     20  *  -  Added StdCLib function and constant names, changed color scheme to
     21  *     a cleaner one. (M. Uli Kusterer)
     22  *  -  Added support for multiple object splitters
     23  * 2004/10/27 (1.0.0)
     24  *  -  First Release
     25  *
     26  * TODO (updated 2004/11/27)
     27  * -------------------------
     28  *
     29  *************************************************************************************
     30  *
     31  *     This file is part of GeSHi.
     32  *
     33  *   GeSHi is free software; you can redistribute it and/or modify
     34  *   it under the terms of the GNU General Public License as published by
     35  *   the Free Software Foundation; either version 2 of the License, or
     36  *   (at your option) any later version.
     37  *
     38  *   GeSHi is distributed in the hope that it will be useful,
     39  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     40  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     41  *   GNU General Public License for more details.
     42  *
     43  *   You should have received a copy of the GNU General Public License
     44  *   along with GeSHi; if not, write to the Free Software
     45  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     46  *
     47  ************************************************************************************/
     48 
     49 $language_data = array (
     50 	'LANG_NAME' => 'C++',
     51 	'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
     52 	'COMMENT_MULTI' => array('/*' => '*/'),
     53 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     54 	'QUOTEMARKS' => array("'", '"'),
     55 	'ESCAPE_CHAR' => '\\',
     56 	'KEYWORDS' => array(
     57 		1 => array(
     58 			'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
     59 			'switch', 'while'
     60 			),
     61 		2 => array(
     62 			'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
     63 			'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
     64 			'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
     65 			'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
     66 			'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
     67 			'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
     68 			'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
     69 			'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
     70 			'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
     71 			'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
     72 			'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
     73 			'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
     74 			'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
     75 			'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
     76 			'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid', 'class'
     77 			),
     78 		3 => array(
     79 			'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
     80 			'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
     81 			'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
     82 			'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
     83 			'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
     84 			'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
     85 			'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
     86 			'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
     87 			'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
     88 			'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
     89 			'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
     90 			'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
     91 			'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
     92 			'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
     93 			'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
     94 			'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
     95 			'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
     96 			'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
     97 			'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
     98 			'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
     99 			),
    100 		4 => array(
    101 			'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
    102 			'register', 'short', 'shortint', 'signed', 'static', 'struct',
    103 			'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
    104 			'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
    105 			'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
    106 			),
    107 		),
    108 	'SYMBOLS' => array(
    109 		'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
    110 		),
    111 	'CASE_SENSITIVE' => array(
    112 		GESHI_COMMENTS => true,
    113 		1 => false,
    114 		2 => false,
    115 		3 => false,
    116 		4 => false,
    117 		),
    118 	'STYLES' => array(
    119 		'KEYWORDS' => array(
    120 			1 => 'color: #0000ff;',
    121 			2 => 'color: #0000ff;',
    122 			3 => 'color: #0000dd;',
    123 			4 => 'color: #0000ff;'
    124 			),
    125 		'COMMENTS' => array(
    126 			1 => 'color: #ff0000;',
    127 			2 => 'color: #339900;',
    128 			'MULTI' => 'color: #ff0000; font-style: italic;'
    129 			),
    130 		'ESCAPE_CHAR' => array(
    131 			0 => 'color: #666666; font-weight: bold;'
    132 			),
    133 		'BRACKETS' => array(
    134 			0 => 'color: #000000;'
    135 			),
    136 		'STRINGS' => array(
    137 			0 => 'color: #666666;'
    138 			),
    139 		'NUMBERS' => array(
    140 			0 => 'color: #0000dd;'
    141 			),
    142 		'METHODS' => array(
    143 			1 => 'color: #00eeff;',
    144 			2 => 'color: #00eeff;'
    145 			),
    146 		'SYMBOLS' => array(
    147 			0 => 'color: #000000;'
    148 			),
    149 		'REGEXPS' => array(
    150 			),
    151 		'SCRIPT' => array(
    152 			)
    153 		),
    154 	'URLS' => array(
    155 		),
    156 	'OOLANG' => true,
    157 	'OBJECT_SPLITTERS' => array(
    158 		1 => '.',
    159 		2 => '::'
    160 		),
    161 	'REGEXPS' => array(
    162 		),
    163 	'STRICT_MODE_APPLIES' => GESHI_NEVER,
    164 	'SCRIPT_DELIMITERS' => array(
    165 		),
    166 	'HIGHLIGHT_STRICT_BLOCK' => array(
    167         ),
    168     'TAB_WIDTH' => 4
    169 );
    170 
    171 ?>