Variable: antlr-font-lock-additional-keywords
antlr-font-lock-additional-keywords is a variable defined in
antlr-mode.el.gz.
Value
Large value
((antlr-invalidate-context-cache)
("\\$setType[ ]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))"
(1 'antlr-tokendef))
("\\$\\sw+"
(0 'antlr-keyword))
(#[257 "\205\301\"\207"
[antlr-font-lock-literal-regexp antlr-re-search-forward]
4 "\n\n(fn LIMIT)"]
(1 'antlr-literal t))
(#[257 "\301\"\207"
[antlr-class-header-regexp antlr-re-search-forward]
4 "\n\n(fn LIMIT)"]
(1 'antlr-keyword)
(2 'antlr-ruledef)
(3 'antlr-keyword)
(4
(if
(member
(match-string 4)
'("Lexer" "Parser" "TreeParser"))
'antlr-keyword 'font-lock-type-face)))
(#[257 "\300\301\"\207"
[antlr-re-search-forward "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>"]
4 "\n\n(fn LIMIT)"]
(1 'antlr-keyword))
(#[257 "\300\301\"\207"
[antlr-re-search-forward "^\\(private\\|public\\|protected\\)\\>[ ]*\\(\\(\\sw+[ ]*\\(:\\)?\\)\\)?"]
4 "\n\n(fn LIMIT)"]
(1 'font-lock-type-face)
(3
(if
(antlr-upcase-p
(char-after
(match-beginning 3)))
'antlr-tokendef 'antlr-ruledef)
nil t)
(4 'antlr-syntax nil t))
(#[257 "\300\301\"\207"
[antlr-re-search-forward "^\\(\\sw+\\)[ ]*\\(:\\)?"]
4 "\n\n(fn LIMIT)"]
(1
(if
(antlr-upcase-p
(char-after
(match-beginning 0)))
'antlr-tokendef 'antlr-ruledef)
nil t)
(2 'antlr-syntax nil t))
(#[257 "\300\301\"\207"
[antlr-re-search-forward "\\(\\sw+\\)[ ]*\\([=:]\\)?"]
4 "\n\n(fn LIMIT)"]
(1
(if
(match-beginning 2)
(if
(eq
(char-after
(match-beginning 2))
61)
'antlr-default 'font-lock-variable-name-face)
(if
(antlr-upcase-p
(char-after
(match-beginning 1)))
'antlr-tokenref 'antlr-ruleref)))
(2 'antlr-default nil t))
(#[257 "\300\301\"\207"
[antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?"]
4 "\n\n(fn LIMIT)"]
(0 'antlr-syntax)))
Documentation
Font-lock keywords for ANTLR's normal grammar code.
See antlr-font-lock-keywords-alist for the keywords of actions.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/antlr-mode.el.gz
(defvar antlr-font-lock-additional-keywords
`((antlr-invalidate-context-cache)
("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))"
(1 'antlr-tokendef))
("\\$\\sw+" (0 'antlr-keyword))
;; the tokens are already fontified as string/docstrings:
(,(lambda (limit)
(if antlr-font-lock-literal-regexp
(antlr-re-search-forward antlr-font-lock-literal-regexp limit)))
(1 'antlr-literal t))
(,(lambda (limit)
(antlr-re-search-forward antlr-class-header-regexp limit))
(1 'antlr-keyword)
(2 'antlr-ruledef)
(3 'antlr-keyword)
(4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser"))
'antlr-keyword
'font-lock-type-face)))
(,(lambda (limit)
(antlr-re-search-forward
"\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>"
limit))
(1 'antlr-keyword))
(,(lambda (limit)
(antlr-re-search-forward
"^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?"
limit))
(1 'font-lock-type-face) ; not XEmacs's java level-3 fruit salad
(3 (if (antlr-upcase-p (char-after (match-beginning 3)))
'antlr-tokendef
'antlr-ruledef)
nil t)
(4 'antlr-syntax nil t))
(,(lambda (limit)
(antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit))
(1 (if (antlr-upcase-p (char-after (match-beginning 0)))
'antlr-tokendef
'antlr-ruledef)
nil t)
(2 'antlr-syntax nil t))
(,(lambda (limit)
;; v:ruleref and v:"literal" is allowed...
(antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit))
(1 (if (match-beginning 2)
(if (eq (char-after (match-beginning 2)) ?=)
'antlr-default
'font-lock-variable-name-face)
(if (antlr-upcase-p (char-after (match-beginning 1)))
'antlr-tokenref
'antlr-ruleref)))
(2 'antlr-default nil t))
(,(lambda (limit)
(antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit))
(0 'antlr-syntax)))
"Font-lock keywords for ANTLR's normal grammar code.
See `antlr-font-lock-keywords-alist' for the keywords of actions.")