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