2 /*************************************************************************************
4 * ---------------------------------
5 * Author: Reid van Melle (rvanmelle@gmail.com)
6 * Copyright: (c) 2004 Reid van Melle (sorry@nowhere)
7 * Release Version: 1.0.7.19
8 * Date Started: 2006/05/05
10 * TCL/iTCL language file for GeSHi.
12 * This was thrown together in about an hour so I don't expect
13 * really great things. However, it is a good start. I never
14 * got a change to try out the iTCL or object-based support but
15 * this is not widely used anyway.
22 * TODO (updated 2006/05/05)
23 * -------------------------
24 * - Get TCL built-in special variables hilighted with a new color..
25 * currently, these are listed in //special variables in the keywords
26 * section, but they get covered by the general REGEXP for symbols
27 * - General cleanup, testing, and verification
29 *************************************************************************************
31 * This file is part of GeSHi.
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.
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.
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
47 ************************************************************************************/
49 $language_data = array (
51 'COMMENT_SINGLE' => array(1 => '#'),
52 'COMMENT_MULTI' => array(),
53 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
54 'QUOTEMARKS' => array('"', "'"),
55 'ESCAPE_CHAR' => '\\',
59 ** Set 1: reserved words
60 ** http://python.org/doc/current/ref/keywords.html
63 'proc', 'global', 'upvar', 'if', 'then', 'else', 'elseif', 'for', 'foreach',
64 'break', 'continue', 'while', 'set', 'eval', 'case', 'in', 'switch',
65 'default', 'exit', 'error', 'proc', 'return', 'uplevel', 'loop',
66 'for_array_keys', 'for_recursive_glob', 'for_file', 'unwind_protect',
67 'expr', 'catch', 'namespace', 'rename', 'variable',
69 'method', 'itcl_class', 'public', 'protected'),
73 ** http://asps.activatestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tcl_2_contents.htm
77 'append', 'binary', 'format', 're_syntax', 'regexp', 'regsub',
78 'scan', 'string', 'subst',
80 'concat', 'join', 'lappend', 'lindex', 'list', 'llength', 'lrange',
81 'lreplace', 'lsearch', 'lset', 'lsort', 'split',
84 // procedures and output
85 'incr', 'close', 'eof', 'fblocked', 'fconfigure', 'fcopy', 'file',
86 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek',
88 // packages and source files
89 'load', 'loadTk', 'package', 'pgk::create', 'pgk_mkIndex', 'source',
90 // interpreter routines
91 'bgerror', 'history', 'info', 'interp', 'memory', 'unknown',
93 'enconding', 'http', 'msgcat',
95 'cd', 'clock', 'exec', 'exit', 'glob', 'pid', 'pwd', 'time',
97 'dde', 'registry', 'resource',
99 '$argc', '$argv', '$errorCode', '$errorInfo', '$argv0',
100 '$auto_index', '$auto_oldpath', '$auto_path', '$env',
101 '$tcl_interactive', '$tcl_libpath', '$tcl_library',
102 '$tcl_pkgPath', '$tcl_platform', '$tcl_precision', '$tcl_traceExec',
106 ** Set 3: standard library
109 'comment', 'dde', 'filename', 'http', 'library', 'memory',
110 'packagens', 'registry', 'resource', 'tcltest', 'tclvars',
114 ** Set 4: special methods
121 '(', ')', '[', ']', '{', '}', '$', '*', '&', '%', '!', ';', '<', '>', '?'
123 'CASE_SENSITIVE' => array(
124 GESHI_COMMENTS
=> true
,
132 1 => 'color: #ff7700;font-weight:bold;', // Reserved
133 2 => 'color: #008000;', // Built-ins + self
134 3 => 'color: #dc143c;', // Standard lib
135 4 => 'color: #0000cd;' // Special methods
138 1 => 'color: #808080; font-style: italic;',
139 'MULTI' => 'color: #808080; font-style: italic;'
141 'ESCAPE_CHAR' => array(
142 0 => 'color: #000099; font-weight: bold;'
148 0 => 'color: #483d8b;'
151 0 => 'color: #ff4500;'
157 0 => 'color: #66cc66;'
160 0 => 'color: #ff3333;'
168 'OBJECT_SPLITTERS' => array(
172 0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*',
174 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
175 'SCRIPT_DELIMITERS' => array(
177 'HIGHLIGHT_STRICT_BLOCK' => array(