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

 1 rizwank 1.1 /**
 2              * Name: csh
 3              * Description: C-Shell script language
 4              * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
 5              */
 6             
 7             state csh extends HighlightEntry
 8             {
 9               /* Comments. From sh description */
10               /#/ {
11                 comment_face (true);
12                 language_print ($0);
13                 call (eat_one_line);
14                 comment_face (false);
15               }
16             
17               /* String constants. From sh */
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. From sh */
26               /^#!/ {
27                 reference_face (true);
28                 language_print ($0);
29                 call (eat_one_line);
30                 reference_face (false);
31               }
32             
33               /* Keywords. :
34                  (build-re '(: alias bg break breaksw case cd chdir continue default dirs
35                  echo eval exec exit fg foreach end glob goto hashstat history if then
36                  else endif jobs kill limit login logout nice nohup notify onintr popd
37                  pushd rehash repeat set setenv shift source stop suspend switch case
38                  endsw time umask unalias unhash unlimit unset wait while % @))
39               */
40               /\b(%|:|@|alias|b(g|reak(|sw))|c(ase()|d|hdir|ontinue)|d(efault|irs)\
41             |e(cho|lse|nd(|if|sw)|val|x(ec|it))|f(g|oreach)|g(lob|oto)\
42             |h(ashstat|istory)|if|jobs|kill|l(imit|og(in|out))|n(ice|o(hup|tify))\
43 rizwank 1.1 |onintr|p(opd|ushd)|re(hash|peat)\
44             |s(et(|env)|hift|ource|top|uspend|witch)|t(hen|ime)\
45             |u(mask|n(alias|hash|limit|set))|w(ait|hile))\b/ {
46                 keyword_face (true);
47                 language_print ($0);
48                 keyword_face (false);
49               }
50             
51               /* Predefined variables:
52                  (build-re '(argv cdpath cwd echo fignore filec hardpaths histchars
53                  history home ignoreeof mail nobeep noclobber noglob nonomatch notify path
54                  prompt savehist shell status verbose)) */
55               /\b(argv|c(dpath|wd)|echo|fi(gnore|lec)|h(ardpaths|ist(chars|ory)|ome)\
56             |ignoreeof|mail|no(beep|clobber|glob|nomatch|tify)|p(ath|rompt)\
57             |s(avehist|hell|tatus)|verbose)\b/ {
58                 builtin_face (true);
59                 language_print ($0);
60                 builtin_face (false);
61               }
62             }
63             
64 rizwank 1.1 
65             /*
66             Local variables:
67             mode: c
68             End:
69             */

Rizwan Kassim
Powered by
ViewCVS 0.9.2