~keith-hughitt/helioviewer.org/helioviewer-wiki

« back to all changes in this revision

Viewing changes to beautifierPackage/HFile/HFile_arm.php

  • Committer: Keith Hughitt
  • Date: 2010-10-18 16:47:20 UTC
  • Revision ID: keith.hughitt@nasa.gov-20101018164720-2x5u122q66dl12dk
BackupĀ 2010/10/18

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
global $BEAUT_PATH;
 
3
if (!isset ($BEAUT_PATH)) return;
 
4
require_once("$BEAUT_PATH/Beautifier/HFile.php");
 
5
  class HFile_arm extends HFile{
 
6
   function HFile_arm(){
 
7
     $this->HFile();    
 
8
/*************************************/
 
9
// Beautifier Highlighting Configuration File 
 
10
// ARM Assembler
 
11
/*************************************/
 
12
// Flags
 
13
 
 
14
$this->nocase                   = "0";
 
15
$this->notrim                   = "0";
 
16
$this->perl                     = "0";
 
17
 
 
18
// Colours
 
19
 
 
20
$this->colours          = array("gray", "blue", "purple", "gray", "brown", "blue", "purple", "brown");
 
21
$this->quotecolour              = "blue";
 
22
$this->blockcommentcolour       = "green";
 
23
$this->linecommentcolour        = "green";
 
24
 
 
25
// Indent Strings
 
26
 
 
27
$this->indent                   = array();
 
28
$this->unindent                 = array();
 
29
 
 
30
// String characters and delimiters
 
31
 
 
32
$this->stringchars              = array("\"");
 
33
$this->delimiters               = array("!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", "[", "\\", "]", "^", "_", "`", "{", "|", "}", "~", "     ");
 
34
$this->escchar                  = "";
 
35
 
 
36
// Comment settings
 
37
 
 
38
$this->linecommenton            = array(";");
 
39
$this->blockcommenton           = array("REM");
 
40
$this->blockcommentoff          = array("");
 
41
 
 
42
// Keywords (keyword mapping to colour number)
 
43
 
 
44
$this->keywords                 = array(
 
45
                        "**" => "7", 
 
46
                        "B" => "1", 
 
47
                        "b" => "1", 
 
48
                        "BL" => "1", 
 
49
                        "bl" => "1", 
 
50
                        "BX" => "1", 
 
51
                        "bx" => "1", 
 
52
                        "BLX" => "1", 
 
53
                        "blx" => "1", 
 
54
                        "AND" => "2", 
 
55
                        "and" => "2", 
 
56
                        "EOR" => "2", 
 
57
                        "eor" => "2", 
 
58
                        "SUB" => "2", 
 
59
                        "sub" => "2", 
 
60
                        "RSB" => "2", 
 
61
                        "rsb" => "2", 
 
62
                        "ADD" => "2", 
 
63
                        "add" => "2", 
 
64
                        "ADC" => "2", 
 
65
                        "adc" => "2", 
 
66
                        "SBC" => "2", 
 
67
                        "sbc" => "2", 
 
68
                        "RSC" => "2", 
 
69
                        "rsc" => "2", 
 
70
                        "TST" => "2", 
 
71
                        "tst" => "2", 
 
72
                        "TEQ" => "2", 
 
73
                        "teq" => "2", 
 
74
                        "CMP" => "2", 
 
75
                        "cmp" => "2", 
 
76
                        "CMN" => "2", 
 
77
                        "cmn" => "2", 
 
78
                        "ORR" => "2", 
 
79
                        "orr" => "2", 
 
80
                        "MOV" => "2", 
 
81
                        "mov" => "2", 
 
82
                        "BIC" => "2", 
 
83
                        "bic" => "2", 
 
84
                        "MVN" => "2", 
 
85
                        "mvn" => "2", 
 
86
                        "LSL" => "2", 
 
87
                        "lsl" => "2", 
 
88
                        "LSR" => "2", 
 
89
                        "lsr" => "2", 
 
90
                        "ASL" => "2", 
 
91
                        "asl" => "2", 
 
92
                        "ASR" => "2", 
 
93
                        "asr" => "2", 
 
94
                        "ROR" => "2", 
 
95
                        "ror" => "2", 
 
96
                        "RRX" => "2", 
 
97
                        "rrx" => "2", 
 
98
                        "NEG" => "2", 
 
99
                        "neg" => "2", 
 
100
                        "MUL" => "3", 
 
101
                        "mul" => "3", 
 
102
                        "MLA" => "3", 
 
103
                        "mla" => "3", 
 
104
                        "SMULL" => "3", 
 
105
                        "smull" => "3", 
 
106
                        "UMULL" => "3", 
 
107
                        "umull" => "3", 
 
108
                        "SMLAL" => "3", 
 
109
                        "smlal" => "3", 
 
110
                        "UMLAL" => "3", 
 
111
                        "umlal" => "3", 
 
112
                        "LDR" => "4", 
 
113
                        "ldr" => "4", 
 
114
                        "STR" => "4", 
 
115
                        "str" => "4", 
 
116
                        "LDM" => "4", 
 
117
                        "ldm" => "4", 
 
118
                        "STM" => "4", 
 
119
                        "stm" => "4", 
 
120
                        "SWP" => "4", 
 
121
                        "swp" => "4", 
 
122
                        "PUSH" => "7", 
 
123
                        "push" => "4", 
 
124
                        "POP" => "7", 
 
125
                        "pop" => "4", 
 
126
                        "SWI" => "5", 
 
127
                        "swi" => "5", 
 
128
                        "BKPT" => "5", 
 
129
                        "bkpt" => "5", 
 
130
                        "CLZ" => "6", 
 
131
                        "clz" => "6", 
 
132
                        "MRS" => "6", 
 
133
                        "mrs" => "6", 
 
134
                        "MSR" => "6", 
 
135
                        "msr" => "6", 
 
136
                        "CDP" => "6", 
 
137
                        "cdp" => "6", 
 
138
                        "MRC" => "6", 
 
139
                        "mrc" => "6", 
 
140
                        "MCR" => "6", 
 
141
                        "mcr" => "6", 
 
142
                        "LDC" => "6", 
 
143
                        "ldc" => "6", 
 
144
                        "STC" => "6", 
 
145
                        "stc" => "6", 
 
146
                        "OPT" => "7", 
 
147
                        "EXT" => "7", 
 
148
                        "EQU" => "7", 
 
149
                        "DC" => "7", 
 
150
                        "ALIGN" => "7", 
 
151
                        "ADR" => "7", 
 
152
                        "RN" => "7", 
 
153
                        "FN" => "7", 
 
154
                        "DIV" => "7", 
 
155
                        "SQR" => "7", 
 
156
                        "SWAP" => "7", 
 
157
                        "VDU" => "7", 
 
158
                        "NOP" => "7", 
 
159
                        "BRK" => "7", 
 
160
                        "SMUL" => "7", 
 
161
                        "UMUL" => "7", 
 
162
                        "SMLA" => "7", 
 
163
                        "UMLA" => "7", 
 
164
                        "LDF" => "7", 
 
165
                        "STF" => "7", 
 
166
                        "ASSERT" => "7", 
 
167
                        "FILL" => "7", 
 
168
                        "FILE" => "7", 
 
169
                        "COND" => "7", 
 
170
                        "HEAD" => "7", 
 
171
                        "ORG" => "7", 
 
172
                        "CN" => "7", 
 
173
                        "CP" => "7", 
 
174
                        "DN" => "7", 
 
175
                        "EXPORT" => "7", 
 
176
                        "GLOBAL" => "7", 
 
177
                        "EXTERN" => "7", 
 
178
                        "GBL" => "7", 
 
179
                        "IMPORT" => "7", 
 
180
                        "KEEP" => "7", 
 
181
                        "LCL" => "7", 
 
182
                        "RLIST" => "7", 
 
183
                        "SET" => "7", 
 
184
                        "SN" => "7", 
 
185
                        "DATA" => "7", 
 
186
                        "FIELD" => "7", 
 
187
                        "LTORG" => "7", 
 
188
                        "MAP" => "7", 
 
189
                        "SPACE" => "7", 
 
190
                        "ELSE" => "7", 
 
191
                        "ENDIF" => "7", 
 
192
                        "GET" => "7", 
 
193
                        "INCLUDE" => "7", 
 
194
                        "IF" => "7", 
 
195
                        "INCBIN" => "7", 
 
196
                        "MACRO" => "7", 
 
197
                        "MEND" => "7", 
 
198
                        "MEXIT" => "7", 
 
199
                        "WEND" => "7", 
 
200
                        "WHILE" => "7", 
 
201
                        "ENDFUNC" => "7", 
 
202
                        "ENDP" => "7", 
 
203
                        "FRAME" => "7", 
 
204
                        "ADDRESS" => "7", 
 
205
                        "REGISTER" => "7", 
 
206
                        "RESTORE" => "7", 
 
207
                        "SAVE" => "7", 
 
208
                        "STATE" => "7", 
 
209
                        "REMEMBER" => "7", 
 
210
                        "FUNCTION" => "7", 
 
211
                        "PROC" => "7", 
 
212
                        "AREA" => "7", 
 
213
                        "CODE16" => "7", 
 
214
                        "CODE32" => "7", 
 
215
                        "END" => "7", 
 
216
                        "ENTRY" => "7", 
 
217
                        "INFO" => "7", 
 
218
                        "NOFP" => "7", 
 
219
                        "REQUIRE" => "7", 
 
220
                        "ROUT" => "7", 
 
221
                        "SUBT" => "7", 
 
222
                        "TTL" => "7", 
 
223
                        "VFPASSERT" => "7", 
 
224
                        "SCALAR" => "7", 
 
225
                        "VECTOR" => "7", 
 
226
                        "FLD" => "7", 
 
227
                        "A1" => "8", 
 
228
                        "A2" => "8", 
 
229
                        "A3" => "8", 
 
230
                        "A4" => "8", 
 
231
                        "F0" => "8", 
 
232
                        "F1" => "8", 
 
233
                        "F2" => "8", 
 
234
                        "F3" => "8", 
 
235
                        "F4" => "8", 
 
236
                        "F5" => "8", 
 
237
                        "F6" => "8", 
 
238
                        "F7" => "8", 
 
239
                        "FP" => "8", 
 
240
                        "IP" => "8", 
 
241
                        "LR" => "8", 
 
242
                        "PC" => "8", 
 
243
                        "R0" => "8", 
 
244
                        "R1" => "8", 
 
245
                        "R10" => "8", 
 
246
                        "R11" => "8", 
 
247
                        "R12" => "8", 
 
248
                        "R13" => "8", 
 
249
                        "R14" => "8", 
 
250
                        "R15" => "8", 
 
251
                        "R2" => "8", 
 
252
                        "R3" => "8", 
 
253
                        "R4" => "8", 
 
254
                        "R5" => "8", 
 
255
                        "R6" => "8", 
 
256
                        "R7" => "8", 
 
257
                        "R8" => "8", 
 
258
                        "R9" => "8", 
 
259
                        "SL" => "8", 
 
260
                        "SP" => "8", 
 
261
                        "V1" => "8", 
 
262
                        "V2" => "8", 
 
263
                        "V3" => "8", 
 
264
                        "V4" => "8", 
 
265
                        "V5" => "8", 
 
266
                        "V6" => "8", 
 
267
                        "a1" => "8", 
 
268
                        "a2" => "8", 
 
269
                        "a3" => "8", 
 
270
                        "a4" => "8", 
 
271
                        "f0" => "8", 
 
272
                        "f1" => "8", 
 
273
                        "f2" => "8", 
 
274
                        "f3" => "8", 
 
275
                        "f4" => "8", 
 
276
                        "f5" => "8", 
 
277
                        "f6" => "8", 
 
278
                        "f7" => "8", 
 
279
                        "fp" => "8", 
 
280
                        "ip" => "8", 
 
281
                        "lr" => "8", 
 
282
                        "pc" => "8", 
 
283
                        "r0" => "8", 
 
284
                        "r1" => "8", 
 
285
                        "r10" => "8", 
 
286
                        "r11" => "8", 
 
287
                        "r12" => "8", 
 
288
                        "r13" => "8", 
 
289
                        "r14" => "8", 
 
290
                        "r15" => "8", 
 
291
                        "r2" => "8", 
 
292
                        "r3" => "8", 
 
293
                        "r4" => "8", 
 
294
                        "r5" => "8", 
 
295
                        "r6" => "8", 
 
296
                        "r7" => "8", 
 
297
                        "r8" => "8", 
 
298
                        "r9" => "8", 
 
299
                        "sl" => "8", 
 
300
                        "sp" => "8", 
 
301
                        "v1" => "8", 
 
302
                        "v2" => "8", 
 
303
                        "v3" => "8", 
 
304
                        "v4" => "8", 
 
305
                        "v5" => "8", 
 
306
                        "v6" => "8");
 
307
 
 
308
// Special extensions
 
309
 
 
310
// Each category can specify a PHP function that returns an altered
 
311
// version of the keyword.
 
312
        
 
313
        
 
314
 
 
315
$this->linkscripts      = array(
 
316
                        "7" => "donothing", 
 
317
                        "1" => "donothing", 
 
318
                        "2" => "donothing", 
 
319
                        "3" => "donothing", 
 
320
                        "4" => "donothing", 
 
321
                        "5" => "donothing", 
 
322
                        "6" => "donothing", 
 
323
                        "8" => "donothing");
 
324
}
 
325
 
 
326
 
 
327
function donothing($keywordin)
 
328
{
 
329
        return $keywordin;
 
330
}
 
331
 
 
332
}?>