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