Variable: vhdl-font-lock-keywords-2
vhdl-font-lock-keywords-2 is a variable defined in vhdl-mode.el.gz.
Value
Large value
(("^\\s-*\\(architecture\\|configuration\\|context\\|entity\\|package\\(\\s-+body\\)?\\|\\(\\(impure\\|pure\\)\\s-+\\)?function\\|procedure\\|component\\)\\s-+\\(\\w+\\)"
5 font-lock-function-name-face)
("^\\s-*\\(architecture\\|configuration\\)\\s-+\\w+\\s-+of\\s-+\\(\\w+\\)"
2 font-lock-function-name-face)
("^\\s-*\\(\\w+\\)\\s-*:[ \n
\f]*\\(\\(assert\\|block\\|case\\|exit\\|for\\|if\\|loop\\|next\\|null\\|postponed\\|process\\|with\\|while\\)\\>\\|\\w+\\s-*\\(([^\n]*)\\|\\.\\w+\\)*\\s-*<=\\)"
1 font-lock-function-name-face)
("^\\s-*\\(\\w+\\)\\s-*:[ \n
\f]*\\(\\w+\\)[ \n
\f]*\\(--[^\n]*[ \n
\f]+\\)*\\(generic\\|port\\)\\s-+map\\>"
(1 font-lock-function-name-face) (2 font-lock-function-name-face))
("^\\s-*\\(\\w+\\)\\s-*:[ \n
\f]*\\(component\\|configuration\\|entity\\)\\s-+\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\(\\s-*(\\(\\w+\\))\\)?"
(1 font-lock-function-name-face) (3 font-lock-function-name-face)
(5 font-lock-function-name-face nil t)
(7 font-lock-function-name-face nil t))
("^\\s-*end\\s-+\\(\\(architecture\\|block\\|case\\|component\\|configuration\\|context\\|entity\\|for\\|function\\|generate\\|if\\|loop\\|package\\(\\s-+body\\)?\\|procedure\\|\\(postponed\\s-+\\)?process\\|units\\)\\s-+\\)?\\(\\w*\\)"
5 font-lock-function-name-face)
("^\\s-*\\(\\w+\\s-*:\\s-*\\)?\\(exit\\|next\\)\\s-+\\(\\w*\\)" 3
font-lock-function-name-face)
("^\\s-*attribute\\s-+\\w+\\s-+of\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\s-*:"
1 font-lock-function-name-face)
("^\\s-*for\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\>\\s-*\\(:[ \n
\f]*\\(\\w+\\)\\|[^i ]\\)"
(1 font-lock-function-name-face)
(4 font-lock-function-name-face nil t))
("^\\s-*library\\>"
(vhdl-font-lock-match-item nil nil (1 font-lock-function-name-face)))
("\\<\\(context\\|use\\)\\s-+\\(\\(entity\\|configuration\\)\\s-+\\)?\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\((\\(\\w+\\))\\)?"
(4 font-lock-function-name-face)
(6 font-lock-function-name-face nil t)
(8 font-lock-function-name-face nil t))
("^\\s-*attribute\\s-+\\(\\w+\\)" 1 vhdl-font-lock-attribute-face)
("^\\s-*\\(\\(sub\\)?\\(nature\\|type\\)\\|end\\s-+\\(record\\|protected\\)\\)\\s-+\\(\\w+\\)"
5 font-lock-type-face)
("\\(:[^=]\\)"
(vhdl-font-lock-match-item
(progn
(goto-char (match-beginning 1)) (skip-syntax-backward " ")
(skip-syntax-backward "w_") (skip-syntax-backward " ")
(while (= (preceding-char) 44)
(backward-char 1) (skip-syntax-backward " ")
(skip-syntax-backward "w_") (skip-syntax-backward " ")))
(goto-char (match-end 1)) (1 font-lock-variable-name-face)))
("\\(=>\\)"
(vhdl-font-lock-match-item
(progn
(goto-char (match-beginning 1)) (skip-syntax-backward " ")
(while (= (preceding-char) 41) (backward-sexp))
(skip-syntax-backward "w_") (skip-syntax-backward " ")
(when (memq (preceding-char) '(110 78 124))
(goto-char (point-max))))
(goto-char (match-end 1)) (1 font-lock-variable-name-face)))
("\\<\\(alias\\|for\\|group\\|quantity\\)\\s-+\\w+\\s-+\\(across\\|in\\|is\\)\\>"
(vhdl-font-lock-match-item
(progn (goto-char (match-end 1)) (match-beginning 2)) nil
(1 font-lock-variable-name-face)))
("^\\s-*\\(`\\w+\\)" 1 font-lock-preprocessor-face))
Documentation
For consideration as a value of vhdl-font-lock-keywords.
This does context sensitive highlighting of names and labels.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defconst vhdl-font-lock-keywords-2
(list
;; highlight names of units, subprograms, and components when declared
(list
(concat
"^\\s-*\\("
"architecture\\|configuration\\|context\\|entity\\|package"
"\\(\\s-+body\\)?\\|"
"\\(\\(impure\\|pure\\)\\s-+\\)?function\\|procedure\\|component"
"\\)\\s-+\\(\\w+\\)")
5 'font-lock-function-name-face)
;; highlight entity names of architectures and configurations
(list
"^\\s-*\\(architecture\\|configuration\\)\\s-+\\w+\\s-+of\\s-+\\(\\w+\\)"
2 'font-lock-function-name-face)
;; highlight labels of common constructs
(list
(concat
"^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\("
"assert\\|block\\|case\\|exit\\|for\\|if\\|loop\\|next\\|null\\|"
"postponed\\|process\\|"
(when (vhdl-standard-p 'ams) "procedural\\|")
"with\\|while"
"\\)\\>\\|\\w+\\s-*\\(([^\n]*)\\|\\.\\w+\\)*\\s-*<=\\)")
1 'font-lock-function-name-face)
;; highlight label and component name of component instantiations
(list
(concat
"^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\w+\\)[ \t\n\r\f]*"
"\\(--[^\n]*[ \t\n\r\f]+\\)*\\(generic\\|port\\)\\s-+map\\>")
'(1 font-lock-function-name-face) '(2 font-lock-function-name-face))
;; highlight label and instantiated unit of component instantiations
(list
(concat
"^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*"
"\\(component\\|configuration\\|entity\\)\\s-+"
"\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\(\\s-*(\\(\\w+\\))\\)?")
'(1 font-lock-function-name-face) '(3 font-lock-function-name-face)
'(5 font-lock-function-name-face nil t)
'(7 font-lock-function-name-face nil t))
;; highlight names and labels at end of constructs
(list
(concat
"^\\s-*end\\s-+\\(\\("
"architecture\\|block\\|case\\|component\\|configuration\\|context\\|"
"entity\\|for\\|function\\|generate\\|if\\|loop\\|package"
"\\(\\s-+body\\)?\\|procedure\\|\\(postponed\\s-+\\)?process\\|"
(when (vhdl-standard-p 'ams) "procedural\\|")
"units"
"\\)\\s-+\\)?\\(\\w*\\)")
5 'font-lock-function-name-face)
;; highlight labels in exit and next statements
(list
(concat
"^\\s-*\\(\\w+\\s-*:\\s-*\\)?\\(exit\\|next\\)\\s-+\\(\\w*\\)")
3 'font-lock-function-name-face)
;; highlight entity name in attribute specifications
(list
(concat
"^\\s-*attribute\\s-+\\w+\\s-+of\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\s-*:")
1 'font-lock-function-name-face)
;; highlight labels in block and component specifications
(list
(concat
"^\\s-*for\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\>\\s-*"
"\\(:[ \t\n\r\f]*\\(\\w+\\)\\|[^i \t]\\)")
'(1 font-lock-function-name-face) '(4 font-lock-function-name-face nil t))
;; highlight names in library clauses
(list "^\\s-*library\\>"
'(vhdl-font-lock-match-item nil nil (1 font-lock-function-name-face)))
;; highlight names in use clauses
(list
(concat
"\\<\\(context\\|use\\)\\s-+\\(\\(entity\\|configuration\\)\\s-+\\)?"
"\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\((\\(\\w+\\))\\)?")
'(4 font-lock-function-name-face) '(6 font-lock-function-name-face nil t)
'(8 font-lock-function-name-face nil t))
;; highlight attribute name in attribute declarations/specifications
(list
(concat
"^\\s-*attribute\\s-+\\(\\w+\\)")
1 'vhdl-font-lock-attribute-face)
;; highlight type/nature name in (sub)type/(sub)nature declarations
(list
(concat
"^\\s-*\\(\\(sub\\)?\\(nature\\|type\\)\\|end\\s-+\\(record\\|protected\\)\\)\\s-+\\(\\w+\\)")
5 'font-lock-type-face)
;; highlight signal/variable/constant declaration names
(list "\\(:[^=]\\)"
'(vhdl-font-lock-match-item
(progn (goto-char (match-beginning 1))
(skip-syntax-backward " ")
(skip-syntax-backward "w_")
(skip-syntax-backward " ")
(while (= (preceding-char) ?,)
(backward-char 1)
(skip-syntax-backward " ")
(skip-syntax-backward "w_")
(skip-syntax-backward " ")))
(goto-char (match-end 1)) (1 font-lock-variable-name-face)))
;; highlight formal parameters in component instantiations and subprogram
;; calls
(list "\\(=>\\)"
'(vhdl-font-lock-match-item
(progn (goto-char (match-beginning 1))
(skip-syntax-backward " ")
(while (= (preceding-char) ?\)) (backward-sexp))
(skip-syntax-backward "w_")
(skip-syntax-backward " ")
(when (memq (preceding-char) '(?n ?N ?|))
(goto-char (point-max))))
(goto-char (match-end 1)) (1 font-lock-variable-name-face)))
;; highlight alias/group/quantity declaration names and for-loop/-generate
;; variables
(list "\\<\\(alias\\|for\\|group\\|quantity\\)\\s-+\\w+\\s-+\\(across\\|in\\|is\\)\\>"
'(vhdl-font-lock-match-item
(progn (goto-char (match-end 1)) (match-beginning 2))
nil (1 font-lock-variable-name-face)))
;; highlight tool directives
(list
(concat
"^\\s-*\\(`\\w+\\)")
1 'font-lock-preprocessor-face)
)
"For consideration as a value of `vhdl-font-lock-keywords'.
This does context sensitive highlighting of names and labels.")