0
|
1 |
<?php
|
|
2 |
/*************************************************************************************
|
|
3 |
* smalltalk.php
|
|
4 |
* --------
|
|
5 |
* Author: Bananeweizen (Bananeweizen@gmx.de)
|
|
6 |
* Copyright: (c) 2005 Bananeweizen (www.bananeweizen.de)
|
|
7 |
* Release Version: 1.0.7.20
|
|
8 |
* 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 |
0 => ''
|
|
67 |
),
|
|
68 |
'BRACKETS' => array(
|
|
69 |
0 => ''
|
|
70 |
),
|
|
71 |
'STRINGS' => array(
|
|
72 |
0 => 'color: #7f0000;'
|
|
73 |
),
|
|
74 |
'NUMBERS' => array(
|
|
75 |
0 => 'color: #7f0000;'
|
|
76 |
),
|
|
77 |
'METHODS' => array(
|
|
78 |
0 => ''
|
|
79 |
),
|
|
80 |
'SYMBOLS' => array(
|
|
81 |
0 => 'color: #000066; font-weight:bold;'
|
|
82 |
),
|
|
83 |
'REGEXPS' => array(
|
|
84 |
0 => 'color: #0000ff;',
|
|
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 |
0 => ''
|
|
94 |
)
|
|
95 |
),
|
|
96 |
'URLS' => array(
|
|
97 |
),
|
|
98 |
'OOLANG' => false,
|
|
99 |
'OBJECT_SPLITTERS' => array(
|
|
100 |
),
|
|
101 |
'REGEXPS' => array(
|
|
102 |
0 => array(
|
|
103 |
GESHI_SEARCH => '([^a-zA-Z0-9_#])([A-Z]+[a-zA-Z0-9_]*)', //class names
|
|
104 |
GESHI_REPLACE => '\\2',
|
|
105 |
GESHI_MODIFIERS => '',
|
|
106 |
GESHI_BEFORE => '\\1',
|
|
107 |
GESHI_AFTER => ''
|
|
108 |
),
|
|
109 |
1 => array(
|
|
110 |
GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols
|
|
111 |
GESHI_REPLACE => '\\1\\2',
|
|
112 |
GESHI_MODIFIERS => '',
|
|
113 |
GESHI_BEFORE => '',
|
|
114 |
GESHI_AFTER => ''
|
|
115 |
),
|
|
116 |
2 => array(
|
|
117 |
GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols
|
|
118 |
GESHI_REPLACE => '\\1',
|
|
119 |
GESHI_MODIFIERS => '',
|
|
120 |
GESHI_BEFORE => '',
|
|
121 |
GESHI_AFTER => ''
|
|
122 |
),
|
|
123 |
3 => array(
|
|
124 |
GESHI_SEARCH => '\|([a-zA-Z0-9_\s]+)\|', //temporary variables
|
|
125 |
GESHI_REPLACE => '\\1',
|
|
126 |
GESHI_MODIFIERS => '',
|
|
127 |
GESHI_BEFORE => '|',
|
|
128 |
GESHI_AFTER => '|'
|
|
129 |
),
|
|
130 |
4 => array(
|
|
131 |
GESHI_SEARCH => '(self|super|true|false|nil)', //keywords again (to avoid matching in next regexp)
|
|
132 |
GESHI_REPLACE => '\\1',
|
|
133 |
GESHI_MODIFIERS => '',
|
|
134 |
GESHI_BEFORE => '',
|
|
135 |
GESHI_AFTER => ''
|
|
136 |
),
|
|
137 |
5 => array(
|
|
138 |
GESHI_SEARCH => '([:(,=[.*/+-]\s*)([a-zA-Z0-9_]+)', //message parameters, message receivers
|
|
139 |
GESHI_REPLACE => '\\2',
|
|
140 |
GESHI_MODIFIERS => 's',
|
|
141 |
GESHI_BEFORE => '\\1',
|
|
142 |
GESHI_AFTER => ''
|
|
143 |
),
|
|
144 |
6 => array(
|
|
145 |
GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets
|
|
146 |
GESHI_REPLACE => '\\1',
|
|
147 |
GESHI_MODIFIERS => '',
|
|
148 |
GESHI_BEFORE => '',
|
|
149 |
GESHI_AFTER => '\\2'
|
|
150 |
)
|
|
151 |
),
|
|
152 |
'STRICT_MODE_APPLIES' => GESHI_NEVER,
|
|
153 |
'SCRIPT_DELIMITERS' => array(
|
|
154 |
),
|
|
155 |
'HIGHLIGHT_STRICT_BLOCK' => array(
|
|
156 |
)
|
|
157 |
);
|
|
158 |
|
|
159 |
?>
|