224 lines
7.6 KiB
XML
224 lines
7.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?><!-- kate: space-indent on; indent-width 2 -->
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
|
<language name="Python" version="1.0" section="Scripts"
|
|
mimetypes="text/x-python;application/x-python"
|
|
extensions="*.py;*.pyw">
|
|
|
|
<syntax>
|
|
<context name="Normal">
|
|
<IncludeRules from="##Misc##ShebangRules"/>
|
|
<Regex pattern="[uUrR]?"""" context="MultilineString" style="Multiline String"/>
|
|
<Regex pattern="[uUrR]?'''" context="MultilineString2" style="Multiline String"/>
|
|
<Regex pattern="[uUrR]?"" context="String" style="String"/>
|
|
<Regex pattern="[uUrR]?'" context="String2" style="String"/>
|
|
<Char char="#" context="Comment" include-into-next="TRUE" style="Comment"/>
|
|
<Keyword keyword="Module Handler" style="Others"/>
|
|
<Keyword keyword="Functions" style="Keyword"/>
|
|
<Keyword keyword="Special Variable" style="Others"/>
|
|
<Keyword keyword="Keywords" style="Keyword"/>
|
|
<Keyword keyword="Builtins" style="Data Type"/>
|
|
<Regex pattern="\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b" style="Decimal"/>
|
|
<Regex pattern="\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?" style="Floating Point"/>
|
|
<Regex pattern="\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b" style="BaseN"/>
|
|
<Regex pattern="\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b" style="BaseN"/>
|
|
</context>
|
|
<context name="MultilineString" style="Multiline String">
|
|
<String string=""""" include-into-next="TRUE" context="#pop" style="Multiline String"/>
|
|
</context>
|
|
<context name="MultilineString2" style="Multiline String">
|
|
<String string="'''" include-into-next="TRUE" context="#pop" style="Multiline String"/>
|
|
</context>
|
|
<context name="String" style="String">
|
|
<Char char=""" include-into-next="TRUE" context="#pop" style="String"/>
|
|
</context>
|
|
<context name="String2" style="String">
|
|
<Char char="'" include-into-next="TRUE" context="#pop" style="String"/>
|
|
</context>
|
|
<context name="Comment" style="Comment" end-of-line-context="#pop">
|
|
<IncludeRules from="##Misc##AlertRules"/>
|
|
</context>
|
|
|
|
<keyword-list name="Module Handler">
|
|
<keyword>import</keyword>
|
|
<keyword>from</keyword>
|
|
<keyword>as</keyword>
|
|
<keyword>__name__</keyword>
|
|
<keyword>__debug__</keyword>
|
|
</keyword-list>
|
|
|
|
<keyword-list name="Functions">
|
|
<keyword>def</keyword>
|
|
<keyword>class</keyword>
|
|
<keyword>return</keyword>
|
|
</keyword-list>
|
|
|
|
<keyword-list name="Special Variable">
|
|
<keyword>True</keyword>
|
|
<keyword>False</keyword>
|
|
<keyword>None</keyword>
|
|
</keyword-list>
|
|
|
|
<keyword-list name="Keywords">
|
|
<keyword>and</keyword>
|
|
<keyword>assert</keyword>
|
|
<keyword>break</keyword>
|
|
<keyword>continue</keyword>
|
|
<keyword>del</keyword>
|
|
<keyword>elif</keyword>
|
|
<keyword>else</keyword>
|
|
<keyword>except</keyword>
|
|
<keyword>exec</keyword>
|
|
<keyword>finally</keyword>
|
|
<keyword>for</keyword>
|
|
<keyword>global</keyword>
|
|
<keyword>if</keyword>
|
|
<keyword>in</keyword>
|
|
<keyword>is</keyword>
|
|
<keyword>lambda</keyword>
|
|
<keyword>not</keyword>
|
|
<keyword>or</keyword>
|
|
<keyword>pass</keyword>
|
|
<keyword>print</keyword>
|
|
<keyword>raise</keyword>
|
|
<keyword>try</keyword>
|
|
<keyword>while</keyword>
|
|
<keyword>yield</keyword>
|
|
</keyword-list>
|
|
|
|
<keyword-list name="Builtins">
|
|
<keyword>ArithmeticError</keyword>
|
|
<keyword>AssertionError</keyword>
|
|
<keyword>AttributeError</keyword>
|
|
<keyword>DeprecationWarning</keyword>
|
|
<keyword>EnvironmentError</keyword>
|
|
<keyword>EOFError</keyword>
|
|
<keyword>Exception</keyword>
|
|
<keyword>FloatingPointError</keyword>
|
|
<keyword>FutureWarning</keyword>
|
|
<keyword>ImportError</keyword>
|
|
<keyword>IndentationError</keyword>
|
|
<keyword>IndexError</keyword>
|
|
<keyword>IOError</keyword>
|
|
<keyword>KeyboardInterrupt</keyword>
|
|
<keyword>KeyError</keyword>
|
|
<keyword>LookupError</keyword>
|
|
<keyword>MemoryError</keyword>
|
|
<keyword>NameError</keyword>
|
|
<keyword>NotImplementedError</keyword>
|
|
<keyword>OSError</keyword>
|
|
<keyword>OverflowError</keyword>
|
|
<keyword>OverflowWarning</keyword>
|
|
<keyword>PendingDeprecationWarning</keyword>
|
|
<keyword>ReferenceError</keyword>
|
|
<keyword>RuntimeError</keyword>
|
|
<keyword>RuntimeWarning</keyword>
|
|
<keyword>StandardError</keyword>
|
|
<keyword>StopIteration</keyword>
|
|
<keyword>SyntaxError</keyword>
|
|
<keyword>SyntaxWarning</keyword>
|
|
<keyword>SystemError</keyword>
|
|
<keyword>SystemExit</keyword>
|
|
<keyword>TabError</keyword>
|
|
<keyword>TypeError</keyword>
|
|
<keyword>UnboundLocalError</keyword>
|
|
<keyword>UnicodeDecodeError</keyword>
|
|
<keyword>UnicodeEncodeError</keyword>
|
|
<keyword>UnicodeError</keyword>
|
|
<keyword>UnicodeTranslateError</keyword>
|
|
<keyword>UserWarning</keyword>
|
|
<keyword>ValueError</keyword>
|
|
<keyword>Warning</keyword>
|
|
<keyword>WindowsError</keyword>
|
|
<keyword>ZeroDivisionError</keyword>
|
|
|
|
<keyword>__import__</keyword>
|
|
|
|
<keyword>abs</keyword>
|
|
<keyword>apply</keyword>
|
|
<keyword>basestring</keyword>
|
|
<keyword>bool</keyword>
|
|
<keyword>buffer</keyword>
|
|
<keyword>callable</keyword>
|
|
<keyword>chr</keyword>
|
|
<keyword>classmethod</keyword>
|
|
<keyword>cmp</keyword>
|
|
<keyword>coerce</keyword>
|
|
<keyword>compile</keyword>
|
|
<keyword>complex</keyword>
|
|
<keyword>delattr</keyword>
|
|
<keyword>dict</keyword>
|
|
<keyword>dir</keyword>
|
|
<keyword>divmod</keyword>
|
|
<keyword>enumerate</keyword>
|
|
<keyword>eval</keyword>
|
|
<keyword>execfile</keyword>
|
|
<keyword>file</keyword>
|
|
<keyword>filter</keyword>
|
|
<keyword>float</keyword>
|
|
<keyword>getattr</keyword>
|
|
<keyword>globals</keyword>
|
|
<keyword>hasattr</keyword>
|
|
<keyword>hash</keyword>
|
|
<keyword>hex</keyword>
|
|
<keyword>id</keyword>
|
|
<keyword>input</keyword>
|
|
<keyword>intern</keyword>
|
|
<keyword>int</keyword>
|
|
<keyword>isinstance</keyword>
|
|
<keyword>issubclass</keyword>
|
|
<keyword>iter</keyword>
|
|
<keyword>len</keyword>
|
|
<keyword>list</keyword>
|
|
<keyword>locals</keyword>
|
|
<keyword>long</keyword>
|
|
<keyword>map</keyword>
|
|
<keyword>max</keyword>
|
|
<keyword>min</keyword>
|
|
<keyword>object</keyword>
|
|
<keyword>oct</keyword>
|
|
<keyword>open</keyword>
|
|
<keyword>ord</keyword>
|
|
<keyword>pow</keyword>
|
|
<keyword>property</keyword>
|
|
<keyword>range</keyword>
|
|
<keyword>raw_input</keyword>
|
|
<keyword>reduce</keyword>
|
|
<keyword>reload</keyword>
|
|
<keyword>repr</keyword>
|
|
<keyword>round</keyword>
|
|
<keyword>self</keyword>
|
|
<keyword>setattr</keyword>
|
|
<keyword>slice</keyword>
|
|
<keyword>staticmethod</keyword>
|
|
<keyword>str</keyword>
|
|
<keyword>sum</keyword>
|
|
<keyword>super</keyword>
|
|
<keyword>tuple</keyword>
|
|
<keyword>type</keyword>
|
|
<keyword>unichr</keyword>
|
|
<keyword>unicode</keyword>
|
|
<keyword>vars</keyword>
|
|
<keyword>xrange</keyword>
|
|
<keyword>zip</keyword>
|
|
</keyword-list>
|
|
</syntax>
|
|
|
|
<styles>
|
|
<style name="Multiline String" default-style="String"/>
|
|
<style name="String" default-style="String"/>
|
|
<style name="Comment" default-style="Comment"/>
|
|
<style name="Others" default-style="Others"/>
|
|
<style name="Keyword" default-style="Keyword"/>
|
|
<style name="Data Type" default-style="DataType"/>
|
|
<style name="Decimal" default-style="Decimal"/>
|
|
<style name="Floating Point" default-style="Float"/>
|
|
<style name="BaseN" default-style="BaseN"/>
|
|
</styles>
|
|
|
|
<general>
|
|
<comments>
|
|
<single-line start="#"/>
|
|
</comments>
|
|
</general>
|
|
</language>
|