(file) Return to ksh.st CVS log (file) (dir) Up to [RizwankCVS] / testProject / share / enscript / hl

 1 rizwank 1.1 /**
 2              * Name: ksh
 3              * Description: Korn shell programming language.
 4              * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
 5              */
 6             
 7             state ksh extends HighlightEntry
 8             {
 9               /(\${*#[a-zA-Z0-9_]*})/ {
10                 language_print ($0);
11               }
12             
13               /* Comments. */
14               /#/ {
15                 comment_face (true);
16                 language_print ($0);
17                 call (eat_one_line);
18                 comment_face (false);
19               }
20             
21               /* String constants. */
22 rizwank 1.1   /\"/ {
23                 string_face (true);
24                 language_print ($0);
25                 call (c_string);
26                 string_face (false);
27               }
28             
29               /* Excutable script. */
30               /^#!/ {
31                 reference_face (true);
32                 language_print ($0);
33                 call (eat_one_line);
34                 reference_face (false);
35               }
36             
37               /* Keywords:
38                  (build-re '(: alias bg break continue cd command eval exec exit export
39                  fc fg getopts hash jobs kill let login newgrp print pwd read readonly
40                  return set shift stop suspend test times trap type typeset ulimit umask
41                  unalias unset wait whence for in do done select case esac if then elif
42                  else fi while until function time))
43 rizwank 1.1   */
44               /\b(:|alias|b(g|reak)|c(ase|d|o(mmand|ntinue))|do(|ne)\
45             |e(l(if|se)|sac|val|x(ec|it|port))|f(c|g|i|or|unction)|getopts|hash\
46             |i(f|n)|jobs|kill|l(et|ogin)|newgrp|p(rint|wd)|re(ad(|only)|turn)\
47             |s(e(lect|t)|hift|top|uspend)|t(est|hen|ime(|s)|rap|ype(|set))\
48             |u(limit|mask|n(alias|set|til))|w(ait|h(ence|ile)))\b/ {
49                 keyword_face (true);
50                 language_print ($0);
51                 keyword_face (false);
52               }
53             
54               /* exported aliases (built-in)
55                  (build-re '(autoload false functions hash history integer nohup r true
56                  type))
57               */
58               /\b(autoload|f(alse|unctions)|h(ash|istory)|integer|nohup|r|t(rue|ype))\b/ {
59                 builtin_face (true);
60                 language_print ($0);
61                 builtin_face (false);
62               }
63             }
64 rizwank 1.1 
65             
66             /*
67             Local variables:
68             mode: c
69             End:
70             */

Rizwan Kassim
Powered by
ViewCVS 0.9.2