template-pre/iar-linker-config-mode.el
changeset 209 9047c4e41e02
parent 195 e905c8c27321
child 212 4618907607b5
equal deleted inserted replaced
208:7f2831d8e9cb 209:9047c4e41e02
     1 ;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode
     1 ;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode
     2 (define-generic-mode iar-linker-config-mode
     2 (define-generic-mode iar-linker-config-mode
     3   '("// " ("/*" . "*/"))
     3   '("// " ("/*" . "*/"))
     4   '("section" "zeroinit" "code" "readwrite" "rw" "readonly" "ro")
     4   '("zeroinit" "code" "readwrite" "rw" "readonly" "ro")
     5   '(
     5   '(
     6     ("\\(define +symbol\\) +\\([_a-zA-Z]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
     6     ("\\(define +symbol\\) +\\([_a-zA-Z0-9]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
     7      (1 font-lock-keyword-face)
     7      (1 font-lock-keyword-face)
     8      (2 font-lock-variable-name-face)
     8      (2 font-lock-variable-name-face)
     9      (3 font-lock-constant-face) )
     9      (3 font-lock-constant-face) )
    10     ("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;"
    10     ("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;"
    11      (1 font-lock-keyword-face)
    11      (1 font-lock-keyword-face)
    12      (2 font-lock-variable-name-face)
    12      (2 font-lock-variable-name-face)
    13      (3 font-lock-keyword-face)
    13      (3 font-lock-keyword-face)
    14      (4 font-lock-constant-face) )
    14      (4 font-lock-constant-face) )
    15     ("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z]+\\) +\\(to\\|size\\) +\\([_a-zA-Z]+\\)\\];"
    15     ("\\(from\\) +\\([_a-zA-Z0-9]+\\) +\\(to\\|size\\) +\\([_a-zA-Z0-9]+\\)"
    16      (1 font-lock-keyword-face)
    16      (1 font-lock-keyword-face)
    17      (2 font-lock-variable-name-face)
    17      (2 font-lock-variable-name-face)
    18      (3 font-lock-variable-name-face)
    18      (3 font-lock-keyword-face)
    19      (4 font-lock-keyword-face)
    19      (4 font-lock-variable-name-face) )
    20      (5 font-lock-variable-name-face)
    20     ("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[.*\\];"
    21      (6 font-lock-keyword-face)
    21      (1 font-lock-keyword-face)
    22      (7 font-lock-variable-name-face) )
    22      (2 font-lock-variable-name-face)
       
    23      (3 font-lock-variable-name-face) )
    23     ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;"
    24     ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;"
    24      (1 font-lock-keyword-face)
    25      (1 font-lock-keyword-face)
    25      (2 font-lock-variable-name-face)
    26      (2 font-lock-variable-name-face)
    26      (3 font-lock-keyword-face)
    27      (3 font-lock-keyword-face)
    27      (4 font-lock-keyword-face)
    28      (4 font-lock-keyword-face)
    35      (1 font-lock-keyword-face)
    36      (1 font-lock-keyword-face)
    36      (2 font-lock-variable-name-face)
    37      (2 font-lock-variable-name-face)
    37      (3 font-lock-variable-name-face) )
    38      (3 font-lock-variable-name-face) )
    38     ("\\(initialize by copy\\) *{"
    39     ("\\(initialize by copy\\) *{"
    39      (1 font-lock-keyword-face) )
    40      (1 font-lock-keyword-face) )
       
    41     ("\\(block\\|section\\) +\\([_.a-zA-Z0-9]+\\)"
       
    42      (1 font-lock-keyword-face)
       
    43      (2 font-lock-variable-name-face) )
    40     )
    44     )
    41   (list "\\.\\(icf\\)\\'")
    45   (list "\\.\\(icf\\)\\'")
    42   (list
    46   (list
    43    (lambda () (setq comment-start "/* " comment-end " */"))
    47    (lambda () (setq comment-start "/* " comment-end " */"))
    44    )
    48    )