Warning, /frameworks/syntax-highlighting/data/syntax/picsrc.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004     <!ENTITY hex "[0-9a-f]++h?">
0005     <!ENTITY oct_hex "[0-7]++(?:&hex;|[hoq]?)|&hex;">
0006     <!ENTITY bin_oct_hex "[01]++(?:&oct_hex;|[hoqb]?)|&oct_hex;">
0007 ]>
0008 <!-- kate: space-indent on; indent-width 2; -->
0009 
0010 <!-- Microchip PIC assembler syntaxfile for gpasm/mpasm assembler by
0011   * Original author: Alain GIBAUD (alain.gibaud@univ-valenciennes.fr)
0012   * Small modifications for the new DTD: Joseph Wenninger <jowenn@kde.org>
0013   * Updated for 16-bit devices, etc.: Laurence Withers <lwithers@users.sf.net>
0014 -->
0015 
0016 <language name="PicAsm" version="7" kateversion="5.62" section="Assembler" extensions="*.src;*.SRC;*.asm;*.ASM;*.pic;*.PIC" mimetype="text/x-PicSrc;text/x-PicHdr" author="Alain GIBAUD (alain.gibaud@univ-valenciennes.fr)" license="LGPL">
0017   
0018   <highlighting>
0019     <list name="directives">
0020       <item>__BADRAM</item>
0021       <item>__CONFIG</item>
0022       <item>__IDLOCS</item>
0023       <item>__MAXRAM</item>
0024       
0025       <item>cblock</item>
0026       <item>constant</item>
0027       <item>da</item>
0028       <item>data</item>
0029       <item>db</item>
0030       <item>de</item>
0031       <item>dt</item>
0032       <item>dw</item>
0033       <item>endc</item>
0034       <item>endm</item>
0035       <item>equ</item>
0036       <item>error</item>
0037       <item>errorlevel</item>
0038       <item>exitm</item>
0039       <item>fill</item>
0040       <item>list</item>
0041       <item>local</item>
0042       <item>macro</item>
0043       <item>messg</item>
0044       <item>noexpand</item>
0045       <item>nolist</item>
0046       <item>org</item>
0047       <item>page</item>
0048       <item>processor</item>
0049       <item>radix</item>
0050       <item>res</item>
0051       <item>set</item>
0052       <item>space</item>
0053       <item>subtitle</item>
0054       <item>title</item>
0055       <item>variable</item>
0056       <item>end</item>
0057     </list>
0058     
0059     <list name="conditional">
0060       <item>if</item>
0061       <item>else</item>
0062       <item>idef</item>
0063       <item>ifndef</item>
0064       <item>endif</item>
0065       <item>while</item>
0066       <item>include</item>
0067       <item>endw</item>
0068     </list>
0069     
0070     <list name="gpasm_macro">
0071       <item>addcf</item>
0072       <item>b</item>
0073       <item>clrc</item>
0074       <item>clrz</item>
0075       <item>setc</item>
0076       <item>setz</item>
0077       <item>movfw</item>
0078       <item>skpc</item>
0079       <item>skpz</item>
0080       <item>skpnc</item>
0081       <item>skpnz</item>
0082       <item>subcf</item>
0083       <item>tstf</item>
0084     </list>
0085 
0086     <list name="branch instructions">
0087       <item>bra</item>
0088       <item>brw</item>
0089       <item>bc</item>
0090       <item>bz</item>
0091       <item>bnc</item>
0092       <item>bnz</item>
0093       <item>call</item>
0094       <item>goto</item>
0095     </list>
0096     
0097     <list name="instructions">
0098       <item>addlw</item>
0099       <item>addwf</item>
0100       <item>addwfc</item>
0101       <item>andlw</item>
0102       <item>andwf</item>
0103       <item>bcf</item>
0104       <item>bn</item>
0105       <item>bnov</item>
0106       <item>bov</item>
0107       <item>bsf</item>
0108       <item>btg</item>
0109       <item>btfsc</item>
0110       <item>btfss</item>
0111       <item>clrf</item>
0112       <item>clrw</item>
0113       <item>clrwdt</item>
0114       <item>comf</item>
0115       <item>cpfseq</item>
0116       <item>cpfslt</item>
0117       <item>cpfsgt</item>
0118       <item>daw</item>
0119       <item>decf</item>
0120       <item>dcfsnz</item>
0121       <item>decfsz</item>
0122       <item>incf</item>
0123       <item>incfsz</item>
0124       <item>infsnz</item>
0125       <item>iorlw</item>
0126       <item>iorwf</item>
0127       <item>lfsr</item>
0128       <item>movf</item>
0129       <item>movff</item>
0130       <item>movlb</item>
0131       <item>movlw</item>
0132       <item>movwf</item>
0133       <item>mullw</item>
0134       <item>mulwf</item>
0135       <item>negf</item>
0136       <item>nop</item>
0137       <item>option</item>
0138       <item>pop</item>
0139       <item>push</item>
0140       <item>rcall</item>
0141       <item>reset</item>
0142       <item>retfie</item>
0143       <item>retlw</item>
0144       <item>return</item>
0145       <item>rlcf</item>
0146       <item>rlf</item>
0147       <item>rlncf</item>
0148       <item>rrcf</item>
0149       <item>rrf</item>
0150       <item>rrncf</item>
0151       <item>setf</item>
0152       <item>sleep</item>
0153       <item>subfwb</item>
0154       <item>sublw</item>
0155       <item>subwf</item>
0156       <item>subwfb</item>
0157       <item>swapf</item>
0158       <item>tblrd</item>
0159       <item>tblwt</item>
0160       <item>tstfsz</item>
0161       <item>xorlw</item>
0162       <item>xorwf</item>
0163     </list>
0164 
0165     <list name="instruction_attr">
0166       <item>A</item>
0167       <item>ACCESS</item>
0168       <item>BANKED</item>
0169       <item>W</item>
0170       <item>F</item>
0171     </list>
0172 
0173     <list name="preprocessor">
0174       <item>define</item>
0175       <item>undefine</item>
0176       <item>v</item>
0177     </list>
0178     
0179     <list name="comment instructions">
0180       <item>INPUT</item>
0181       <item>OUTPUT</item>
0182       <item>PARAMETERS</item>
0183       <item>AUTHOR</item>
0184       <item>EMAIL</item>
0185     </list>
0186     
0187     <contexts>
0188       
0189       <!-- The main ('normal') context -->
0190       
0191       <context name="normal" attribute="Normal Text" lineEndContext="#stay">
0192         <DetectSpaces attribute="Normal Text" context="#stay"/>
0193 
0194         <keyword attribute="Directives" context="Operands" String="directives" insensitive="1"/>
0195         <keyword attribute="Preprocessor" context="Operands" String="conditional"/>
0196         <DetectIdentifier attribute="Label" context="EndLabel" column="0"/>
0197         <keyword attribute="Instructions" context="Operands" String="instructions" insensitive="1"/>
0198         <keyword attribute="Branch Instructions" context="Operands" String="branch instructions" insensitive="1"/>
0199         <keyword attribute="InstructionAttr" context="Operands" String="instruction_attr" insensitive="1"/>
0200         <keyword attribute="GPASM-macros" context="Operands" String="gpasm_macro" insensitive="1"/>
0201 
0202         <DetectIdentifier attribute="Unknown Instructions" context="Operands"/>
0203 
0204         <DetectChar attribute="Comment" context="#pop!comment" char=";" />
0205         <DetectChar attribute="Preprocessor" context="preprocessor1" char="#"/>
0206       </context>
0207 
0208       <context name="Operands" attribute="Normal Text" lineEndContext="#pop">
0209         <DetectSpaces attribute="Normal Text"/>
0210 
0211         <DetectChar attribute="Unbased Numbers" context="Number16or10" char="0" lookAhead="1"/>
0212         <Int attribute="Unbased Numbers" context="CheckNumberSuffix"/>
0213         <DetectChar attribute="Based Numbers" context="Number10" char="."/>
0214 
0215         <HlCChar attribute="Char" context="#stay"/>
0216         <Detect2Chars attribute="Char" context="ASCIIChar" char="A" char1="'" />
0217         <Detect2Chars attribute="Char" context="ASCIIChar" char="a" char1="'" />
0218         <Detect2Chars attribute="Based Numbers" context="binaryDigits"  char="B" char1="'" />
0219         <Detect2Chars attribute="Based Numbers" context="binaryDigits"  char="b" char1="'" />
0220         <Detect2Chars attribute="Based Numbers" context="hexDigits"  char="H" char1="'" />
0221         <Detect2Chars attribute="Based Numbers" context="hexDigits"  char="h" char1="'" />
0222         <Detect2Chars attribute="Based Numbers" context="octDigits"  char="O" char1="'" />
0223         <Detect2Chars attribute="Based Numbers" context="octDigits"  char="o" char1="'" />
0224         <Detect2Chars attribute="Based Numbers" context="decimalDigits"  char="D" char1="'" />
0225         <Detect2Chars attribute="Based Numbers" context="decimalDigits"  char="d" char1="'" />
0226         <DetectChar attribute="String" context="string" char="&quot;" />
0227         <DetectChar attribute="Comment" context="#pop!comment" char=";" />
0228         <DetectChar attribute="Preprocessor" context="preprocessor2" char="#"/>
0229         <AnyChar attribute="Symbol" context="#stay" String=",-/*%+=&gt;&lt;&amp;|^!~()" />
0230 
0231         <DetectIdentifier attribute="Normal Text"/>
0232       </context>
0233       
0234       
0235       
0236       <!-- Additional contexts -->
0237       
0238       <context name="EndLabel" attribute="Label" lineEndContext="#pop" fallthroughContext="#pop">
0239         <Detect2Chars attribute="Char" context="#pop!LabelReplaceMacro" char="#" char1="v" />
0240         <DetectChar attribute="Symbol" context="#pop" char=":"/>
0241       </context>
0242       <context name="LabelReplaceMacro" attribute="Label" lineEndContext="#pop" fallthroughContext="#pop">
0243         <DetectChar attribute="Symbol" context="#pop!ReplaceMacro" char="("/>
0244       </context>
0245       <context name="ReplaceMacro" attribute="Label" lineEndContext="#pop">
0246         <DetectChar attribute="Symbol" context="ReplaceMacro2" char="("/>
0247         <DetectChar attribute="Symbol" context="#pop!ContinueLabel" char=")"/>
0248         <IncludeRules context="Operands"/>
0249       </context>
0250       <context name="ReplaceMacro2" attribute="Label" lineEndContext="#pop">
0251         <DetectChar attribute="Symbol" context="ReplaceMacro" char="("/>
0252         <DetectChar attribute="Symbol" context="#pop" char=")"/>
0253         <IncludeRules context="Operands"/>
0254       </context>
0255       <context name="ContinueLabel" attribute="Label" lineEndContext="#pop" fallthroughContext="#pop">
0256         <DetectIdentifier attribute="Label" context="#pop!EndLabel"/>
0257         <DetectChar attribute="Symbol" context="#pop" char=":"/>
0258       </context>
0259 
0260       <context name="string" attribute="String" lineEndContext="#pop">
0261         <LineContinue attribute="String" context="#stay"/>
0262         <HlCStringChar attribute="Char" context="#stay"/>
0263         <DetectChar attribute="String" context="#pop" char="&quot;"/>
0264       </context>
0265 
0266       <context name="comment" attribute="Comment" lineEndContext="#pop">
0267         <DetectSpaces attribute="Comment"/>
0268         <IncludeRules context="##Comments" />
0269         <keyword attribute="Instructions" context="#stay" String="comment instructions" insensitive="0"/>
0270         <DetectIdentifier attribute="Comment"/>
0271       </context>
0272       
0273       <context name="preprocessor1" attribute="Preprocessor" lineEndContext="#pop" fallthroughContext="#pop!Operands">
0274         <keyword attribute="Preprocessor" context="#pop!Operands" String="preprocessor" insensitive="1"/>
0275         <DetectIdentifier attribute="Error" context="#pop!Operands"/>
0276       </context>
0277       <context name="preprocessor2" attribute="Preprocessor" lineEndContext="#pop" fallthroughContext="#pop">
0278         <keyword attribute="Preprocessor" context="#pop" String="preprocessor" insensitive="1"/>
0279         <DetectIdentifier attribute="Error" context="#pop"/>
0280       </context>
0281       
0282       
0283       
0284       <!-- Number -->
0285 
0286       <context name="Number10" attribute="Based Numbers" lineEndContext="#pop" fallthroughContext="#pop">
0287         <Int attribute="Unbased Numbers" context="#pop!CheckNumberSuffix"/>
0288       </context>
0289 
0290       <context name="Number16or10" attribute="Based Numbers" lineEndContext="#pop" fallthroughContext="#pop">
0291         <Detect2Chars attribute="Based Numbers" context="#pop!Number16" char="0" char1="x"/>
0292         <Detect2Chars attribute="Based Numbers" context="#pop!Number16" char="0" char1="X"/>
0293         <Int attribute="Unbased Numbers" context="#pop!CheckNumberSuffix"/>
0294       </context>
0295 
0296       <context name="Number16" attribute="Hex" lineEndContext="#pop" fallthroughContext="#pop">
0297         <RegExpr attribute="Hex" context="#pop!CheckNumberSuffix" String="[0-9A-Fa-f]+"/>
0298       </context>
0299 
0300       <context name="CheckNumberSuffix" attribute="Based Numbers" lineEndContext="#pop" fallthroughContext="#pop">
0301         <DetectSpaces attribute="Normal Text" context="#pop"/>
0302         <AnyChar attribute="Symbol" context="#pop" String=",-/*%+=&gt;&lt;&amp;|^!~"/>
0303         <RegExpr attribute="Error" context="#pop" String="[\d\w]+"/>
0304       </context>
0305 
0306 
0307 
0308       <!-- Quoted numbers -->
0309       
0310       <context name="decimalDigits" attribute="Unbased Numbers" lineEndContext="#pop" fallthroughContext="QuotedNumEnd">
0311         <RegExpr attribute="Unbased Numbers" context="QuotedNumEnd" String="\d+"/>
0312       </context>
0313       
0314       <context name="binaryDigits" attribute="Binary" lineEndContext="#pop" fallthroughContext="QuotedNumEnd">
0315         <RegExpr attribute="Binary" context="QuotedNumEnd" String="[01]+"/>
0316       </context>
0317       
0318       <context name="hexDigits" attribute="Hex" lineEndContext="#pop" fallthroughContext="QuotedNumEnd">
0319         <RegExpr attribute="Hex" context="QuotedNumEnd" String="[0-9A-Fa-f]+"/>
0320       </context>
0321       
0322       <context name="octDigits" attribute="Octal" lineEndContext="#pop" fallthroughContext="QuotedNumEnd">
0323         <RegExpr attribute="Octal" context="QuotedNumEnd" String="[0-7]+" />
0324       </context>
0325 
0326       <context name="QuotedNumEnd" attribute="Error" lineEndContext="#pop#pop">
0327         <DetectChar attribute="Based Numbers" context="#pop#pop" char="'"/>
0328         <RegExpr attribute="Error" context="#pop#pop" String="."/>
0329       </context>
0330 
0331 
0332 
0333       <!-- Quoted char -->
0334       
0335       <context name="ASCIIChar" attribute="Char" lineEndContext="#pop">
0336         <RegExpr attribute="Char" context="QuotedASCIICharEnd" String="." />
0337       </context>
0338 
0339       <context name="QuotedASCIICharEnd" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="#pop#pop">
0340         <DetectChar attribute="Char" context="#pop#pop" char="'"/>
0341         <RegExpr attribute="Error" context="#pop#pop" String="."/>
0342       </context>
0343       
0344     </contexts>
0345     
0346     
0347     <itemDatas>
0348       <itemData name="Normal Text"      defStyleNum="dsNormal"/>
0349       <itemData name="Label"            defStyleNum="dsFunction"/>
0350       <itemData name="Directives"       defStyleNum="dsOthers"/>
0351       <itemData name="Preprocessor"     defStyleNum="dsPreprocessor"/>
0352       <itemData name="Instructions"     defStyleNum="dsKeyword"/>
0353       <itemData name="Unknown Instructions" defStyleNum="dsNormal"/>
0354       <itemData name="Branch Instructions" defStyleNum="dsControlFlow"/>
0355       <itemData name="InstructionAttr"  defStyleNum="dsNormal" color="#000080" selColor="#000080" bold="0" italic="1"/>
0356       <itemData name="Unbased Numbers"  defStyleNum="dsDecVal"/>
0357       <itemData name="Based Numbers"    defStyleNum="dsBaseN" />
0358       <itemData name="Hex"              defStyleNum="dsBaseN" />
0359       <itemData name="Octal"            defStyleNum="dsBaseN" />
0360       <itemData name="Binary"           defStyleNum="dsBaseN" />
0361       <itemData name="Char"             defStyleNum="dsChar"/>
0362       <itemData name="String"           defStyleNum="dsString"/>
0363       <itemData name="Comment"          defStyleNum="dsComment" />
0364       <itemData name="Symbol"           defStyleNum="dsOperator"/>
0365       <itemData name="GPASM-macros"     defStyleNum="dsNormal" color="#000000" selColor="#000000" bold="1" italic="1"/>
0366       <itemData name="Error"            defStyleNum="dsError" />
0367     </itemDatas>
0368     
0369   </highlighting>
0370   
0371   
0372   <general>
0373     <comments>
0374       <comment name="singleLine" start=";" />
0375     </comments>
0376     <keywords casesensitive="1" additionalDeliminator="#"/>
0377   </general>
0378   
0379 </language>