PageRenderTime 77ms CodeModel.GetById 69ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/jEdit/tags/jedit-4-2-pre4/modes/shellscript.xml

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