PageRenderTime 64ms CodeModel.GetById 59ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
XML | 130 lines | 90 code | 19 blank | 21 comment | 0 complexity | f6a3c0c69f59e087a3a5606d816d1c37 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<!--
  6<MODE NAME="myghty"			FILE="myghty.xml"
  7				FILE_NAME_GLOB="*.myt"/>
  8-->
  9
 10<MODE>
 11	<PROPS>
 12		<PROPERTY NAME="commentStart" VALUE="&lt;!--" />
 13		<PROPERTY NAME="commentEnd" VALUE="--&gt;" />
 14	</PROPS>
 15	<RULES IGNORE_CASE="TRUE">
 16
 17		<EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#</EOL_SPAN>
 18		<!-- <SEQ TYPE="LITERAL4" AT_LINE_END="TRUE">\</SEQ> -->
 19
 20		<!-- attr block (python) -->
 21		<SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
 22			<BEGIN>&lt;%attr&gt;</BEGIN>
 23			<END>&lt;/%attr&gt;</END>
 24		</SPAN>
 25
 26		<!-- def, closure, method -->
 27		<SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL4" DELEGATE="DEF">
 28			<BEGIN>&lt;%(def|closure|method)</BEGIN>
 29			<END>&gt;</END>
 30		</SPAN_REGEXP>
 31		<SEQ_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL4">&lt;/%(def|closure|method)&gt;</SEQ_REGEXP>
 32
 33		<!-- doc block -->
 34		<SPAN TYPE="COMMENT4">
 35			<BEGIN>&lt;%doc&gt;</BEGIN>
 36			<END>&lt;/%doc&gt;</END>
 37		</SPAN>
 38
 39		<!-- flags block (python) -->
 40		<SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
 41			<BEGIN>&lt;%flags&gt;</BEGIN>
 42			<END>&lt;/%flags&gt;</END>
 43		</SPAN>
 44
 45		<!-- python block -->
 46		<SPAN_REGEXP HASH_CHAR="&lt;" DELEGATE="MYGHTY" TYPE="LITERAL4">
 47			<BEGIN>&lt;%python[^>]*&gt;</BEGIN>
 48			<END>&lt;/%python&gt;</END>
 49		</SPAN_REGEXP>
 50
 51		<!-- python block aliases - don't take args -->
 52		<SPAN_REGEXP HASH_CHAR="&lt;" DELEGATE="MYGHTY" TYPE="LITERAL4">
 53			<BEGIN>&lt;%(args|cleanup|filter|global|init|once|requestlocal|requestonce|shared|threadlocal|threadonce)&gt;</BEGIN>
 54			<END>&lt;/%$1&gt;</END>
 55		</SPAN_REGEXP>
 56
 57		<!-- text block -->
 58		<SPAN TYPE="LITERAL3">
 59			<BEGIN>&lt;%text&gt;</BEGIN>
 60			<END>&lt;/%text&gt;</END>
 61		</SPAN>
 62
 63		<!-- calling component -->
 64		<SEQ TYPE="LITERAL4">&lt;/&amp;&gt;</SEQ>
 65		<SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL4" DELEGATE="MYGHTY">
 66			<BEGIN>&lt;&amp;[|]?</BEGIN>
 67			<END>&amp;&gt;</END>
 68		</SPAN_REGEXP>
 69
 70		<!-- substitutions -->
 71		<SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
 72			<BEGIN>&lt;%</BEGIN>
 73			<END>%&gt;</END>
 74		</SPAN>
 75
 76		<EOL_SPAN 
 77			AT_LINE_START="TRUE" 
 78			DELEGATE="MYGHTY" 
 79			TYPE="LITERAL4">%</EOL_SPAN>
 80
 81		<IMPORT DELEGATE="html::MAIN"/>
 82
 83		<KEYWORDS>
 84			<!-- only here for complete-word -->
 85			<NULL>args</NULL>
 86			<NULL>attr</NULL>
 87			<NULL>cleanup</NULL>
 88			<NULL>closure</NULL>
 89			<NULL>def</NULL>
 90			<NULL>doc</NULL>
 91			<NULL>filter</NULL>
 92			<NULL>flags</NULL>
 93			<NULL>global</NULL>
 94			<NULL>init</NULL>
 95			<NULL>method</NULL>
 96			<NULL>once</NULL>
 97			<NULL>python</NULL>
 98			<NULL>requestlocal</NULL>
 99			<NULL>requestonce</NULL>
100			<NULL>shared</NULL>
101			<NULL>threadlocal</NULL>
102			<NULL>threadonce</NULL>
103		</KEYWORDS>
104
105	</RULES>
106
107	<RULES IGNORE_CASE="FALSE" SET="MYGHTY">
108		<!-- alias for MODULE -->
109		<SEQ TYPE="KEYWORD4">@</SEQ>
110		<IMPORT DELEGATE="python::MAIN"/>
111		<KEYWORDS>
112			<KEYWORD4>ARGS</KEYWORD4>
113			<KEYWORD4>MODULE</KEYWORD4>
114			<KEYWORD4>SELF</KEYWORD4>
115			<KEYWORD4>m</KEYWORD4>
116			<!-- request -->
117			<KEYWORD4>r</KEYWORD4>
118			<!-- session -->
119			<KEYWORD4>s</KEYWORD4>
120			<!-- URL encode -->
121			<KEYWORD4>u</KEYWORD4>
122			<!-- HTML encode -->
123			<KEYWORD4>h</KEYWORD4>
124		</KEYWORDS>
125	</RULES>
126
127	<!-- only exists to color component name like a function -->
128	<RULES IGNORE_CASE="TRUE" SET="DEF" DEFAULT="FUNCTION">
129	</RULES>
130</MODE>