PageRenderTime 135ms CodeModel.GetById 130ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
XML | 138 lines | 134 code | 3 blank | 1 comment | 0 complexity | 779e9a9176536cacc072ae7a52445880 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		<!-- indent after literal blocks and directives -->
  9		<PROPERTY NAME="indentNextLines" VALUE=".+::$"/>
 10	</PROPS>
 11
 12	<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" ESCAPE="\">
 13
 14		<!-- targets -->
 15		<EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">__</EOL_SPAN>
 16		<EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">.. _</EOL_SPAN>
 17
 18		<!-- section titles -->
 19		<SEQ_REGEXP HASH_CHAR="=" TYPE="LABEL">={3,}</SEQ_REGEXP>
 20		<SEQ_REGEXP HASH_CHAR="-" TYPE="LABEL">-{3,}</SEQ_REGEXP>
 21		<SEQ_REGEXP HASH_CHAR="~" TYPE="LABEL">~{3,}</SEQ_REGEXP>
 22		<SEQ_REGEXP HASH_CHAR="#" TYPE="LABEL">#{3,}</SEQ_REGEXP>
 23		<SEQ_REGEXP HASH_CHAR='"' TYPE="LABEL">"{3,}</SEQ_REGEXP>
 24		<SEQ_REGEXP HASH_CHAR='^' TYPE="LABEL">\^{3,}</SEQ_REGEXP>
 25		<SEQ_REGEXP HASH_CHAR='+' TYPE="LABEL">\+{3,}</SEQ_REGEXP>
 26		<SEQ_REGEXP HASH_CHAR='*' TYPE="LABEL">\*{3,}</SEQ_REGEXP>
 27
 28		<!-- replacement -->
 29		<SEQ_REGEXP
 30			HASH_CHAR="."
 31			AT_LINE_START="TRUE"
 32			TYPE="LITERAL3"
 33		>\.\.\s\|[^|]+\|</SEQ_REGEXP>
 34
 35		<!-- substitution -->
 36		<SEQ_REGEXP
 37			HASH_CHAR="|"
 38			AT_LINE_START="FALSE"
 39			TYPE="LITERAL4"
 40		>\|[^|]+\|</SEQ_REGEXP>
 41
 42		<!-- directives: .. name:: -->
 43		<SEQ_REGEXP
 44			HASH_CHAR="."
 45			AT_LINE_START="TRUE"
 46			TYPE="LITERAL2"
 47		>\.\.\s[A-z][A-z0-9-_]+::</SEQ_REGEXP>
 48
 49		<!-- strong emphasis: **...** -->
 50		<SEQ_REGEXP
 51			HASH_CHAR="*"
 52			AT_LINE_START="FALSE"
 53			TYPE="KEYWORD2"
 54		>\*\*[^*]+\*\*</SEQ_REGEXP>
 55
 56		<!-- emphasis: *...* -->
 57		<SEQ_REGEXP
 58			HASH_CHAR="*"
 59			AT_LINE_START="FALSE"
 60			TYPE="KEYWORD4"
 61		>\*[^\s*][^*]*\*</SEQ_REGEXP>
 62
 63		<!-- comments -->
 64		<EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">..</EOL_SPAN>
 65
 66		<!-- links: `...`_ or `...`__ -->
 67		<SEQ_REGEXP
 68			HASH_CHAR="`"
 69			TYPE="LABEL"
 70		>`[A-z0-9]+[^`]+`_{1,2}</SEQ_REGEXP>
 71
 72		<!-- footnote reference: [0]_ -->
 73		<SEQ_REGEXP
 74			HASH_CHAR="["
 75			TYPE="LABEL"
 76		>\[[0-9]+\]_</SEQ_REGEXP>
 77
 78		<!-- footnote reference: [#]_ or [#foo]_ -->
 79		<SEQ_REGEXP
 80			HASH_CHAR="["
 81			TYPE="LABEL"
 82		>\[#[A-z0-9_]*\]_</SEQ_REGEXP>
 83
 84		<!-- footnote reference: [*]_ -->
 85		<SEQ_REGEXP
 86			HASH_CHAR="["
 87			TYPE="LABEL"
 88		>\[*\]_</SEQ_REGEXP>
 89
 90		<!-- citation reference: [foo]_ -->
 91		<SEQ_REGEXP
 92			HASH_CHAR="["
 93			TYPE="LABEL"
 94		>\[[A-z][A-z0-9_-]*\]_</SEQ_REGEXP>
 95
 96		<!-- inline literal: ``...``-->
 97		<!--<SEQ_REGEXP
 98			HASH_CHAR="`"
 99			TYPE="LITERAL1"
100		>``[^`]+``</SEQ_REGEXP>-->
101		<SPAN TYPE="LITERAL1">
102			<BEGIN>``</BEGIN>
103			<END>``</END>
104		</SPAN>
105
106		<!-- interpreted text: `...` -->
107		<!--
108		<SEQ_REGEXP
109			HASH_CHAR="`"
110			TYPE="KEYWORD1"
111		>`[^`]+`</SEQ_REGEXP>
112		-->
113		<SPAN TYPE="KEYWORD1">
114			<BEGIN>`</BEGIN>
115			<END>`</END>
116		</SPAN>
117
118		<SEQ_REGEXP HASH_CHAR="`" TYPE="LABEL">`{3,}</SEQ_REGEXP>
119
120		<!-- :field list: -->
121		<SEQ_REGEXP
122			HASH_CHAR=":"
123			TYPE="KEYWORD1"
124		>:[A-z][A-z0-9 	=\s\t_]*:</SEQ_REGEXP>
125
126		<!-- table -->
127		<SEQ_REGEXP
128			HASH_CHAR="+"
129			TYPE="LABEL"
130		>\+-[+-]+</SEQ_REGEXP>
131		<SEQ_REGEXP
132			HASH_CHAR="+"
133			TYPE="LABEL"
134		>\+=[+=]+</SEQ_REGEXP>
135
136	</RULES>
137
138</MODE>