[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 * urbi.php 4 * ------- 5 * Author: Alexandre Morgand (morgand.alexandre@gmail.com) 6 * Copyright: (c) 2011 Morgand (http://gostai.com) 7 * Release Version: 1.0.9.1 8 * Date Started: 2011/09/10 9 * 10 * Urbi language file for GeSHi. 11 * 12 * CHANGES 13 * ------- 14 * ------------------------- 15 * 16 ************************************************************************************* 17 * 18 * This file is part of GeSHi. 19 * 20 * GeSHi is free software; you can redistribute it and/or modify 21 * it under the terms of the GNU General Public License as published by 22 * the Free Software Foundation; either version 2 of the License, or 23 * (at your option) any later version. 24 * 25 * GeSHi is distributed in the hope that it will be useful, 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 * GNU General Public License for more details. 29 * 30 * You should have received a copy of the GNU General Public License 31 * along with GeSHi; if not, write to the Free Software 32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 33 * 34 ************************************************************************************/ 35 36 $language_data = array ( 37 'LANG_NAME' => 'Urbi', 38 'COMMENT_SINGLE' => array(1 => '//'), 39 'COMMENT_MULTI' => array('/*' => '*/'), 40 'COMMENT_REGEXP' => array( 41 //Multiline-continued single-line comments 42 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', 43 //Multiline-continued preprocessor define 44 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m', 45 // Urbi warning. 46 3 => "#\[[0-9a-f]{8}:warning\].*#", 47 // Urbi message from echo. 48 4 => '#\[[0-9a-f]{8}\] \*\*\*.*#', 49 // Urbi error message. 50 6 => '#\[[0-9a-f]{8}:error\].*#', 51 // Urbi system message. 52 5 => '#\[00.*\].*#', 53 // Nested comment. Max depth 4. 54 7 => '#\/\*(.|\n)*\/\*(.|\n)*\*\/(.|\n)*\*\/#', 55 ), 56 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 57 'QUOTEMARKS' => array( 58 0 => '"', 59 1 => '\'', 60 ), 61 // For Urbi, disable escape char is better. 62 'ESCAPE_CHAR' => '\\', 63 'ESCAPE_REGEXP' => array( 64 //Simple Single Char Escapes 65 1 => "#\\\\[abfnrtv\\\'\"?\n]#", 66 //Hexadecimal Char Specs 67 2 => "#\\\\x[\da-fA-F]{2}#", 68 //Hexadecimal Char Specs 69 3 => "#\\\\u[\da-fA-F]{4}#", 70 //Hexadecimal Char Specs 71 4 => "#\\\\U[\da-fA-F]{8}#", 72 //Octal Char Specs 73 5 => "#\\\\[0-7]{1,3}#", 74 ), 75 'NUMBERS' => 76 GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | 77 GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | 78 GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, 79 'KEYWORDS' => array( 80 // Condition keywords. 81 1 => array( 82 'at', 'at;', 'at|', 'at&', 'at,', 'break', 'call', 'case', 'catch', 'continue', 83 'do', 'else', 'every', 'every&', 'every,', 'every;', 'every|', 'for', 'for&', 84 'for,', 'for;', 'foreach', 'for|', 'freezeif', 'goto', 'if', 'in', 'loop', 85 'loop&', 'loop,', 'loop;', 'loop|', 'or_eq', 'stopif', 'switch', 'try', 86 'waituntil', 'when', 'whenever', 'while', 'while&', 'while,', 'while;', 87 'while|', 'throw', 'onleave', 'watch', 'return', 'and_eq', 'default', 'finally', 88 'timeout', 'xor_eq' 89 ), 90 // Type. 91 2 => array( 92 'virtual', 'using', 'namespace', 'inline', 'protected', 'private', 'public', 93 'typename', 'typeid', 'class', 'const_cast', 'dynamic_cast', 'friend', 94 'template', 'enum', 'static_cast', 'reinterpret_cast', 'mutable', 'explicit' 95 ), 96 // Standard function. 97 3 => array( 98 'this', 'sizeof', 'delete', 'assert', 'isdef', 'compl', 'detach', 99 'disown', '__HERE__', 'asm' 100 ), 101 // Type. 102 4 => array( 103 'char', 'const', 'double', 'int', 'long', 'typedef', 'union', 104 'unsigned', 'var', 'short', 'wchar_t', 'volatile', 'signed', 'bool', 105 'float', 'struct', 'auto', 'register', 'static', 'extern', 'function', 106 'export', 'external', 'internal', 'closure', 'BIN' 107 ), 108 ), 109 'SYMBOLS' => array( 110 0 => array('(', ')', '{', '}', '[', ']'), 111 1 => array('<', '>','=', '!=', '==', '==='), 112 2 => array('+', '-', '*', '/', '%', 'bitand', 'bitor', 'xor'), 113 3 => array('!', '^', '&', '|'), 114 4 => array('?', ':', ';') 115 ), 116 'CASE_SENSITIVE' => array( 117 GESHI_COMMENTS => false, 118 1 => true, 119 2 => true, 120 3 => true, 121 4 => true, 122 ), 123 'STYLES' => array( 124 'KEYWORDS' => array( 125 1 => 'color: #0000ff;', 126 2 => 'color: #0000ff;', 127 3 => 'color: #0000dd;', 128 4 => 'color: #0000ff;' 129 ), 130 'COMMENTS' => array( 131 1 => 'color: #666666;', 132 2 => 'color: #339900;', 133 3 => 'color: #d46b0f;', 134 4 => 'color: #20b537;', 135 5 => 'color: #73776f;', 136 6 => 'color: #a71616;', 137 7 => 'color: #666666;', 138 'MULTI' => 'color: #666666; font-style: italic;' 139 ), 140 'ESCAPE_CHAR' => array( 141 0 => 'color: #ff0000;', 142 1 => 'color: #ff0000;', 143 ), 144 'BRACKETS' => array( 145 0 => 'color: #7a0874; font-weight: bold;' 146 ), 147 'STRINGS' => array( 148 0 => 'color: #ff0000;', 149 1 => 'color: #007788;' 150 ), 151 'NUMBERS' => array( 152 0 => 'color: #0000dd;' 153 ), 154 'METHODS' => array( 155 1 => 'color: #007788;', 156 2 => 'color: #007788;' 157 ), 158 'SYMBOLS' => array( 159 0 => 'color: #008000;', 160 1 => 'color: #0000f8;', 161 2 => 'color: #000040;', 162 3 => 'color: #000040; font-weight: bold;', 163 4 => 'color: #008080;' 164 ), 165 'REGEXPS' => array( 166 0 => 'color: #0000dd', 167 1 => 'color: #0000dd;', 168 2 => 'color: #0000dd;', 169 3 => 'color: #0000dd;', 170 ), 171 'SCRIPT' => array( 172 ) 173 ), 174 'URLS' => array( 175 1 => '', 176 2 => '', 177 3 => '', 178 4 => '' 179 ), 180 'OOLANG' => true, 181 'OBJECT_SPLITTERS' => array( 182 1 => '.', 183 2 => '::', 184 // FIXME: add -> splitter. 185 ), 186 'REGEXPS' => array( 187 0 => '0x[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])*', 188 1 => '[0-9]([0-9_]*[0-9])*(e|E)(-|\+)?[0-9]([0-9_]*[0-9])*', 189 2 => '[0-9]([0-9_]*[0-9])*(min|s|ms|h|d)', 190 3 => '[0-9]+_([0-9_])*[0-9]', 191 ), 192 'STRICT_MODE_APPLIES' => GESHI_NEVER, 193 'SCRIPT_DELIMITERS' => array( 194 ), 195 'HIGHLIGHT_STRICT_BLOCK' => array( 196 ), 197 'TAB_WIDTH' => 4, 198 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body