Variable: awk-font-lock-keywords
awk-font-lock-keywords is a variable defined in cc-awk.el.gz.
Value
Large value
((#[257
"\303\304!\210`W\203\305\306\303#\203\307\224b\210\304!\204\307\225b\210\310 \311\312\"\216\313\314\224\314\225\315 $)\266\310 \311\316\"\216\317\224\203I\313\317\224\317\225\315\n$\210)\210\310 \311\320\"\216\321\224\203z\321\224Tb\210\321\225S`W\203y\322\323\303#\203y\313`\324Z`\315\325$\210\202_\210)\210\202)\326\207"
[parse-sexp-lookup-properties font-lock-keyword-face
font-lock-function-name-face t
c-skip-comments-and-strings
re-search-forward
"^\\s *\\(func\\(tion\\)?\\)\\s +\\(\\(\\sw+\\(::\\sw+\\)?\\)\\s *\\)?\\(([^()]*)\\)?"
0 match-data make-closure
#[0 "\301\300\302\"\207"
[V0 set-match-data t] 3]
put-text-property 1 face
#[0 "\301\300\302\"\207"
[V0 set-match-data t] 3]
4
#[0 "\301\300\302\"\207"
[V0 set-match-data t] 3]
6 c-syntactic-re-search-forward "::"
2 font-lock-warning-face nil]
8 "\n\n(fn LIMIT)"])
("\\<\\(ARG\\(?:IND\\|[CV]\\)\\|BINMODE\\|CONVFMT\\|E\\(?:NVIRON\\|RRNO\\)\\|F\\(?:I\\(?:ELDWIDTHS\\|LENAME\\)\\|NR\\|PAT\\|S\\|UNCTAB\\)\\|IGNORECASE\\|LINT\\|N[FR]\\|O\\(?:F\\(?:MT\\|S\\)\\|RS\\)\\|PR\\(?:EC\\|OCINFO\\)\\|R\\(?:LENGTH\\|OUNDMODE\\|START\\|[ST]\\)\\|S\\(?:UBSEP\\|YMTAB\\)\\|TEXTDOMAIN\\)\\>"
. font-lock-variable-name-face)
("\\(\"/dev/\\(fd/[0-9]+\\|p\\(\\(\\(gr\\)?p\\)?id\\)\\|std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\\(\\(\"\\)\\|\\([^\"/\n
][^\"\n
]*\\)?$\\)"
(1 font-lock-variable-name-face t)
(8 font-lock-variable-name-face t t))
("\\(\"/inet/\\(\\(raw\\|\\(tc\\|ud\\)p\\)/lport/rhost/rport\\)\\)\\>\\(\\(\"\\)\\|\\([^\"/\n
][^\"\n
]*\\)?$\\)"
(1 font-lock-variable-name-face t)
(6 font-lock-variable-name-face t t))
"\\<\\(BEGIN\\(?:FILE\\)?\\|END\\(?:FILE\\)?\\|break\\|c\\(?:\\(?:as\\|ontinu\\)e\\)\\|d\\(?:e\\(?:fault\\|lete\\)\\|o\\)\\|e\\(?:lse\\|xit\\)\\|for\\|getline\\|i[fn]\\|next\\(?:file\\)?\\|return\\|switch\\|while\\)\\>"
(eval list
"\\<\\(a\\(?:dump\\|nd\\|sorti?\\|tan2\\)\\|bindtextdomain\\|c\\(?:lose\\|o\\(?:mpl\\|s\\)\\)\\|dc\\(?:n?gettext\\)\\|ex\\(?:p\\|tension\\)\\|fflush\\|g\\(?:\\(?:en\\)?sub\\)\\|i\\(?:n\\(?:dex\\|t\\)\\|sarray\\)\\|l\\(?:ength\\|og\\|shift\\)\\|m\\(?:atch\\|ktime\\)\\|or\\|p\\(?:atsplit\\|rintf?\\)\\|r\\(?:and\\|shift\\)\\|s\\(?:in\\|p\\(?:lit\\|rintf\\)\\|qrt\\|rand\\|t\\(?:opme\\|r\\(?:ftime\\|tonum\\)\\)\\|ub\\(?:str\\)?\\|yst\\(?:em\\|ime\\)\\)\\|t\\(?:o\\(?:\\(?:low\\|upp\\)er\\)\\|ypeof\\)\\|xor\\)\\>"
0 c-preprocessor-face-name)
(eval quote
("@\\(include\\|load\\|namespace\\)\\>" 0
font-lock-preprocessor-face))
("\\(\\w\\|_\\)\\(\\\\[\n
]\\)*\\s \\(\\\\[\n
]\\|[ ]\\)*("
(0 'font-lock-warning-face))
c-awk-font-lock-invalid-namespace-separators
("\\\\\\s +$" 0 font-lock-warning-face t)
("\\s|" 0 font-lock-warning-face t nil)
("\\(_\\)\\s|" 1 font-lock-warning-face)
("\\(_\\)\\s\"" 1 font-lock-string-face))
Documentation
Default expressions to highlight in AWK mode.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-awk.el.gz
;; Awk regexps written with help from Peter Galbraith
;; <galbraith@mixing.qc.dfo.ca>.
;; Take GNU Emacs's 'words out of the following regexp-opts. They don't work
;; in XEmacs 21.4.4. acm 2002/9/19.
(defconst awk-font-lock-keywords
(eval-when-compile
(list
;; Function declarations.
`(,(c-make-font-lock-search-function
"^\\s *\\(func\\(tion\\)?\\)\\s +\\(\\(\\sw+\\(::\\sw+\\)?\\)\\s *\\)?\\(([^()]*)\\)?"
'(1 font-lock-keyword-face t)
;; We can't use LAXMATCH in `c-make-font-lock-search-function', so....
'((when (match-beginning 4)
(c-put-font-lock-face
(match-beginning 4) (match-end 4) font-lock-function-name-face)
nil))
;; Put warning face on any use of :: inside the parens.
'((when (match-beginning 6)
(goto-char (1+ (match-beginning 6)))
(let ((end (1- (match-end 6))))
(while (and (< (point) end)
(c-syntactic-re-search-forward "::" end t))
(c-put-font-lock-face (- (point) 2) (point)
'font-lock-warning-face)))
nil))))
;; Variable names.
(cons
(concat "\\<"
(regexp-opt
'("ARGC" "ARGIND" "ARGV" "BINMODE" "CONVFMT" "ENVIRON"
"ERRNO" "FIELDWIDTHS" "FILENAME" "FNR" "FPAT" "FS" "FUNCTAB"
"IGNORECASE" "LINT" "NF" "NR" "OFMT" "OFS" "ORS" "PREC"
"PROCINFO" "RLENGTH" "ROUNDMODE" "RS" "RSTART" "RT" "SUBSEP"
"SYMTAB" "TEXTDOMAIN") t) "\\>")
'font-lock-variable-name-face)
;; Special file names. (acm, 2002/7/22)
;; The following regexp was created by first evaluating this in GNU Emacs 21.1:
;; (regexp-opt '("/dev/stdin" "/dev/stdout" "/dev/stderr" "/dev/fd/n" "/dev/pid"
;; "/dev/ppid" "/dev/pgrpid" "/dev/user") 'words)
;; , removing the "?:" from each "\\(?:" (for backward compatibility with older Emacsen)
;; , replacing the "n" in "dev/fd/n" with "[0-9]+"
;; , removing the unwanted \\< at the beginning, and finally filling out the
;; regexp so that a " must come before, and either a " or heuristic stuff after.
;; The surrounding quotes are fontified along with the filename, since, semantically,
;; they are an indivisible unit.
'("\\(\"/dev/\\(fd/[0-9]+\\|p\\(\\(\\(gr\\)?p\\)?id\\)\\|\
std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\
\\(\\(\"\\)\\|\\([^\"/\n\r][^\"\n\r]*\\)?$\\)"
(1 font-lock-variable-name-face t)
(8 font-lock-variable-name-face t t))
;; Do the same (almost) with
;; (regexp-opt '("/inet/tcp/lport/rhost/rport" "/inet/udp/lport/rhost/rport"
;; "/inet/raw/lport/rhost/rport") 'words)
;; This cannot be combined with the above pattern, because the match number
;; for the (optional) closing \" would then exceed 9.
'("\\(\"/inet/\\(\\(raw\\|\\(tc\\|ud\\)p\\)/lport/rhost/rport\\)\\)\\>\
\\(\\(\"\\)\\|\\([^\"/\n\r][^\"\n\r]*\\)?$\\)"
(1 font-lock-variable-name-face t)
(6 font-lock-variable-name-face t t))
;; Keywords.
(concat "\\<"
(regexp-opt
'("BEGIN" "BEGINFILE" "END" "ENDFILE"
"break" "case" "continue" "default" "delete"
"do" "else" "exit" "for" "getline" "if" "in" "next"
"nextfile" "return" "switch" "while")
t) "\\>")
;; Builtins.
`(eval . (list
,(concat
"\\<"
(regexp-opt
'("adump" "and" "asort" "asorti" "atan2" "bindtextdomain" "close"
"compl" "cos" "dcgettext" "dcngettext" "exp" "extension" "fflush"
"gensub" "gsub" "index" "int" "isarray" "length" "log" "lshift"
"match" "mktime" "or" "patsplit" "print" "printf" "rand" "rshift"
"sin" "split" "sprintf" "sqrt" "srand" "stopme"
"strftime" "strtonum" "sub" "substr" "system"
"systime" "tolower" "toupper" "typeof" "xor")
t)
"\\>")
0 c-preprocessor-face-name))
;; Directives
`(eval . '("@\\(include\\|load\\|namespace\\)\\>" 0 ,c-preprocessor-face-name))
;; gawk debugging keywords. (acm, 2002/7/21)
;; (Removed, 2003/6/6. These functions are now fontified as built-ins)
;; (list (concat "\\<" (regexp-opt '("adump" "stopme") t) "\\>")
;; 0 'font-lock-warning-face)
;; User defined functions with an apparent spurious space before the
;; opening parenthesis. acm, 2002/5/30.
`(,(concat "\\(\\w\\|_\\)" c-awk-escaped-nls* "\\s "
c-awk-escaped-nls*-with-space* "(")
(0 'font-lock-warning-face))
;; Double :: tokens, or the same with space(s) around them.
#'c-awk-font-lock-invalid-namespace-separators
;; Space after \ in what looks like an escaped newline. 2002/5/31
'("\\\\\\s +$" 0 font-lock-warning-face t)
;; Unbalanced string (") or regexp (/) delimiters. 2002/02/16.
'("\\s|" 0 font-lock-warning-face t nil)
;; gawk 3.1 localizable strings ( _"translate me!"). 2002/5/21
'("\\(_\\)\\s|" 1 font-lock-warning-face)
'("\\(_\\)\\s\"" 1 font-lock-string-face) ; FIXME! not for XEmacs. 2002/10/6
))
"Default expressions to highlight in AWK mode.")