|
1 ;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 4.x linker scripts |
|
2 |
|
3 ;; Copyright (C) 2009, 2010 by Oleksandr Gavenko <gavenkoa@gmail.com> |
|
4 |
|
5 ;; You can do anything with this file without any warranty. |
|
6 |
|
7 ;; Author: Oleksandr Gavenko <gavenkoa@gmail.com> |
|
8 ;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com> |
|
9 ;; Created: 2009-11-04 |
|
10 ;; Version: 0.1 |
|
11 ;; Keywords: languages |
|
12 |
|
13 ;;; Commentary: |
|
14 ;; |
|
15 ;; Very pure highlighting and not all available syntax. |
|
16 |
|
17 ;;; Code: |
|
18 |
|
19 ;;;###autoload |
|
20 (define-generic-mode iar4-linker-config-mode |
|
21 '("// " ("/*" . "*/")) |
|
22 nil |
|
23 '( |
|
24 ("^\\(-c\\)\\([_a-zA-Z]+\\)" |
|
25 (1 font-lock-keyword-face) |
|
26 (2 font-lock-variable-name-face) ) |
|
27 ("^\\(-D\\)\\([_a-zA-Z0-9]+\\)=\\(\\(0x\\)?[0-9a-fA-F]+\\|.[0-9]+\\)" |
|
28 (1 font-lock-keyword-face) |
|
29 (2 font-lock-variable-name-face) |
|
30 (3 font-lock-constant-face) ) |
|
31 ("^\\(-Q\\)\\([_a-zA-Z]+\\)=\\([_a-zA-Z]+\\)" |
|
32 (1 font-lock-keyword-face) |
|
33 (2 font-lock-variable-name-face) |
|
34 (3 font-lock-variable-name-face) ) |
|
35 ("^\\(-Z\\|-P\\|-b\\)(\\([_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 ("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)\\+\\([_a-zA-Z]+\\)=" |
|
40 (1 font-lock-keyword-face) |
|
41 (2 font-lock-variable-name-face) |
|
42 (3 font-lock-variable-name-face) |
|
43 (4 font-lock-variable-name-face) ) |
|
44 ) |
|
45 (list "\\.\\(xcl\\)\\'") |
|
46 (list |
|
47 (lambda () (setq comment-start "// " comment-end "")) |
|
48 ) |
|
49 "Generic mode for iar linker config files.") |
|
50 |
|
51 (provide 'iar4-linker-config-mode) |
|
52 |
|
53 ;;; iar4-linker-config-mode.el ends here |