PageRenderTime 56ms CodeModel.GetById 48ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/modes/shellscript.xml

#
XML | 162 lines | 157 code | 4 blank | 1 comment | 0 complexity | cdd89560a5792b00df5fe3d12fdf1944 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	</PROPS>
 11	<RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
 12		<!-- Comments -->
 13		<EOL_SPAN TYPE="COMMENT2">#!</EOL_SPAN>
 14		<EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
 15
 16		<!-- Variables -->
 17		<SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
 18			<BEGIN>${</BEGIN>
 19			<END>}</END>
 20		</SPAN>
 21
 22		<MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
 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">$&lt;</MARK_FOLLOWING>
 28		<MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
 29		<MARK_PREVIOUS TYPE="KEYWORD2" EXCLUDE_MATCH="TRUE">=</MARK_PREVIOUS>
 30
 31		<!-- weird stuff -->
 32		<SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
 33			<BEGIN>$((</BEGIN>
 34			<END>))</END>
 35		</SPAN>
 36		<SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
 37			<BEGIN>$(</BEGIN>
 38			<END>)</END>
 39		</SPAN>
 40		<SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
 41			<BEGIN>$[</BEGIN>
 42			<END>]</END>
 43		</SPAN>
 44		<SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
 45			<BEGIN>`</BEGIN>
 46			<END>`</END>
 47		</SPAN>
 48
 49		<!-- Literals -->
 50		<SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
 51			<BEGIN>"</BEGIN>
 52			<END>"</END>
 53		</SPAN>
 54		<SPAN TYPE="LITERAL1">
 55			<BEGIN>'</BEGIN>
 56			<END>'</END>
 57		</SPAN>
 58
 59		<!-- Readins -->
 60		<SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL1" DELEGATE="LITERAL">
 61			<BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
 62			<END>$1</END>
 63		</SPAN_REGEXP>
 64
 65		<!-- Operators -->
 66		<SEQ TYPE="OPERATOR">|</SEQ>
 67		<SEQ TYPE="OPERATOR">&amp;</SEQ>
 68		<SEQ TYPE="OPERATOR">!</SEQ>
 69		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 70		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 71
 72		<!-- %jobnumber -->
 73		<MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
 74
 75		<!-- functions -->
 76		<MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
 77
 78		<KEYWORDS>
 79			<KEYWORD1>if</KEYWORD1>
 80			<KEYWORD1>then</KEYWORD1>
 81			<KEYWORD1>elif</KEYWORD1>
 82			<KEYWORD1>else</KEYWORD1>
 83			<KEYWORD1>fi</KEYWORD1>
 84			<KEYWORD1>case</KEYWORD1>
 85			<KEYWORD1>in</KEYWORD1>
 86			<OPERATOR>;;</OPERATOR>
 87			<KEYWORD1>esac</KEYWORD1>
 88			<KEYWORD1>while</KEYWORD1>
 89			<KEYWORD1>for</KEYWORD1>
 90			<KEYWORD1>do</KEYWORD1>
 91			<KEYWORD1>done</KEYWORD1>
 92			<KEYWORD1>continue</KEYWORD1>
 93
 94			<KEYWORD1>local</KEYWORD1>
 95			<KEYWORD1>return</KEYWORD1>
 96		</KEYWORDS>
 97
 98		<!-- some of these should be marked OPERATOR -->
 99		<!-- <SEQ TYPE="NULL">)</SEQ>
100		<SEQ TYPE="NULL">(</SEQ>
101		<SEQ TYPE="NULL">=</SEQ>
102		<SEQ TYPE="NULL">!</SEQ>
103		<SEQ TYPE="NULL">&gt;=</SEQ>
104		<SEQ TYPE="NULL">&lt;=</SEQ>
105		<SEQ TYPE="NULL">+</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	</RULES>
121
122	<RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
123		<!-- Variables -->
124		<SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
125			<BEGIN>${</BEGIN>
126			<END>}</END>
127		</SPAN>
128
129		<MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
130	</RULES>
131
132	<RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
133		<!-- Variables -->
134		<SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
135			<BEGIN>${</BEGIN>
136			<END>}</END>
137		</SPAN>
138
139		<SPAN TYPE="KEYWORD3">
140			<BEGIN>$((</BEGIN>
141			<END>))</END>
142		</SPAN>
143
144		<SPAN TYPE="KEYWORD3">
145			<BEGIN>$(</BEGIN>
146			<END>)</END>
147		</SPAN>
148
149		<SPAN TYPE="KEYWORD3">
150			<BEGIN>$[</BEGIN>
151			<END>]</END>
152		</SPAN>
153
154		<MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
155
156		<SEQ TYPE="OPERATOR">|</SEQ>
157		<SEQ TYPE="OPERATOR">&amp;</SEQ>
158		<SEQ TYPE="OPERATOR">!</SEQ>
159		<SEQ TYPE="OPERATOR">&gt;</SEQ>
160		<SEQ TYPE="OPERATOR">&lt;</SEQ>
161	</RULES>
162</MODE>