author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 02 Dec 2009 23:45:47 +0200 | |
changeset 205 | 9460f6ad163d |
parent 195 | e905c8c27321 |
child 209 | 9047c4e41e02 |
permissions | -rw-r--r-- |
193 | 1 |
;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode |
2 |
(define-generic-mode iar-linker-config-mode |
|
3 |
'("// " ("/*" . "*/")) |
|
194
a00fe2a384f9
adds new match for highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
193
diff
changeset
|
4 |
'("section" "zeroinit" "code" "readwrite" "rw" "readonly" "ro") |
193 | 5 |
'( |
6 |
("\\(define +symbol\\) +\\([_a-zA-Z]+\\) *= *\\(0x[0-9a-fA-F]+\\);" |
|
7 |
(1 font-lock-keyword-face) |
|
8 |
(2 font-lock-variable-name-face) |
|
9 |
(3 font-lock-constant-face) ) |
|
10 |
("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;" |
|
11 |
(1 font-lock-keyword-face) |
|
12 |
(2 font-lock-variable-name-face) |
|
13 |
(3 font-lock-keyword-face) |
|
14 |
(4 font-lock-constant-face) ) |
|
194
a00fe2a384f9
adds new match for highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
193
diff
changeset
|
15 |
("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z]+\\) +\\(to\\|size\\) +\\([_a-zA-Z]+\\)\\];" |
193 | 16 |
(1 font-lock-keyword-face) |
17 |
(2 font-lock-variable-name-face) |
|
18 |
(3 font-lock-variable-name-face) |
|
19 |
(4 font-lock-keyword-face) |
|
20 |
(5 font-lock-variable-name-face) |
|
21 |
(6 font-lock-keyword-face) |
|
22 |
(7 font-lock-variable-name-face) ) |
|
23 |
("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;" |
|
24 |
(1 font-lock-keyword-face) |
|
25 |
(2 font-lock-variable-name-face) |
|
26 |
(3 font-lock-keyword-face) |
|
27 |
(4 font-lock-keyword-face) |
|
28 |
(5 font-lock-variable-name-face) ) |
|
29 |
("\\(do +not +initialize\\) *{" |
|
30 |
(1 font-lock-keyword-face) ) |
|
31 |
("\\(place +in\\) +\\([_a-zA-Z]+\\) *{" |
|
32 |
(1 font-lock-keyword-face) |
|
33 |
(2 font-lock-variable-name-face) ) |
|
34 |
("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{" |
|
35 |
(1 font-lock-keyword-face) |
|
36 |
(2 font-lock-variable-name-face) |
|
37 |
(3 font-lock-variable-name-face) ) |
|
194
a00fe2a384f9
adds new match for highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
193
diff
changeset
|
38 |
("\\(initialize by copy\\) *{" |
a00fe2a384f9
adds new match for highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
193
diff
changeset
|
39 |
(1 font-lock-keyword-face) ) |
193 | 40 |
) |
41 |
(list "\\.\\(icf\\)\\'") |
|
42 |
(list |
|
43 |
(lambda () (setq comment-start "/* " comment-end " */")) |
|
44 |
) |
|
45 |
"Generic mode for iar linker config files.") |