Import GNU Enscript version 1.6.4
[enscript.git] / states / hl / tcsh.st
1 /**
2  * Name: tcsh
3  * Description: TC-Shell script language
4  * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
5  */
6
7 state tcsh 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     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 alloc bg bindkey break breaksw builtins bye case
35      case cd chdir complete continue default dirs echo echotc else end endif
36      endsw eval exec exit fg filetest foreach getspath getxvers glob goto
37      hashstat history hup if inlib jobs kill limit log login logout ls-F
38      migrate newgrp nice nohup notify onintr popd printenv pushd rehash repeat
39      rootnode sched set setenv setpath setspath settc setty setxvers shift
40      source stop suspend switch telltc time umask unalias uncomplete unhash
41      universe unlimit unset unsetenv ver wait warp watchlog where which while))
42   */
43   /\b(%|:|@|al(ias|loc)|b(g|indkey|reak(|sw)|uiltins|ye)\
44 |c(ase()|d|hdir|o(mplete|ntinue))|d(efault|irs)\
45 |e(cho(|tc)|lse|nd(|if|sw)|val|x(ec|it))|f(g|iletest|oreach)\
46 |g(et(spath|xvers)|lob|oto)|h(ashstat|istory|up)|i(f|nlib)|jobs|kill\
47 |l(imit|og(|in|out)|s-F)|migrate|n(ewgrp|ice|o(hup|tify))|onintr\
48 |p(opd|rintenv|ushd)|r(e(hash|peat)|ootnode)\
49 |s(ched|et(|env|path|spath|t(c|y)|xvers)|hift|ource|top|uspend|witch)\
50 |t(elltc|ime)|u(mask|n(alias|complete|hash|iverse|limit|set(|env)))\
51 |ver|w(a(it|rp|tchlog)|h(ere|i(ch|le))))\b/ {
52     keyword_face (true);
53     language_print ($0);
54     keyword_face (false);
55   }
56
57   /* Special aliases:
58      (build-re '(beepcmd cwdcmd periodic precmd shell))
59
60      Predefined variables:
61      (build-re '(addsuffix afsuser ampm argv autocorrect autoexpand autolist
62      autologout backslash_quote cdpath correct cwd dextract dirsfile dirstack
63      dunique echo echo_style edit ellipsis fignore filec gid histchars histdup
64      histfile histlist history home ignoreeof inputmode listjobs listlinks
65      listmax listmaxrows loginsh mail matchbeep nobeep noclobber noglob
66      nokanji nonomatch nostat notify oid owd path printexitvalue prompt
67      prompt2 prompt3 pushdtohome pushdsilent recexact
68      recognize_only_executables rmstar savedirs savehist sched shell shlvl
69      showdots status symlinks tcsh term tperiod tty uid user verbose version
70      visiblebell watch whow wordchars)) */
71   /\b(a(ddsuffix|fsuser|mpm|rgv|uto(correct|expand|l(ist|ogout)))\
72 |backslash_quote|c(dpath|orrect|wd)|d(extract|irs(file|tack)|unique)\
73 |e(cho(|_style)|dit|llipsis)|fi(gnore|lec)|gid\
74 |h(ist(chars|dup|file|list|ory)|ome)|i(gnoreeof|nputmode)\
75 |l(ist(jobs|links|max(|rows))|oginsh)|ma(il|tchbeep)\
76 |no(beep|clobber|glob|kanji|nomatch|stat|tify)|o(id|wd)\
77 |p(ath|r(intexitvalue|ompt(|2|3))|ushd(silent|tohome))\
78 |r(ec(exact|ognize_only_executables)|mstar)\
79 |s(ave(dirs|hist)|ched|h(ell|lvl|owdots)|tatus|ymlinks)\
80 |t(csh|erm|period|ty)|u(id|ser)|v(er(bose|sion)|isiblebell)\
81 |w(atch|how|ordchars))\b/ {
82     builtin_face (true);
83     language_print ($0);
84     builtin_face (false);
85   }
86 }
87
88 \f
89 /*
90 Local variables:
91 mode: c
92 End:
93 */