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