diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-16 10:26:47 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-16 10:26:47 +0200 |
commit | 28a7458e48d45bfa1e0a3df9ba0a5f7c13b3809b (patch) | |
tree | 7b13533527f03baee8d9cc4b339b535462ae7ada /library/Text_Highlighter/python.xml | |
parent | 05ed20d336c505520fde94e44789d817d136c6f4 (diff) | |
parent | d457f11717da40f44d98eeba5b88e6f1e5636247 (diff) | |
download | volse-hubzilla-28a7458e48d45bfa1e0a3df9ba0a5f7c13b3809b.tar.gz volse-hubzilla-28a7458e48d45bfa1e0a3df9ba0a5f7c13b3809b.tar.bz2 volse-hubzilla-28a7458e48d45bfa1e0a3df9ba0a5f7c13b3809b.zip |
Merge branch 'dev' into sabre32
Diffstat (limited to 'library/Text_Highlighter/python.xml')
-rw-r--r-- | library/Text_Highlighter/python.xml | 229 |
1 files changed, 229 insertions, 0 deletions
diff --git a/library/Text_Highlighter/python.xml b/library/Text_Highlighter/python.xml new file mode 100644 index 000000000..29e77203c --- /dev/null +++ b/library/Text_Highlighter/python.xml @@ -0,0 +1,229 @@ +<?xml version="1.0"?> +<!-- $Id: python.xml,v 1.1 2007-06-03 02:35:28 ssttoo Exp $ --> + +<highlight lang="python" case="no"> + + <authors> + <author name="Andrey Demenev" email="demenev@gmail.com"/> + </authors> + + <default innerClass="code" /> + + <region name="strsingle3" delimClass="quotes" innerClass="string" + start="'''" end="'''" /> + + <region name="strdouble3" delimClass="quotes" innerClass="string" + start=""""" end="""""> + </region> + + <region name="strdouble" delimClass="quotes" innerClass="string" + start=""" end=""" > + </region> + + <region name="strsingle" delimClass="quotes" innerClass="string" + start="'" end="'" /> + + <region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" > + <contains all="yes"/> + </region> + + <region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" > + <contains all="yes"/> + </region> + + <block name="escaped" match="\\." innerClass="special" contained="yes"> + <onlyin region="strsingle"/> + <onlyin region="strsingle3"/> + <onlyin region="strdouble"/> + <onlyin region="strdouble3"/> + </block> + + <block name="possiblefunction" match="[a-z_]\w*(?=\s*\()" innerClass="identifier" /> + + <block name="identifier" match="[a-z_]\w*" innerClass="identifier" /> + + <block name="exponent" + match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)" + innerClass="number" /> + + <block name="imaginary" match="((\d*\.\d+)|(\d+\.\d*)|(\d+))j" innerClass="number"/> + + <block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number"/> + + <block name="integer" match="\d+l?|\b0l?\b" innerClass="number" /> + + <block name="hexinteger" match="0[xX][\da-f]+l?" innerClass="number" /> + + <block name="octinteger" match="0[0-7]+l?" innerClass="number" /> + + <block name="comment" innerClass="comment" + match="#.+" /> + + <keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes"> + <keyword match="and"/> + <keyword match="del"/> + <keyword match="for"/> + <keyword match="is"/> + <keyword match="raise"/> + <keyword match="assert"/> + <keyword match="elif"/> + <keyword match="from"/> + <keyword match="lambda"/> + <keyword match="return"/> + <keyword match="break"/> + <keyword match="else"/> + <keyword match="global"/> + <keyword match="not"/> + <keyword match="try"/> + <keyword match="class"/> + <keyword match="except"/> + <keyword match="if"/> + <keyword match="or"/> + <keyword match="while"/> + <keyword match="continue"/> + <keyword match="exec"/> + <keyword match="import"/> + <keyword match="pass"/> + <keyword match="yield"/> + <keyword match="def"/> + <keyword match="finally"/> + <keyword match="in"/> + <keyword match="print"/> + <keyword match="False"/> + <keyword match="True"/> + <keyword match="None"/> + <keyword match="NotImplemented"/> + <keyword match="Ellipsis"/> + + <keyword match="Exception" /> + <keyword match="SystemExit" /> + <keyword match="StopIteration" /> + <keyword match="StandardError" /> + <keyword match="KeyboardInterrupt" /> + <keyword match="ImportError" /> + <keyword match="EnvironmentError" /> + <keyword match="IOError" /> + <keyword match="OSError" /> + <keyword match="WindowsError" /> + <keyword match="EOFError" /> + <keyword match="RuntimeError" /> + <keyword match="NotImplementedError" /> + <keyword match="NameError" /> + <keyword match="UnboundLocalError" /> + + <keyword match="AttributeError" /> + <keyword match="SyntaxError" /> + <keyword match="IndentationError" /> + <keyword match="TabError" /> + <keyword match="TypeError" /> + <keyword match="AssertionError" /> + <keyword match="LookupError" /> + <keyword match="IndexError" /> + <keyword match="KeyError" /> + <keyword match="ArithmeticError" /> + <keyword match="OverflowError" /> + <keyword match="ZeroDivisionError" /> + <keyword match="FloatingPointError" /> + <keyword match="ValueError" /> + <keyword match="UnicodeError" /> + <keyword match="UnicodeEncodeError" /> + <keyword match="UnicodeDecodeError" /> + + <keyword match="UnicodeTranslateError" /> + <keyword match="ReferenceError" /> + <keyword match="SystemError" /> + <keyword match="MemoryError" /> + <keyword match="Warning" /> + <keyword match="UserWarning" /> + <keyword match="DeprecationWarning" /> + <keyword match="PendingDeprecationWarning" /> + <keyword match="SyntaxWarning" /> + <keyword match="OverflowWarning" /> + <keyword match="RuntimeWarning" /> + <keyword match="FutureWarning" /> + + </keywords> + + <keywords name="builtin" inherits="possiblefunction" + innerClass="builtin" otherwise="identifier" case = "yes"> + <keyword match="__import__"/> + + <keyword match="abs"/> + <keyword match="apply"/> + <keyword match="basestring"/> + <keyword match="bool"/> + <keyword match="buffer"/> + <keyword match="callable"/> + <keyword match="chr"/> + <keyword match="classmethod"/> + <keyword match="cmp"/> + + <keyword match="coerce"/> + <keyword match="compile"/> + <keyword match="complex"/> + <keyword match="delattr"/> + <keyword match="dict"/> + <keyword match="dir"/> + <keyword match="divmod"/> + <keyword match="enumerate"/> + <keyword match="eval"/> + + <keyword match="execfile"/> + <keyword match="file"/> + <keyword match="filter"/> + <keyword match="float"/> + <keyword match="getattr"/> + <keyword match="globals"/> + <keyword match="hasattr"/> + <keyword match="hash"/> + <keyword match="help"/> + + <keyword match="hex"/> + <keyword match="id"/> + <keyword match="input"/> + <keyword match="int"/> + <keyword match="intern"/> + <keyword match="isinstance"/> + <keyword match="issubclass"/> + <keyword match="iter"/> + <keyword match="len"/> + + <keyword match="list"/> + <keyword match="locals"/> + <keyword match="long"/> + <keyword match="map"/> + <keyword match="max"/> + <keyword match="min"/> + <keyword match="object"/> + <keyword match="oct"/> + <keyword match="open"/> + + <keyword match="ord"/> + <keyword match="pow"/> + <keyword match="property"/> + <keyword match="range"/> + <keyword match="raw_input"/> + <keyword match="reduce"/> + <keyword match="reload"/> + <keyword match="repr"/> + <keyword match="round"/> + + <keyword match="setattr"/> + <keyword match="slice"/> + <keyword match="staticmethod"/> + <keyword match="sum"/> + <keyword match="super"/> + <keyword match="str"/> + <keyword match="tuple"/> + <keyword match="type"/> + <keyword match="unichr"/> + + <keyword match="unicode"/> + <keyword match="vars"/> + <keyword match="xrange"/> + <keyword match="zip"/> + + </keywords> + +</highlight> + |