PageRenderTime 66ms CodeModel.GetById 61ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
XML | 116 lines | 94 code | 14 blank | 8 comment | 0 complexity | 54f6f40ee327b748025cd1929a4771f2 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<MODE>
  6	<PROPS>
  7		<PROPERTY NAME="commentStart" VALUE="#*" />
  8		<PROPERTY NAME="commentEnd" VALUE="*#" />
  9		<PROPERTY NAME="lineComment" VALUE="##" />
 10		<!-- Auto indent -->
 11		<PROPERTY NAME="indentNextLines" VALUE="^\s*(#(foreach|if|elseif|else))\s*\(.*\)\s*"/>
 12		<PROPERTY NAME="unindentThisLine" VALUE="^\s*#(end|elseif|else)\b.*"/>
 13	</PROPS>
 14	<RULES IGNORE_CASE="TRUE">
 15		<!-- SGML comment -->
 16		<SPAN TYPE="COMMENT1">
 17			<BEGIN>&lt;!--</BEGIN>
 18			<END>--&gt;</END>
 19		</SPAN>
 20
 21		<!-- JavaScript -->
 22		<SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
 23			<BEGIN>&lt;SCRIPT</BEGIN>
 24			<END>&lt;/SCRIPT&gt;</END>
 25		</SPAN>
 26
 27		<!-- stylesheet -->
 28		<SPAN TYPE="MARKUP" DELEGATE="CSS">
 29			<BEGIN>&lt;STYLE</BEGIN>
 30			<END>&lt;/STYLE&gt;</END>
 31		</SPAN>
 32
 33		<!-- DTD instructions -->
 34		<SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
 35			<BEGIN>&lt;!</BEGIN>
 36			<END>&gt;</END>
 37		</SPAN>
 38
 39		<!-- markup tags -->
 40		<SPAN TYPE="MARKUP" DELEGATE="html::TAGS">
 41			<BEGIN>&lt;</BEGIN>
 42			<END>&gt;</END>
 43		</SPAN>
 44
 45		<!-- SGML entities -->
 46		<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
 47			<BEGIN>&amp;</BEGIN>
 48			<END>;</END>
 49		</SPAN>
 50		<IMPORT DELEGATE="VELOCITY" />
 51	</RULES>
 52
 53	<RULES SET="VELOCITY">
 54		<SPAN TYPE="COMMENT2">
 55			<BEGIN>#*</BEGIN>
 56			<END>*#</END>
 57		</SPAN>
 58
 59		<EOL_SPAN TYPE="COMMENT3">##</EOL_SPAN>
 60
 61		<SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
 62			<BEGIN>${</BEGIN>
 63			<END>}</END>
 64		</SPAN>
 65
 66		<SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3"
 67			>\$!?[A-z][A-z0-9._-]*</SEQ_REGEXP>
 68
 69		<KEYWORDS>
 70			<KEYWORD1>#set</KEYWORD1>
 71			<KEYWORD1>#foreach</KEYWORD1>
 72			<KEYWORD1>#end</KEYWORD1>
 73			<KEYWORD1>#if</KEYWORD1>
 74			<KEYWORD1>#else</KEYWORD1>
 75			<KEYWORD1>#elseif</KEYWORD1>
 76			<KEYWORD1>#parse</KEYWORD1>
 77			<KEYWORD1>#macro</KEYWORD1>
 78			<KEYWORD1>#stop</KEYWORD1>
 79			<KEYWORD1>#include</KEYWORD1>
 80		</KEYWORDS>
 81	</RULES>
 82
 83	<RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
 84		<SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT2">&gt;</SEQ>
 85		<!-- handle <SCRIPT SRC="..."> properly -->
 86		<SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
 87	</RULES>
 88
 89	<RULES SET="JAVASCRIPT2"
 90		ESCAPE="\"
 91		IGNORE_CASE="FALSE"
 92		HIGHLIGHT_DIGITS="TRUE"
 93		DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
 94
 95		<IMPORT DELEGATE="VELOCITY" />
 96		<IMPORT DELEGATE="javascript::MAIN" />
 97	</RULES>
 98
 99	<RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
100		<SEQ TYPE="MARKUP" DELEGATE="MAIN">&gt;</SEQ>
101	</RULES>
102
103	<RULES SET="CSS" DEFAULT="MARKUP">
104		<SEQ TYPE="MARKUP" DELEGATE="CSS2">&gt;</SEQ>
105	</RULES>
106
107	<RULES SET="CSS2"
108		IGNORE_CASE="TRUE"
109		HIGHLIGHT_DIGITS="TRUE"
110		DIGIT_RE="[\p{Digit}]+(pt|pc|in|mm|cm|em|ex|px|ms|s|%)"
111		NO_WORD_SEP="-_">
112
113		<IMPORT DELEGATE="VELOCITY" />
114		<IMPORT DELEGATE="css::MAIN" />
115	</RULES>
116</MODE>