summaryrefslogtreecommitdiff
path: root/share/tinykate/syntax/python.xml
Side-by-side diff
Diffstat (limited to 'share/tinykate/syntax/python.xml') (more/less context) (ignore whitespace changes)
-rw-r--r--share/tinykate/syntax/python.xml213
1 files changed, 213 insertions, 0 deletions
diff --git a/share/tinykate/syntax/python.xml b/share/tinykate/syntax/python.xml
new file mode 100644
index 0000000..e7722e9
--- a/dev/null
+++ b/share/tinykate/syntax/python.xml
@@ -0,0 +1,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>