[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
1 <?php 2 /************************************************************************************* 3 * bash.php 4 * -------- 5 * Author: Andreas Gohr (andi@splitbrain.org) 6 * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter) 7 * Release Version: 1.0.7.15 8 * CVS Revision Version: $Revision: 1.13.2.5 $ 9 * Date Started: 2004/08/20 10 * Last Modified: $Date: 2006/09/25 05:29:50 $ 11 * 12 * BASH language file for GeSHi. 13 * 14 * CHANGES 15 * ------- 16 * 2004/11/27 (1.0.2) 17 * - Added support for multiple object splitters 18 * 2004/10/27 (1.0.1) 19 * - Added support for URLs 20 * 2004/08/20 (1.0.0) 21 * - First Release 22 * 23 * TODO (updated 2004/11/27) 24 * ------------------------- 25 * * Get symbols working 26 * * Highlight builtin vars 27 * 28 ************************************************************************************* 29 * 30 * This file is part of GeSHi. 31 * 32 * GeSHi is free software; you can redistribute it and/or modify 33 * it under the terms of the GNU General Public License as published by 34 * the Free Software Foundation; either version 2 of the License, or 35 * (at your option) any later version. 36 * 37 * GeSHi is distributed in the hope that it will be useful, 38 * but WITHOUT ANY WARRANTY; without even the implied warranty of 39 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 40 * GNU General Public License for more details. 41 * 42 * You should have received a copy of the GNU General Public License 43 * along with GeSHi; if not, write to the Free Software 44 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 45 * 46 ************************************************************************************/ 47 48 $language_data = array ( 49 'LANG_NAME' => 'Bash', 50 // Bash DOES have single line comments with # markers. But bash also has 51 // the $# variable, so comments need special handling (see sf.net 52 // 1564839) 53 'COMMENT_SINGLE' => array(), 54 'COMMENT_MULTI' => array(), 55 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 56 'QUOTEMARKS' => array("'", '"'), 57 'ESCAPE_CHAR' => '\\', 58 'KEYWORDS' => array( 59 1 => array( 60 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function', 61 'if', 'in', 'select', 'then', 'until', 'while', 'time' 62 ), 63 3 => array( 64 'source', 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command', 65 'compgen', 'complete', 'continue', 'declare', 'typeset', 'dirs', 66 'disown', 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc', 67 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let', 68 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'read', 'readonly', 69 'return', 'set', 'shift', 'shopt', 'suspend', 'test', 'times', 'trap', 70 'type', 'ulimit', 'umask', 'unalias', 'unset', 'wait' 71 ) 72 ), 73 'SYMBOLS' => array( 74 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>' 75 ), 76 'CASE_SENSITIVE' => array( 77 GESHI_COMMENTS => false, 78 1 => true, 79 3 => true, 80 ), 81 'STYLES' => array( 82 'KEYWORDS' => array( 83 1 => 'color: #b1b100;', 84 3 => 'color: #000066;' 85 ), 86 'COMMENTS' => array( 87 1 => 'color: #808080; font-style: italic;', 88 ), 89 'ESCAPE_CHAR' => array( 90 0 => 'color: #000099; font-weight: bold;' 91 ), 92 'BRACKETS' => array( 93 0 => 'color: #66cc66;' 94 ), 95 'STRINGS' => array( 96 0 => 'color: #ff0000;' 97 ), 98 'NUMBERS' => array( 99 0 => 'color: #cc66cc;' 100 ), 101 'METHODS' => array( 102 ), 103 'SYMBOLS' => array( 104 0 => 'color: #66cc66;' 105 ), 106 'REGEXPS' => array( 107 0 => 'color: #0000ff;', 108 1 => 'color: #0000ff;', 109 2 => 'color: #0000ff;', 110 3 => 'color: #808080; font-style: italic;', 111 4 => 'color: #0000ff;' 112 ), 113 'SCRIPT' => array( 114 ) 115 ), 116 'URLS' => array( 117 1 => '', 118 3 => '' 119 ), 120 'OOLANG' => false, 121 'OBJECT_SPLITTERS' => array( 122 ), 123 'REGEXPS' => array( 124 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", 125 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", 126 2 => "([a-zA-Z_][a-zA-Z0-9_]*)=", 127 3 => "(?<!\\$)#.*\n", 128 4 => "\\$#" 129 ), 130 'STRICT_MODE_APPLIES' => GESHI_NEVER, 131 'SCRIPT_DELIMITERS' => array( 132 ), 133 'HIGHLIGHT_STRICT_BLOCK' => array( 134 ) 135 ); 136 137 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |