ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_asmavr.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_asmavr extends HFile{
6  function HFile_asmavr(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // AVR assembler
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue");
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("");
40 $this->blockcommentoff = array("");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "add" => "1",
46  "adc" => "1",
47  "adiw" => "1",
48  "and" => "1",
49  "andi" => "1",
50  "cbr" => "1",
51  "clr" => "1",
52  "com" => "1",
53  "cp" => "1",
54  "cpc" => "1",
55  "cpi" => "1",
56  "dec" => "1",
57  "eor" => "1",
58  "fmul" => "1",
59  "fmuls" => "1",
60  "fmulsu" => "1",
61  "inc" => "1",
62  "mul" => "1",
63  "muls" => "1",
64  "mulsu" => "1",
65  "neg" => "1",
66  "or" => "1",
67  "ori" => "1",
68  "sub" => "1",
69  "subi" => "1",
70  "sbc" => "1",
71  "sbci" => "1",
72  "sbiw" => "1",
73  "sbr" => "1",
74  "ser" => "1",
75  "tst" => "1",
76  "brbs" => "2",
77  "brbc" => "2",
78  "breq" => "2",
79  "brne" => "2",
80  "brcs" => "2",
81  "brcc" => "2",
82  "brsh" => "2",
83  "brlo" => "2",
84  "brmi" => "2",
85  "brpl" => "2",
86  "brge" => "2",
87  "brlt" => "2",
88  "brhs" => "2",
89  "brhc" => "2",
90  "brts" => "2",
91  "brtc" => "2",
92  "brvs" => "2",
93  "brvc" => "2",
94  "brie" => "2",
95  "brid" => "2",
96  "call" => "2",
97  "cpse" => "2",
98  "eicall" => "2",
99  "eijmp" => "2",
100  "ijmp" => "2",
101  "icall" => "2",
102  "jmp" => "2",
103  "rjmp" => "2",
104  "rcall" => "2",
105  "ret" => "2",
106  "reti" => "2",
107  "sbrc" => "2",
108  "sbrs" => "2",
109  "sbic" => "2",
110  "sbis" => "2",
111  "elpm" => "3",
112  "espm" => "3",
113  "in" => "3",
114  "ldi" => "3",
115  "lds" => "3",
116  "ld" => "3",
117  "ldd" => "3",
118  "lpm" => "3",
119  "mov" => "3",
120  "movw" => "3",
121  "out" => "3",
122  "push" => "3",
123  "pop" => "3",
124  "st" => "3",
125  "sts" => "3",
126  "std" => "3",
127  "spm" => "3",
128  "x" => "3",
129  "x+" => "3",
130  "y" => "3",
131  "y+" => "3",
132  "y+q" => "3",
133  "z" => "3",
134  "z+" => "3",
135  "z+q" => "3",
136  "-x" => "3",
137  "-y" => "3",
138  "-z" => "3",
139  "asr" => "4",
140  "cbi" => "4",
141  "clc" => "4",
142  "cln" => "4",
143  "clz" => "4",
144  "cli" => "4",
145  "cls" => "4",
146  "clv" => "4",
147  "clt" => "4",
148  "clh" => "4",
149  "lsl" => "4",
150  "lsr" => "4",
151  "nop" => "4",
152  "ror" => "4",
153  "rol" => "4",
154  "sbi" => "4",
155  "sec" => "4",
156  "sen" => "4",
157  "sez" => "4",
158  "sei" => "4",
159  "ses" => "4",
160  "sev" => "4",
161  "set" => "4",
162  "seh" => "4",
163  "swap" => "4",
164  "sleep" => "4",
165  "bst" => "4",
166  "bld" => "4",
167  "bset" => "4",
168  "bclr" => "4",
169  "wdr" => "4",
170  ".org" => "5",
171  ".equ" => "5",
172  ".include" => "5",
173  ".macro" => "5",
174  ".endmacro" => "5",
175  ".set" => "5",
176  ".byte" => "5",
177  ".cseg" => "5",
178  ".db" => "5",
179  ".def" => "5",
180  ".device" => "5",
181  ".dseg" => "5",
182  ".dw" => "5",
183  ".eseg" => "5",
184  ".exit" => "5",
185  ".list" => "5",
186  ".nolist" => "5",
187  ".listmac" => "5");
188 
189 // Special extensions
190 
191 // Each category can specify a PHP function that returns an altered
192 // version of the keyword.
193 
194 
195 
196 $this->linkscripts = array(
197  "1" => "donothing",
198  "2" => "donothing",
199  "3" => "donothing",
200  "4" => "donothing",
201  "5" => "donothing");
202 }
203 
204 
205 function donothing($keywordin)
206 {
207  return $keywordin;
208 }
209 
210 }?>