summaryrefslogtreecommitdiff
path: root/share/tinykate/syntax/python.xml
blob: e7722e97d9d96012b874a8c4997b3c6725409a0e (plain)
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?xml version="1.02" encoding="UTF-8"?>
<!DOCTYPE language>
<!-- Python syntax highlightning v0.9 by Per Wigren -->
<language name="Python" version="1.00" kateversion="2.0" section="Scripts" extensions="*.py;*.pyw" mimetype="text/x-python" casesensitive="1">
	<highlighting>
		<list name="prep">
			<item> import </item>
			<item> from </item>
			<item> as </item>
		</list>

		<list name="statements">
			<item> assert </item>
			<item> break </item>
			<item> class </item>
			<item> continue </item>
			<item> def </item>
			<item> del </item>
			<item> elif </item>
			<item> else </item>
			<item> except </item>
			<item> exec </item>
			<item> finally </item>
			<item> for </item>
			<item> global </item>
			<item> if </item>
			<item> in </item>
			<item> is </item>
			<item> lambda </item>
			<item> not </item>
			<item> or </item>
			<item> pass </item>
			<item> print </item>
			<item> raise </item>
			<item> return </item>
			<item> try </item>
			<item> while </item>
			<item> yield </item>
		</list>

		<list name="builtinfuncs">
			<item> abs </item>
			<item> apply </item>
			<item> buffer </item>
			<item> callable </item>
			<item> chr </item>
			<item> cmp </item>
			<item> coerce </item>
			<item> compile </item>
			<item> complex </item>
			<item> copyright </item>
			<item> credits </item>
			<item> delattr </item>
			<item> dir </item>
			<item> divmod </item>
			<item> eval </item>
			<item> execfile </item>
			<item> exit </item>
			<item> filter </item>
			<item> float </item>
			<item> getattr </item>
			<item> globals </item>
			<item> hasattr </item>
			<item> hash </item>
			<item> hex </item>
			<item> id </item>
			<item> input </item>
			<item> int </item>
			<item> intern </item>
			<item> isinstance </item>
			<item> issubclass </item>
			<item> iter </item>
			<item> len </item>
			<item> license </item>
			<item> list </item>
			<item> locals </item>
			<item> long </item>
			<item> map </item>
			<item> max </item>
			<item> min </item>
			<item> oct </item>
			<item> open </item>
			<item> ord </item>
			<item> pow </item>
			<item> quit </item>
			<item> range </item>
			<item> raw_input </item>
			<item> reduce </item>
			<item> reload </item>
			<item> repr </item>
			<item> round </item>
			<item> setattr </item>
			<item> slice </item>
			<item> str </item>
			<item> tuple </item>
			<item> type </item>
			<item> unichr </item>
			<item> unicode </item>
			<item> vars </item>
			<item> xrange </item>
			<item> zip </item>
		</list>

		<list name="specialvars">
			<item> None </item>
			<item> self </item>
		</list>

		<contexts>
			<context name="Normal" attribute="Normal Text" lineEndContext="0">
				<keyword attribute="Preprocessor" String="prep" context="0"/>
				<keyword attribute="Keyword" String="statements" context="0"/>
				<keyword attribute="Builtin Function" String="builtinfuncs" context="0"/>
				<keyword attribute="Special Variable" String="specialvars" context="0"/>
				<RegExpr attribute="Normal" String="[a-zA-Z][a-zA-Z0-9]+" context="0"/>
				<RegExpr attribute="Long" String="[1-9][0-9]*([eE][0-9.]+)?[Ll]" context="0"/>
				<RegExpr attribute="Hex" String="0[Xx][0-9a-fA-F]+" context="0"/>
				<RegExpr attribute="Octal" String="0[1-9][0-9]*" context="0"/>
				<RegExpr attribute="Complex" String="[0-9+.-]+[Jj]" context="0"/>
				<RegExpr attribute="Float" String="([1-9][0-9]*)?\.[0-9]*([eE][1-9][0-9]*(\.[0-9]*)?)?" context="0"/>
				<RegExpr attribute="Int" String="([1-9][0-9]*([eE][0-9]+)?|0)" context="0"/>

				<RegExpr attribute="Raw String" String="[rR]'" context="9"/>
				<RegExpr attribute="Raw String" String="[rR]&quot;" context="10"/>

				<RegExpr attribute="Comment" String="#.*$" context="0"/>
				<RegExpr attribute="Comment" String="^\s*'''" context="1"/>
				<RegExpr attribute="Comment" String="^\s*&quot;&quot;&quot;" context="2"/>

				<StringDetect attribute="String" String="'''" context="3"/>
				<StringDetect attribute="String" String="&quot;&quot;&quot;" context="4"/>
				<DetectChar attribute="String" char="'" context="7"/>
				<DetectChar attribute="String" char="&quot;" context="8"/>

				<RegExpr attribute="Operator" String="[+*/\(\)%\|\[\]\{\}:=;\!&lt;&gt;!^&amp;~-]" context="0"/>

			</context>

			<context name="Tripple A-comment" attribute="Comment" lineEndContext="1">
				<HlCChar attribute="Comment" context="1"/>
				<RegExpr attribute="Comment" String="'''" context="0"/>
			</context>

			<context name="Tripple Q-comment" attribute="Comment" lineEndContext="2">
				<HlCChar attribute="Comment" context="2"/>
				<RegExpr attribute="Comment" String="&quot;&quot;&quot;" context="0"/>
			</context>

			<context name="Tripple A-string" attribute="String" lineEndContext="3">
				<HlCChar attribute="String" context="3"/>
				<RegExpr attribute="Operator" String="%[a-zA-Z]" context="3"/>
				<RegExpr attribute="String" String="'''" context="0"/>
			</context>

			<context name="Tripple Q-string" attribute="String" lineEndContext="4">
				<HlCStringChar attribute="String" context="4"/>
				<RegExpr attribute="Operator" String="%[a-zA-Z]" context="4"/>
				<RegExpr attribute="String" String="&quot;&quot;&quot;" context="0"/>
			</context>

			<context name="Single A-comment" attribute="Comment" lineEndContext="5">
				<HlCStringChar attribute="Comment" context="5"/>
				<DetectChar attribute="Comment" char="'" context="0"/>
			</context>

			<context name="Single Q-comment" attribute="Comment" lineEndContext="6">
				<HlCStringChar attribute="Comment" context="6"/>
				<DetectChar attribute="Comment" char="&quot;" context="0"/>
			</context>

			<context name="Single A-string" attribute="String" lineEndContext="7">
				<HlCStringChar attribute="String" context="7"/>
				<RegExpr attribute="Operator" String="%[a-zA-Z]" context="7"/>
				<DetectChar attribute="String" char="'" context="0"/>
			</context>

			<context name="Single Q-string" attribute="String" lineEndContext="8">
				<HlCStringChar attribute="String" context="8"/>
				<RegExpr attribute="Operator" String="%[a-zA-Z]" context="8"/>
				<DetectChar attribute="String" char="&quot;" context="0"/>
			</context>

			<context name="Raw A-string" attribute="Raw String" lineEndContext="9">
				<HlCStringChar attribute="Raw String" context="9"/>
				<DetectChar attribute="Raw String" char="'" context="0"/>
			</context>

			<context name="Raw Q-string" attribute="Raw String" lineEndContext="10">
				<HlCStringChar attribute="Raw String" context="10"/>
				<DetectChar attribute="Raw String" char="&quot;" context="0"/>
			</context>


		</contexts>
		<itemDatas>
			<itemData name="Normal Text" defStyleNum="dsNormal"/>
			<itemData name="Operator" defStyleNum="dsChar"/>
			<itemData name="Keyword" defStyleNum="dsKeyword"/>
			<itemData name="Builtin Function" defStyleNum="dsDataType"/>
			<itemData name="Special Variable" defStyleNum="dsOthers"/>
			<itemData name="Preprocessor" defStyleNum="dsChar"/>
			<itemData name="Long" defStyleNum="dsOthers"/>
			<itemData name="Float" defStyleNum="dsFloat"/>
			<itemData name="Int" defStyleNum="dsDecVal"/>
			<itemData name="Hex" defStyleNum="dsOthers"/>
			<itemData name="Octal" defStyleNum="dsOthers"/>
			<itemData name="Complex" defStyleNum="dsOthers"/>
			<itemData name="Comment" defStyleNum="dsComment"/>
			<itemData name="String" defStyleNum="dsString"/>
			<itemData name="Raw String" defStyleNum="dsString"/>
		</itemDatas>
	</highlighting>
</language>