diff options
Diffstat (limited to 'kig/scripting/python-kig.xml')
-rw-r--r-- | kig/scripting/python-kig.xml | 289 |
1 files changed, 289 insertions, 0 deletions
diff --git a/kig/scripting/python-kig.xml b/kig/scripting/python-kig.xml new file mode 100644 index 00000000..930d5f8f --- /dev/null +++ b/kig/scripting/python-kig.xml @@ -0,0 +1,289 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language> +<!-- Python syntax highlightning v0.9 by Per Wigren --> +<!-- Python syntax highlightning v1.2.x for Kig by Pino Toscano --> +<language name="Python-Kig" version="1.2.1" kateversion="2.1" section="Scripts" extensions="*.py;*.pyw" mimetype="application/x-python;text/x-python" casesensitive="1"> + <highlighting> + <list name="prep"> + <item> import </item> + <item> from </item> + <item> as </item> + </list> + + <list name="statements"> + <item> and </item> + <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> + <!-- BEGIN: math module functions --> + <item> acos </item> + <item> asin </item> + <item> atan </item> + <item> atan2 </item> + <item> ceil </item> + <item> cos </item> + <item> cosh </item> + <item> degrees </item> + <item> exp </item> + <item> fabs </item> + <item> floor </item> + <item> fmod </item> + <item> frexp </item> + <item> hypot </item> + <item> ldexp </item> + <item> log </item> + <item> log10 </item> + <item> modf </item> + <item> radians </item> + <item> sin </item> + <item> sinh </item> + <item> sqrt </item> + <item> tan </item> + <item> tanh </item> + <!-- END: math module functions --> + </list> + + <list name="specialvars"> + <item> None </item> + <item> self </item> + </list> + + <list name="kigobjects"> + <item> AbstractLine </item> + <item> Angle </item> + <item> Arc </item> + <item> BogusObject </item> + <item> CartesianConic </item> + <item> Circle </item> + <item> Conic </item> + <item> ConicCartesianData </item> + <item> ConicPolarData </item> + <item> Coordinate </item> + <item> Cubic </item> + <item> CubicCartesianData </item> + <item> Curve </item> + <item> DoubleObject </item> + <item> IntObject </item> + <item> InvalidObject </item> + <item> Line </item> + <item> LineData </item> + <item> Object </item> + <item> ObjectType </item> + <item> Point </item> + <item> PolarConic </item> + <item> Ray </item> + <item> Segment </item> + <item> StringObject </item> + <item> TestResultObject </item> + <item> Transformation </item> + <item> Vector </item> + </list> + + <list name="mathconsts"> + <item> e </item> + <item> pi </item> + </list> + + <contexts> + <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> + <keyword attribute="Preprocessor" String="prep" context="#stay"/> + <keyword attribute="Keyword" String="statements" context="#stay"/> + <keyword attribute="Builtin Function" String="builtinfuncs" context="#stay"/> + <keyword attribute="Special Variable" String="specialvars" context="#stay"/> + <keyword attribute="Kig Object" String="kigobjects" context="#stay" /> + <keyword attribute="Math Constants" String="mathconsts" context="#stay" /> + <RegExpr attribute="Normal" String="[a-zA-Z_][a-zA-Z_0-9]+" context="#stay"/> + + <RegExpr attribute="Complex" String=" ((([0-9]*\.[0-9]+|[0-9]+\.)|([0-9]+|([0-9]*\.[0-9]+|[0-9]+\.))[eE](\+|-)?[0-9]+)|[0-9]+)[jJ]" context="#stay"/> + <RegExpr attribute="Float" String="([0-9]+\.[0-9]*|\.[0-9]+)([eE][0-9]+)?" context="#stay"/> + <RegExpr attribute="Int" String="([1-9][0-9]*([eE][0-9]+)?|0)" context="#stay"/> + <RegExpr attribute="Long" String="[1-9][0-9]*([eE][0-9.]+)?[Ll]" context="#stay"/> + <RegExpr attribute="Hex" String="0[Xx][0-9a-fA-F]+" context="#stay"/> + <RegExpr attribute="Octal" String="0[1-9][0-9]*" context="#stay"/> + + <RegExpr attribute="Raw String" String="[rR]'" context="Raw A-string"/> + <RegExpr attribute="Raw String" String="[rR]"" context="Raw Q-string"/> + + <RegExpr attribute="Comment" String="#.*$" context="#stay"/> + <RegExpr attribute="Comment" String="^\s*'''" context="Tripple A-comment"/> + <RegExpr attribute="Comment" String="^\s*"""" context="Tripple Q-comment"/> + + <StringDetect attribute="String" String="'''" context="Tripple A-string"/> + <StringDetect attribute="String" String=""""" context="Tripple Q-string"/> + <DetectChar attribute="String" char="'" context="Single A-string"/> + <DetectChar attribute="String" char=""" context="Single Q-string"/> + + <RegExpr attribute="Operator" String="[+*/\(\)%\|\[\]\{\}:=;\!<>!^&~-]" context="#stay"/> + + </context> + + <context name="Tripple A-comment" attribute="Comment" lineEndContext="#stay"> + <HlCChar attribute="Comment" context="#stay"/> + <RegExpr attribute="Comment" String="'''" context="#pop"/> + </context> + + <context name="Tripple Q-comment" attribute="Comment" lineEndContext="#stay"> + <HlCChar attribute="Comment" context="#stay"/> + <RegExpr attribute="Comment" String=""""" context="#pop"/> + </context> + + <context name="Tripple A-string" attribute="String" lineEndContext="#stay"> + <HlCChar attribute="String" context="#stay"/> + <RegExpr attribute="Operator" String="%[a-zA-Z]" context="#stay"/> + <RegExpr attribute="String" String="'''" context="#pop"/> + </context> + + <context name="Tripple Q-string" attribute="String" lineEndContext="#stay"> + <HlCStringChar attribute="String" context="#stay"/> + <RegExpr attribute="Operator" String="%[a-zA-Z]" context="#stay"/> + <RegExpr attribute="String" String=""""" context="#pop"/> + </context> + + <context name="Single A-comment" attribute="Comment" lineEndContext="#stay"> + <HlCStringChar attribute="Comment" context="#stay"/> + <DetectChar attribute="Comment" char="'" context="#pop"/> + </context> + + <context name="Single Q-comment" attribute="Comment" lineEndContext="#stay"> + <HlCStringChar attribute="Comment" context="#stay"/> + <DetectChar attribute="Comment" char=""" context="#pop"/> + </context> + + <context name="Single A-string" attribute="String" lineEndContext="#stay"> + <HlCStringChar attribute="String" context="#stay"/> + <RegExpr attribute="Operator" String="%[a-zA-Z]" context="#stay"/> + <DetectChar attribute="String" char="'" context="#pop"/> + </context> + + <context name="Single Q-string" attribute="String" lineEndContext="#stay"> + <HlCStringChar attribute="String" context="#stay"/> + <RegExpr attribute="Operator" String="%[a-zA-Z]" context="#stay"/> + <DetectChar attribute="String" char=""" context="#pop"/> + </context> + + <context name="Raw A-string" attribute="Raw String" lineEndContext="#stay"> + <HlCStringChar attribute="Raw String" context="#stay"/> + <DetectChar attribute="Raw String" char="'" context="#pop"/> + </context> + + <context name="Raw Q-string" attribute="Raw String" lineEndContext="#stay"> + <HlCStringChar attribute="Raw String" context="#stay"/> + <DetectChar attribute="Raw String" char=""" context="#pop"/> + </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="Kig Object" defStyleNum="dsKeyword" color="#000080" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Math Constants" defStyleNum="dsKeyword" color="#008000" selColor="#00FF00" bold="0" italic="0"/> + <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> + <general> +<!-- <folding indentationsensitive="1" /> --> + <comments> + <comment name="singleLine" start="#" /> + </comments> + <keywords casesensitive="1" /> + </general> +</language> |