fix some db docs
[factor/jcg.git] / basis / xmode / modes / freemarker.xml
blob065e5f9ab94361242e3002d8e9eaac6e0adc1898
1 <?xml version="1.0"?>\r
2 \r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">\r
4 \r
5 <!-- A JEdit mode configuration file for FTL (FreeMarker Template Language)\r
6      Note that this version will only work with JEdit 4.1pre6 or later.\r
7      by Jonathan Revusky, revusky@users.sourceforge.net -->\r
8 \r
9 <MODE>\r
10   <RULES IGNORE_CASE="FALSE">\r
12     <!-- JavaScript -->\r
13     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">\r
14     <BEGIN>&lt;script</BEGIN>\r
15     <END>&lt;/script&gt;</END>\r
16     </SPAN>\r
17     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">\r
18     <BEGIN>&lt;Script</BEGIN>\r
19     <END>&lt;/Script&gt;</END>\r
20     </SPAN>\r
21     <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">\r
22     <BEGIN>&lt;SCRIPT</BEGIN>\r
23     <END>&lt;/SCRIPT&gt;</END>\r
24     </SPAN>\r
26     <!-- stylesheet -->\r
27     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">\r
28     <BEGIN>&lt;style</BEGIN>\r
29     <END>&lt;/style&gt;</END>\r
30     </SPAN>\r
31     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">\r
32     <BEGIN>&lt;Style</BEGIN>\r
33     <END>&lt;/Style&gt;</END>\r
34     </SPAN>\r
35     <SPAN TYPE="MARKUP" DELEGATE="html::CSS">\r
36     <BEGIN>&lt;STYLE</BEGIN>\r
37     <END>&lt;/STYLE&gt;</END>\r
38     </SPAN>\r
40     <!-- XML/HTML comment -->\r
41     <SPAN TYPE="COMMENT2" DELEGATE="xml::DTD-TAGS">\r
42     <BEGIN>&lt;!--</BEGIN>\r
43     <END>--&gt;</END>\r
44     </SPAN>\r
46     <!-- DTD instructions -->\r
47     <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">\r
48     <BEGIN>&lt;!</BEGIN>\r
49     <END>&gt;</END>\r
50     </SPAN>\r
52     <!-- FTL markup starts here. -->\r
54     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">\r
55       <BEGIN>${</BEGIN>\r
56       <END>}</END>\r
57     </SPAN>\r
59     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">\r
60       <BEGIN>#{</BEGIN>\r
61       <END>}</END>\r
62     </SPAN>\r
64     <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="&lt;#ftl" DELEGATE="EXPRESSION">\r
65       <BEGIN>&lt;#ftl\b</BEGIN>\r
66       <END>&gt;</END>\r
67     </SPAN_REGEXP>\r
69     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="&lt;">\r
70       <BEGIN>&lt;#?(if|elseif|switch|foreach|list|case|assign|local|global|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN>\r
71       <END>&gt;</END>\r
72     </SPAN_REGEXP>\r
74     <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="&lt;/"\r
75         >&lt;/#?(assign|local|global|if|switch|foreach|list|escape|macro|function|transform|compress|noescape)&gt;</SEQ_REGEXP>\r
77     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="&lt;">\r
78       <BEGIN>&lt;#?(else|compress|noescape|default|break|flush|nested|t|rt|lt|return|recurse)\b</BEGIN>\r
79       <END>&gt;</END>\r
80     </SPAN_REGEXP>\r
82     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="&lt;/@">\r
83       <BEGIN>&lt;/@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN>\r
84       <END>&gt;</END>\r
85     </SPAN_REGEXP>\r
87     <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="&lt;@">\r
88       <BEGIN>&lt;@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN>\r
89       <END>&gt;</END>\r
90     </SPAN_REGEXP>\r
92     <SPAN TYPE="COMMENT1">\r
93       <BEGIN>&lt;#--</BEGIN>\r
94       <END>--&gt;</END>\r
95     </SPAN>\r
97     <SEQ TYPE="KEYWORD1">&lt;stop&gt;</SEQ>\r
98      <SPAN TYPE="COMMENT1">\r
99     <BEGIN>&lt;comment&gt;</BEGIN>\r
100     <END>&lt;/comment&gt;</END>\r
101     </SPAN>\r
102     <SPAN TYPE="INVALID">\r
103       <BEGIN>&lt;#</BEGIN>\r
104       <END>&gt;</END>\r
105     </SPAN>\r
106     <SPAN TYPE="INVALID">\r
107       <BEGIN>&lt;/#</BEGIN>\r
108       <END>&gt;</END>\r
109     </SPAN>\r
111     <!-- non-FTL markup -->\r
112     <SPAN TYPE="MARKUP" DELEGATE="TAGS">\r
113     <BEGIN>&lt;</BEGIN>\r
114     <END>&gt;</END>\r
115     </SPAN>\r
116   </RULES>\r
118   <RULES SET="EXPRESSION"\r
119       DEFAULT="KEYWORD2"\r
120       HIGHLIGHT_DIGITS="TRUE"\r
121       ESCAPE="\"\r
122       IGNORE_CASE="FALSE"\r
123     >\r
124     <SPAN TYPE="COMMENT1">\r
125       <BEGIN>&lt;#--</BEGIN>\r
126       <END>--&gt;</END>\r
127     </SPAN>\r
128     <SPAN TYPE="COMMENT1">\r
129       <BEGIN>&lt;!--</BEGIN>\r
130       <END>--&gt;</END>\r
131     </SPAN>\r
133     <SPAN TYPE="LITERAL1">\r
134     <BEGIN>"</BEGIN>\r
135     <END>"</END>\r
136     </SPAN>\r
137     <SPAN TYPE="OPERATOR" DELEGATE="EXPRESSION">\r
138       <BEGIN>(</BEGIN><END>)</END>\r
139     </SPAN>\r
140     <SEQ TYPE="OPERATOR">=</SEQ>\r
141     <SEQ TYPE="OPERATOR">!</SEQ>\r
142     <SEQ TYPE="OPERATOR">|</SEQ>\r
143     <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
144     <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
145     <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
146     <SEQ TYPE="OPERATOR">*</SEQ>\r
147     <SEQ TYPE="OPERATOR">/</SEQ>\r
148     <SEQ TYPE="OPERATOR">-</SEQ>\r
149     <SEQ TYPE="OPERATOR">+</SEQ>\r
150     <SEQ TYPE="OPERATOR">%</SEQ>\r
151     <SEQ TYPE="OPERATOR">.</SEQ>\r
152     <SEQ TYPE="OPERATOR">:</SEQ>\r
153     <SEQ TYPE="OPERATOR">.</SEQ>\r
154     <SEQ TYPE="OPERATOR">.</SEQ>\r
155     <SEQ TYPE="OPERATOR">[</SEQ>\r
156     <SEQ TYPE="OPERATOR">]</SEQ>\r
157     <SEQ TYPE="OPERATOR">{</SEQ>\r
158     <SEQ TYPE="OPERATOR">}</SEQ>\r
159     <SEQ TYPE="OPERATOR">;</SEQ>\r
160     <!-- Builtins -->\r
161     <MARK_FOLLOWING TYPE="FUNCTION">?</MARK_FOLLOWING>\r
162     <KEYWORDS>\r
163       <KEYWORD1>true</KEYWORD1>\r
164       <KEYWORD1>false</KEYWORD1>\r
165       <KEYWORD1>as</KEYWORD1>\r
166       <KEYWORD1>in</KEYWORD1>\r
167       <KEYWORD1>using</KEYWORD1>\r
168       <OPERATOR>gt</OPERATOR>\r
169       <OPERATOR>gte</OPERATOR>\r
170       <OPERATOR>lt</OPERATOR>\r
171       <OPERATOR>lte</OPERATOR>\r
172     </KEYWORDS>\r
173   </RULES>\r
175   <RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">\r
176     <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">\r
177     <BEGIN>"</BEGIN>\r
178     <END>"</END>\r
179     </SPAN>\r
181     <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">\r
182     <BEGIN>'</BEGIN>\r
183     <END>'</END>\r
184     </SPAN>\r
186     <SEQ TYPE="OPERATOR">=</SEQ>\r
187   </RULES>\r
190   <!-- a ruleset for when we are within a quoted string within an SGML tag\r
191        It can contain FTL interpolations -->\r
192   <RULES SET="INQUOTE">\r
193     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">\r
194     <BEGIN>${</BEGIN>\r
195     <END>}</END>\r
196     </SPAN>\r
197     <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">\r
198     <BEGIN>#{</BEGIN>\r
199     <END>}</END>\r
200     </SPAN>\r
201   </RULES>\r
203   <!-- empty ruleset to delegate to for spots where any non-whitespace is invalid -->\r
204   <RULES SET="INVALID" DEFAULT="INVALID" />\r
205 </MODE>\r