1 rizwank 1.1 /**
2 * Name: awk
3 * Description: AWK programming language.
4 * Author: Juergen Kahrs <Juergen.Kahrs@t-online.de>
5 */
6
7 state awk extends HighlightEntry
8 {
9 /* Comments. */
10 /#/ {
11 comment_face (true);
12 language_print ($0);
13 call (eat_one_line);
14 comment_face (false);
15 }
16
17 /* String constants. */
18 /\"/ {
19 string_face (true);
20 language_print ($0);
21 call (c_string);
22 rizwank 1.1 string_face (false);
23 }
24
25 /* Excutable script. */
26 /^#!/ {
27 reference_face (true);
28 language_print ($0);
29 call (eat_one_line);
30 reference_face (false);
31 }
32
33 /* Keywords. */
34 /\b(ARG(C|V|IND)|BEGIN|CONVFMT|E(N(D|VIRON)|RRNO)\
35 |F(I(ELDWIDTHS|LENAME)|NR|S)|IGNORECASE|N[FR]|O(FMT|FS|RS)\
36 |R(LENGTH|S(TART)?|T)|SUBSEP\
37 |atan2|break|c(lose|o(ntinue|s))|d(elete|o)|e(lse|x(it|p))\
38 |f(flush|or|unction)|g(((en)?sub)|etline)|i(f|n(dex|t)?)\
39 |l(ength|og)|match|next(file)?|return|while|print[f]?\
40 |rand|s(in|ub(str)?|ystem|p(lit|rintf)|qrt|rand|trftime|ystime)\
41 |to(lower|upper))\b/ {
42 keyword_face (true);
43 rizwank 1.1 language_print ($0);
44 keyword_face (false);
45 }
46 }
47
48
49 /*
50 Local variables:
51 mode: c
52 End:
53 */
|