]> matita.cs.unibo.it Git - helm.git/blob - matitaB/matita/matita.lang
- lib: some additions
[helm.git] / matitaB / matita / matita.lang
1 <?xml version="1.0" encoding="UTF-8"?>
2 <language id="grafite" _name="grafite" version="2.0" _section="Sources">
3   <metadata>
4     <property name="mimetypes">text/x-matita</property>
5     <property name="globs">*.ma</property>
6     <property name="block-comment-start">(*</property>
7     <property name="block-comment-end">*)</property>
8   </metadata>
9
10   <styles>
11     <style id="comment" _name="Comment" map-to="def:comment"/>
12     <style id="string" _name="String" map-to="def:string"/>
13     <style id="escape" _name="Escape" map-to="def:string"/>
14     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
15     <style id="type" _name="Data Type" map-to="def:type"/>
16     <style id="latex" _name="LaTeX Escaped" map-to="def:special-char"/>
17     <style id="macros" _name="Macros" map-to="def:keyword"/>
18     <style id="tinycals" _name="Tinycals" map-to="def:keyword"/>
19     <style id="quantifiers" _name="Quantifiers" map-to="def:type"/>
20   </styles>
21
22   <definitions>
23     <define-regex id="char-esc">\\"|[0-9a-zA-Z]</define-regex>
24     <context id="escape-seq" style-ref="escape">
25       <match>\%{char-esc}</match>
26     </context>
27     <!-- here's the main context -->
28     <context id="grafite">
29       <include>
30         <context id="comment" style-ref="comment">
31           <start>\(\*</start>
32           <end>\*\)</end>
33           <include>
34             <context ref="string"/>
35             <context id="comment-in-comment" style-ref="comment">
36               <start>\(\*</start>
37               <end>\*\)</end>
38               <include>
39                 <context ref="string"/>
40                 <context ref="comment-in-comment"/>
41                 <context ref="def:in-comment:*"/>
42               </include>
43             </context>
44             <context ref="def:in-comment:*"/>
45           </include>
46         </context>
47         <context id="string" style-ref="string">
48           <start>"</start>
49           <end>"</end>
50           <include>
51             <context ref="escape-seq"/>
52           </include>
53         </context>
54         <context id="character-constant" style-ref="string">
55           <match>('\%{char-esc}')|('[^\\']')</match>
56         </context>
57         <context id="latex" style-ref="latex">
58          <prefix>\\</prefix>
59          <keyword>def</keyword>
60          <keyword>forall</keyword>
61          <keyword>lambda</keyword>
62          <keyword>to</keyword>
63          <keyword>exists</keyword>
64          <keyword>Rightarrow</keyword>
65          <keyword>Assign</keyword>
66          <keyword>land</keyword>
67          <keyword>lor</keyword>
68          <keyword>lnot</keyword>
69          <keyword>liff</keyword>
70          <keyword>subst</keyword>
71          <keyword>vdash</keyword>
72          <keyword>iforall</keyword>
73          <keyword>iexists</keyword>
74         </context>
75         <!-- Flow control & common keywords -->
76         <context id="keywords" style-ref="keyword">
77
78          <!-- objects -->
79          <keyword>theorem</keyword>
80          <keyword>record</keyword>
81          <keyword>definition</keyword>
82          <keyword>inductive</keyword>
83          <keyword>coinductive</keyword>
84          <keyword>let</keyword>
85          <keyword>lemma</keyword>
86          <keyword>remark</keyword>
87          <keyword>axiom</keyword>
88
89          <!-- tactics -->
90          <keyword>apply</keyword>                
91          <keyword>applyS</keyword>               
92          <keyword>cases</keyword>                
93          <keyword>letin</keyword>                
94          <keyword>auto</keyword>                 
95          <keyword>elim</keyword>                 
96          <keyword>whd</keyword>          
97          <keyword>normalize</keyword>            
98          <keyword>assumption</keyword>           
99          <keyword>generalize</keyword>           
100          <keyword>change</keyword>               
101          <keyword>rewrite</keyword>              
102          <keyword>cut</keyword>          
103          <keyword>inversion</keyword>
104          <keyword>lapply</keyword>
105          <keyword>destruct</keyword> 
106
107           <!-- commands -->
108           <keyword>alias</keyword>
109           <keyword>and</keyword>
110           <keyword>as</keyword>
111           <keyword>coercion</keyword>
112           <keyword>prefer</keyword>
113           <keyword>nocomposites</keyword>
114           <keyword>coinductive</keyword>
115           <keyword>corec</keyword>
116           <keyword>default</keyword>
117           <keyword>for</keyword>
118           <keyword>include</keyword>
119           <keyword>include'</keyword>
120           <keyword>inductive</keyword>
121           <keyword>inverter</keyword>
122           <keyword>in</keyword>
123           <keyword>interpretation</keyword>
124           <keyword>let</keyword>
125           <keyword>match</keyword>
126           <keyword>names</keyword>
127           <keyword>notation</keyword>
128           <keyword>on</keyword>
129           <keyword>qed</keyword>
130           <keyword>rec</keyword>
131           <keyword>record</keyword>
132           <keyword>return</keyword>
133           <keyword>source</keyword>    
134           <keyword>to</keyword>
135           <keyword>using</keyword>
136           <keyword>with</keyword>
137          
138          
139           <!-- commands -->
140           <keyword>unification</keyword>
141           <keyword>hint</keyword>
142           <keyword>coercion</keyword>
143           <keyword>inverter</keyword>
144           <keyword>qed</keyword>
145
146           <!-- macros -->
147           <keyword>check</keyword>
148           <keyword>eval</keyword>
149           <keyword>hint</keyword>
150           <keyword>set</keyword>
151           <keyword>auto</keyword>
152           <keyword>nodefaults</keyword>
153           <keyword>coercions</keyword>
154           <keyword>comments</keyword>
155           <keyword>debug</keyword>
156          
157           <!-- tinycals -->
158           <keyword>try</keyword>
159           <keyword>solve</keyword>
160           <keyword>do</keyword>
161           <keyword>repeat</keyword>
162           <keyword>first</keyword>
163           <keyword>focus</keyword>
164           <keyword>unfocus</keyword>
165           <keyword>progress</keyword>
166           <keyword>skip</keyword>
167         </context>
168         <context id="types" style-ref="type">
169           <!-- sorts -->
170           <keyword>Prop</keyword>
171           <keyword>Type[0]</keyword>
172           <keyword>CProp[0]</keyword>
173           <keyword>Type[1]</keyword>
174           <keyword>CProp[1]</keyword>
175           <keyword>Type[2]</keyword>
176           <keyword>CProp[2]</keyword>
177         </context>
178         <context id="quantifiers" style-ref="quantifiers">
179           <!-- quantifiers -->
180           <match>∀|∃|λ|=|→|⇒|…|≝|≡|\?</match>
181         </context>
182         <context id="tinycals" style-ref="tinycals">
183                 <match>\[|\||\]|\{|\}|>|//|&lt;|@|\$|#|\\\\|;|\.|:>|:|-</match>
184         </context>
185       </include>
186     </context>
187   </definitions>
188 </language>