-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlean_syntax.xml
157 lines (156 loc) · 7.03 KB
/
lean_syntax.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"[
<!ENTITY charsdelim "_;."(){}@">
<!ENTITY wordsep "(?=[&charsdelim;]|\s|$)">
]>
<language name="lean" version="0" kateversion="5.0" section="Sources" extensions="*.lean" mimetype="text/x-lean" author="Eloi Torrents" license="LGPL">
<highlighting>
<list name="imports">
<item>import</item>
<!-- <item regexp="import\s+[a-zA-Z0-9_.]+\s*$" format="import" /> -->
<item>namespace</item>
<item>open</item>
</list>
<list name="reserved keywords">
<item>abbreviation</item>
<item>assume</item>
<item>axiom</item>
<item>begin</item>
<item>by</item>
<item>class</item>
<item>def</item>
<item>example</item>
<item>end</item>
<item>instance</item>
<item>lemma</item>
<item>meta</item>
<item>structure</item>
<item>universe</item>
<item>variable</item>
<item>variables</item>
</list>
<list name="preprocessor">
<item>#eval</item>
<item>#find</item>
<item>#check</item>
</list>
<list name="errors">
<item>sorry</item>
</list>
<list name="tactics">
<item>abel</item>
<item>abstract</item>
<item>ac_mono</item>
<item>ac_refl</item>
<item>all_goals</item>
<item>any_goals</item>
<item>apply</item>
<item>apply_assumption</item>
<item>apply_auto_param</item>
<item>apply_congr</item>
<item>apply_fun</item>
<item>apply_instance</item>
<item>apply_opt_param</item>
<item>apply_rules</item>
<item>apply_with</item>
<item>assoc_rewrite</item>
<item>assume</item>
<item>assumtion</item>
<item>assumtion'</item>
<item>async</item>
<item>by_cases</item>
<item>by_contradiction</item>
<item>by_contra</item>
<item>by_contra'</item>
<item>cancel_denoms</item>
<item>case</item>
<item>cases</item>
<item>cases_matching</item>
<item>casesm</item>
<item>cases_type</item>
<!-- category_theory.elementwise_of / category_theory.reassoc_of -->
<item>cc</item>
<item>change</item>
<item>change'</item>
<item>choose</item>
<item>classical</item>
<item>clear</item>
<item>clear'</item>
<item>clear_</item>
<item>clear_aux_decl</item>
<!-- TODO: complete: https://leanprover-community.github.io/mathlib_docs/tactics.html -->
<item>split</item>
</list>
<contexts>
<context attribute="Normal" lineEndContext="#stay" name="code">
<keyword attribute="Keyword" context="#stay" String="reserved keywords" />
<keyword attribute="Preprocessor" context="#stay" String="preprocessor" />
<keyword attribute="Error" context="#stay" String="errors" />
<keyword attribute="Tactic" context="#stay" String="tactics" />
<keyword attribute="Import" context="#stay" String="imports" />
<RegExpr attribute="Type" context="#stay" String="(?:Prop[₀-₉]+|Prop[0-9]*|Type[₀-₉]+|Type[0-9]*)&wordsep;" />
<RegExpr attribute="Special" context="#stay" String="(?:\->|→|∀|λ|:|=|\|)&wordsep;" />
<RegExpr attribute="Float" context="#stay" String="\d+(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)&wordsep;" />
<RegExpr attribute="Decimal" context="#stay" String="[0-9]+&wordsep;" />
<DetectChar attribute="Char" context="char" char="'" />
<DetectChar attribute="String" context="string" char=""" />
<Detect2Chars attribute="Comment" context="comment" char="-" char1="-" />
<Detect2Chars attribute="Comment" context="comments" char="/" char1="-" beginRegion="CommentBlock" />
<Detect2Chars attribute="Hole" context="hole" char="{" char1="!" />
<!-- delimiters which cannot be part of an identifier, or
backslash which starts a lambda expression -->
<AnyChar attribute="Special" context="#stay" String="&charsdelim;\\" />
<!-- any other identifier (can contain backslash and single
quote anywhere except at start, but these two special
cases are already taken care off above) -->
<RegExpr attribute="Normal" context="#stay" String="[^&charsdelim;\s]+" />
</context>
<context attribute="Comment" lineEndContext="#pop" name="comment">
<IncludeRules context="##Comments" />
</context>
<context attribute="Comment" lineEndContext="#stay" name="comments" noIndentationBasedFolding="1">
<Detect2Chars attribute="Comment" context="comments" char="/-" char1="-" beginRegion="CommentBlock" /> <!-- for nested comments -->
<Detect2Chars attribute="Comment" context="#pop" char="-" char1="/" endRegion="CommentBlock" />
<IncludeRules context="##Comments" />
</context>
<context attribute="Hole" lineEndContext="#stay" name="hole">
<Detect2Chars attribute="Hole" context="#pop" char="!" char1="}" />
</context>
<context attribute="Char" lineEndContext="#pop" name="char">
<Detect2Chars attribute="Char" context="#stay" char="\" char1="'" />
<DetectChar attribute="Char" context="#pop" char="'" />
</context>
<context attribute="String" lineEndContext="#stay" name="string">
<Detect2Chars attribute="String" context="#stay" char="\" char1=""" />
<DetectChar attribute="String" context="#pop" char=""" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false" />
<itemData name="Hole" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Type" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Special" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Error" defStyleNum="dsError" spellChecking="false" />
<itemData name="Tactic" defStyleNum="dsControlFlow" spellChecking="false" />
<itemData name="Import" defStyleNum="dsKeyword" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<folding indentationsensitive="1"/>
<comments>
<comment name="singleLine" start="--" position="afterwhitespace" />
<comment name="multiLine" start="{-" end="-}" region="CommentBlock" />
</comments>
<keywords casesensitive="1"
weakDeliminator=":!+,-<=>%&*/?[]^|~\\"
additionalDeliminator="&charsdelim;" />
</general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->