author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 08 Nov 2011 11:47:48 +0200 | |
changeset 795 | 627ed33d9488 |
parent 318 | 6a430707c23e |
permissions | -rw-r--r-- |
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
1 |
;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 5.x linker scripts |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
2 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
3 |
;; Copyright (C) 2009, 2010 by Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
4 |
|
279
fd6164dfec82
Update copyright statement and year.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
274
diff
changeset
|
5 |
;; You can do anything with this file without any warranty. |
fd6164dfec82
Update copyright statement and year.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
274
diff
changeset
|
6 |
|
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
7 |
;; Author: Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
8 |
;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
9 |
;; Created: 2009-11-08 |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
10 |
;; Version: 0.1 |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
11 |
;; Keywords: languages |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
12 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
13 |
;;; Commentary: |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
14 |
;; |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
15 |
;; Very pure highlighting and not all available syntax. |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
16 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
17 |
;;; Code: |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
18 |
|
274
7c18567f0754
Added autoload magic comment for main mode function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
270
diff
changeset
|
19 |
;;;###autoload |
193 | 20 |
(define-generic-mode iar-linker-config-mode |
21 |
'("// " ("/*" . "*/")) |
|
209
9047c4e41e02
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
195
diff
changeset
|
22 |
'("zeroinit" "code" "readwrite" "rw" "readonly" "ro") |
193 | 23 |
'( |
209
9047c4e41e02
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
195
diff
changeset
|
24 |
("\\(define +symbol\\) +\\([_a-zA-Z0-9]+\\) *= *\\(0x[0-9a-fA-F]+\\);" |
193 | 25 |
(1 font-lock-keyword-face) |
26 |
(2 font-lock-variable-name-face) |
|
27 |
(3 font-lock-constant-face) ) |
|
28 |
("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;" |
|
29 |
(1 font-lock-keyword-face) |
|
30 |
(2 font-lock-variable-name-face) |
|
31 |
(3 font-lock-keyword-face) |
|
32 |
(4 font-lock-constant-face) ) |
|
212
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
33 |
("\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z0-9]+\\) +\\(to\\|size\\) +\\([_a-zA-Z0-9]+\\)\\]" |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
34 |
(1 font-lock-variable-name-face) |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
35 |
(2 font-lock-keyword-face) |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
36 |
(3 font-lock-variable-name-face) |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
37 |
(4 font-lock-keyword-face) |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
38 |
(5 font-lock-variable-name-face) ) |
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
39 |
("\\(define +region\\) +\\([_a-zA-Z]+\\) *=" |
193 | 40 |
(1 font-lock-keyword-face) |
212
4618907607b5
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
41 |
(2 font-lock-variable-name-face) ) |
193 | 42 |
("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;" |
43 |
(1 font-lock-keyword-face) |
|
44 |
(2 font-lock-variable-name-face) |
|
45 |
(3 font-lock-keyword-face) |
|
46 |
(4 font-lock-keyword-face) |
|
47 |
(5 font-lock-variable-name-face) ) |
|
48 |
("\\(do +not +initialize\\) *{" |
|
49 |
(1 font-lock-keyword-face) ) |
|
50 |
("\\(place +in\\) +\\([_a-zA-Z]+\\) *{" |
|
51 |
(1 font-lock-keyword-face) |
|
52 |
(2 font-lock-variable-name-face) ) |
|
53 |
("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{" |
|
54 |
(1 font-lock-keyword-face) |
|
55 |
(2 font-lock-variable-name-face) |
|
56 |
(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
|
57 |
("\\(initialize by copy\\) *{" |
a00fe2a384f9
adds new match for highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
193
diff
changeset
|
58 |
(1 font-lock-keyword-face) ) |
209
9047c4e41e02
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
195
diff
changeset
|
59 |
("\\(block\\|section\\) +\\([_.a-zA-Z0-9]+\\)" |
9047c4e41e02
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
195
diff
changeset
|
60 |
(1 font-lock-keyword-face) |
9047c4e41e02
Correct highlighting in iar-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
195
diff
changeset
|
61 |
(2 font-lock-variable-name-face) ) |
193 | 62 |
) |
63 |
(list "\\.\\(icf\\)\\'") |
|
64 |
(list |
|
65 |
(lambda () (setq comment-start "/* " comment-end " */")) |
|
66 |
) |
|
67 |
"Generic mode for iar linker config files.") |
|
258
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
68 |
|
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
69 |
(provide 'iar-linker-config-mode) |
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
70 |
|
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
212
diff
changeset
|
71 |
;;; iar-linker-config-mode.el ends here |