1 | 1 | simandl | <?php |
2 | | | /************************************************************************************* |
3 | | | * smalltalk.php |
4 | | | * -------- |
5 | | | * Author: Bananeweizen (Bananeweizen@gmx.de) |
6 | | | * Copyright: (c) 2005 Bananeweizen (www.bananeweizen.de) |
7 | 3 | simandl | * Release Version: 1.0.8.3 |
8 | 1 | simandl | * Date Started: 2005/03/27 |
9 | | | * |
10 | | | * Smalltalk language file for GeSHi. |
11 | | | * |
12 | | | * CHANGES |
13 | | | * ------- |
14 | | | * 2006-05-24 (1.0.0) |
15 | | | * - First Release |
16 | | | * |
17 | | | * TODO |
18 | | | * ------------------------- |
19 | | | * * recognize nested array symbols correctly |
20 | | | * |
21 | | | ************************************************************************************* |
22 | | | * |
23 | | | * This file is part of GeSHi. |
24 | | | * |
25 | | | * GeSHi is free software; you can redistribute it and/or modify |
26 | | | * it under the terms of the GNU General Public License as published by |
27 | | | * the Free Software Foundation; either version 2 of the License, or |
28 | | | * (at your option) any later version. |
29 | | | * |
30 | | | * GeSHi is distributed in the hope that it will be useful, |
31 | | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
32 | | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
33 | | | * GNU General Public License for more details. |
34 | | | * |
35 | | | * You should have received a copy of the GNU General Public License |
36 | | | * along with GeSHi; if not, write to the Free Software |
37 | | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
38 | | | * |
39 | | | ************************************************************************************/ |
40 | | | |
41 | | | $language_data = array ( |
42 | | | 'LANG_NAME' => 'Smalltalk', |
43 | | | 'COMMENT_SINGLE' => array(), |
44 | | | 'COMMENT_MULTI' => array('"' => '"'), |
45 | | | 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
46 | | | 'QUOTEMARKS' => array("'"), |
47 | | | 'ESCAPE_CHAR' => '', |
48 | | | 'KEYWORDS' => array( |
49 | | | 1 => array('self','super','true','false','nil') |
50 | | | ), |
51 | | | 'SYMBOLS' => array( |
52 | | | '[', ']', '=' , ':=', '(', ')', '#' |
53 | | | ), |
54 | | | 'CASE_SENSITIVE' => array( |
55 | | | GESHI_COMMENTS => false, |
56 | | | 1 => true |
57 | | | ), |
58 | | | 'STYLES' => array( |
59 | | | 'KEYWORDS' => array( |
60 | | | 1 => 'color: #7f007f;' |
61 | | | ), |
62 | | | 'COMMENTS' => array( |
63 | | | 'MULTI' => 'color: #007f00; font-style: italic;' |
64 | | | ), |
65 | | | 'ESCAPE_CHAR' => array( |
66 | | | |
67 | | | ), |
68 | | | 'BRACKETS' => array( |
69 | | | |
70 | | | ), |
71 | | | 'STRINGS' => array( |
72 | | | |
73 | | | ), |
74 | | | 'NUMBERS' => array( |
75 | | | |
76 | | | ), |
77 | | | 'METHODS' => array( |
78 | | | |
79 | | | ), |
80 | | | 'SYMBOLS' => array( |
81 | | | |
82 | | | ), |
83 | | | 'REGEXPS' => array( |
84 | | | |
85 | | | 1 => 'color: #7f0000;', |
86 | | | 2 => 'color: #7f0000;', |
87 | | | 3 => 'color: #00007f;', |
88 | | | 4 => 'color: #7f007f;', |
89 | | | 5 => 'color: #00007f;', |
90 | | | 6 => 'color: #00007f;' |
91 | | | ), |
92 | | | 'SCRIPT' => array( |
93 | | | |
94 | | | ) |
95 | | | ), |
96 | | | 'URLS' => array( |
97 | | | 1 => '' |
98 | | | ), |
99 | | | 'OOLANG' => false, |
100 | | | 'OBJECT_SPLITTERS' => array( |
101 | | | ), |
102 | | | 'REGEXPS' => array( |
103 | | | |
104 | | | GESHI_SEARCH => '([^a-zA-Z0-9_#<])([A-Z]+[a-zA-Z0-9_]*)(?!>)', //class names |
105 | | | GESHI_REPLACE => '\\2', |
106 | | | GESHI_MODIFIERS => '', |
107 | | | GESHI_BEFORE => '\\1', |
108 | | | GESHI_AFTER => '' |
109 | | | ), |
110 | | | 1 => array( |
111 | | | GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols |
112 | | | GESHI_REPLACE => '\\1\\2', |
113 | | | GESHI_MODIFIERS => '', |
114 | | | GESHI_BEFORE => '', |
115 | | | GESHI_AFTER => '' |
116 | | | ), |
117 | | | 2 => array( |
118 | | | GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols |
119 | | | GESHI_REPLACE => '\\1', |
120 | | | GESHI_MODIFIERS => '', |
121 | | | GESHI_BEFORE => '', |
122 | | | GESHI_AFTER => '' |
123 | | | ), |
124 | | | 3 => array( |
125 | | | GESHI_SEARCH => '<PIPE>([a-zA-Z0-9_\s]+)<PIPE>', //temporary variables |
126 | | | GESHI_REPLACE => '\\1', |
127 | | | GESHI_MODIFIERS => '', |
128 | | | GESHI_BEFORE => '|', |
129 | | | GESHI_AFTER => '|' |
130 | | | ), |
131 | | | 4 => array( |
132 | | | GESHI_SEARCH => '(self|super|true|false|nil)', //keywords again (to avoid matching in next regexp) |
133 | | | GESHI_REPLACE => '\\1', |
134 | | | GESHI_MODIFIERS => '', |
135 | | | GESHI_BEFORE => '', |
136 | | | GESHI_AFTER => '' |
137 | | | ), |
138 | | | 5 => array( |
139 | | | GESHI_SEARCH => '([:(,=[.*\/+-]\s*)([a-zA-Z0-9_]+)', //message parameters, message receivers |
140 | | | GESHI_REPLACE => '\\2', |
141 | | | GESHI_MODIFIERS => 's', |
142 | | | GESHI_BEFORE => '\\1', |
143 | | | GESHI_AFTER => '' |
144 | | | ), |
145 | | | 6 => array( |
146 | | | GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets |
147 | | | GESHI_REPLACE => '\\1', |
148 | | | GESHI_MODIFIERS => '', |
149 | | | GESHI_BEFORE => '', |
150 | | | GESHI_AFTER => '\\2' |
151 | | | ) |
152 | | | ), |
153 | | | 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
154 | | | 'SCRIPT_DELIMITERS' => array( |
155 | | | ), |
156 | | | 'HIGHLIGHT_STRICT_BLOCK' => array( |
157 | | | ) |
158 | | | ); |
159 | | | |
160 | | | ?> |