fix some db docs
[factor/jcg.git] / basis / xmode / modes / shellscript.xml
blob5d265b750db874494b3f08957d38e82f50128bb3
1 <?xml version="1.0"?>\r
2 \r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">\r
4 \r
5 <MODE>\r
6         <PROPS>\r
7                 <PROPERTY NAME="lineComment" VALUE="#" />\r
8                 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />\r
9                 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />\r
10         </PROPS>\r
11         <RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">\r
12                 <!-- Comments -->\r
13                 <EOL_SPAN TYPE="COMMENT2">#!</EOL_SPAN>\r
14                 <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>\r
16                 <!-- Variables -->\r
17                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
18                         <BEGIN>${</BEGIN>\r
19                         <END>}</END>\r
20                 </SPAN>\r
22                 <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>\r
23                 <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>\r
24                 <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>\r
25                 <MARK_FOLLOWING TYPE="KEYWORD2">$@</MARK_FOLLOWING>\r
26                 <MARK_FOLLOWING TYPE="KEYWORD2">$$</MARK_FOLLOWING>\r
27                 <MARK_FOLLOWING TYPE="KEYWORD2">$&lt;</MARK_FOLLOWING>\r
28                 <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>\r
29                 <MARK_PREVIOUS TYPE="KEYWORD2" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>\r
31                 <!-- weird stuff -->\r
32                 <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">\r
33                         <BEGIN>$((</BEGIN>\r
34                         <END>))</END>\r
35                 </SPAN>\r
36                 <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">\r
37                         <BEGIN>$(</BEGIN>\r
38                         <END>)</END>\r
39                 </SPAN>\r
40                 <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">\r
41                         <BEGIN>$[</BEGIN>\r
42                         <END>]</END>\r
43                 </SPAN>\r
44                 <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">\r
45                         <BEGIN>`</BEGIN>\r
46                         <END>`</END>\r
47                 </SPAN>\r
49                 <!-- Literals -->\r
50                 <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">\r
51                         <BEGIN>"</BEGIN>\r
52                         <END>"</END>\r
53                 </SPAN>\r
54                 <SPAN TYPE="LITERAL1">\r
55                         <BEGIN>'</BEGIN>\r
56                         <END>'</END>\r
57                 </SPAN>\r
59                 <!-- Readins -->\r
60                 <SPAN_REGEXP HASH_CHAR="&lt;&lt;" TYPE="LITERAL1" DELEGATE="LITERAL">\r
61                         <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>\r
62                         <END>$1</END>\r
63                 </SPAN_REGEXP>\r
65                 <!-- Operators -->\r
66                 <SEQ TYPE="OPERATOR">|</SEQ>\r
67                 <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
68                 <SEQ TYPE="OPERATOR">!</SEQ>\r
69                 <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
70                 <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
72                 <!-- %jobnumber -->\r
73                 <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>\r
75                 <!-- functions -->\r
76                 <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>\r
77                 <SEQ TYPE="OPERATOR">)</SEQ>\r
79                 <KEYWORDS>\r
80                         <KEYWORD1>if</KEYWORD1>\r
81                         <KEYWORD1>then</KEYWORD1>\r
82                         <KEYWORD1>elif</KEYWORD1>\r
83                         <KEYWORD1>else</KEYWORD1>\r
84                         <KEYWORD1>fi</KEYWORD1>\r
85                         <KEYWORD1>case</KEYWORD1>\r
86                         <KEYWORD1>in</KEYWORD1>\r
87                         <OPERATOR>;;</OPERATOR>\r
88                         <KEYWORD1>esac</KEYWORD1>\r
89                         <KEYWORD1>while</KEYWORD1>\r
90                         <KEYWORD1>for</KEYWORD1>\r
91                         <KEYWORD1>do</KEYWORD1>\r
92                         <KEYWORD1>done</KEYWORD1>\r
93                         <KEYWORD1>continue</KEYWORD1>\r
95                         <KEYWORD1>local</KEYWORD1>\r
96                         <KEYWORD1>return</KEYWORD1>\r
97                 </KEYWORDS>\r
99                 <!-- some of these should be marked OPERATOR -->\r
100                 <!-- <SEQ TYPE="NULL">)</SEQ>\r
101                 <SEQ TYPE="NULL">(</SEQ>\r
102                 <SEQ TYPE="NULL">=</SEQ>\r
103                 <SEQ TYPE="NULL">!</SEQ>\r
104                 <SEQ TYPE="NULL">&gt;=</SEQ>\r
105                 <SEQ TYPE="NULL">&lt;=</SEQ>\r
106                 <SEQ TYPE="NULL">+</SEQ>\r
107                 <SEQ TYPE="NULL">-</SEQ>\r
108                 <SEQ TYPE="NULL">/</SEQ>\r
109                 <SEQ TYPE="NULL">*</SEQ>\r
110                 <SEQ TYPE="NULL">^</SEQ>\r
111                 <SEQ TYPE="NULL">~</SEQ>\r
112                 <SEQ TYPE="NULL">}</SEQ>\r
113                 <SEQ TYPE="NULL">{</SEQ>\r
114                 SEQ TYPE="NULL">.</SEQ\r
115                 <SEQ TYPE="NULL">,</SEQ>\r
116                 <SEQ TYPE="NULL">;</SEQ>\r
117                 <SEQ TYPE="NULL">]</SEQ>\r
118                 <SEQ TYPE="NULL">[</SEQ>\r
119                 <SEQ TYPE="NULL">?</SEQ>\r
120                 <SEQ TYPE="NULL">:</SEQ> -->\r
121         </RULES>\r
123         <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">\r
124                 <!-- Variables -->\r
125                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
126                         <BEGIN>${</BEGIN>\r
127                         <END>}</END>\r
128                 </SPAN>\r
130                 <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>\r
131         </RULES>\r
133         <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">\r
134                 <!-- Variables -->\r
135                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
136                         <BEGIN>${</BEGIN>\r
137                         <END>}</END>\r
138                 </SPAN>\r
140                 <SPAN TYPE="KEYWORD3">\r
141                         <BEGIN>$((</BEGIN>\r
142                         <END>))</END>\r
143                 </SPAN>\r
145                 <SPAN TYPE="KEYWORD3">\r
146                         <BEGIN>$(</BEGIN>\r
147                         <END>)</END>\r
148                 </SPAN>\r
150                 <SPAN TYPE="KEYWORD3">\r
151                         <BEGIN>$[</BEGIN>\r
152                         <END>]</END>\r
153                 </SPAN>\r
155                 <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>\r
157                 <SEQ TYPE="OPERATOR">|</SEQ>\r
158                 <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
159                 <SEQ TYPE="OPERATOR">!</SEQ>\r
160                 <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
161                 <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
162         </RULES>\r
163 </MODE>\r