Correct highlighting in iar-linker-config-mode.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 04 Dec 2009 13:47:30 +0200
changeset 209 9047c4e41e02
parent 208 7f2831d8e9cb
child 210 b1404f54ec30
Correct highlighting in iar-linker-config-mode.
template-pre/iar-linker-config-mode.el
--- a/template-pre/iar-linker-config-mode.el	Thu Dec 03 21:40:56 2009 +0200
+++ b/template-pre/iar-linker-config-mode.el	Fri Dec 04 13:47:30 2009 +0200
@@ -1,9 +1,9 @@
 ;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode
 (define-generic-mode iar-linker-config-mode
   '("// " ("/*" . "*/"))
-  '("section" "zeroinit" "code" "readwrite" "rw" "readonly" "ro")
+  '("zeroinit" "code" "readwrite" "rw" "readonly" "ro")
   '(
-    ("\\(define +symbol\\) +\\([_a-zA-Z]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
+    ("\\(define +symbol\\) +\\([_a-zA-Z0-9]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
      (1 font-lock-keyword-face)
      (2 font-lock-variable-name-face)
      (3 font-lock-constant-face) )
@@ -12,14 +12,15 @@
      (2 font-lock-variable-name-face)
      (3 font-lock-keyword-face)
      (4 font-lock-constant-face) )
-    ("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z]+\\) +\\(to\\|size\\) +\\([_a-zA-Z]+\\)\\];"
+    ("\\(from\\) +\\([_a-zA-Z0-9]+\\) +\\(to\\|size\\) +\\([_a-zA-Z0-9]+\\)"
      (1 font-lock-keyword-face)
      (2 font-lock-variable-name-face)
-     (3 font-lock-variable-name-face)
-     (4 font-lock-keyword-face)
-     (5 font-lock-variable-name-face)
-     (6 font-lock-keyword-face)
-     (7 font-lock-variable-name-face) )
+     (3 font-lock-keyword-face)
+     (4 font-lock-variable-name-face) )
+    ("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[.*\\];"
+     (1 font-lock-keyword-face)
+     (2 font-lock-variable-name-face)
+     (3 font-lock-variable-name-face) )
     ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;"
      (1 font-lock-keyword-face)
      (2 font-lock-variable-name-face)
@@ -37,6 +38,9 @@
      (3 font-lock-variable-name-face) )
     ("\\(initialize by copy\\) *{"
      (1 font-lock-keyword-face) )
+    ("\\(block\\|section\\) +\\([_.a-zA-Z0-9]+\\)"
+     (1 font-lock-keyword-face)
+     (2 font-lock-variable-name-face) )
     )
   (list "\\.\\(icf\\)\\'")
   (list