<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="Python" version="1.0" _section="Scripts" mimetypes="text/x-python">

	<escape-char>\</escape-char>

	<string _name = "Multiline Double Quoted String" style = "String" end-at-line-end = "FALSE">
		<start-regex>([uUrR]|[uU][rR]|[rR][uU])?&quot;&quot;&quot;</start-regex>
		<end-regex>&quot;&quot;&quot;</end-regex>
	</string>

	<string _name = "Multiline Single Quoted String" style = "String" end-at-line-end = "FALSE">
		<start-regex>([uUrR]|[uU][rR]|[rR][uU])?&apos;&apos;&apos;</start-regex>
		<end-regex>&apos;&apos;&apos;</end-regex>
	</string>

	<string _name = "Double Quoted String" style = "String" end-at-line-end = "TRUE">
		<start-regex>([uUrR]|[uU][rR]|[rR][uU])?&quot;</start-regex>
		<end-regex>&quot;</end-regex>
	</string>

	<string _name = "Single Quoted String" style = "String" end-at-line-end = "TRUE">
		<start-regex>([uUrR]|[uU][rR]|[rR][uU])?&apos;</start-regex>
		<end-regex>&apos;</end-regex>
	</string>

	<line-comment _name = "Line Comment" style= "Comment">
		<start-regex>#</start-regex>
	</line-comment>

	<keyword-list _name = "Module Handler" style = "Preprocessor" case-sensitive="TRUE">
		<keyword>import</keyword>
		<keyword>from</keyword>
		<keyword>as</keyword>
		<keyword>False</keyword>
		<keyword>None</keyword>
		<keyword>True</keyword>
		<keyword>__name__</keyword>
		<keyword>__debug__</keyword>
	</keyword-list>

	<keyword-list _name = "Function" style = "Keyword" case-sensitive="TRUE">
		<keyword>def</keyword>
		<keyword>class</keyword>
		<keyword>return</keyword>
	</keyword-list>

	<keyword-list _name = "Keyword" style = "Keyword" case-sensitive="TRUE">
		<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" style = "Others" case-sensitive="TRUE">
		<keyword>ArithmeticError</keyword>
		<keyword>AssertionError</keyword>
		<keyword>AttributeError</keyword>
		<keyword>EnvironmentError</keyword>
		<keyword>EOFError</keyword>
		<keyword>Exception</keyword>
		<keyword>FloatingPointError</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>ReferenceError</keyword>
		<keyword>RuntimeError</keyword>
		<keyword>StandardError</keyword>
		<keyword>StopIteration</keyword>
		<keyword>SyntaxError</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>ValueError</keyword>
		<keyword>WindowsError</keyword>
		<keyword>ZeroDivisionError</keyword>
		
		<keyword>Warning</keyword>
		<keyword>UserWarning</keyword>
		<keyword>DeprecationWarning</keyword>
		<keyword>PendingDeprecationWarning</keyword>
		<keyword>SyntaxWarning</keyword>
		<keyword>OverflowWarning</keyword>
		<keyword>RuntimeWarning</keyword>
		<keyword>FutureWarning</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>int</keyword>
		<keyword>intern</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>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>

	<pattern-item name = "Self" style = "Data Type">
		<regex>\bself\b</regex>
	</pattern-item>
	
	<pattern-item _name = "Decimal" style = "Decimal">
		<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
	</pattern-item>

	<pattern-item _name = "Floating Point Number" style = "Floating Point">
		<regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
	</pattern-item>

	<pattern-item _name = "Octal Number" style = "Base-N Integer">
		<regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
	</pattern-item>

	<pattern-item _name = "Hex Number" style = "Base-N Integer">
		<regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
	</pattern-item>

</language>
