Syntax highlighting for KDE kate

Discussion in 'Cadence' started by Geier, Apr 14, 2008.

  1. Geier

    Geier Guest

    Hello,

    i have adapted a kate syntax highlighting file for kate.
    This is to be stored under ~/.kde/share/apps/katepart/syntax/skill.xml

    File: skill.xml
    ----------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE language SYSTEM "language.dtd">
    <!--
    This file is part of KDE's kate project.

    copyright : (C) 2008 by Jan Sundermeyer
    email : sunderme at gmx dot de
    (adaptation for Cadence skill)

    copyright : (C) 2004-2005 by Dominik Haumann
    email : dhdev at gmx dot de


    copyright : (C) 2004 by Goffart Olivier
    email : ogoffart @ kde.org
    (brackets coloration)



    **********************************************************************
    * This library is free software; you can redistribute it and/or
    *
    * modify it under the terms of the GNU Library General Public
    *
    * License as published by the Free Software Foundation; either
    *
    * version 2 of the License, or (at your option) any later version.
    *
    *
    *
    * This library is distributed in the hope that it will be useful,
    *
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    *
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    *
    * Library General Public License for more details.
    *
    *
    *
    * You should have received a copy of the GNU Library General Public
    *
    * License along with this library; if not, write to the
    *
    * Free Software Foundation, Inc., 51 Franklin Street, Fifth
    Floor, *
    * Boston, MA 02110-1301, USA.
    *

    **********************************************************************
    NOTE:
    This file defines highlighting rules for Cadence skill.
    -->
    <language version="1.01" kateversion="2.4" name="skill"
    section="Scripts" extensions="*.il" mimetype="text/x-skill"
    author="Jan Sundermeyer ()" license="LGPL">
    <highlighting>
    <list name="operators">
    <item> &lt;= </item>
    <item> &lt; </item>
    <item> = </item>
    <item> =&gt; </item>
    <item> &gt;= </item>
    <item> &gt; </item>
    <item> - </item>
    <item> / </item>
    <item> *,* </item>
    <item> *) </item>
    <item> + </item>
    </list>
    <list name="keywords">
    <item>abs</item>
    <item>acos</item>
    <item>add1</item>
    <item>addDefstructClass</item>
    <item>alias</item>
    <item>alphalessp</item>
    <item>alphaNumCmp</item>
    <item>and</item>
    <item>append</item>
    <item>append1</item>
    <item>apply</item>
    <item>argc</item>
    <item>argv</item>
    <item>arrayp</item>
    <item>arrayref</item>
    <item>asin</item>
    <item>assoc</item>
    <item>assq</item>
    <item>assv</item>
    <item>atan</item>
    <item>atan2</item>
    <item>atof</item>
    <item>atoi</item>
    <item>atom</item>
    <item>band</item>
    <item>bcdp</item>
    <item>begin</item>
    <item>bitfield1</item>
    <item>bitfield</item>
    <item>blankstrp</item>
    <item>bnand</item>
    <item>bnor</item>
    <item>bnot</item>
    <item>booleanp</item>
    <item>bor</item>
    <item>boundp</item>
    <item>buildString</item>
    <item>bxnor</item>
    <item>bxor</item>
    <item>caaaar</item>
    <item>caaadr</item>
    <item>caaar</item>
    <item>caadar</item>
    <item>caaddr</item>
    <item>caadr</item>
    <item>caar</item>
    <item>cadaar</item>
    <item>cadadr</item>
    <item>cadar</item>
    <item>caddar</item>
    <item>cadddr</item>
    <item>caddr</item>
    <item>cadr</item>
    <item>car</item>
    <item>case</item>
    <item>caseq</item>
    <item>cdaaar</item>
    <item>cdaadr</item>
    <item>cdaar</item>
    <item>cdadar</item>
    <item>cdaddr</item>
    <item>cdadr</item>
    <item>cdar</item>
    <item>cddaar</item>
    <item>cddadr</item>
    <item>cddar</item>
    <item>cdddar</item>
    <item>cddddr</item>
    <item>cdddr</item>
    <item>cddr</item>
    <item>cdr</item>
    <item>cdsGetInstPath</item>
    <item>ceiling</item>
    <item>changeWorkingDir</item>
    <item>charToInt</item>
    <item>clearExitProcs</item>
    <item>close</item>
    <item>compareTime</item>
    <item>compress</item>
    <item>concat</item>
    <item>cond</item>
    <item>cons</item>
    <item>constar</item>
    <item>copy</item>
    <item>copyDefstructDeep</item>
    <item>cos</item>
    <item>cputime</item>
    <item>createDir</item>
    <item>csh</item>
    <item>declare</item>
    <item>declareLambda</item>
    <item>declareNLambda</item>
    <item>declareSQNLambda</item>
    <item>define</item>
    <item>defmacro</item>
    <item>defMathConstants</item>
    <item>defprop</item>
    <item>defstruct</item>
    <item>defstructp</item>
    <item>defun</item>
    <item>defUserInitProc</item>
    <item>defvar</item>
    <item>deleteDir</item>
    <item>deleteFile</item>
    <item>difference</item>
    <item>display</item>
    <item>do</item>
    <item>drain</item>
    <item>dtpr</item>
    <item>ed</item>
    <item>edi</item>
    <item>edit</item>
    <item>edl</item>
    <item>envobj</item>
    <item>eq</item>
    <item>equal</item>
    <item>eqv</item>
    <item>err</item>
    <item>error</item>
    <item>errset</item>
    <item>errsetstring</item>
    <item>eval</item>
    <item>evalstring</item>
    <item>evenp</item>
    <item>exists</item>
    <item>exit</item>
    <item>exp</item>
    <item>expandMacro</item>
    <item>expt</item>
    <item>fboundp</item>
    <item>fileLength</item>
    <item>fileSeek</item>
    <item>fileTell</item>
    <item>fileTimeModified</item>
    <item>fix</item>
    <item>fixp</item>
    <item>float</item>
    <item>floatp</item>
    <item>floor</item>
    <item>for</item>
    <item>forall</item>
    <item>foreach</item>
    <item>fprintf</item>
    <item>fscanf</item>
    <item>funcall</item>
    <item>funobj</item>
    <item>gc</item>
    <item>gensym</item>
    <item>geqp</item>
    <item>get</item>
    <item>get_filename</item>
    <item>get_pname</item>
    <item>get_string</item>
    <item>getc</item>
    <item>getchar</item>
    <item>getCurrentTime</item>
    <item>getd</item>
    <item>getDirFiles</item>
    <item>getFnWriteProtect</item>
    <item>getFunType</item>
    <item>getInstallPath</item>
    <item>getLogin</item>
    <item>getPrompts</item>
    <item>getq</item>
    <item>getqq</item>
    <item>getTempDir</item>
    <item>gets</item>
    <item>getShellEnvVar</item>
    <item>getSkillPath</item>
    <item>getSkillVersion</item>
    <item>getVarWriteProtect</item>
    <item>getVersion</item>
    <item>getWarn</item>
    <item>getWorkingDir</item>
    <item>go</item>
    <item>greaterp</item>
    <item>help</item>
    <item>if</item>
    <item>importSkillVar</item>
    <item>index</item>
    <item>infile</item>
    <item>inportp</item>
    <item>inScheme</item>
    <item>inSkill</item>
    <item>instring</item>
    <item>integerp</item>
    <item>intToChar</item>
    <item>isCallable</item>
    <item>isDir</item>
    <item>isExecutable</item>
    <item>isFile</item>
    <item>isFileEncrypted</item>
    <item>isFileName</item>
    <item>isInfinity</item>
    <item>isLargeFile</item>
    <item>isLink</item>
    <item>isMacro</item>
    <item>isNaN</item>
    <item>isReadable</item>
    <item>isWritable</item>
    <item>lambda</item>
    <item>last</item>
    <item>lconc</item>
    <item>leftshift</item>
    <item>length</item>
    <item>leqp</item>
    <item>lessp</item>
    <item>let</item>
    <item>letrec</item>
    <item>letseq</item>
    <item>lineread</item>
    <item>linereadstring</item>
    <item>list</item>
    <item>listp</item>
    <item>listToVector</item>
    <item>load</item>
    <item>loadi</item>
    <item>loadstring</item>
    <item>log</item>
    <item>log10</item>
    <item>lowerCase</item>
    <item>makeTable</item>
    <item>makeTempFileName</item>
    <item>makeVector</item>
    <item>map</item>
    <item>mapc</item>
    <item>mapcan</item>
    <item>mapcar</item>
    <item>maplist</item>
    <item>max</item>
    <item>measureTime</item>
    <item>member, memq, memv</item>
    <item>min</item>
    <item>minus</item>
    <item>minusp</item>
    <item>mod</item>
    <item>modulo</item>
    <item>mprocedure</item>
    <item>nconc</item>
    <item>ncons</item>
    <item>needNCells</item>
    <item>negativep</item>
    <item>neq</item>
    <item>nequal</item>
    <item>newline</item>
    <item>nindex</item>
    <item>nlambda</item>
    <item>not</item>
    <item>nprocedure</item>
    <item>nth</item>
    <item>nthcdr</item>
    <item>nthelem</item>
    <item>null</item>
    <item>numberp</item>
    <item>numOpenFiles</item>
    <item>oddp</item>
    <item>onep</item>
    <item>openportp</item>
    <item>or</item>
    <item>otherp</item>
    <item>outfile</item>
    <item>outportp</item>
    <item>pairp</item>
    <item>parseString</item>
    <item>plist</item>
    <item>plus</item>
    <item>plusp</item>
    <item>portp</item>
    <item>postdecrement</item>
    <item>postincrement</item>
    <item>pprint</item>
    <item>predecrement</item>
    <item>preincrement</item>
    <item>prependInstallPath</item>
    <item>print</item>
    <item>printf</item>
    <item>printlev</item>
    <item>println</item>
    <item>procedure</item>
    <item>procedurep</item>
    <item>prog</item>
    <item>prog1</item>
    <item>prog2</item>
    <item>progn</item>
    <item>putd</item>
    <item>putprop</item>
    <item>putpropq</item>
    <item>putpropqq</item>
    <item>quote</item>
    <item>quotient</item>
    <item>random</item>
    <item>range</item>
    <item>read</item>
    <item>readstring</item>
    <item>readTable</item>
    <item>realp</item>
    <item>regExitAfter</item>
    <item>regExitBefore</item>
    <item>remainder</item>
    <item>remd</item>
    <item>remdq</item>
    <item>remExitProc</item>
    <item>remove</item>
    <item>remprop</item>
    <item>remq</item>
    <item>renameFile</item>
    <item>return</item>
    <item>reverse</item>
    <item>rexCompile</item>
    <item>rexExecute</item>
    <item>rexMagic</item>
    <item>rexMatchAssocList</item>
    <item>rexMatchList</item>
    <item>rexMatchp</item>
    <item>rexReplace</item>
    <item>rexSubstitute</item>
    <item>rightshift</item>
    <item>rindex</item>
    <item>round</item>
    <item>rplaca</item>
    <item>rplacd</item>
    <item>scanf</item>
    <item>schemeTopLevelEnv</item>
    <item>set</item>
    <item>setarray</item>
    <item>setcar</item>
    <item>setcdr</item>
    <item>setFnWriteProtect</item>
    <item>setof</item>
    <item>setplist</item>
    <item>setPrompts</item>
    <item>setq</item>
    <item>setqbitfield1</item>
    <item>setqbitfield</item>
    <item>setShellEnvVar</item>
    <item>setSkillPath</item>
    <item>setVarWriteProtect</item>
    <item>sh</item>
    <item>shell</item>
    <item>simplifyFilename</item>
    <item>sin</item>
    <item>sort</item>
    <item>sortcar</item>
    <item>sprintf</item>
    <item>sqrt</item>
    <item>srandom</item>
    <item>sscanf</item>
    <item>sstatus</item>
    <item>status</item>
    <item>strcat</item>
    <item>strcmp</item>
    <item>stringp</item>
    <item>stringToFunction</item>
    <item>stringToSymbol</item>
    <item>stringToTime</item>
    <item>strlen</item>
    <item>strncat</item>
    <item>strncmp</item>
    <item>sub1</item>
    <item>subst</item>
    <item>substring</item>
    <item>sxtd</item>
    <item>symbolp</item>
    <item>symbolToString</item>
    <item>symeval</item>
    <item>symstrp</item>
    <item>system</item>
    <item>tablep</item>
    <item>tableToList</item>
    <item>tailp</item>
    <item>tan</item>
    <item>tconc</item>
    <item>theEnvironment</item>
    <item>times</item>
    <item>timeToString</item>
    <item>timeToTm</item>
    <item>tmToTime</item>
    <item>truncate</item>
    <item>type</item>
    <item>typep</item>
    <item>unalias</item>
    <item>unless</item>
    <item>upperCase</item>
    <item>vector</item>
    <item>vectorp</item>
    <item>vectorToList</item>
    <item>vi</item>
    <item>vii</item>
    <item>vil</item>
    <item>warn</item>
    <item>when</item>
    <item>which</item>
    <item>while</item>
    <item>write</item>
    <item>writeTable</item>
    <item>xcons</item>
    <item>xCoord</item>
    <item>xdifference</item>
    <item>xplus</item>
    <item>xquotient</item>
    <item>xtimes</item>
    <item>yCoord</item>
    <item>zerop</item>
    </list>
    <contexts>
    <context name="Level0" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets1" context="Level1"
    char="("/>
    <IncludeRules context="Default" />
    </context>
    <context name="Default" attribute="Normal"
    lineEndContext="#stay">
    <RegExpr attribute="Region Marker" context="#stay" String=";+
    \s*BEGIN.*$" beginRegion="region"/>
    <RegExpr attribute="Region Marker" context="#stay" String=";+
    \s*END.*$" endRegion="region"/>
    <RegExpr attribute="Comment" context="#stay" String=";.*$"/>
    <Detect2Chars attribute="Comment" context="MultiLineComment"
    char="#" char1="!" beginRegion="region"/>
    <keyword attribute="Keyword" context="#stay" String="keywords"/<keyword attribute="Operator" context="#stay"
    String="operators"/>
    <RegExpr attribute="Definition" context="#stay" String="'\w*"/>
    <RegExpr attribute="Data" context="#stay" String="\?\w*"/>
    <RegExpr attribute="Function" context="#stay" String="\w*(?=\()"/>
    <RegExpr attribute="Char" context="SpecialNumber"
    String="#[bodxei]"/>
    <RegExpr attribute="Decimal" context="#stay" String="#[tf]"/>
    <Float attribute="Float" context="#stay"/>
    <Int attribute="Decimal" context="#stay"/>
    <DetectChar attribute="Brackets1" context="Level1" char="("/>
    </context>
    <context name="MultiLineComment" attribute="Comment"
    lineEndContext="#stay">
    <RegExpr attribute="Comment" context="#pop" String="!#\s*$"
    endRegion="region" column="0"/>
    </context>
    <context name="SpecialNumber" attribute="Normal"
    fallthrough="true" lineEndContext="#pop">
    <RegExpr attribute="Decimal" context="#pop" String="\d*(\.\d
    +)?"/>
    </context>
    <context name="String" attribute="String"
    lineEndContext="#stay">
    <RegExpr attribute="Char" context="#stay" String="#\\."/>
    <Detect2Chars attribute="Char" context="#stay" char="\"
    char1="&quot;"/>
    <Detect2Chars attribute="Char" context="#stay" char="\"
    char1="\"/>
    <DetectChar attribute="String" context="#pop" char="&quot;"/>
    </context>
    <context name="Level1" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets2" context="Level2" char="("/<DetectChar attribute="Brackets1" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    <context name="Level2" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets3" context="Level3" char="("/<DetectChar attribute="Brackets2" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    <context name="Level3" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets4" context="Level4" char="("/<DetectChar attribute="Brackets3" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    <context name="Level4" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets5" context="Level5" char="("/<DetectChar attribute="Brackets4" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    <context name="Level5" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets6" context="Level6" char="("/<DetectChar attribute="Brackets5" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    <context name="Level6" attribute="Normal"
    lineEndContext="#stay">
    <DetectChar attribute="Brackets1" context="Level1" char="("/<DetectChar attribute="Brackets6" context="#pop" char=")" /<IncludeRules context="Default" />
    </context>
    </contexts>
    <itemDatas>
    <itemData name="Normal" defStyleNum="dsNormal"/>
    <itemData name="Keyword" defStyleNum="dsKeyword"/>
    <itemData name="Definition" defStyleNum="dsKeyword"
    color="#d22811"/>
    <itemData name="Operator" defStyleNum="dsKeyword"
    color="#d22811"/>
    <itemData name="Function" defStyleNum="dsFunction"/>
    <itemData name="Data" defStyleNum="dsDataType"/>
    <itemData name="Decimal" defStyleNum="dsDecVal"/>
    <itemData name="BaseN" defStyleNum="dsBaseN"/>
    <itemData name="Float" defStyleNum="dsFloat"/>
    <itemData name="Char" defStyleNum="dsChar"/>
    <itemData name="String" defStyleNum="dsString"/>
    <itemData name="Comment" defStyleNum="dsComment"/>
    <itemData name="Region Marker" defStyleNum="dsRegionMarker"/>
    <itemData name="Brackets1" defStyleNum="dsNormal"
    color="#ff0000" selColor="#000000" bold="1" italic="0"/>
    <itemData name="Brackets2" defStyleNum="dsNormal"
    color="#ff8800" selColor="#000000" bold="1" italic="0"/>
    <itemData name="Brackets3" defStyleNum="dsNormal"
    color="#888800" selColor="#000000" bold="1" italic="0"/>
    <itemData name="Brackets4" defStyleNum="dsNormal"
    color="#008800" selColor="#000000" bold="1" italic="0"/>
    <itemData name="Brackets5" defStyleNum="dsNormal"
    color="#000088" selColor="#000000" bold="1" italic="0"/>
    <itemData name="Brackets6" defStyleNum="dsNormal"
    color="#880088" selColor="#000000" bold="1" italic="0"/>
    </itemDatas>
    </highlighting>
    <general>
    <!-- <keywords casesensitive="1" weakDeliminator="-+*?!&lt;&gt;=/:#
    \"/> -->
    <comments>
    <comment name="singleLine" start=";;" />
    <comment name="multiLine" start="#!" end="!#" />
    </comments>
    </general>
    </language>
     
    Geier, Apr 14, 2008
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.