193
|
1 |
;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode
|
|
2 |
(define-generic-mode iar-linker-config-mode
|
|
3 |
'("// " ("/*" . "*/"))
|
|
4 |
nil
|
|
5 |
;; '("define" "symbol" "region" "block" "memory" "place" "in" "at" "do" "not" "initialize" "with" "size" "from" "to")
|
|
6 |
'(
|
|
7 |
("\\(define +symbol\\) +\\([_a-zA-Z]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
|
|
8 |
(1 font-lock-keyword-face)
|
|
9 |
(2 font-lock-variable-name-face)
|
|
10 |
(3 font-lock-constant-face) )
|
|
11 |
("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;"
|
|
12 |
(1 font-lock-keyword-face)
|
|
13 |
(2 font-lock-variable-name-face)
|
|
14 |
(3 font-lock-keyword-face)
|
|
15 |
(4 font-lock-constant-face) )
|
|
16 |
("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z]+\\) +\\(to\\) +\\([_a-zA-Z]+\\)\\];"
|
|
17 |
(1 font-lock-keyword-face)
|
|
18 |
(2 font-lock-variable-name-face)
|
|
19 |
(3 font-lock-variable-name-face)
|
|
20 |
(4 font-lock-keyword-face)
|
|
21 |
(5 font-lock-variable-name-face)
|
|
22 |
(6 font-lock-keyword-face)
|
|
23 |
(7 font-lock-variable-name-face) )
|
|
24 |
("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;"
|
|
25 |
(1 font-lock-keyword-face)
|
|
26 |
(2 font-lock-variable-name-face)
|
|
27 |
(3 font-lock-keyword-face)
|
|
28 |
(4 font-lock-keyword-face)
|
|
29 |
(5 font-lock-variable-name-face) )
|
|
30 |
("\\(do +not +initialize\\) *{"
|
|
31 |
(1 font-lock-keyword-face) )
|
|
32 |
("\\(place +in\\) +\\([_a-zA-Z]+\\) *{"
|
|
33 |
(1 font-lock-keyword-face)
|
|
34 |
(2 font-lock-variable-name-face) )
|
|
35 |
("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{"
|
|
36 |
(1 font-lock-keyword-face)
|
|
37 |
(2 font-lock-variable-name-face)
|
|
38 |
(3 font-lock-variable-name-face) )
|
|
39 |
)
|
|
40 |
(list "\\.\\(icf\\)\\'")
|
|
41 |
(list
|
|
42 |
(lambda () (setq comment-start "/* " comment-end " */"))
|
|
43 |
)
|
|
44 |
"Generic mode for iar linker config files.")
|