parent
2824570e9e
commit
87fd132d01
@ -0,0 +1,926 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY label "[a-zA-Z_][a-zA-Z_0-9]*"> <!-- so sehen Labels aus -->
|
||||
<!ENTITY varname "([a-z_]\w*|[0-9]*[&])"> <!-- valid character in a variable name -->
|
||||
<!ENTITY pathpart "[^"*=/:<>?\\[\]\|]"> <!-- valid character in a file name -->
|
||||
<!ENTITY tasten "((Strg|Alt|Shift)-)?([a-z0-9]|F[1-9]|F1[0-2]|Esc|Bksp|Tab|Enter|Up|Down|Left|Right|PgUp|PgDn|Home|End|Ins|Del)">
|
||||
]>
|
||||
<language name="4DOS BatchToMemory" kateversion="2.4" version="1.0" section="Scripts" extensions="*.btm" casesensitive="0" author="Stefan Huebner (st0ff@npl.de)" license="LGPL">
|
||||
<!--DONE:
|
||||
- comments are there
|
||||
- substitutions are there
|
||||
- basic variable function handling, distinguishing the function result between numerical and string
|
||||
- variables are there (somehow)
|
||||
- numbers will be found
|
||||
- escape characters are found and highlit
|
||||
- jumps, gosubs and labels
|
||||
- command grouping
|
||||
- conditions
|
||||
- redirection
|
||||
- many different command handlings
|
||||
- iff
|
||||
- echo
|
||||
- text/endtext
|
||||
- set/unset
|
||||
- input/inkey
|
||||
- do
|
||||
- for
|
||||
- switch
|
||||
- internal commands of 4DOS
|
||||
TODO:
|
||||
- if someone finds that PATH-detection makes sense: create it...
|
||||
- whatever doesn't seem to be correctly lit after all the preceeding stuff ...
|
||||
- follow the TODO-Marks
|
||||
-->
|
||||
<highlighting>
|
||||
<list name="HighlightInsideComment">
|
||||
<item> todo </item>
|
||||
<item> attention </item>
|
||||
<item> attn </item>
|
||||
<item> fixme </item>
|
||||
<item> achtung </item>
|
||||
<item> info </item>
|
||||
</list>
|
||||
<list name="IntFunctions">
|
||||
<item> DOSMEM </item> <!-- b|k|m-->
|
||||
<item> EMS </item> <!-- b|k|m-->
|
||||
<item> EXTENDED </item> <!-- b|k|m-->
|
||||
<item> XMS </item> <!-- b|k|m-->
|
||||
<item> CDROM </item> <!--string-->
|
||||
<item> CLUSTSIZE </item> <!--string-->
|
||||
<item> CODEPAGE </item> <!--string-->
|
||||
<item> COM </item> <!-- int-->
|
||||
<item> DEVICE </item> <!--string-->
|
||||
<item> DISKFREE </item> <!--string, b|k|m-->
|
||||
<item> DISKTOTAL </item> <!--string, b|k|m-->
|
||||
<item> DISKUSED </item> <!--string, b|k|m-->
|
||||
<item> DRIVETYPE </item> <!--string-->
|
||||
<item> HDDSIZE </item> <!--string, b|k|m-->
|
||||
<item> LPT </item> <!-- int-->
|
||||
<item> READY </item> <!--string-->
|
||||
<item> REMOTE </item> <!--string-->
|
||||
<item> REMOVABLE </item> <!--string-->
|
||||
<item> ATTRIB </item> <!--string,-n|r|h|s|a|d,p]--><!--ATTENTION : nur mit 2 Parametern wird ein Int returned-->
|
||||
<item> COMPARE </item> <!--string-->
|
||||
<item> FILEAGE </item> <!--string,a|c|w]-->
|
||||
<item> FILECLOSE </item> <!-- int-->
|
||||
<item> FILEOPEN </item> <!--string, r|w|a,b|t]-->
|
||||
<item> FILEREAD </item> <!-- int, int]-->
|
||||
<item> FILEREADB </item> <!-- int, int-->
|
||||
<item> FILES </item> <!--string,-n|r|h|s|a|d]-->
|
||||
<item> FILESEEK </item> <!-- int, int, int-->
|
||||
<item> FILESEEKL </item> <!-- int, int-->
|
||||
<item> FILESIZE </item> <!--string,char,char]]-->
|
||||
<item> FILEWRITE </item> <!-- int,string-->
|
||||
<item> FILEWRITEB </item> <!-- int, int,string-->
|
||||
<item> FINDCLOSE </item> <!--string-->
|
||||
<item> LINES </item> <!--string-->
|
||||
<item> ASCII </item> <!-- char-->
|
||||
<item> COUNT </item> <!-- char,string-->
|
||||
<item> FIELDS </item> <!--"string",]string-->
|
||||
<item> INDEX </item> <!--string,string,int]-->
|
||||
<item> ISALNUM </item> <!--string-->
|
||||
<item> ISALPHA </item> <!--string-->
|
||||
<item> ISASCII </item> <!--string-->
|
||||
<item> ISCNTRL </item> <!--string-->
|
||||
<item> ISDIGIT </item> <!--string-->
|
||||
<item> ISLOWER </item> <!--string-->
|
||||
<item> ISPRINT </item> <!--string-->
|
||||
<item> ISPUNCT </item> <!--string-->
|
||||
<item> ISSPACE </item> <!--string-->
|
||||
<item> ISUPPER </item> <!--string-->
|
||||
<item> ISXDIGIT </item> <!--string-->
|
||||
<item> LEN </item> <!--string-->
|
||||
<item> SIMILAR </item> <!--string,string-->
|
||||
<item> WILD </item> <!--string,string-->
|
||||
<item> WORDS </item> <!--"string",]string-->
|
||||
<item> ABS </item> <!-- float-->
|
||||
<item> AVERAGE </item> <!-- float,float,float...]]]-->
|
||||
<item> CEILING </item> <!-- float-->
|
||||
<item> CONVERT </item> <!-- int, int, int-->
|
||||
<item> DEC </item> <!--expression-->
|
||||
<item> DECIMAL </item> <!-- float-->
|
||||
<item> DIGITS </item> <!--string-->
|
||||
<item> EVAL </item> <!--expression-->
|
||||
<item> FLOOR </item> <!-- float-->
|
||||
<item> INC </item> <!--expression-->
|
||||
<item> INT </item> <!-- float-->
|
||||
<item> MAX </item> <!-- float,float,float...]]]-->
|
||||
<item> MIN </item> <!-- float,float,float...]]]-->
|
||||
<item> NUMERIC </item> <!--string-->
|
||||
<item> RANDOM </item> <!-- float,float-->
|
||||
<item> DATE </item> <!-- date-->
|
||||
<item> DAY </item> <!-- date-->
|
||||
<item> DOWI </item> <!-- date-->
|
||||
<item> DOY </item> <!-- date-->
|
||||
<item> ISODOWI </item> <!-- date-->
|
||||
<item> ISOWEEK </item> <!-- date-->
|
||||
<item> ISOWYEAR </item> <!-- date-->
|
||||
<item> MAKEAGE </item> <!-- date,time]-->
|
||||
<item> MONTH </item> <!-- date-->
|
||||
<item> TIME </item> <!-- time-->
|
||||
<item> YEAR </item> <!-- date-->
|
||||
<item> EXEC </item> <!--expression-->
|
||||
<item> INIWRITE </item> <!--string,string,string,string-->
|
||||
</list>
|
||||
<list name="StringFunctions">
|
||||
<item> DDCSTR </item> <!-- int-->
|
||||
<item> MASTER </item> <!--string-->
|
||||
<item> READSCR </item> <!-- int, int, int-->
|
||||
<item> SMBSTR </item> <!-- int, int-->
|
||||
<item> CWD </item> <!--string-->
|
||||
<item> CWDS </item> <!--string-->
|
||||
<item> FSTYPE </item> <!--string-->
|
||||
<item> LABEL </item> <!--string-->
|
||||
<item> SERIAL </item> <!--string-->
|
||||
<item> ATTRIB </item> <!--string--><!--ATTENTION : nur mit 1 Parameter wird ein String returned-->
|
||||
<item> FILEDATE </item> <!--string,acw],n]]-->
|
||||
<item> FILETIME </item> <!--string,acw],s]]-->
|
||||
<item> FINDFIRST </item> <!--string,-n|r|h|s|a|d]-->
|
||||
<item> FINDNEXT </item> <!--string,-n|r|h|s|a|d]-->
|
||||
<item> LINE </item> <!--string, int-->
|
||||
<item> MD5 </item> <!--string-->
|
||||
<item> SEARCH </item> <!--string,string]-->
|
||||
<item> SHA1 </item> <!--string-->
|
||||
<item> TRUENAME </item> <!--string-->
|
||||
<item> UNIQUE </item> <!--string-->
|
||||
<item> ALTNAME </item> <!--string-->
|
||||
<item> EXPAND </item> <!--string,-n|r|h|s|a|d]-->
|
||||
<item> EXT </item> <!--string-->
|
||||
<item> FILENAME </item> <!--string-->
|
||||
<item> FULL </item> <!--string-->
|
||||
<item> LFN </item> <!--string-->
|
||||
<item> NAME </item> <!--string-->
|
||||
<item> PATH </item> <!--string-->
|
||||
<item> QUOTE </item> <!--string-->
|
||||
<item> SFN </item> <!--string-->
|
||||
<item> UNQUOTE </item> <!--string-->
|
||||
<item> UNQUOTES </item> <!--string-->
|
||||
<item> ASCII </item> <!--string-->
|
||||
<item> CAPS </item> <!--"string",string-->
|
||||
<item> CHAR </item> <!--space-delimited list of int-->
|
||||
<item> FIELD </item> <!--"string",] int,string-->
|
||||
<item> FORMAT </item> <!--string,string-->
|
||||
<item> INSERT </item> <!-- int,string,string-->
|
||||
<item> INSTR </item> <!-- int, int,string-->
|
||||
<item> LCS </item> <!--string,string-->
|
||||
<item> LEFT </item> <!-- int,string-->
|
||||
<item> LOWER </item> <!--string-->
|
||||
<item> LTRIM </item> <!--string,string-->
|
||||
<item> REPEAT </item> <!-- char, int-->
|
||||
<item> REPLACE </item> <!--string,string,string-->
|
||||
<item> RIGHT </item> <!-- int,string-->
|
||||
<item> RTRIM </item> <!--string,string-->
|
||||
<item> REVERSE </item> <!--string-->
|
||||
<item> STRIP </item> <!--string,string-->
|
||||
<item> SUBST </item> <!-- int,string,string-->
|
||||
<item> SUBSTR </item> <!-- int, int,string-->
|
||||
<item> TRIM </item> <!--string-->
|
||||
<item> UPPER </item> <!--string-->
|
||||
<item> WORD </item> <!--"string",]n,string-->
|
||||
<item> COMMA </item> <!-- float-->
|
||||
<item> AGEDATE </item> <!-- int,format]-->
|
||||
<item> DATECONV </item> <!--string,format]-->
|
||||
<item> DOW </item> <!-- date-->
|
||||
<item> DOWF </item> <!-- date-->
|
||||
<item> MAKEDATE </item> <!-- int-->
|
||||
<item> MAKETIME </item> <!-- int-->
|
||||
<item> MONTHF </item> <!-- date-->
|
||||
<item> ALIAS </item> <!--string-->
|
||||
<item> CLIP </item> <!--string-->
|
||||
<item> CLIPW </item> <!--string-->
|
||||
<item> EXECSTR </item> <!--string-->
|
||||
<item> FUNCTION </item> <!--string-->
|
||||
<item> HISTORY </item> <!-- int, int]-->
|
||||
<item> IF </item> <!--condition,string,string-->
|
||||
<item> INIREAD </item> <!--string,string,string-->
|
||||
<item> SELECT </item> <!--string, int, int, int, int,string-->
|
||||
<item> TIMER </item> <!-- int-->
|
||||
</list>
|
||||
<list name="IfCommand"> <item> if </item> </list>
|
||||
<list name="IffCommand"> <item> iff </item> </list>
|
||||
<list name="TextCommand"> <item> text </item> </list>
|
||||
<list name="InputCommand"> <item> input </item> </list>
|
||||
<list name="InkeyCommand"> <item> inkey </item> </list>
|
||||
<list name="DoCommand"> <item> do </item> </list>
|
||||
<list name="EnddoCommand"> <item> enddo </item> </list>
|
||||
<list name="SkipdoCommand">
|
||||
<item> iterate </item>
|
||||
<item> leave </item>
|
||||
</list>
|
||||
<list name="SwitchCommand"> <item> switch </item> </list>
|
||||
<list name="TestErrorlevel"><item> errorlevel </item></list>
|
||||
<list name="TestStatusVarname">
|
||||
<item> defined </item>
|
||||
<item> isalias </item>
|
||||
<item> isfunction </item>
|
||||
<item> isinternal </item>
|
||||
<item> islabel </item>
|
||||
</list>
|
||||
<list name="SetCommand">
|
||||
<item> set </item>
|
||||
<item> function </item>
|
||||
<item> alias </item>
|
||||
</list>
|
||||
<list name="UnsetCommand">
|
||||
<item> ENDLOCAL </item>
|
||||
<item> UNALIAS </item>
|
||||
<item> UNFUNCTION </item>
|
||||
<item> UNSET </item>
|
||||
</list>
|
||||
<list name="BadCommands">
|
||||
<item> for </item>
|
||||
<item> else </item>
|
||||
<item> elseiff </item>
|
||||
<item> endiff </item>
|
||||
<item> enddo </item>
|
||||
<item> endtext </item>
|
||||
<item> case </item>
|
||||
<item> endswitch </item>
|
||||
<item> default </item>
|
||||
<!-- the following is only valid within a do-loop. But obviously I didn't think about it twice:
|
||||
if inside a do-loop we enter an iff/endiff construct, we switch contexts and the "leave" will
|
||||
not be found by the "insideDo" context. There would need to be a way to create a dynamic list
|
||||
of keywords that can be shorted or expanded by a specific context, so that the above wouldn't
|
||||
happen. -->
|
||||
<!--item> iterate </item>
|
||||
<item> leave </item-->
|
||||
</list>
|
||||
<list name="NeedOnOffCommands">
|
||||
<item> BREAK </item>
|
||||
<item> IDLE </item>
|
||||
<item> LFNFOR </item>
|
||||
<item> LOADBTM </item>
|
||||
<item> SWAPPING </item>
|
||||
<item> TRANSIENT </item>
|
||||
<item> VERIFY </item>
|
||||
</list>
|
||||
<list name="TakeAFileNameCommands">
|
||||
<item> CALL </item>
|
||||
<item> CD </item>
|
||||
<item> CHDIR </item>
|
||||
<item> CDD </item>
|
||||
<item> DIR </item>
|
||||
<item> ERASE </item>
|
||||
<item> DEL </item>
|
||||
<item> DESCRIBE </item>
|
||||
<item> HEAD </item>
|
||||
<item> MD </item>
|
||||
<item> MKDIR </item>
|
||||
<item> RD </item>
|
||||
<item> RMDIR </item>
|
||||
<item> PUSHD </item>
|
||||
<item> REN </item>
|
||||
<item> RENAME </item>
|
||||
<item> TOUCH </item>
|
||||
</list>
|
||||
<list name="simpleNoChecksCommands">
|
||||
<item> BEEP </item>
|
||||
<item> CANCEL </item>
|
||||
<item> DATE /T </item>
|
||||
<item> FREE </item>
|
||||
<item> KEYBD </item>
|
||||
<item> ELSE </item>
|
||||
<item> PAUSE </item>
|
||||
<item> POPD </item>
|
||||
<item> QUIT </item>
|
||||
<item> SETDOS </item>
|
||||
<item> SHIFT </item>
|
||||
<item> TAIL </item>
|
||||
<item> TEE </item>
|
||||
<item> TIME </item>
|
||||
<item> TIMER </item>
|
||||
<item> TYPE </item>
|
||||
</list>
|
||||
<list name="NeedAnIntegerCommands">
|
||||
<item> CHCP </item>
|
||||
<item> DELAY </item>
|
||||
<item> COUNTRY </item>
|
||||
<item> SETERROR </item>
|
||||
</list>
|
||||
<list name="TakeColorsCommands">
|
||||
<item> CLS </item>
|
||||
<item> COLOR </item>
|
||||
</list>
|
||||
<list name="FilesystemOperationCommands">
|
||||
<item> ATTRIB </item>
|
||||
<item> COPY </item>
|
||||
<item> FFIND </item>
|
||||
<item> MOVE </item>
|
||||
</list>
|
||||
<list name="DrawCommands">
|
||||
<item> DRAWBOX </item>
|
||||
<item> DRAWHLINE </item>
|
||||
<item> DRAWVLINE </item>
|
||||
<item> SCREEN </item>
|
||||
<item> SCRPUT </item>
|
||||
<item> VSCRPUT </item>
|
||||
</list>
|
||||
<list name="NeedsACommandCommands">
|
||||
<item> EXCEPT </item>
|
||||
<item> GLOBAL </item>
|
||||
</list>
|
||||
<list name="NoParametersAtAllCommands">
|
||||
<item> SETLOCAL </item>
|
||||
</list>
|
||||
<list name="OnOff">
|
||||
<item> on </item>
|
||||
<item> off </item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context name="base" attribute="Normal" lineEndContext="#stay">
|
||||
<IncludeRules context="findComments"/>
|
||||
<IncludeRules context="findCommands"/>
|
||||
<IncludeRules context="findCommandSeparator"/>
|
||||
<IncludeRules context="findStrings"/> <!-- includes "findSubstitution"-->
|
||||
</context>
|
||||
<!--
|
||||
the following contexts are meant to be included in other contexts.
|
||||
-->
|
||||
<!-- find any comments (we were even keen enough to highlight things like TODO/FIXME and so on)-->
|
||||
<context name="findComments" attribute="Normal" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="foundComment" char=":" char1=":" column="0"/>
|
||||
<WordDetect attribute="Comment" context="foundComment" String="rem" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<!-- whereever there should be a command start, the following should match in some way or another -->
|
||||
<context name="findCommands" attribute="Normal" lineEndContext="#stay">
|
||||
<!-- Highlight command groups and start/end corresponding folding region -->
|
||||
<DetectChar attribute="Label" context="CommandGroup" char="(" beginRegion="true"/>
|
||||
<!-- find Labels and jmp/jsr/rts commands -->
|
||||
<IncludeRules context="findSpaghetti"/>
|
||||
<!-- find commands that need special handling-->
|
||||
<!-- TODO: replace single-item keyword lists with WordDetect as soon as WordDetect works properly again-->
|
||||
<keyword attribute="Keyword" context="conditionLeft" String="IfCommand"/>
|
||||
<keyword attribute="Keyword" context="cmdIff" String="IffCommand"/>
|
||||
<!-- find all "echo"-variations -->
|
||||
<RegExpr attribute="Keyword" String="[@]?echo\s+(on|off)(?=\s*($|\%\+|\)|\]))" insensitive="true"/>
|
||||
<RegExpr attribute="Keyword" context="cmdEcho" String="\becho[s]?(err)?[\.]?" insensitive="true"/>
|
||||
<!-- special treatment for Text and EndText -->
|
||||
<keyword attribute="Keyword" context="cmdText" String="TextCommand" insensitive="true" beginRegion="true"/>
|
||||
<!-- Set und Unset-Befehle -->
|
||||
<keyword attribute="Keyword" context="cmdSet" String="SetCommand"/>
|
||||
<keyword attribute="Keyword" context="cmdUnset" String="UnsetCommand"/>
|
||||
<!-- inkey/input -->
|
||||
<keyword attribute="Keyword" context="cmdInput" String="InputCommand"/>
|
||||
<keyword attribute="Keyword" context="cmdInkey" String="InkeyCommand"/>
|
||||
<!-- do loops -->
|
||||
<keyword attribute="Keyword" context="cmdDo" String="DoCommand" beginRegion="true"/>
|
||||
<!-- switch constructs -->
|
||||
<keyword attribute="Keyword" context="cmdSwitch" String="SwitchCommand" beginRegion="true"/>
|
||||
<!-- all the other internal 4DOS commands (with as little processing, as time permits) -->
|
||||
<keyword attribute="Keyword" context="cmdNeedOnOff" String="NeedOnOffCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdTakeAFileName" String="TakeAFileNameCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdsimpleNoChecks" String="simpleNoChecksCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdNeedAnInteger" String="NeedAnIntegerCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdTakeColors" String="TakeColorsCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdFilesystemOperation" String="FilesystemOperationCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdDraw" String="DrawCommands"/>
|
||||
<keyword attribute="Keyword" context="cmdNeedsACommand" String="NeedsACommandCommands"/>
|
||||
<keyword attribute="Keyword" context="popNeedEndOfCommand" String="NoParametersAtAllCommands"/>
|
||||
<!-- BAD COMMANDS:
|
||||
for :: if someone codes for 4DOS, he shall not use for-loops. The way to go is using do-loops,
|
||||
for-loops were just included into 4DOS to have M$-DOS command.com compatibility
|
||||
any other bad commands: are not available outside of their respective scopes, or it's the same
|
||||
as with "for"
|
||||
-->
|
||||
<keyword attribute="Error" context="Error" String="BadCommands"/>
|
||||
</context>
|
||||
|
||||
<!-- find jumps, labels and subroutine calls -->
|
||||
<context name="findSpaghetti" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Label" context="foundLabel" String="^:&label;" beginRegion="true" insensitive="true"/>
|
||||
<RegExpr attribute="Label" context="foundSpagetti" String="(goto|gosub)\s+&label;" insensitive="true"/>
|
||||
<WordDetect attribute="Label" String="return" insensitive="true" endRegion="true"/>
|
||||
</context>
|
||||
|
||||
<!-- find any variable substitution-->
|
||||
<context name="findSubstitution" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectChar context="substitutionFound" char="%" lookAhead="true"/>
|
||||
</context>
|
||||
|
||||
<!-- findVariables just finds variable substitutions WITHOUT variable functions!!!-->
|
||||
<context name="findVariables" attribute="Normal" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="VariableBold" context="substitutionIndirect" char="%" char1="["/>
|
||||
<RegExpr attribute="Variable" String="%(([a-z_][a-z_0-9]*%?)|[0-9]+&?|&|\?+|_\?|#)" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<!-- findNumbers finds Numbers and variableSubstitutions that may well be numbers-->
|
||||
<context name="findNumbers" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Number" String="\s*[+-]?\d*[,.]?\d+"/>
|
||||
<Detect2Chars attribute="Function" context="substitutionFindIntFunction" char="%" char1="@"/>
|
||||
<IncludeRules context="findVariables"/>
|
||||
</context>
|
||||
|
||||
<!-- findStrings should skip over Strings, highlighting any substitution inside-->
|
||||
<context name="findStrings" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectChar attribute="Escape" context="foundStringBackQuote" char="`"/>
|
||||
<DetectChar attribute="String" context="foundStringQuote" char="""/>
|
||||
<IncludeRules context="findEscapes"/>
|
||||
<IncludeRules context="findSubstitution"/>
|
||||
<!-- a Number may well be interpreted as a string in 4dos, also -->
|
||||
<RegExpr attribute="Number" String="\s*[+-]?\d*[,.]?\d+"/>
|
||||
<!-- the following highlights ANSI-Escape-Sequences -->
|
||||
<RegExpr attribute="Escape" String="\x1b\[.*[fhlmpsuABCDHJKR]" minimal="true"/>
|
||||
<!--
|
||||
we shall find strings - so why don't we find at least literal words?
|
||||
|
||||
There is one simple answer: if we are inside a context that shall highlight strings,
|
||||
then "findStrings" is included, to find things that evaluate to some kind of string.
|
||||
Normal plaintext strings shall be lit by the context itself.
|
||||
-->
|
||||
</context>
|
||||
|
||||
<!-- highlight escaped characters -->
|
||||
<context name="findEscapes" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Escape" context="foundANSIEscape" String="%=e\[(?=.*[fhlmpsuABCDHJKR])" minimal="true"/>
|
||||
<RegExpr attribute="Escape" String="\x18.|%=."/>
|
||||
</context>
|
||||
|
||||
<!-- highlight the command seperator without changing contexts -->
|
||||
<context name="findCommandSeparator" attribute="Normal" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Keyword" char="%" char1="+"/>
|
||||
</context>
|
||||
|
||||
<!-- highlight the command seperator and pop a context -->
|
||||
<context name="popNeedEndOfCommand" attribute="Error" lineEndContext="#pop">
|
||||
<Detect2Chars attribute="Keyword" context="#pop" char="%" char1="+"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<!-- Entry Point for finding conditions -->
|
||||
<context name="findCondition" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Error" context="conditionLeft" String="(not\s+)*(((dir)?exist|isdir|defined|is(alias|function|label|internal)|errorlevel)|(.+((\s*(==|!=)\s*)|(\s+(eq|ne|gt|ge|lt|le|eqc)\s+)).+))" lookAhead="true" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<!-- find redirections -->
|
||||
<context name="findRedirection" attribute="Error" lineEndContext="#stay">
|
||||
<DetectChar attribute="Keyword" context="RedirectionInput1st" char="<"/>
|
||||
<RegExpr attribute="Keyword" context="RedirectionOutput1st" String="[>]{1,2}[&]?[>]?"/>
|
||||
</context>
|
||||
|
||||
<!-- find any Option -->
|
||||
<context name="findOption" attribute="Option" lineEndContext="#stay">
|
||||
<DetectChar attribute="Option" context="Option" char="/"/>
|
||||
</context>
|
||||
|
||||
|
||||
<!--
|
||||
Here we start with functional contexts. These actually do something more than just find something and should not be sourced directly
|
||||
-->
|
||||
<context name="CommandGroup" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectChar attribute="Label" context="#pop" char=")" endRegion="true"/>
|
||||
<IncludeRules context="base"/>
|
||||
</context>
|
||||
|
||||
<!-- Highlight ANSI Escap-Sequences - the "%=e[" are already eaten up -->
|
||||
<context name="foundANSIEscape" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findStrings"/>
|
||||
<AnyChar attribute="Escape" context="#pop" String="fhlmpsuABCDHJKR"/>
|
||||
</context>
|
||||
|
||||
<!-- if any substitution was found, we get here ... -->
|
||||
<context name="substitutionFound" attribute="Error" lineEndContext="#pop">
|
||||
<Detect2Chars attribute="Function" context="#pop!substitutionFindFunction" char="%" char1="@"/>
|
||||
<Detect2Chars attribute="VariableBold" context="#pop!substitutionIndirect" char="%" char1="["/>
|
||||
<RegExpr attribute="Variable" context="#pop" String="%((([a-z_][a-z_0-9]*)%?)|[0-9]+&?|&|\?+|_\?|#)" insensitive="true"/>
|
||||
<!-- in @EVAL there is the modulo-operator %% - we'll have to filter it out!
|
||||
TODO: give eval a special handler and remove the following rule. -->
|
||||
<Detect2Chars attribute="Operator" context="#pop" char="%" char1="%"/>
|
||||
</context>
|
||||
|
||||
<context name="substitutionFindFunction" attribute="Error" lineEndContext="#pop">
|
||||
<!-- TODO: add special function handlers for
|
||||
execstr
|
||||
if
|
||||
-->
|
||||
<keyword attribute="Function" context="#pop!substitutionFunctionFound" String="StringFunctions"/>
|
||||
<IncludeRules context="substitutionFindIntFunction"/>
|
||||
</context>
|
||||
|
||||
<context name="substitutionFindIntFunction" attribute="Error" lineEndContext="#pop">
|
||||
<!-- TODO: add special function handlers for
|
||||
eval
|
||||
-->
|
||||
<keyword attribute="Function" context="#pop!substitutionFunctionFound" String="IntFunctions"/>
|
||||
<RegExpr attribute="Function" context="#pop!substitutionFunctionFound" String="&label;(?=\[)" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<!-- Variable Functions - the Masterpower of 4DOS -> we'll make this more complex later on!-->
|
||||
<context name="substitutionFunctionFound" attribute="Error" lineEndContext="Error">
|
||||
<DetectChar attribute="Function" context="#pop!findFunctionParameters" beginRegion="true" char="["/>
|
||||
</context>
|
||||
|
||||
<context name="findFunctionParameters" attribute="String" lineEndContext="Error">
|
||||
<DetectChar attribute="Function" char=","/>
|
||||
<DetectChar attribute="Function" context="#pop" endRegion="true" char="]"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- indirect Substitutions - they need to find their ending braces-->
|
||||
<context name="substitutionIndirect" attribute="Variable" lineEndContext="Error">
|
||||
<DetectChar attribute="VariableBold" context="#pop" endRegion="true" char="]"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- Strings within quotes -->
|
||||
<context name="foundStringBackQuote" attribute="String" lineEndContext="#pop">
|
||||
<DetectChar attribute="Escape" context="#pop" char="`"/>
|
||||
</context>
|
||||
|
||||
<context name="foundStringQuote" attribute="String" lineEndContext="#pop">
|
||||
<DetectChar attribute="String" context="#pop" char="""/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- stuff inside comments ... (a comment always runs until EOL) -->
|
||||
<context name="foundComment" attribute="Comment" lineEndContext="#pop">
|
||||
<keyword attribute="Alert" String="HighlightInsideComment"/>
|
||||
</context>
|
||||
|
||||
<!-- Label definitions including parameter definitions for Gosub-->
|
||||
<context name="foundLabel" attribute="Error" lineEndContext="#pop">
|
||||
<!-- Wir suchen nach Parameterdefinitionen für GOSUBs, alles andere sind Fehler! -->
|
||||
<DetectChar attribute="Label" context="#pop!foundLabelParameters" char="["/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="foundLabelParameters" attribute="Error" lineEndContext="#pop">
|
||||
<DetectIdentifier attribute="Variable" context="#stay"/>
|
||||
<DetectChar attribute="Label" context="#pop" char="]"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<!-- highlight gosubs and gotos with additional parameters (only valid with gosub, actually)-->
|
||||
<context name="foundSpagetti" attribute="Normal" lineEndContext="#pop">
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- Rules that highlight conditions (include the entry point "findCondition" to start this as a context that pops behind the condition(s))-->
|
||||
<context name="conditionLeft" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!conditionLeftStandard">
|
||||
<RegExpr attribute="Normal" context="conditionNot" String="\bnot\b" lookAhead="true" insensitive="true"/>
|
||||
<keyword attribute="Label" context="#pop!conditionVarname" String="TestStatusVarname"/>
|
||||
<!-- the end of a filename comes with any non-quoted space - so we need to eat up the first space after exist etc.-->
|
||||
<RegExpr attribute="Label" context="#pop!conditionFileTest" String="((dir)?exist|isdir)\s+" insensitive="true"/>
|
||||
<keyword attribute="Label" context="#pop!conditionErrorlevel" String="TestErrorlevel"/>
|
||||
<DetectSpaces/>
|
||||
</context>
|
||||
|
||||
<context name="conditionNot" attribute="Error" lineEndContext="#pop#pop">
|
||||
<!-- the context itself highlights everything as Error - just this rule finds the last not -->
|
||||
<RegExpr attribute="Alert" context="#pop" String="\bnot\b(?!\s*not\b)" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="conditionVarname" attribute="Normal" lineEndContext="#pop">
|
||||
<!-- basic variable name check just finds an identifier -->
|
||||
<DetectIdentifier attribute="Variable" context="#pop!conditionEnd"/>
|
||||
<!-- TODO: further checking, as a varname can also be calculated -->
|
||||
</context>
|
||||
|
||||
<context name="conditionFileTest" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findStrings"/>
|
||||
<DetectSpaces context="#pop!conditionEnd"/>
|
||||
</context>
|
||||
|
||||
<context name="conditionErrorlevel" attribute="Normal" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<RegExpr attribute="Operator" String="==|!=|eq|ne|gt|ge|lt|le" insensitive="true"/>
|
||||
<RegExpr attribute="Number" context="#pop!conditionEnd" String="\s*[+-]?\d*[,.]?\d+"/>
|
||||
<!-- TODO: actually errorlevel-test can also take calculated numbers or int variables to test agains - but would we want to duplicate a lot of the functionality above again?-->
|
||||
</context>
|
||||
|
||||
<context name="conditionEnd" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||
<RegExpr attribute="Operator" context="#pop!conditionLeft" String="\.(and|(x)?or)\." insensitive="true"/>
|
||||
<!--DetectSpaces/-->
|
||||
</context>
|
||||
|
||||
<context name="conditionLeftStandard" attribute="Normal" lineEndContext="#pop">
|
||||
<!--DetectSpaces/-->
|
||||
<RegExpr attribute="Operator" context="#pop!conditionLeftEval" String="\s*(==|!=|eq|ne|gt|ge|lt|le)\s*" lookAhead="true" insensitive="true"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<context name="conditionLeftEval" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!conditionRight">
|
||||
<DetectSpaces/>
|
||||
<RegExpr attribute="Operator" String="==|!=|eq|ne|gt|ge|lt|le|eqc" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="conditionRight" attribute="Normal" lineEndContext="#pop">
|
||||
<IncludeRules context="findStrings"/>
|
||||
<DetectSpaces context="#pop!conditionEnd"/>
|
||||
</context>
|
||||
|
||||
<!-- Handle Iff correctly: condition, then, wait for possible else/handle elseiff find endiff-->
|
||||
<context name="cmdIff" attribute="Normal" lineEndContext="#pop">
|
||||
<IncludeRules context="findCondition"/>
|
||||
<DetectSpaces/>
|
||||
<!-- TODO: replace with WordDetect as soon as WordDetect works right-->
|
||||
<RegExpr attribute="Keyword" context="#pop!cmdIffThen" beginRegion="true" String="\bthen\b\s*($|%\+)" insensitive="true"/>
|
||||
<!-- should the above regex not match, there is an error... -->
|
||||
<StringDetect attribute="Keyword" context="Error" String="then" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdIffThen" attribute="Normal" lineEndContext="#stay">
|
||||
<!-- TODO: replace with WordDetect as soon as WordDetect works right-->
|
||||
<RegExpr attribute="Keyword" context="popNeedEndOfCommand" String="\belse\b" insensitive="true"/>
|
||||
<RegExpr attribute="Keyword" context="cmdElseiff" String="\belseiff\b" insensitive="true"/>
|
||||
<RegExpr attribute="Keyword" context="#pop!popNeedEndOfCommand" endRegion="true" String="\bendiff\b" insensitive="true"/>
|
||||
<IncludeRules context="base"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdElseiff" attribute="Normal" lineEndContext="#pop">
|
||||
<IncludeRules context="findCondition"/>
|
||||
<DetectSpaces/>
|
||||
<!-- TODO: replace with WordDetect as soon as WordDetect works right-->
|
||||
<RegExpr attribute="Keyword" context="#pop" String="\bthen\b\s*($|%\+)" insensitive="true"/>
|
||||
<!-- should the above regex not match, there is an error... -->
|
||||
<StringDetect attribute="Keyword" context="Error" String="then" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<!-- echo -->
|
||||
<context name="cmdEcho" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findStrings"/>
|
||||
<IncludeRules context="findRedirection"/>
|
||||
<RegExpr attribute="Normal" context="#pop" String="\s*($|\%\+|\)|\])" lookAhead="true"/>
|
||||
</context>
|
||||
|
||||
<!-- Redirection: kann ja auch mehrfach auftreten -->
|
||||
<context name="Redirection" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces attribute="Normal" context="#stay"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="RedirectionOutput1st" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="Redirection"/>
|
||||
<DetectChar attribute="Redirection" context="#pop!Redirection" char="<"/>
|
||||
</context>
|
||||
|
||||
<context name="RedirectionInput1st" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="Redirection"/>
|
||||
<RegExpr attribute="Redirection" context="#pop!Redirection" String="[>]{1,2}[&]?[>]?"/>
|
||||
</context>
|
||||
|
||||
<!-- special treatment of text and endtext -->
|
||||
<context name="cmdText" attribute="Error" lineEndContext="#pop!cmdEndText">
|
||||
<DetectSpaces attribute="Normal" context="#stay"/>
|
||||
<RegExpr attribute="Keyword" context="Redirection" String="[>]{1,2}"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdEndText" attribute="String" lineEndContext="#stay">
|
||||
<RegExpr attribute="Keyword" context="#pop" String="^\s*endtext\s*$" insensitive="true"/>
|
||||
<!-- As we are pretty 31337, we also highlight ANSI-Escapes in Textblocks.
|
||||
We're just not 1337 enough to also provide a syntactic checking for
|
||||
those sequences...-->
|
||||
<RegExpr attribute="Escape" String="\x1b\[.*[fhlmpsuABCDHJKR]" minimal="true"/>
|
||||
</context>
|
||||
|
||||
<!-- Set/Unset commands -->
|
||||
<context name="cmdUnset" attribute="Normal" lineEndContext="#pop">
|
||||
<IncludeRules context="findOption"/>
|
||||
<DetectIdentifier attribute="Variable" context="#stay"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdSet" attribute="Normal" lineEndContext="#pop">
|
||||
<DetectChar attribute="Keyword" context="#pop" char="="/>
|
||||
<IncludeRules context="cmdUnset"/>
|
||||
</context>
|
||||
|
||||
<!-- Highlight an Option, #pop on next space ...-->
|
||||
<context name="Option" attribute="Option" lineEndContext="#pop">
|
||||
<IncludeRules context="findStrings"/>
|
||||
<DetectSpaces attribute="Normal" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<!-- input und inkey - testing allowed Options ... -->
|
||||
<context name="cmdInput" attribute="String" lineEndContext="#pop"
|
||||
fallthroughContext="#pop!inputMessage" fallthrough="true">
|
||||
<IncludeRules context="input"/>
|
||||
<RegExpr attribute="Option" String="/([en]|l[0-9]+)\s" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdInkey" attribute="String" lineEndContext="#pop"
|
||||
fallthroughContext="#pop!inputMessage" fallthrough="true">
|
||||
<RegExpr attribute="Option" context="inputKeysDP" String="/k:" insensitive="true"/>
|
||||
<RegExpr attribute="Option" context="inputKeysAZ" String="/k\"" insensitive="true"/>
|
||||
<StringDetect attribute="Error" String="/k" insensitive="true"/>
|
||||
<StringDetect attribute="Option" String="/m" insensitive="true"/>
|
||||
<IncludeRules context="input"/>
|
||||
</context>
|
||||
|
||||
<context name="input" attribute="Error" lineEndContext="#stay">
|
||||
<RegExpr attribute="Option" String="/([cdpx]|[w][0-9]+)\s" insensitive="true"/>
|
||||
<DetectSpaces attribute="Normal" context="#stay"/>
|
||||
</context>
|
||||
|
||||
<context name="inputKeysDP" attribute="Error" lineEndContext="#pop#pop">
|
||||
<DetectChar attribute="String" context="inputKeyDesc" char="["/>
|
||||
<DetectSpaces attribute="Normal" context="#pop"/>
|
||||
<RegExpr attribute="Function" String="\S"/>
|
||||
</context>
|
||||
|
||||
<context name="inputKeysAZ" attribute="Error" lineEndContext="#pop#pop">
|
||||
<DetectChar attribute="String" context="inputKeyDesc" char="["/>
|
||||
<DetectChar attribute="Option" context="#pop" char="""/>
|
||||
<RegExpr attribute="Function" String="\S"/>
|
||||
</context>
|
||||
|
||||
<context name="inputKeyDesc" attribute="Error" lineEndContext="#pop#pop#pop">
|
||||
<RegExpr attribute="Label" context="#pop!inputKeyDesc2" String="&tasten;"/>
|
||||
</context>
|
||||
|
||||
<context name="inputKeyDesc2" attribute="Error" lineEndContext="#pop#pop#pop">
|
||||
<DetectChar attribute="String" context="#pop" char="]"/>
|
||||
</context>
|
||||
|
||||
<context name="inputMessage" attribute="String" lineEndContext="#pop">
|
||||
<RegExpr attribute="Variable" context="#pop!popNeedEndOfCommand" String="%%[a-z_][a-z0-9_]*" insensitive="true"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- special treatment of DO -->
|
||||
<context name="cmdDo" attribute="Error" lineEndContext="Error">
|
||||
<!-- do n | forever-->
|
||||
<RegExpr attribute="Label" context="#pop!insideDo" String="\s*forever(?=\s*$)" insensitive="true"/>
|
||||
<RegExpr attribute="Variable" context="#pop!fixedDo" String="\s*(%|[0-9]+)" lookAhead="true"/>
|
||||
<!-- WHILE | UNTIL -->
|
||||
<RegExpr attribute="Label" context="#pop!conditionalDo" String="\s*(while|until)" insensitive="true"/>
|
||||
<!-- varname = start TO end [BY n] | varname in blubberkram -->
|
||||
<RegExpr attribute="Variable" context="#pop!countedDo" String="\s*&varname;" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="fixedDo" attribute="Error" lineEndContext="#pop!insideDo">
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
<IncludeRules context="findNumbers"/>
|
||||
</context>
|
||||
|
||||
<context name="countedDo" attribute="Error" lineEndContext="Error">
|
||||
<RegExpr attribute="Keyword" context="#pop!countedDoIn" String="\bin\b" insensitive="true"/>
|
||||
<DetectChar attribute="Keyword" context="#pop!countedDoStart" char="="/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="countedDoIn" attribute="String" lineEndContext="#pop!insideDo">
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<context name="countedDoStart" attribute="Error" lineEndContext="Error">
|
||||
<RegExpr attribute="Keyword" context="#pop!countedDoTo" String="\bto\b" insensitive="true"/>
|
||||
<IncludeRules context="findNumbers"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="countedDoTo" attribute="Error" lineEndContext="#pop!insideDo">
|
||||
<IncludeRules context="findNumbers"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
<RegExpr attribute="Keyword" context="#pop!countedDoBy" String="\bby\b" insensitive="true"/>
|
||||
</context>
|
||||
|
||||
<context name="countedDoBy" attribute="Error" lineEndContext="#pop!insideDo">
|
||||
<IncludeRules context="findNumbers"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="conditionalDo" attribute="Error" lineEndContext="#pop!insideDo">
|
||||
<IncludeRules context="findCondition"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="insideDo" attribute="Normal" lineEndContext="#stay">
|
||||
<keyword attribute="Keyword" String="SkipdoCommand"/>
|
||||
<keyword attribute="Keyword" endRegion="true" context="#pop!popNeedEndOfCommand" String="EnddoCommand"/>
|
||||
<IncludeRules context="base"/>
|
||||
</context>
|
||||
|
||||
<!-- special treatment of switch statements -->
|
||||
<context name="cmdSwitch" attribute="Normal" lineEndContext="#pop!insideSwitch">
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<context name="insideSwitch" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Keyword" context="#pop!switchDefault" String="\s*default\s*$" insensitive="true"/>
|
||||
<IncludeRules context="switchDefault"/>
|
||||
</context>
|
||||
<!-- "Default" may be used only once, that's why we change contexts when it was found -->
|
||||
<context name="switchDefault" attribute="Normal" lineEndContext="#stay">
|
||||
<RegExpr attribute="Keyword" context="switchCase" String="\bcase\b" insensitive="true"/>
|
||||
<RegExpr attribute="Keyword" context="#pop!popNeedEndOfCommand" String="\bendswitch\b" insensitive="true" endRegion="true"/>
|
||||
<IncludeRules context="base"/>
|
||||
</context>
|
||||
|
||||
<context name="switchCase" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<StringDetect attribute="Operator" insensitive="true" String=".or."/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
</context>
|
||||
|
||||
<!-- internal commands of the 4DOS interpreter (TODO: make it even better, like integrated syntax checking) -->
|
||||
<context name="cmdNeedOnOff" attribute="Error" lineEndContext="#pop">
|
||||
<keyword attribute="String" context="#pop!popNeedEndOfCommand" String="OnOff"/>
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdNeedAnInteger" attribute="Error" lineEndContext="#pop">
|
||||
<DetectSpaces attribute="Normal"/>
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="findNumbers"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdNeedsACommand" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="base"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdsimpleNoChecks" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdTakeAFileName" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdTakeColors" attribute="String" lineEndContext="#pop">
|
||||
<RegExpr attribute="Operator" context="#pop!ColorHaveBrightFG" String="\bbri(ght)?\b" insensitive="true"/>
|
||||
<RegExpr attribute="Operator" context="#pop!ColorHaveBlinkFG" String="\bbli(nk)?\b" insensitive="true"/>
|
||||
<IncludeRules context="ColorHaveBlinkFG"/>
|
||||
</context>
|
||||
|
||||
<context name="ColorHaveBrightFG" attribute="String" lineEndContext="Error">
|
||||
<RegExpr attribute="Operator" context="#pop!ColorHaveBlinkFG" String="\bbli(nk)?\b" insensitive="true"/>
|
||||
<IncludeRules context="ColorHaveBlinkFG"/>
|
||||
</context>
|
||||
|
||||
<context name="ColorHaveBlinkFG" attribute="String" lineEndContext="Error">
|
||||
<RegExpr attribute="Option" context="#pop!ColorHaveFG" insensitive="true" String="\b(Bla(ck)?|Blue?|Gre(en)?|Red|Mag(enta)?|Cyan?|Yel(low)?|Whi(te)?)\b"/>
|
||||
<DetectSpaces/>
|
||||
</context>
|
||||
|
||||
<context name="ColorHaveFG" attribute="String" lineEndContext="Error">
|
||||
<RegExpr attribute="Keyword" context="#pop!ColorBG" insensitive="true" String="\s+on\s+"/>
|
||||
</context>
|
||||
|
||||
<context name="ColorBG" attribute="String" lineEndContext="Error">
|
||||
<RegExpr attribute="Operator" insensitive="true" String="\bbri(ght)?\b"/>
|
||||
<RegExpr attribute="Option" context="#pop!ColorHaveBG" insensitive="true" String="\b(Bla(ck)?|Blue?|Gre(en)?|Red|Mag(enta)?|Cyan?|Yel(low)?|Whi(te)?)\b"/>
|
||||
</context>
|
||||
|
||||
<context name="ColorHaveBG" attribute="String" lineEndContext="#pop">
|
||||
<RegExpr attribute="Operator" context="#pop!ColorNeedBordercol" insensitive="true" String="\bBOR(der)?\b"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="ColorNeedBordercol" attribute="String" lineEndContext="Error">
|
||||
<RegExpr attribute="Option" context="#pop!popNeedEndOfCommand" insensitive="true" String="\s*(Bla(ck)?|Blue?|Gre(en)?|Red|Mag(enta)?|Cyan?|Yel(low)?|Whi(te)?)\b"/>
|
||||
</context>
|
||||
|
||||
<context name="cmdDraw" attribute="String" lineEndContext="#pop">
|
||||
<!-- ToDo: check if we'll have to split this into multiple contexts, add the highlighting for drawing commands -->
|
||||
</context>
|
||||
|
||||
<context name="cmdFilesystemOperation" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="findOption"/>
|
||||
<IncludeRules context="findStrings"/>
|
||||
<IncludeRules context="popNeedEndOfCommand"/>
|
||||
</context>
|
||||
|
||||
<context name="Error" attribute="Error" lineEndContext="#stay">
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal" defStyleNum="dsNormal"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Number" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Option" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Label" defStyleNum="dsOthers"/>
|
||||
<itemData name="Function" defStyleNum="dsFunction"/>
|
||||
<itemData name="Redirection" defStyleNum="dsKeyword"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Escape" defStyleNum="dsChar"/>
|
||||
<itemData name="Path" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Variable" defStyleNum="dsDataType"/>
|
||||
<itemData name="VariableBold" defStyleNum="dsDataType" bold="true"/>
|
||||
<itemData name="Alert" defStyleNum="dsAlert"/>
|
||||
<itemData name="Error" defStyleNum="dsError"/>
|
||||
<itemData name="Operator" defStyleNum="dsRegionMarker"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="rem "/>
|
||||
<comment name="singleLine" start="::"/>
|
||||
</comments>
|
||||
<keywords casesensitive="0" additionalDeliminator="@"/>
|
||||
<indentation mode="cstyle"/>
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!-- Dockerfile syntaxfile v1.0 by James Turnbull <james@lovedthanlost.net> -->
|
||||
<language name="Dockerfile" section="Other" version="1.1" kateversion="2.4" extensions="Dockerfile" author="James Turnbull (james@lovedthanlost.net)" license="LGPLv2+">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> FROM </item>
|
||||
<item> MAINTAINER </item>
|
||||
<item> ENV </item>
|
||||
<item> RUN </item>
|
||||
<item> ONBUILD </item>
|
||||
<item> COPY </item>
|
||||
<item> ADD </item>
|
||||
<item> VOLUME </item>
|
||||
<item> EXPOSE </item>
|
||||
<item> ENTRYPOINT </item>
|
||||
<item> CMD </item>
|
||||
<item> WORKDIR </item>
|
||||
<item> USER </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="normal" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<DetectChar attribute="Comment" context="Comment" char="#"/>
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
||||
<DetectIdentifier/>
|
||||
<DetectChar attribute="String" context="string"" char="""/>
|
||||
<DetectChar attribute="String" context="string'" char="'"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||
<LineContinue attribute="Comment" context="#stay" />
|
||||
</context>
|
||||
|
||||
<context name="string"" attribute="String" lineEndContext="#pop">
|
||||
<LineContinue attribute="Operator" context="#stay"/>
|
||||
<DetectChar attribute="String" context="#pop" char="""/>
|
||||
</context>
|
||||
|
||||
<context name="string'" attribute="String" lineEndContext="#pop">
|
||||
<LineContinue attribute="String" context="#stay"/>
|
||||
<DetectChar attribute="String" context="#pop" char="'"/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/>
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="String" defStyleNum="dsString" spellChecking="0"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name = "singleLine" start = "#"/>
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
||||
|
@ -0,0 +1,899 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
"Intel x86 (FASM)" is based on ver. 1.3 of "Intel x86 (NASM)" by Nicola Gigante and Bogdan Drozdowski
|
||||
|
||||
Known issues:
|
||||
* Does not include all 64-bit registers and instructions
|
||||
* "near" and "far" as in "jmp near MyLabel" is unhandeled.
|
||||
* Confuses and,or,not,xor,shl instructions,with operators with same name, e.g. "2 shl 4"
|
||||
* May confuse ah,bh,ch,dh with hexadecimal numbers.
|
||||
|
||||
Notes:
|
||||
* "used" and "defined" are treated opperators and are not highlighted.
|
||||
-->
|
||||
|
||||
<language name="Intel x86 (FASM)" section="Assembler" version="0.2" kateversion="2.3" extensions="*.asm;*.inc;*.fasm" mimetype="" author="rCX (rCX12@yahoo.com)" license="GPL">
|
||||
<highlighting>
|
||||
<list name="registers">
|
||||
<!-- General purpose registers -->
|
||||
<item>rax</item>
|
||||
<item>eax</item>
|
||||
<item>ax</item>
|
||||
<item>ah</item>
|
||||
<item>al</item>
|
||||
<item>rbx</item>
|
||||
<item>ebx</item>
|
||||
<item>bx</item>
|
||||
<item>bh</item>
|
||||
<item>bl</item>
|
||||
<item>rcx</item>
|
||||
<item>ecx</item>
|
||||
<item>cx</item>
|
||||
<item>ch</item>
|
||||
<item>cl</item>
|
||||
<item>rdx</item>
|
||||
<item>edx</item>
|
||||
<item>dx</item>
|
||||
<item>dh</item>
|
||||
<item>dl</item>
|
||||
<item>rbp</item>
|
||||
<item>ebp</item>
|
||||
<item>bp</item>
|
||||
<item>rsi</item>
|
||||
<item>esi</item>
|
||||
<item>si</item>
|
||||
<item>rdi</item>
|
||||
<item>edi</item>
|
||||
<item>di</item>
|
||||
<item>rsp</item>
|
||||
<item>esp</item>
|
||||
<item>sp</item>
|
||||
<item>r8</item>
|
||||
<item>r9</item>
|
||||
<item>r10</item>
|
||||
<item>r11</item>
|
||||
<item>r12</item>
|
||||
<item>r13</item>
|
||||
<item>r14</item>
|
||||
<item>r15</item>
|
||||
<!-- Segmentation registers -->
|
||||
<item>cs</item>
|
||||
<item>ds</item>
|
||||
<item>es</item>
|
||||
<item>fs</item>
|
||||
<item>gs</item>
|
||||
<item>ss</item>
|
||||
<!-- Control registers -->
|
||||
<item>cr0</item>
|
||||
<!--<item>cr1</item>-->
|
||||
<item>cr2</item>
|
||||
<item>cr3</item>
|
||||
<item>cr4</item>
|
||||
<!-- Debug registers -->
|
||||
<item>dr0</item>
|
||||
<item>dr1</item>
|
||||
<item>dr2</item>
|
||||
<item>dr3</item>
|
||||
<item>dr6</item>
|
||||
<item>dr7</item>
|
||||
<!-- x87 FPU Registers -->
|
||||
<item>st</item>
|
||||
<!-- MMX registers -->
|
||||
<item>mm0</item>
|
||||
<item>mm1</item>
|
||||
<item>mm2</item>
|
||||
<item>mm3</item>
|
||||
<item>mm4</item>
|
||||
<item>mm5</item>
|
||||
<item>mm6</item>
|
||||
<item>mm7</item>
|
||||
<!-- XMM registers -->
|
||||
<item>xmm0</item>
|
||||
<item>xmm1</item>
|
||||
<item>xmm2</item>
|
||||
<item>xmm3</item>
|
||||
<item>xmm4</item>
|
||||
<item>xmm5</item>
|
||||
<item>xmm6</item>
|
||||
<item>xmm7</item>
|
||||
</list>
|
||||
<list name="instructions">
|
||||
<item>aaa</item>
|
||||
<item>aad</item>
|
||||
<item>aam</item>
|
||||
<item>aas</item>
|
||||
<item>adc</item>
|
||||
<item>add</item>
|
||||
<item>addpd</item>
|
||||
<item>addps</item>
|
||||
<item>addsd</item>
|
||||
<item>addss</item>
|
||||
<item>addsubpd</item>
|
||||
<item>addsubps</item>
|
||||
<item>and</item>
|
||||
<item>andnpd</item>
|
||||
<item>andnps</item>
|
||||
<item>andpd</item>
|
||||
<item>andps</item>
|
||||
<item>arpl</item>
|
||||
<item>bound</item>
|
||||
<item>bsf</item>
|
||||
<item>bsr</item>
|
||||
<item>bswap</item>
|
||||
<item>bt</item>
|
||||
<item>btc</item>
|
||||
<item>btr</item>
|
||||
<item>bts</item>
|
||||
<item>call</item>
|
||||
<item>cbw</item>
|
||||
<item>cwde</item>
|
||||
<item>cwd</item>
|
||||
<item>cdq</item>
|
||||
<item>cdqe</item>
|
||||
<item>cqo</item>
|
||||
<item>clc</item>
|
||||
<item>cld</item>
|
||||
<item>clgi</item>
|
||||
<item>cli</item>
|
||||
<item>clts</item>
|
||||
<item>clflush</item>
|
||||
<item>cmc</item>
|
||||
<item>cmova</item>
|
||||
<item>cmovae</item>
|
||||
<item>cmovb</item>
|
||||
<item>cmovbe</item>
|
||||
<item>cmovc</item>
|
||||
<item>cmove</item>
|
||||
<item>cmovg</item>
|
||||
<item>cmovge</item>
|
||||
<item>cmovl</item>
|
||||
<item>cmovle</item>
|
||||
<item>cmovna</item>
|
||||
<item>cmovnae</item>
|
||||
<item>cmovnb</item>
|
||||
<item>cmovnbe</item>
|
||||
<item>cmovnc</item>
|
||||
<item>cmovne</item>
|
||||
<item>cmovng</item>
|
||||
<item>cmovnge</item>
|
||||
<item>cmovnl</item>
|
||||
<item>cmovnle</item>
|
||||
<item>cmovno</item>
|
||||
<item>cmovnp</item>
|
||||
<item>cmovns</item>
|
||||
<item>cmovnz</item>
|
||||
<item>cmovo</item>
|
||||
<item>cmovp</item>
|
||||
<item>cmovpe</item>
|
||||
<item>cmovpo</item>
|
||||
<item>cmovs</item>
|
||||
<item>cmovz</item>
|
||||
<item>cmp</item>
|
||||
<item>cmpeqpd</item>
|
||||
<item>cmpeqps</item>
|
||||
<item>cmpeqsd</item>
|
||||
<item>cmpeqss</item>
|
||||
<item>cmplepd</item>
|
||||
<item>cmpleps</item>
|
||||
<item>cmplesd</item>
|
||||
<item>cmpless</item>
|
||||
<item>cmpltpd</item>
|
||||
<item>cmpltps</item>
|
||||
<item>cmpltsd</item>
|
||||
<item>cmpltss</item>
|
||||
<item>cmpneqpd</item>
|
||||
<item>cmpneqps</item>
|
||||
<item>cmpneqsd</item>
|
||||
<item>cmpneqss</item>
|
||||
<item>cmpnlepd</item>
|
||||
<item>cmpnleps</item>
|
||||
<item>cmpnlesd</item>
|
||||
<item>cmpnless</item>
|
||||
<item>cmpnltpd</item>
|
||||
<item>cmpnltps</item>
|
||||
<item>cmpnltsd</item>
|
||||
<item>cmpnltss</item>
|
||||
<item>cmpordpd</item>
|
||||
<item>cmpordps</item>
|
||||
<item>cmpordsd</item>
|
||||
<item>cmpordss</item>
|
||||
<item>cmppd</item>
|
||||
<item>cmpps</item>
|
||||
<item>cmps</item>
|
||||
<item>cmpsb</item>
|
||||
<item>cmpsd</item>
|
||||
<item>cmpss</item>
|
||||
<item>cmpsw</item>
|
||||
<item>cmpunordpd</item>
|
||||
<item>cmpunordps</item>
|
||||
<item>cmpunordsd</item>
|
||||
<item>cmpunordss</item>
|
||||
<item>cmpxchg</item>
|
||||
<item>cmpxchg486</item>
|
||||
<item>cmpxchg8b</item>
|
||||
<item>cmpxchg16b</item>
|
||||
<item>comisd</item>
|
||||
<item>comiss</item>
|
||||
<item>cpuid</item>
|
||||
<item>cvtdq2pd</item>
|
||||
<item>cvtdq2ps</item>
|
||||
<item>cvtpd2dq</item>
|
||||
<item>cvtpd2pi</item>
|
||||
<item>cvtpd2ps</item>
|
||||
<item>cvtpi2pd</item>
|
||||
<item>cvtpi2ps</item>
|
||||
<item>cvtps2dq</item>
|
||||
<item>cvtps2pd</item>
|
||||
<item>cvtps2pi</item>
|
||||
<item>cvtsd2si</item>
|
||||
<item>cvtsd2ss</item>
|
||||
<item>cvtsi2sd</item>
|
||||
<item>cvtsi2ss</item>
|
||||
<item>cvtss2sd</item>
|
||||
<item>cvtss2si</item>
|
||||
<item>cvttpd2dq</item>
|
||||
<item>cvttpd2pi</item>
|
||||
<item>cvttps2dq</item>
|
||||
<item>cvttps2pi</item>
|
||||
<item>cvttsd2si</item>
|
||||
<item>cvttss2si</item>
|
||||
<item>daa</item>
|
||||
<item>das</item>
|
||||
<item>dec</item>
|
||||
<item>div</item>
|
||||
<item>divpd</item>
|
||||
<item>divps</item>
|
||||
<item>divsd</item>
|
||||
<item>divss</item>
|
||||
<item>emms</item>
|
||||
<item>enter</item>
|
||||
<item>f2xm1</item>
|
||||
<item>fabs</item>
|
||||
<item>fadd</item>
|
||||
<item>faddp</item>
|
||||
<item>fbld</item>
|
||||
<item>fbstp</item>
|
||||
<item>fchs</item>
|
||||
<item>fclex</item>
|
||||
<item>fnclex</item>
|
||||
<item>fcmovb</item>
|
||||
<item>fcmovbe</item>
|
||||
<item>fcmove</item>
|
||||
<item>fcmovnb</item>
|
||||
<item>fcmovnbe</item>
|
||||
<item>fcmovne</item>
|
||||
<item>fcmovnu</item>
|
||||
<item>fcmovu</item>
|
||||
<item>fcom</item>
|
||||
<item>fcomp</item>
|
||||
<item>fcompp</item>
|
||||
<item>fcomi</item>
|
||||
<item>fcomip</item>
|
||||
<item>fcos</item>
|
||||
<item>fdecstp</item>
|
||||
<item>fdisi</item>
|
||||
<item>feni</item>
|
||||
<item>fdiv</item>
|
||||
<item>fdivr</item>
|
||||
<item>fdivp</item>
|
||||
<item>fdivrp</item>
|
||||
<item>femms</item>
|
||||
<item>ffree</item>
|
||||
<item>ffreep</item>
|
||||
<item>fiadd</item>
|
||||
<item>ficom</item>
|
||||
<item>ficomp</item>
|
||||
<item>fidiv</item>
|
||||
<item>fidivr</item>
|
||||
<item>fild</item>
|
||||
<item>fimul</item>
|
||||
<item>fincstp</item>
|
||||
<item>finit</item>
|
||||
<item>fist</item>
|
||||
<item>fistp</item>
|
||||
<item>fisttp</item>
|
||||
<item>fisub</item>
|
||||
<item>fisubr</item>
|
||||
<item>fld</item>
|
||||
<item>fld1</item>
|
||||
<item>fldl2e</item>
|
||||
<item>fldl2t</item>
|
||||
<item>fldlg2</item>
|
||||
<item>fldln2</item>
|
||||
<item>fldcw</item>
|
||||
<item>fldenv</item>
|
||||
<item>fldpi</item>
|
||||
<item>fldz</item>
|
||||
<item>fmul</item>
|
||||
<item>fmulp</item>
|
||||
<item>fndisi</item>
|
||||
<item>fneni</item>
|
||||
<item>fninit</item>
|
||||
<item>fnop</item>
|
||||
<item>fnsave</item>
|
||||
<item>fnstcw</item>
|
||||
<item>fnstenv</item>
|
||||
<item>fnstsw</item>
|
||||
<item>fnwait</item>
|
||||
<item>fpatan</item>
|
||||
<item>fptan</item>
|
||||
<item>fprem</item>
|
||||
<item>fprem1</item>
|
||||
<item>frndint</item>
|
||||
<item>frstor</item>
|
||||
<item>fsave</item>
|
||||
<item>fscale</item>
|
||||
<item>fsetpm</item>
|
||||
<item>fsin</item>
|
||||
<item>fsincos</item>
|
||||
<item>fsqrt</item>
|
||||
<item>fst</item>
|
||||
<item>fstp</item>
|
||||
<item>fstcw</item>
|
||||
<item>fstenv</item>
|
||||
<item>fstsw</item>
|
||||
<item>fsub</item>
|
||||
<item>fsubr</item>
|
||||
<item>fsubp</item>
|
||||
<item>fsubrp</item>
|
||||
<item>ftst</item>
|
||||
<item>fucom</item>
|
||||
<item>fucomp</item>
|
||||
<item>fucompp</item>
|
||||
<item>fucomi</item>
|
||||
<item>fucomip</item>
|
||||
<item>fwait</item>
|
||||
<item>fxam</item>
|
||||
<item>fxch</item>
|
||||
<item>fxrstor</item>
|
||||
<item>fxsave</item>
|
||||
<item>fxtract</item>
|
||||
<item>fyl2x</item>
|
||||
<item>fyl2xp1</item>
|
||||
<item>haddpd</item>
|
||||
<item>haddps</item>
|
||||
<item>hlt</item>
|
||||
<item>hsubpd</item>
|
||||
<item>hsubps</item>
|
||||
<item>ibts</item>
|
||||
<item>idiv</item>
|
||||
<item>imul</item>
|
||||
<item>in</item>
|
||||
<item>inc</item>
|
||||
<item>ins</item>
|
||||
<item>insb</item>
|
||||
<item>insd</item>
|
||||
<item>insw</item>
|
||||
<item>int</item>
|
||||
<item>int1</item>
|
||||
<item>int3</item>
|
||||
<item>into</item>
|
||||
<item>invd</item>
|
||||
<item>invlpg</item>
|
||||
<item>invlpga</item>
|
||||
<item>iret</item>
|
||||
<item>iretd</item>
|
||||
<item>iretq</item>
|
||||
<item>iretw</item>
|
||||
<item>ja</item>
|
||||
<item>jae</item>
|
||||
<item>jb</item>
|
||||
<item>jbe</item>
|
||||
<item>jc</item>
|
||||
<item>je</item>
|
||||
<item>jg</item>
|
||||
<item>jge</item>
|
||||
<item>jl</item>
|
||||
<item>jle</item>
|
||||
<item>jna</item>
|
||||
<item>jnae</item>
|
||||
<item>jnb</item>
|
||||
<item>jnbe</item>
|
||||
<item>jnc</item>
|
||||
<item>jne</item>
|
||||
<item>jng</item>
|
||||
<item>jnge</item>
|
||||
<item>jnl</item>
|
||||
<item>jnle</item>
|
||||
<item>jno</item>
|
||||
<item>jnp</item>
|
||||
<item>jns</item>
|
||||
<item>jnz</item>
|
||||
<item>jo</item>
|
||||
<item>jp</item>
|
||||
<item>jpe</item>
|
||||
<item>jpo</item>
|
||||
<item>js</item>
|
||||
<item>jz</item>
|
||||
<item>jcxz</item>
|
||||
<item>jecxz</item>
|
||||
<item>jrcxz</item>
|
||||
<item>jmp</item>
|
||||
<item>lahf</item>
|
||||
<item>lar</item>
|
||||
<item>lddqu</item>
|
||||
<item>ldmxcsr</item>
|
||||
<item>lds</item>
|
||||
<item>les</item>
|
||||
<item>lea</item>
|
||||
<item>leave</item>
|
||||
<item>lfence</item>
|
||||
<item>lfs</item>
|
||||
<item>lgdt</item>
|
||||
<item>lgs</item>
|
||||
<item>lidt</item>
|
||||
<item>lldt</item>
|
||||
<item>lmsw</item>
|
||||
<item>loadall</item>
|
||||
<item>loadall286</item>
|
||||
<item>lods</item>
|
||||
<item>lodsb</item>
|
||||
<item>lodsd</item>
|
||||
<item>lodsq</item>
|
||||
<item>lodsw</item>
|
||||
<item>loop</item>
|
||||
<item>loope</item>
|
||||
<item>loopne</item>
|
||||
<item>loopnz</item>
|
||||
<item>loopz</item>
|
||||
<item>lsl</item>
|
||||
<item>lss</item>
|
||||
<item>ltr</item>
|
||||
<item>maskmovdqu</item>
|
||||
<item>maskmovq</item>
|
||||
<item>maxpd</item>
|
||||
<item>maxps</item>
|
||||
<item>maxsd</item>
|
||||
<item>maxss</item>
|
||||
<item>mfence</item>
|
||||
<item>minpd</item>
|
||||
<item>minps</item>
|
||||
<item>minsd</item>
|
||||
<item>minss</item>
|
||||
<item>monitor</item>
|
||||
<item>mov</item>
|
||||
<item>movapd</item>
|
||||
<item>movaps</item>
|
||||
<item>movd</item>
|
||||
<item>movddup</item>
|
||||
<item>movdq2q</item>
|
||||
<item>movdqa</item>
|
||||
<item>movdqu</item>
|
||||
<item>movhlps</item>
|
||||
<item>movhpd</item>
|
||||
<item>movhps</item>
|
||||
<item>movlhps</item>
|
||||
<item>movlpd</item>
|
||||
<item>movlps</item>
|
||||
<item>movmskpd</item>
|
||||
<item>movmskps</item>
|
||||
<item>movntdq</item>
|
||||
<item>movnti</item>
|
||||
<item>movntpd</item>
|
||||
<item>movntps</item>
|
||||
<item>movntq</item>
|
||||
<item>movq</item>
|
||||
<item>movq2dq</item>
|
||||
<item>movs</item>
|
||||
<item>movsb</item>
|
||||
<item>movsd</item>
|
||||
<item>movshdup</item>
|
||||
<item>movsldup</item>
|
||||
<item>movsq</item>
|
||||
<item>movss</item>
|
||||
<item>movsx</item>
|
||||
<item>movsxd</item>
|
||||
<item>movsw</item>
|
||||
<item>movupd</item>
|
||||
<item>movups</item>
|
||||
<item>movzx</item>
|
||||
<item>mul</item>
|
||||
<item>mulpd</item>
|
||||
<item>mulps</item>
|
||||
<item>mulsd</item>
|
||||
<item>mulss</item>
|
||||
<item>mwait</item>
|
||||
<item>neg</item>
|
||||
<item>nop</item>
|
||||
<item>not</item>
|
||||
<item>or</item>
|
||||
<item>orpd</item>
|
||||
<item>orps</item>
|
||||
<item>out</item>
|
||||
<item>outs</item>
|
||||
<item>outsb</item>
|
||||
<item>outsw</item>
|
||||
<item>outsd</item>
|
||||
<item>packssdw</item>
|
||||
<item>packsswb</item>
|
||||
<item>packuswb</item>
|
||||
<item>paddb</item>
|
||||
<item>paddd</item>
|
||||
<item>paddq</item>
|
||||
<item>paddsb</item>
|
||||
<item>paddsw</item>
|
||||
<item>paddusb</item>
|
||||
<item>paddusw</item>
|
||||
<item>paddw</item>
|
||||
<item>pand</item>
|
||||
<item>pandn</item>
|
||||
<item>pause</item>
|
||||
<item>pavgb</item>
|
||||
<item>pavgusb</item>
|
||||
<item>pavgw</item>
|
||||
<item>pcmpeqb</item>
|
||||
<item>pcmpeqw</item>
|
||||
<item>pcmpeqd</item>
|
||||
<item>pcmpgtb</item>
|
||||
<item>pcmpgtw</item>
|
||||
<item>pcmpgtd</item>
|
||||
<item>pdistib</item>
|
||||
<item>pextrw</item>
|
||||
<item>pf2id</item>
|
||||
<item>pf2iw</item>
|
||||
<item>pfacc</item>
|
||||
<item>pfadd</item>
|
||||
<item>pfcmpeq</item>
|
||||
<item>pfcmpge</item>
|
||||
<item>pfcmpgt</item>
|
||||
<item>pfmax</item>
|
||||
<item>pfmin</item>
|
||||
<item>pfmul</item>
|
||||
<item>pfnacc</item>
|
||||
<item>pfpnacc</item>
|
||||
<item>pfrcp</item>
|
||||
<item>pfrcpit1</item>
|
||||
<item>pfrcpit2</item>
|
||||
<item>pfrsqit1</item>
|
||||
<item>pfrsqrt</item>
|
||||
<item>pfsub</item>
|
||||
<item>pfsubr</item>
|
||||
<item>pi2fd</item>
|
||||
<item>pi2fw</item>
|
||||
<item>pinsrw</item>
|
||||
<item>pmachriw</item>
|
||||
<item>pmaddwd</item>
|
||||
<item>pmagw</item>
|
||||
<item>pmaxsw</item>
|
||||
<item>pmaxub</item>
|
||||
<item>pminsw</item>
|
||||
<item>pminub</item>
|
||||
<item>pmovmskb</item>
|
||||
<item>pmulhrw</item>
|
||||
<item>pmulhuw</item>
|
||||
<item>pmulhw</item>
|
||||
<item>pmullw</item>
|
||||
<item>pmuludq</item>
|
||||
<item>pmvgezb</item>
|
||||
<item>pmvlzb</item>
|
||||
<item>pmvnzb</item>
|
||||
<item>pmvzb</item>
|
||||
<item>pop</item>
|
||||
<item>popa</item>
|
||||
<item>popaw</item>
|
||||
<item>popad</item>
|
||||
<item>popf</item>
|
||||
<item>popfw</item>
|
||||
<item>popfd</item>
|
||||
<item>popfq</item>
|
||||
<item>por</item>
|
||||
<item>prefetch</item>
|
||||
<item>prefetchnta</item>
|
||||
<item>prefetcht0</item>
|
||||
<item>prefetcht1</item>
|
||||
<item>prefetcht2</item>
|
||||
<item>prefetchw</item>
|
||||
<item>psadbw</item>
|
||||
<item>pshufd</item>
|
||||
<item>pshufhw</item>
|
||||
<item>pshuflw</item>
|
||||
<item>pshufw</item>
|
||||
<item>pslld</item>
|
||||
<item>pslldq</item>
|
||||
<item>psllq</item>
|
||||
<item>psllw</item>
|
||||
<item>psrad</item>
|
||||
<item>psraw</item>
|
||||
<item>psrld</item>
|
||||
<item>psrldq</item>
|
||||
<item>psrlq</item>
|
||||
<item>psrlw</item>
|
||||
<item>psubb</item>
|
||||
<item>psubd</item>
|
||||
<item>psubq</item>
|
||||
<item>psubsb</item>
|
||||
<item>psubsiw</item>
|
||||
<item>psubsw</item>
|
||||
<item>psubusb</item>
|
||||
<item>psubusw</item>
|
||||
<item>psubw</item>
|
||||
<item>pswapd</item>
|
||||
<item>punpckhbw</item>
|
||||
<item>punpckhdq</item>
|
||||
<item>punpckhqdq</item>
|
||||
<item>punpckhwd</item>
|
||||
<item>punpcklbw</item>
|
||||
<item>punpckldq</item>
|
||||
<item>punpcklqdq</item>
|
||||
<item>punpcklwd</item>
|
||||
<item>push</item>
|
||||
<item>pusha</item>
|
||||
<item>pushad</item>
|
||||
<item>pushaw</item>
|
||||
<item>pushf</item>
|
||||
<item>pushfd</item>
|
||||
<item>pushfq</item>
|
||||
<item>pushfw</item>
|
||||
<item>pxor</item>
|
||||
<item>rcl</item>
|
||||
<item>rcr</item>
|
||||
<item>rcpps</item>
|
||||
<item>rcpss</item>
|
||||
<item>rdmsr</item>
|
||||
<item>rdpmc</item>
|
||||
<item>rdshr</item>
|
||||
<item>rdtsc</item>
|
||||
<item>rdtscp</item>
|
||||
<item>ret</item>
|
||||
<item>retf</item>
|
||||
<item>retn</item>
|
||||
<item>rol</item>
|
||||
<item>ror</item>
|
||||
<item>rsdc</item>
|
||||
<item>rsldt</item>
|
||||
<item>rsm</item>
|
||||
<item>rsqrtps</item>
|
||||
<item>rsqrtss</item>
|
||||
<item>rsts</item>
|
||||
<item>sahf</item>
|
||||
<item>sal</item>
|
||||
<item>sar</item>
|
||||
<item>salc</item>
|
||||
<item>sbb</item>
|
||||
<item>scas</item>
|
||||
<item>scasb</item>
|
||||
<item>scasd</item>
|
||||
<item>scasq</item>
|
||||
<item>scasw</item>
|
||||
<item>seta</item>
|
||||
<item>setae</item>
|
||||
<item>setb</item>
|
||||
<item>setbe</item>
|
||||
<item>setc</item>
|
||||
<item>sete</item>
|
||||
<item>setg</item>
|
||||
<item>setge</item>
|
||||
<item>setl</item>
|
||||
<item>setle</item>
|
||||
<item>setna</item>
|
||||
<item>setnae</item>
|
||||
<item>setnb</item>
|
||||
<item>setnbe</item>
|
||||
<item>setnc</item>
|
||||
<item>setne</item>
|
||||
<item>setng</item>
|
||||
<item>setnge</item>
|
||||
<item>setnl</item>
|
||||
<item>setnle</item>
|
||||
<item>setno</item>
|
||||
<item>setnp</item>
|
||||
<item>setns</item>
|
||||
<item>setnz</item>
|
||||
<item>seto</item>
|
||||
<item>setp</item>
|
||||
<item>setpe</item>
|
||||
<item>setpo</item>
|
||||
<item>sets</item>
|
||||
<item>setz</item>
|
||||
<item>sfence</item>
|
||||
<item>sgdt</item>
|
||||
<item>shl</item>
|
||||
<item>shld</item>
|
||||
<item>shr</item>
|
||||
<item>shrd</item>
|
||||
<item>shufpd</item>
|
||||
<item>shufps</item>
|
||||
<item>sidt</item>
|
||||
<item>skinit</item>
|
||||
<item>sldt</item>
|
||||
<item>smi</item>
|
||||
<item>smint</item>
|
||||
<item>smintold</item>
|
||||
<item>smsw</item>
|
||||
<item>sqrtpd</item>
|
||||
<item>sqrtps</item>
|
||||
<item>sqrtsd</item>
|
||||
<item>sqrtss</item>
|
||||
<item>stc</item>
|
||||
<item>std</item>
|
||||
<item>stgi</item>
|
||||
<item>sti</item>
|
||||
<item>stmxcsr</item>
|
||||
<item>stos</item>
|
||||
<item>stosb</item>
|
||||
<item>stosd</item>
|
||||
<item>stosq</item>
|
||||
<item>stosw</item>
|
||||
<item>str</item>
|
||||
<item>sub</item>
|
||||
<item>subpd</item>
|
||||
<item>subps</item>
|
||||
<item>subsd</item>
|
||||
<item>subss</item>
|
||||
<item>svdc</item>
|
||||
<item>svldt</item>
|
||||
<item>svts</item>
|
||||
<item>swapgs</item>
|
||||
<item>syscall</item>
|
||||
<item>sysenter</item>
|
||||
<item>sysexit</item>
|
||||
<item>sysret</item>
|
||||
<item>test</item>
|
||||
<item>ucomisd</item>
|
||||
<item>ucomiss</item>
|
||||
<item>ud0</item>
|
||||
<item>ud1</item>
|
||||
<item>ud2</item>
|
||||
<item>umov</item>
|
||||
<item>unpckhpd</item>
|
||||
<item>unpckhps</item>
|
||||
<item>unpcklpd</item>
|
||||
<item>unpcklps</item>
|
||||
<item>verr</item>
|
||||
<item>verw</item>
|
||||
<item>vmload</item>
|
||||
<item>vmmcall</item>
|
||||
<item>vmrun</item>
|
||||
<item>vmsave</item>
|
||||
<item>wait</item>
|
||||
<item>wbinvd</item>
|
||||
<item>wrmsr</item>
|
||||
<item>wrshr</item>
|
||||
<item>xadd</item>
|
||||
<item>xbts</item>
|
||||
<item>xchg</item>
|
||||
<item>xlat</item>
|
||||
<item>xlatb</item>
|
||||
<item>xor</item>
|
||||
<item>xorpd</item>
|
||||
<item>xorps</item>
|
||||
</list>
|
||||
|
||||
<list name="Data">
|
||||
<!-- Initialized data (1.2.2)-->
|
||||
<item>db</item>
|
||||
<item>dw</item>
|
||||
<item>du</item>
|
||||
<item>dd</item>
|
||||
<item>dp</item>
|
||||
<item>df</item>
|
||||
<item>dq</item>
|
||||
<item>dt</item>
|
||||
<!-- Uninitialized data (1.2.2)-->
|
||||
<item>rb</item>
|
||||
<item>rw</item>
|
||||
<item>rd</item>
|
||||
<item>rp</item>
|
||||
<item>rf</item>
|
||||
<item>rq</item>
|
||||
<item>rt</item>
|
||||
<!-- binary file include (1.2.2)-->
|
||||
<item>file</item>
|
||||
<!-- operand size from (1.2.1)-->
|
||||
<item>byte</item>
|
||||
<item>word</item>
|
||||
<item>dword</item>
|
||||
<item>pword</item>
|
||||
<item>qword</item>
|
||||
<item>tbyte</item>
|
||||
<item>tword</item>
|
||||
<item>dqword</item>
|
||||
<item>ptr</item>
|
||||
</list>
|
||||
|
||||
<list name="Preprocessor Keywords"> <!-- Contains keywords for macros, structures, etc... -->
|
||||
<item>append</item>
|
||||
<item>at</item> <!-- As in "virtual at"-->
|
||||
<item>break</item>
|
||||
<item>common</item>
|
||||
<item>display</item>
|
||||
<item>else</item>
|
||||
<item>end</item> <!-- As in "end if"-->
|
||||
<item>equ</item>
|
||||
<item>fix</item>
|
||||
<item>foward</item>
|
||||
<item>if</item>
|
||||
<item>irp</item>
|
||||
<item>irps</item>
|
||||
<item>label</item>
|
||||
<item>local</item>
|
||||
<item>match</item>
|
||||
<item>macro</item>
|
||||
<item>purge</item>
|
||||
<item>repeat</item>
|
||||
<item>rept</item>
|
||||
<item>reverse</item>
|
||||
<item>restore</item>
|
||||
<item>struc</item>
|
||||
<item>times</item>
|
||||
<item>while</item>
|
||||
<item>virtual</item>
|
||||
</list>
|
||||
|
||||
<list name="Instruction-like Keywords"> <!-- Contains instruction-like keywords -->
|
||||
<item>align</item>
|
||||
<item>entry</item>
|
||||
<item>extrn</item>
|
||||
<item>format</item>
|
||||
<item>include</item>
|
||||
<item>invoke</item>
|
||||
<item>data</item>
|
||||
<item>load</item>
|
||||
<item>from</item>
|
||||
<item>heap</item>
|
||||
<item>org</item>
|
||||
<item>proc</item>
|
||||
<item>public</item>
|
||||
<item>section</item>
|
||||
<item>segment</item>
|
||||
<item>stack</item>
|
||||
<item>store</item>
|
||||
<item>use16</item>
|
||||
<item>use32</item>
|
||||
<item>use64</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<keyword attribute="Registers" context="#stay" String="registers"/>
|
||||
<keyword attribute="Data" context="#stay" String="Data"/>
|
||||
<keyword attribute="Instructions" context="#stay" String="instructions"/>
|
||||
<keyword attribute="Instructions" context="#stay" String="Instruction-like Keywords"/>
|
||||
<keyword attribute="Preprocessor" context="#stay" String="Preprocessor Keywords"/>
|
||||
<DetectChar attribute="Comment" context="Comment" char=";"/>
|
||||
<AnyChar attribute="String" context="String" String=""'"/>
|
||||
<RegExpr attribute="Label" context="#stay" String="^\s*[A-Za-z0-9@_.$?]+:"/>
|
||||
<!-- Conditional instructions -->
|
||||
<RegExpr attribute="Instructions" context="#stay" String="(cmov|fcmov|j|loop|set)(a|ae|b|be|c|e|g|ge|l|le|na|nae|nb|nbe|nc|ne|ng|nge|nl|nle|no|np|ns|nz|o|p|pe|po|s|z)"/>
|
||||
<!-- hexadecimal numbers -->
|
||||
<RegExpr attribute="BaseN" context="#stay" insensitive="true" String="(^|[ \t,]+)((\$|0x){1}[0-9]+[a-f0-9]*|[a-f0-9]+h)([ \t,]+|$)"/>
|
||||
<!-- octal and binary numbers -->
|
||||
<RegExpr attribute="BaseN" context="#stay" insensitive="true" String="(^|[ \t,]+)([0-7]+(q|o)|[01]+b)([ \t,]+|$)"/>
|
||||
<DetectChar attribute="Number" context="#stay" char="$"/>
|
||||
<HlCOct attribute="BaseN" context="#stay"/>
|
||||
<HlCHex attribute="BaseN" context="#stay"/>
|
||||
<Float attribute="Float" context="#stay"/>
|
||||
<Int attribute="Number" context="#stay"/>
|
||||
<HlCChar attribute="Char" context="#stay"/>
|
||||
</context>
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#pop"/>
|
||||
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop"/>
|
||||
<context name="String" attribute="String" lineEndContext="#pop">
|
||||
<AnyChar attribute="String" context="#pop" String=""'"/>
|
||||
</context>
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Registers" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Instructions" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Label" defStyleNum="dsFunction"/>
|
||||
<itemData name="Data" defStyleNum="dsDataType"/>
|
||||
<itemData name="BaseN" defStyleNum="dsBaseN"/>
|
||||
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||
<itemData name="Number" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Char" defStyleNum="dsChar"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Preprocessor" defStyleNum="dsOthers"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="0"/>
|
||||
<comments>
|
||||
<comment name="singleLine" start=";"/>
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="FTL" version="1.10" kateversion="2.3" section="Markup" extensions="*.ftl" license="LGPLv2+" author="Radomir Svancer (svancer@gmail.com), Robert Kratky (kratky@rob.cz>), Matthias Mailänder (matthias.mailaender@vogella.com)">
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="comment start" attribute="NormalText" lineEndContext="#stay">
|
||||
<StringDetect attribute="Comment" context="comment end" String="<!--"/>
|
||||
<StringDetect attribute="FTLComment" context="comment ending" String="<#--"/>
|
||||
<RegExpr attribute="FTLKeyword" context="syntax start" String="<\s*\/?\s*[#@][a-zA-Z0-9_]*" />
|
||||
<StringDetect attribute="FTLMark" context="variable end" String="${" />
|
||||
<RegExpr attribute="Keyword" context="logic end" String="<\s*\/?\s*[a-zA-Z0-9_]*" />
|
||||
</context>
|
||||
|
||||
<context name="logic end" attribute="Identifier" lineEndContext="#stay">
|
||||
<DetectChar attribute="Keyword" context="#pop" char=">"/>
|
||||
<RegExpr attribute="NormalText" context="logic" String="\s*=\s*"/>
|
||||
<StringDetect attribute="FTLComment" context="comment ending" String="<#--"/>
|
||||
<RegExpr attribute="FTLKeyword" context="syntax start" String="<\s*\/?\s*[#@][a-zA-Z0-9_]*" />
|
||||
<StringDetect attribute="FTLMark" context="variable end" String="${" />
|
||||
</context>
|
||||
|
||||
<context name="logic" attribute="Types" lineEndContext="#stay">
|
||||
<RegExpr attribute="Types" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<DetectChar attribute="Types" context="logic start" char=""" />
|
||||
</context>
|
||||
|
||||
<context name="logic start" attribute="Types" lineEndContext="#stay">
|
||||
<DetectChar attribute="Types" context="#pop#pop" char=""" />
|
||||
<StringDetect attribute="FTLComment" context="comment ending" String="<#--"/>
|
||||
<RegExpr attribute="FTLKeyword" context="syntax start" String="<\s*\/?\s*[#@][a-zA-Z0-9_]*" />
|
||||
<StringDetect attribute="FTLMark" context="variable end" String="${" />
|
||||
</context>
|
||||
|
||||
<context name="comment" attribute="Comment" lineEndContext="#pop"/>
|
||||
|
||||
<context name="values" attribute="String" lineEndContext="#pop">
|
||||
<DetectChar attribute="String" context="#pop" char="'"/>
|
||||
</context>
|
||||
|
||||
<context name="comment end" attribute="Comment" lineEndContext="#stay">
|
||||
<StringDetect attribute="Comment" context="#pop" String="-->"/>
|
||||
<StringDetect attribute="FTLComment" context="comment ending" String="<#--"/>
|
||||
<RegExpr attribute="FTLKeyword" context="syntax start" String="<\s*\/?\s*[#@][a-zA-Z0-9_]*" />
|
||||
<StringDetect attribute="FTLMark" context="variable end" String="${" />
|
||||
</context>
|
||||
|
||||
<context name="comment ending" attribute="FTLComment" lineEndContext="#stay">
|
||||
<StringDetect attribute="FTLComment" context="#pop" String="-->"/>
|
||||
</context>
|
||||
|
||||
<context name="syntax start" attribute="FTLKeyword" lineEndContext="#stay">
|
||||
<DetectChar attribute="FTLKeyword" context="#pop" char=">"/>
|
||||
<DetectChar attribute="FTLQuot" context="comment string" char=""" />
|
||||
<RegExpr attribute="FTLIdentifier" context="syntax end" String="\s*"/>
|
||||
</context>
|
||||
|
||||
<context name="comment string" attribute="FTLQuot" lineEndContext="#stay">
|
||||
<DetectChar attribute="FTLQuot" context="#pop#pop" char=""" />
|
||||
</context>
|
||||
|
||||
<context name="syntax end" attribute="FTLIdentifier" lineEndContext="#stay">
|
||||
<DetectChar attribute="FTLKeyword" context="#pop#pop" char=">"/>
|
||||
<DetectChar attribute="FTLQuot" context="comment string" char=""" />
|
||||
</context>
|
||||
|
||||
<context name="variable end" attribute="FTLIdentifier" lineEndContext="#stay">
|
||||
<DetectChar attribute="FTLMark" context="#pop" char="}"/>
|
||||
<DetectChar attribute="FTLQuot" context="comment string" char=""" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="NormalText" defStyleNum="dsNormal"/>
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Identifier" defStyleNum="dsOthers"/>
|
||||
<itemData name="Types" defStyleNum="dsDataType"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="FTLComment" defStyleNum="dsComment" color="#7777cc" selColor="#00ff00" bold="0" italic="1"/>
|
||||
<itemData name="FTLKeyword" defStyleNum="dsKeyword" color="#0000cc" selColor="#00ff00" bold="1" italic="0"/>
|
||||
<itemData name="FTLQuot" defStyleNum="dsOthers" color="#ff0044" selColor="#00ff00" bold="0" italic="0"/>
|
||||
<itemData name="FTLIdentifier" defStyleNum="dsOthers" color="#0022bb" selColor="#00ff00" bold="0" italic="0"/>
|
||||
<itemData name="FTLMark" defStyleNum="dsOthers" color="#0000cc" selColor="#00ff00" bold="1" italic="1"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="<#--" end="-->" />
|
||||
</comments>
|
||||
<keywords casesensitive="0" />
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="Git Ignore" version="0.1" kateversion="2.4" section="Configuration" extensions=".gitignore*;" mimetype="text/x-git-ignore" license="LGPL">
|
||||
<highlighting>
|
||||
<contexts>
|
||||
|
||||
<context name="ini" attribute="Normal Text" lineEndContext="#pop">
|
||||
<DetectChar char="#" attribute="Comment" context="Comment" />
|
||||
<RegExpr attribute="Include" String="^!.*" context="Include"/>
|
||||
<RegExpr attribute="Exclude" String=".*" context="Exclude" />
|
||||
</context>
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
</context>
|
||||
|
||||
<context name="Include" attribute="Include" lineEndContext="#pop">
|
||||
</context>
|
||||
|
||||
<context name="Exclude" attribute="Exclude" lineEndContext="#pop">
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Exclude" defStyleNum="dsString" />
|
||||
<itemData name="Include" defStyleNum="dsChar" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
<keywords casesensitive="0" />
|
||||
</general>
|
||||
</language>
|
||||
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language version="0.1" kateversion="2.4" name="Gitolite" section="Configuration" extensions="gitolite.conf" author="Andor Dávid (david-andor@kozpontiagy.hu)" license="GPL">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item>repo</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="Normal Text" attribute="Normal Text" lineEndContext="#pop">
|
||||
<DetectChar context="SingleLineComment" char="#" />
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords" />
|
||||
<RegExpr attribute="Group" context="#stay" String="\@[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" />
|
||||
<RegExpr attribute="Symbol" context="Value" String="=" />
|
||||
</context>
|
||||
|
||||
<context name="SingleLineComment" attribute="Comment (Single)" lineEndContext="#pop" ></context>
|
||||
|
||||
<context name="Value" attribute="Value" lineEndContext="#pop">
|
||||
<RegExpr attribute="Group" context="#stay" String="\@[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" />
|
||||
</context>
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Comment (Single)" defStyleNum="dsComment" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
|
||||
<itemData name="Group" defStyleNum="dsKeyword" spellChecking="false" />
|
||||
<!-- <itemData name="Refs" defStyleNum="dsKeyword" spellChecking="false" /> -->
|
||||
<itemData name="Symbol" defStyleNum="dsString" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
<keywords casesensitive="1" />
|
||||
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
|
||||
</general>
|
||||
|
||||
<!-- kate: space-indent on indent-width 2 replace-tabs on indent-mode xml -->
|
||||
</language>
|
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
========================================================================
|
||||
|
||||
Haxe Language highlighting.
|
||||
|
||||
========================================================================
|
||||
|
||||
Author: Chad Joan
|
||||
|
||||
========================================================================
|
||||
-->
|
||||
|
||||
<language name="Haxe" section="Sources" extensions="*.hx;*.Hx;*.hX;*.HX;" mimetype="text/x-hxsrc" version="0.1" kateversion="2.4" casesensitive="true" author="Chad Joan" license="MIT">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
|
||||
<item> break </item>
|
||||
|
||||
<item> case </item>
|
||||
<item> cast </item>
|
||||
<item> catch </item>
|
||||
<item> class </item>
|
||||
<item> continue </item>
|
||||
|
||||
<item> default </item>
|
||||
|
||||
<item> else </item>
|
||||
<item> enum </item>
|
||||
<item> extends </item>
|
||||
|
||||
<item> false </item>
|
||||
<item> for </item>
|
||||
<item> function </item>
|
||||
|
||||
<item> if </item>
|
||||
<item> implements </item>
|
||||
<item> in </item>
|
||||
<item> inline </item>
|
||||
<item> interface </item>
|
||||
|
||||
<item> new </item>
|
||||
<item> null </item>
|
||||
|
||||
<item> override </item>
|
||||
|
||||
<item> private </item>
|
||||
<item> public </item>
|
||||
|
||||
<item> return </item>
|
||||
|
||||
<item> static </item>
|
||||
<item> super </item>
|
||||
<item> switch </item>
|
||||
|
||||
<item> this </item>
|
||||
<item> throw </item>
|
||||
<item> trace </item>
|
||||
<item> true </item>
|
||||
<item> try </item>
|
||||
<item> typedef </item>
|
||||
|
||||
<item> untyped </item>
|
||||
|
||||
<item> var </item>
|
||||
|
||||
<item> while </item>
|
||||
|
||||
</list>
|
||||
|
||||
<list name="modules">
|
||||
<item> package </item>
|
||||
<item> import </item>
|
||||
</list>
|
||||
|
||||
<list name="types">
|
||||
<item> Array </item>
|
||||
<item> Void </item>
|
||||
<item> Bool </item>
|
||||
<item> Int </item>
|
||||
<item> UInt </item>
|
||||
<item> Float </item>
|
||||
<item> Dynamic </item>
|
||||
<item> String </item>
|
||||
<item> List </item>
|
||||
<item> Error </item>
|
||||
<item> Unknown </item>
|
||||
<item> Type </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="normal">
|
||||
<RegExpr attribute="Preprocessor" context="#pop" String="#if(\s+\w+)?" />
|
||||
<RegExpr attribute="Preprocessor" context="#pop" String="#(else|elseif|end|error)" />
|
||||
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
||||
<keyword attribute="Module" context="ModuleName" String="modules"/>
|
||||
<keyword attribute="Type" context="#stay" String="types"/>
|
||||
|
||||
<DetectIdentifier attribute="Normal Text"/>
|
||||
|
||||
<HlCStringChar attribute="EscapeString" context="#pop"/>
|
||||
|
||||
<DetectChar attribute="RawString" context="RawString" char="'"/>
|
||||
<DetectChar attribute="String" context="String" char="""/>
|
||||
|
||||
<Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
|
||||
<Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/>
|
||||
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="BraceA" />
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="BraceA" />
|
||||
|
||||
<!-- Match ... and .. before numbers are matched. -->
|
||||
<StringDetect attribute="Normal Text" context="#pop" String="..."/>
|
||||
<Detect2Chars attribute="Normal Text" char="." char1="."/>
|
||||
|
||||
<!-- Float -->
|
||||
<!-- Floats must be matched before Binary|Octal|Hex|Integer -->
|
||||
<!-- All floats except integers -->
|
||||
<RegExpr attribute="Float" context="#pop" String="[\d][\d]*(\.(?!\.)[\d]*([eE][-+]?[\d]+)?)"/>
|
||||
<RegExpr attribute="Float" context="#pop" String="\.[\d][\d]*([eE][-+]?[\d]+)?"/>
|
||||
|
||||
<!-- Hex|Integer -->
|
||||
<RegExpr attribute="Hex" context="#pop" String="0[xX][\da-fA-F]+"/>
|
||||
<RegExpr attribute="Integer" context="#pop" String="\d+"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Module Name" lineEndContext="#stay" name="ModuleName">
|
||||
<Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
|
||||
<Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/>
|
||||
<RegExpr context="#pop" String="[^\s\w.:,]"/>
|
||||
</context>
|
||||
|
||||
<!-- Strings -->
|
||||
<!-- '...' -->
|
||||
<context attribute="RawString" lineEndContext="#stay" name="RawString">
|
||||
<DetectChar attribute="RawString" context="#pop" char="'"/>
|
||||
</context>
|
||||
<!-- "..." -->
|
||||
<context attribute="String" lineEndContext="#stay" name="String">
|
||||
<Detect2Chars attribute="String" context="#stay" char="\" char1="""/>
|
||||
<DetectChar attribute="String" context="#pop" char="""/>
|
||||
<HlCStringChar attribute="EscapeSequence"/>
|
||||
<RegExpr attribute="EscapeSequence" context="#stay" String="\\(u[\da-fA-F]{4}|U[\da-fA-F]{8}|&[a-zA-Z]\w+;)" />
|
||||
</context>
|
||||
|
||||
<!-- Comments -->
|
||||
<context attribute="Comment" lineEndContext="#pop" name="CommentLine"/>
|
||||
<context attribute="Comment" lineEndContext="#stay" name="CommentBlock">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentBlock"/>
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Type" defStyleNum="dsDataType"/>
|
||||
<itemData name="Integer" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Hex" defStyleNum="dsBaseN"/>
|
||||
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||
|
||||
<itemData name="Module" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff"/>
|
||||
<itemData name="Module Name" defStyleNum="dsNormal" color="#0000ff" selColor="#ffffff"/>
|
||||
|
||||
<itemData name="EscapeSequence" defStyleNum="dsString" color="#00aa88" selColor="#ff0000"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="RawString" defStyleNum="dsString"/>
|
||||
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
|
||||
<itemData name="Preprocessor" defStyleNum="dsOthers"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="//"/>
|
||||
<comment name="multiLine" start="/*" end="*/" />
|
||||
</comments>
|
||||
<keywords casesensitive="true"/>
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd" >
|
||||
<language name="Hunspell Affix File" section="Other" extensions="*.aff" priority="-9" version="1" kateversion="2.4" author="Lukas Sommer" license="LGPL version 2.1, or version 3 or later versions approved by the membership of KDE e.V.; or any other license appoved by the emembership of KDE e.V.">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<!-- This list is commented out. We use a simple fallback rule instead …
|
||||
<list name="list_keywordsWithNumbersOrFlags">
|
||||
|
||||
<!- - keywords without options: - - >
|
||||
<item>ONLYMAXDIFF</item>
|
||||
<item>NOSPLITSUGS</item>
|
||||
<item>SUGSWITHDOTS</item>
|
||||
<item>FORBIDWARN</item>
|
||||
<item>CHECKCOMPOUNDDUP</item>
|
||||
<item>CHECKCOMPOUNDREP</item>
|
||||
<item>CHECKCOMPOUNDCASE</item>
|
||||
<item>CHECKCOMPOUNDTRIPLE</item>
|
||||
<item>SIMPLIFIEDTRIPLE</item>
|
||||
<item>FULLSTRIP</item>
|
||||
<item>CHECKSHARPS</item>
|
||||
<item>COMPLEXPREFIXES</item>
|
||||
|
||||
<!- - keywords with flags: - - >
|
||||
<item>COMPOUNDFLAG</item>
|
||||
<item>COMPOUNDBEGIN</item>
|
||||
<item>COMPOUNDLAST</item>
|
||||
<item>COMPOUNDMIDDLE</item>
|
||||
<item>ONLYINCOMPOUND</item>
|
||||
<item>COMPOUNDPERMITFLAG</item>
|
||||
<item>COMPOUNDFORBIDFLAG</item>
|
||||
<item>COMPOUNDROOT</item>
|
||||
<item>COMPOUNDROOT</item>
|
||||
<item>FORCEUCASE</item>
|
||||
<item>SYLLABLENUM</item>
|
||||
<item>CIRCUMFIX</item>
|
||||
<item>FORBIDDENWORD</item>
|
||||
<item>KEEPCASE</item>
|
||||
<item>LEMMA_PRESENT</item>
|
||||
<item>NEEDAFFIX</item>
|
||||
<!- - PSEUDOROOT is deprecated. (Former name of the NEEDAFFIX option.) - - >
|
||||
<item>SUBSTANDARD</item>
|
||||
<item>NOSUGGEST</item>
|
||||
<item>WARN</item>
|
||||
|
||||
<!- - keywords with number: - - >
|
||||
<item>MAXCPDSUGS</item>
|
||||
<item>MAXNGRAMSUGS</item>
|
||||
<item>MAXDIFF</item>
|
||||
<item>COMPOUNDMIN</item>
|
||||
<item>COMPOUNDWORDMAX</item>
|
||||
|
||||
<!- - keywords with number or flags: - - >
|
||||
<item>AF</item>
|
||||
|
||||
</list>
|
||||
-->
|
||||
|
||||
<list name="list_keywordsWithEnum">
|
||||
<item>SET</item>
|
||||
<item>FLAG</item>
|
||||
<item>LANG</item>
|
||||
</list>
|
||||
|
||||
<list name="list_keywordsWithCharacters">
|
||||
<item>TRY</item>
|
||||
<item>WORDCHARS</item>
|
||||
<item>IGNORE</item>
|
||||
</list>
|
||||
|
||||
<list name="list_keywordsWithNumbersOrStrings">
|
||||
<item>BREAK</item>
|
||||
<item>COMPOUNDSYLLABLE</item>
|
||||
</list>
|
||||
|
||||
<list name="list_keywordsForAffixes">
|
||||
<item>SFX</item>
|
||||
<item>PFX</item>
|
||||
</list>
|
||||
|
||||
<list name="list_keywordsWithPattern">
|
||||
<!-- TODO Maybe we could implement a special highlighting for each of these pattern types? -->
|
||||
<item>COMPOUNDRULE</item>
|
||||
<item>PHONE</item>
|
||||
<item>ICONV</item>
|
||||
<item>OCONV</item>
|
||||
<item>KEY</item>
|
||||
<item>MAP</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
|
||||
<context name="aff" attribute="Undefined" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<keyword attribute="Keyword" context="context_flag_stripping_affix_condition_morphologicalFields" String="list_keywordsForAffixes" column="0" />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<StringDetect String="REP" insensitive="true" attribute="Keyword" context="context_replace" column="0" />
|
||||
<StringDetect String="CHECKCOMPOUNDPATTERN" insensitive="true" attribute="Keyword" context="context_stringsWithFlags" column="0" />
|
||||
<keyword attribute="Keyword" context="context_numbersOrString" String="list_keywordsWithNumbersOrStrings" column="0" />
|
||||
<keyword attribute="Keyword" context="context_characters" String="list_keywordsWithCharacters" column="0" />
|
||||
<keyword attribute="Keyword" context="context_pattern" String="list_keywordsWithPattern" column="0" />
|
||||
<keyword attribute="Keyword" context="context_enum" String="list_keywordsWithEnum" column="0" />
|
||||
<!-- Fallback rule: -->
|
||||
<DetectIdentifier attribute="Keyword" context="context_numbersOrFlags" column="0" />
|
||||
</context>
|
||||
|
||||
<context name="context_stringsWithFlags" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<DetectChar char="/" attribute="Keyword" context="context_stringsWithFlags_flagHelper" />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_stringsWithFlags_flagHelper" attribute="Flags" lineEndContext="#pop">
|
||||
<DetectSpaces context="context_stringsWithFlags" />
|
||||
</context>
|
||||
|
||||
<context name="context_characters" attribute="Characters" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_enum" attribute="Choice" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_replace" attribute="Keyword" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<Int attribute="Number" context="#stay" />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<RegExpr context="context_numbersOrString" attribute="Pattern" String="\S*" />
|
||||
</context>
|
||||
|
||||
<context name="context_pattern" attribute="Pattern" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_numbersOrFlags" attribute="Flags" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<Int attribute="Number" context="#stay" />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_numbersOrString" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<Int attribute="Number" context="#stay" />
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_flag_stripping_affix_condition_morphologicalFields" attribute="Keyword" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<RegExpr context="context_stripping_affix_condition_morphologicalFields" attribute="Flags" String="\S*" />
|
||||
</context>
|
||||
|
||||
<context name="context_stripping_affix_condition_morphologicalFields" attribute="Flags" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<DetectChar char="0" attribute="Skipped parameter" context="context_affix_condition_morphologicalFields" />
|
||||
<RegExpr context="context_numbersOrString" attribute="Choice" String="(Y|N)\s*(?![^\d])" />
|
||||
<RegExpr context="context_affix_condition_morphologicalFields" attribute="Stripping" String="\S*" />
|
||||
</context>
|
||||
|
||||
<context name="context_affix_condition_morphologicalFields" attribute="Stripping" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<RegExpr context="context_slash_flags_condition_morphologicalFields" attribute="Skipped parameter" String="0(?=/)" />
|
||||
<DetectChar char="0" attribute="Skipped parameter" context="context_condition_morphologicalFields" />
|
||||
<RegExpr context="context_slash_flags_condition_morphologicalFields" attribute="Affix" String="[^\s/]*(?=/)" />
|
||||
<DetectChar char="/" context="context_slash_flags_condition_morphologicalFields" lookAhead="true" />
|
||||
<RegExpr context="context_condition_morphologicalFields" attribute="Affix" String="\S*" />
|
||||
</context>
|
||||
|
||||
<context name="context_slash_flags_condition_morphologicalFields" attribute="Stripping" lineEndContext="#pop">
|
||||
<DetectChar char="/" attribute="Keyword" />
|
||||
<RegExpr attribute="Flags" String="\S*" />
|
||||
<DetectSpaces context="context_condition_morphologicalFields" />
|
||||
</context>
|
||||
|
||||
<context name="context_condition_morphologicalFields" attribute="Stripping" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<RegExpr attribute="Skipped parameter" String="\.(?!\S)" context="context_morphologicalFields" />
|
||||
<RegExpr context="context_notSkippedCondition_morphologicalFields" lookAhead="true" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="context_notSkippedCondition_morphologicalFields" attribute="Stripping" lineEndContext="#pop">
|
||||
<RegExpr attribute="Pattern" String="\S*" />
|
||||
<DetectSpaces context="context_morphologicalFields" />
|
||||
</context>
|
||||
|
||||
<context name="context_morphologicalFields" attribute="Keyword" lineEndContext="#pop">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="context_comment" />
|
||||
<DetectChar char=":" attribute="itemData2_Keyword" context="context_morphologicalFieldsContent" />
|
||||
</context>
|
||||
|
||||
<context name="context_morphologicalFieldsContent" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces context="context_morphologicalFields" />
|
||||
</context>
|
||||
|
||||
<context name="context_comment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Undefined" defStyleNum="dsNormal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Number" defStyleNum="dsDecVal" />
|
||||
<itemData name="Stripping" defStyleNum="dsString" />
|
||||
<itemData name="Affix" defStyleNum="dsString" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
<itemData name="Flags" defStyleNum="dsChar" />
|
||||
<itemData name="Skipped parameter" defStyleNum="dsKeyword" />
|
||||
<itemData name="Pattern" defStyleNum="dsOthers" />
|
||||
<itemData name="Characters" defStyleNum="dsChar" />
|
||||
<itemData name="Choice" defStyleNum="dsDataType" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
</general>
|
||||
|
||||
</language>
|
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd" >
|
||||
<language name="Hunspell Thesaurus File" section="Other" extensions="*.dat" priority="-9" version="1" kateversion="2.4" author="Lukas Sommer" license="LGPL version 2.1, or version 3 or later versions approved by the membership of KDE e.V.; or any other license appoved by the emembership of KDE e.V.">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<contexts>
|
||||
|
||||
<context name="context_dat" fallthrough="true" fallthroughContext="context_content" attribute="Undefined" lineEndContext="context_content" >
|
||||
<RegExpr attribute="Encoding" context="context_content" String=".*" />
|
||||
</context>
|
||||
|
||||
<context name="context_content" attribute="Entry" lineEndContext="#stay">
|
||||
<DetectChar char="-" attribute="Keyword" column="0" context="context_list" />
|
||||
<DetectChar char="|" attribute="Keyword" context="context_number" />
|
||||
</context>
|
||||
|
||||
<context name="context_list" attribute="String" lineEndContext="#pop">
|
||||
<DetectChar char="|" attribute="Keyword" context="#stay" />
|
||||
<RangeDetect char="(" char1=")" attribute="Hint" />
|
||||
</context>
|
||||
|
||||
<context name="context_number" attribute="Number" lineEndContext="#pop">
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Undefined" defStyleNum="dsNormal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Number" defStyleNum="dsDecVal" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
<itemData name="Hint" defStyleNum="dsOthers" />
|
||||
<itemData name="Encoding" defStyleNum="dsDataType" />
|
||||
<itemData name="Entry" defStyleNum="dsFunction" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
</general>
|
||||
|
||||
</language>
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd" >
|
||||
<language name="Hunspell Dictionary File" section="Other" extensions="*.dic" priority="-9" version="1" kateversion="2.4" author="Lukas Sommer" license="LGPL version 2.1, or version 3 or later versions approved by the membership of KDE e.V.; or any other license appoved by the emembership of KDE e.V.">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<list name="list_hyphenKeywords">
|
||||
<item>LEFTHYPHENMIN</item>
|
||||
<item>RIGHTHYPHENMIN</item>
|
||||
<item>COMPOUNDLEFTHYPHENMIN</item>
|
||||
<item>COMPOUNDRIGHTHYPHENMIN</item>
|
||||
<item>NEXTWORD</item>
|
||||
<item>NOHYPHEN</item>
|
||||
<item>NEXTLEVEL</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
|
||||
<context name="context_dic" attribute="Undefined" lineEndContext="context_spell" >
|
||||
<!-- detect in the first line wether this is a hyphen dictionary (continue with context_hyphen) or a spell check dictionary (continue with context_spell) -->
|
||||
<Int attribute="Number" context="context_spell" column="0" />
|
||||
<RegExpr attribute="Encoding" context="context_hyphen" String=".*" />
|
||||
</context>
|
||||
|
||||
<context name="context_hyphen" attribute="String" lineEndContext="#stay">
|
||||
<AnyChar String="0123456789" attribute="Number" context="#stay" />
|
||||
<DetectChar char="." attribute="Keyword" context="#stay" />
|
||||
<DetectChar char="/" attribute="Keyword" context="context_hyphen_parameters" />
|
||||
<AnyChar String="#%" column="0" attribute="Comment" context="context_comment" />
|
||||
<keyword attribute="Keyword" context="#stay" String="list_hyphenKeywords" column="0" />
|
||||
</context>
|
||||
|
||||
<context name="context_hyphen_parameters" attribute="String" lineEndContext="#pop">
|
||||
<AnyChar String=",=" attribute="Keyword" context="#stay" />
|
||||
<AnyChar String="0123456789" attribute="Number" context="#stay" />
|
||||
</context>
|
||||
|
||||
<context name="context_spell" attribute="String" lineEndContext="#stay">
|
||||
<DetectChar char="#" column="0" attribute="Comment" context="context_comment" />
|
||||
<DetectChar char="/" attribute="Keyword" context="context_spell_flags" />
|
||||
<DetectSpaces context="context_spell_options" />
|
||||
</context>
|
||||
|
||||
<context name="context_spell_flags" attribute="Flags" lineEndContext="#pop">
|
||||
<DetectSpaces context="context_spell_options" />
|
||||
</context>
|
||||
|
||||
<context name="context_spell_options" attribute="Keyword" lineEndContext="#pop">
|
||||
<DetectChar char=":" attribute="Keyword" context="context_spell_parameter" />
|
||||
<DetectChar char="#" column="0" attribute="Comment" context="context_comment" />
|
||||
</context>
|
||||
|
||||
<context name="context_spell_parameter" attribute="String" lineEndContext="#pop">
|
||||
<DetectSpaces context="#pop" />
|
||||
</context>
|
||||
|
||||
<context name="context_comment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Undefined" defStyleNum="dsNormal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Number" defStyleNum="dsDecVal" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
<itemData name="Flags" defStyleNum="dsChar" />
|
||||
<itemData name="Encoding" defStyleNum="dsDataType" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
</general>
|
||||
|
||||
</language>
|
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY unum "\d+"> <!-- Unsigned integer number -->
|
||||
<!ENTITY anum "[a-z\d]+"> <!-- Non-10-based unsigned integer number, e.g. 1a -->
|
||||
<!ENTITY bnum "\b&unum;b_?&anum;(\.&anum;)\b"> <!-- Based integer number, e.g. 36b_1a.z2 -->
|
||||
<!ENTITY inum "_?&unum;"> <!-- Integer number -->
|
||||
<!ENTITY xnum "\b&inum;x\b"> <!-- Extended precision integer number, e.g. _123x -->
|
||||
<!ENTITY rnum "\b&inum;r&inum;\b"> <!-- Rational number, e.g. _1r23 -->
|
||||
<!ENTITY fnum "&inum;(\.&unum;)?"> <!-- Floating point number, e.g. 1.23 -->
|
||||
<!ENTITY enum "(&fnum;(e&inum;)?|_?_|_\.)"> <!-- Exponential (scientific) notation, e.g. 1.2e_3 -->
|
||||
<!ENTITY cnum "&enum;((j|a[dr])&enum;)?"> <!-- Complex number, e.g. 1.2e3j4.5e_6 -->
|
||||
<!ENTITY pnum "\b&cnum;([px]&cnum;)?(?![a-z\d_.])"> <!-- Number based on pi or on e, e.g. 1j2p3j4 -->
|
||||
<!ENTITY name "[a-zA-Z][a-zA-Z\d_]*"> <!-- Name -->
|
||||
<!ENTITY lname "\b&name;_(&name;)?_\b"> <!-- Locative, a__ means a_base_ -->
|
||||
<!ENTITY ilname "\b&name;__&name;\b"> <!-- Indirect locative -->
|
||||
]>
|
||||
<!--
|
||||
j.xml syntax highlighting for J programming language under Kate
|
||||
|
||||
J is a modern, high-level, general-purpose, high-performance, portable programming language
|
||||
http://www.jsoftware.com
|
||||
|
||||
Kate is a KDE Advanced Text Editor
|
||||
http://kate.kde.org/
|
||||
-->
|
||||
<language name="J" section="Scripts" version="1.1" kateversion="2.4" extensions="*.ijs;*.IJS" mimetype="text/x-j;text/x-jsrc" author="Igor Zhuravlov (zhuravlov.ip@ya.ru)" indenter="normal" license="GPL">
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context attribute="Sentence" lineEndContext="#stay" name="sentence">
|
||||
<DetectSpaces/>
|
||||
<StringDetect attribute="Comment" context="comment" String="NB."/>
|
||||
<RegExpr attribute="String" context="#stay" String="'([^']|'')*'"/>
|
||||
<RegExpr attribute="Adverb" context="#stay" String="([/\\bfMt]\.|t:|[~/\\}])(?![.:])"/>
|
||||
<RegExpr attribute="Verb" context="#stay" String="(_?\d:|p\.\.|[ACeEIjLor]\.|[_/\\iqsux]:|\{::|[=!\]]|[-<>+*%$|,#{][.:]?|[;[]:?|[~}"ip][.:]|[?^]\.?)(?![.:])"/>
|
||||
<RegExpr attribute="Number" context="#stay" String="&bnum;|&xnum;|&rnum;|&pnum;"/>
|
||||
<AnyChar attribute="Parens" context="#stay" String="()"/>
|
||||
<RegExpr attribute="Conjunction" context="#stay" String="("|[@&][.:]?|[.:][.:]?|[!D][.:]|&\.:|[;dHT]\.|`:?|[LS^]:)(?![.:])"/>
|
||||
<RegExpr attribute="Control" context="#stay" String="\b(assert|break|f?case|catch[dt]?|continue|do|else(if)?|end|for(_&name;)?|(goto|label)_&name;|if|return|select|throw|try|whil(e|st))\.(?![.:])"/>
|
||||
<Detect2Chars attribute="Copulae Global" context="#stay" char="=" char1=":"/>
|
||||
<Detect2Chars attribute="Copulae Local" context="#stay" char="=" char1="."/>
|
||||
<RegExpr attribute="ExpArg" context="#stay" String="\b[nmuvxy]\.?(?![\w:])"/>
|
||||
<RegExpr attribute="Noun" context="#stay" String="\ba[.:](?![.:])"/>
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="comment"/>
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Sentence" defStyleNum="dsNormal"/>
|
||||
<itemData name="Adverb" defStyleNum="dsKeyword" color="#d44"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true"/>
|
||||
<itemData name="Conjunction" defStyleNum="dsKeyword" color="#d90"/>
|
||||
<itemData name="Control" defStyleNum="dsKeyword" color="#f00" bold="false"/>
|
||||
<itemData name="Copulae Global" defStyleNum="dsKeyword" color="#a52a2a"/>
|
||||
<itemData name="Copulae Local" defStyleNum="dsKeyword" color="#a020f0" bold="false"/>
|
||||
<itemData name="ExpArg" defStyleNum="dsKeyword" color="#a52a2a" italic="true"/>
|
||||
<itemData name="Noun" defStyleNum="dsKeyword" color="#00f" bold="true"/>
|
||||
<itemData name="Number" defStyleNum="dsDecVal" color="#a020f0"/>
|
||||
<itemData name="Parens" defStyleNum="dsRegionMarker" color="#000"/>
|
||||
<itemData name="String" defStyleNum="dsString" color="#00f"/>
|
||||
<itemData name="Verb" defStyleNum="dsKeyword" color="#096"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="NB."/>
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!-- GNU LD Linker Script syntax highlighter -->
|
||||
<language name="GNU Linker Script" section="Scripts" extensions="*.ld" version="1.0" kateversion="2.4" author="Lyle Putnam (lcputnam@gmail.com)" license="">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> AT </item>
|
||||
<item> ENTRY </item>
|
||||
<item> INPUT </item>
|
||||
<item> GROUP </item>
|
||||
<item> OUTPUT </item>
|
||||
<item> OUTPUT_ARCH </item>
|
||||
<item> OUTPUT_FORMAT </item>
|
||||
<item> SEARCH_DIR </item>
|
||||
<item> STARTUP </item>
|
||||
<item> TARGET </item>
|
||||
</list>
|
||||
<list name="functions">
|
||||
<item> ABSOLUTE </item>
|
||||
<item> ADDR </item>
|
||||
<item> ALIGN </item>
|
||||
<item> DATA_SEGMENT_ALIGN </item>
|
||||
<item> DATA_SEGMENT_END </item>
|
||||
<item> DATA_SEGMENT_RELRO_END </item>
|
||||
<item> DEFINED </item>
|
||||
<item> LOADADDR </item>
|
||||
<item> MAX </item>
|
||||
<item> MIN </item>
|
||||
<item> NEXT </item>
|
||||
<item> SIZEOF </item>
|
||||
<item> SIZEOF_HEADERS </item>
|
||||
</list>
|
||||
<list name="commands">
|
||||
<item> SECTIONS </item>
|
||||
<item> MEMORY </item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords" />
|
||||
<keyword attribute="Function" context="#stay" String="functions" />
|
||||
<keyword attribute="Command" context="#stay" String="commands" />
|
||||
<HlCOct attribute="Number" context="#stay" />
|
||||
<HlCHex attribute="Number" context="#stay" />
|
||||
<!-- Base 10 Integers may be suffixed with K, M or G to indicate size -->
|
||||
<Int attribute="Number" context="#stay">
|
||||
<StringDetect attribute="Number" context="#stay" String="K" insensitive="true" />
|
||||
<StringDetect attribute="Number" context="#stay" String="M" insensitive="true" />
|
||||
<StringDetect attribute="Number" context="#stay" String="G" insensitive="true" />
|
||||
</Int>
|
||||
<RegExpr attribute="Section Name" context="#stay" String="\.[\-_0-9a-zA-Z]+" />
|
||||
<!-- "COMMON" and "/DISCARD/" are special section targets -->
|
||||
<RegExpr attribute="Section Name" context="#stay" String="(COMMON|\/DISCARD\/)" />
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Block" />
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Block" />
|
||||
<Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="Comment" />
|
||||
<DetectChar attribute="String" context="string" char=""" />
|
||||
</context>
|
||||
<context name="comment" attribute="Comment" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
|
||||
</context>
|
||||
<context name="string" attribute="String" lineEndContext="#stay">
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Function" defStyleNum="dsFunction" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Section Name" defStyleNum="dsChar" />
|
||||
<itemData name="Command" defStyleNum="dsKeyword" />
|
||||
<itemData name="Number" defStyleNum="dsBaseN" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="/*" end="*/" region="Comment" />
|
||||
<!-- I don't think GNU LD scripts have single-line comments -->
|
||||
</comments>
|
||||
<keywords casesensitive="1" />
|
||||
</general>
|
||||
</language>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="Troff Mandoc" section="Markup" version="0.11" kateversion="2.4" extensions="*.1;*.2;*.3;*.4;*.5;*.6;*.7;*.8;*.1m;*.3x;*.tmac" mimetype="" author="Matthew Woehlke (mw_triad@users.sourceforge.net)" license="GPL">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<list name="headings">
|
||||
<item>SH</item>
|
||||
<item>SS</item>
|
||||
<item>TH</item>
|
||||
</list>
|
||||
|
||||
<list name="paragraph">
|
||||
<item>HP</item>
|
||||
<item>IP</item>
|
||||
<item>LP</item>
|
||||
<item>P</item>
|
||||
<item>PD</item>
|
||||
<item>PP</item>
|
||||
<item>RE</item>
|
||||
<item>RS</item>
|
||||
<item>TP</item>
|
||||
</list>
|
||||
|
||||
<list name="formatting">
|
||||
<item>B</item>
|
||||
<item>BI</item>
|
||||
<item>BR</item>
|
||||
<item>I</item>
|
||||
<item>IB</item>
|
||||
<item>IR</item>
|
||||
<item>RB</item>
|
||||
<item>RI</item>
|
||||
<item>SM</item>
|
||||
<item>SB</item>
|
||||
</list>
|
||||
|
||||
<list name="others">
|
||||
<item>DT</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
|
||||
<!-- root context -->
|
||||
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="DetectComments##Roff"/>
|
||||
<DetectChar attribute="Macros" context="DetectDirective" char="." column="0"/>
|
||||
<IncludeRules context="DetectOthers##Roff"/>
|
||||
</context>
|
||||
|
||||
<!-- directive start -->
|
||||
<context name="DetectDirective" attribute="Macros" lineEndContext="#pop">
|
||||
<keyword attribute="Headings" context="Directive" String="headings"/>
|
||||
<keyword attribute="Paragraphs" context="Directive" String="paragraph"/>
|
||||
<keyword attribute="Formatting" context="Directive" String="formatting"/>
|
||||
<keyword attribute="Other Macros" context="Directive" String="others"/>
|
||||
<IncludeRules context="DetectDirective##Roff"/>
|
||||
</context>
|
||||
|
||||
<context name="Directive" attribute="Identifier" lineEndContext="#pop">
|
||||
<IncludeRules context="Directive##Roff"/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Macros" defStyleNum="dsFunction"/>
|
||||
<itemData name="Headings" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Paragraphs" defStyleNum="dsDataType"/>
|
||||
<itemData name="Formatting" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Other Macros" defStyleNum="dsFunction"/>
|
||||
<itemData name="Identifier" defStyleNum="dsString"/>
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
|
||||
<comments>
|
||||
<comment name="singleLine" start=".\"" />
|
||||
</comments>
|
||||
|
||||
<keywords casesensitive="1"/>
|
||||
|
||||
</general>
|
||||
|
||||
</language>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="Nagios" section="Configuration" extensions="*.cfg" version="1.0" kateversion="2.4" author="Gastón Martini" license="GPL" casesensitive="true">
|
||||
<highlighting>
|
||||
<list name="Objects">
|
||||
<item>host</item>
|
||||
<item>hostgroup</item>
|
||||
<item>service</item>
|
||||
<item>servicegroup</item>
|
||||
<item>contact</item>
|
||||
<item>contactgroup</item>
|
||||
<item>timeperiod</item>
|
||||
<item>command</item>
|
||||
<item>servicedependency</item>
|
||||
<item>serviceescalation</item>
|
||||
<item>hostdependency</item>
|
||||
<item>hostescalation</item>
|
||||
<item>hostextinfo</item>
|
||||
<item>serviceextinfo</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context name="Nagios" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char="#" attribute="Comment" context="Comment" firstNonSpace="true"/> <!-- or column="0"? -->
|
||||
<DetectChar char="$" context="Macro Definition" firstNonSpace="true" lookAhead="true"/>
|
||||
<keyword String="Keywords" attribute="Definition" context="Definition" firstNonSpace="true"/>
|
||||
<StringDetect String="define" attribute="Definition" context="Definition" firstNonSpace="true"/>
|
||||
<IncludeRules context="Variable" includeAttrib="true"/>
|
||||
</context>
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
<context name="Macro Definition" attribute="Macro Definition" lineEndContext="#pop">
|
||||
<RangeDetect char="$" char1="$" firstNonSpace="true" context="#stay"/>
|
||||
<DetectChar char="=" attribute="Symbol" context="Value"/>
|
||||
</context>
|
||||
<context name="Variable" attribute="Variable" lineEndContext="#pop">
|
||||
<RegExpr String="[A-Za-z0-9_]+\s*" firstNonSpace="true" context="#stay"/>
|
||||
<DetectChar char="=" attribute="Symbol" context="Value"/>
|
||||
</context>
|
||||
<context name="Definition" attribute="Definition" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<keyword String="Objects" attribute="Object" context="#stay"/>
|
||||
<DetectChar char="{" attribute="Definition Block" context="Object Directives" beginRegion="Object Definition"/>
|
||||
<RegExpr String="[^{]+" attribute="Invalid Text" context="#stay"/>
|
||||
</context>
|
||||
<context name="Object Directives" attribute="Object Directive" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<DetectChar char=";" attribute="Comment" context="Comment" firstNonSpace="true"/>
|
||||
<RegExpr String="[A-Za-z0-9_]+\s*" firstNonSpace="true" attribute="Object Directive" context="Value"/>
|
||||
<DetectChar char="}" attribute="Definition Block" context="Nagios" endRegion="Object Definition"/>
|
||||
</context>
|
||||
<context name="Value" attribute="Value" lineEndContext="#pop">
|
||||
<RangeDetect char="$" char1="$" attribute="Macro" context="#stay"/>
|
||||
<Float attribute="Float" />
|
||||
<Int attribute="Int" />
|
||||
<DetectChar char=";" attribute="Comment" context="Comment" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Variable" defStyleNum="dsNormal"/>
|
||||
<itemData name="Object" defStyleNum="dsDataType"/>
|
||||
<itemData name="Object Directive" defStyleNum="dsNormal"/>
|
||||
<itemData name="Macro" defStyleNum="dsFunction"/>
|
||||
<itemData name="Macro Definition" defStyleNum="dsFunction"/>
|
||||
<itemData name="Value" defStyleNum="dsString"/>
|
||||
<itemData name="Int" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||
<itemData name="Symbol" defStyleNum="dsOthers"/>
|
||||
<itemData name="Definition" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Definition Block" defStyleNum="dsRegionMarker"/>
|
||||
<itemData name="Invalid Text" defStyleNum="dsError"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<folding indentationsensitive="false"/>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#"/>
|
||||
</comments>
|
||||
<keywords casesensitive="true"/>
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="q" version="1.01" kateversion="2.3" section="Scripts" extensions="*.q" license="LGPL2+" author="James Schmitz (james.schmitz@gmail.com)">
|
||||
<highlighting>
|
||||
<list name="DotQ">
|
||||
<item>.Q.addmonths</item>
|
||||
<item>.Q.addr</item>
|
||||
<item>.Q.host</item>
|
||||
<item>.Q.chk</item>
|
||||
<item>.Q.cn</item>
|
||||
<item>.Q.dd</item>
|
||||
<item>.Q.dpft</item>
|
||||
<item>.Q.dsftg</item>
|
||||
<item>.Q.def</item>
|
||||
<item>.Q.en</item>
|
||||
<item>.Q.fc</item>
|
||||
<item>.Q.fk</item>
|
||||
<item>.Q.fmt</item>
|
||||
<item>.Q.fs</item>
|
||||
<item>.Q.ft</item>
|
||||
<item>.Q.fu</item>
|
||||
<item>.Q.gc</item>
|
||||
<item>.Q.hdpf</item>
|
||||
<item>.Q.ind</item>
|
||||
<item>.Q.j10</item>
|
||||
<item>.Q.x10</item>
|
||||
<item>.Q.j12</item>
|
||||
<item>.Q.x12</item>
|
||||
<item>.Q.k</item>
|
||||
<item>.Q.l</item>
|
||||
<item>.Q.opt</item>
|
||||
<item>.Q.par</item>
|
||||
<item>.Q.qp</item>
|
||||
<item>.Q.qt</item>
|
||||
<item>.Q.s</item>
|
||||
<item>.Q.ty</item>
|
||||
<item>.Q.v</item>
|
||||
<item>.Q.V</item>
|
||||
<item>.Q.view</item>
|
||||
<item>.Q.w</item>
|
||||
<item>.Q.M</item>
|
||||
<item>.Q.pf</item>
|
||||
<item>.Q.pt</item>
|
||||
<item>.Q.PD</item>
|
||||
<item>.Q.PV</item>
|
||||
<item>.Q.pd</item>
|
||||
<item>.Q.pv</item>
|
||||
<item>.Q.pn</item>
|
||||
<item>.Q.bv</item>
|
||||
<item>.Q.vp</item>
|
||||
<item>.Q.P</item>
|
||||
<item>.Q.D</item>
|
||||
<item>.Q.u</item>
|
||||
</list>
|
||||
<list name="qkeywords">
|
||||
<item>aj</item>
|
||||
<item>aj0</item>
|
||||
<item>all</item>
|
||||
<item>and</item>
|
||||
<item>any</item>
|
||||
<item>asc</item>
|
||||
<item>asof</item>
|
||||
<item>attr</item>
|
||||
<item>avgs</item>
|
||||
<item>ceiling</item>
|
||||
<item>cols</item>
|
||||
<item>cor</item>
|
||||
<item>count</item>
|
||||
<item>cov</item>
|
||||
<item>cross</item>
|
||||
<item>csv</item>
|
||||
<item>cut</item>
|
||||
<item>deltas</item>
|
||||
<item>desc</item>
|
||||
<item>dev</item>
|
||||
<item>differ</item>
|
||||
<item>distinct</item>
|
||||
<item>each</item>
|
||||
<item>ej</item>
|
||||
<item>enlist</item>
|
||||
<item>eval</item>
|
||||
<item>except</item>
|
||||
<item>fby</item>
|
||||
<item>fills</item>
|
||||
<item>first</item>
|
||||
<item>fkeys</item>
|
||||
<item>flip</item>
|
||||
<item>floor</item>
|
||||
<item>from</item>
|
||||
<item>get</item>
|
||||
<item>group</item>
|
||||
<item>gtime</item>
|
||||
<item>hclose</item>
|
||||
<item>hcount</item>
|
||||
<item>hdel</item>
|
||||
<item>hopen</item>
|
||||
<item>hsym</item>
|
||||
<item>iasc</item>
|
||||
<item>idesc</item>
|
||||
<item>ij</item>
|
||||
<item>inter</item>
|
||||
<item>inv</item>
|
||||
<item>key</item>
|
||||
<item>keys</item>
|
||||
<item>lj</item>
|
||||
<item>load</item>
|
||||
<item>lower</item>
|
||||
<item>lsq</item>
|
||||
<item>ltime</item>
|
||||
<item>ltrim</item>
|
||||
<item>mavg</item>
|
||||
<item>maxs</item>
|
||||
<item>mcount</item>
|
||||
<item>md5</item>
|
||||
<item>mdev</item>
|
||||
<item>med</item>
|
||||
<item>meta</item>
|
||||
<item>mins</item>
|
||||
<item>mmax</item>
|
||||
<item>mmin</item>
|
||||
<item>mmu</item>
|
||||
<item>mod</item>
|
||||
<item>msum</item>
|
||||
<item>neg</item>
|
||||
<item>next</item>
|
||||
<item>not</item>
|
||||
<item>null</item>
|
||||
<item>or</item>
|
||||
<item>over</item>
|
||||
<item>parse</item>
|
||||
<item>peach</item>
|
||||
<item>pj</item>
|
||||
<item>plist</item>
|
||||
<item>prds</item>
|
||||
<item>prev</item>
|
||||
<item>prior</item>
|
||||
<item>rand</item>
|
||||
<item>rank</item>
|
||||
<item>ratios</item>
|
||||
<item>raze</item>
|
||||
<item>read0</item>
|
||||
<item>read1</item>
|
||||
<item>reciprocal</item>
|
||||
<item>reverse</item>
|
||||
<item>rload</item>
|
||||
<item>rotate</item>
|
||||
<item>rsave</item>
|
||||
<item>rtrim</item>
|
||||
<item>save</item>
|
||||
<item>scan</item>
|
||||
<item>set</item>
|
||||
<item>show</item>
|
||||
<item>signum</item>
|
||||
<item>ssr</item>
|
||||
<item>string</item>
|
||||
<item>sublist</item>
|
||||
<item>sums</item>
|
||||
<item>sv</item>
|
||||
<item>system</item>
|
||||
<item>tables</item>
|
||||
<item>til</item>
|
||||
<item>trim</item>
|
||||
<item>txf</item>
|
||||
<item>type</item>
|
||||
<item>uj</item>
|
||||
<item>ungroup</item>
|
||||
<item>union</item>
|
||||
<item>update</item>
|
||||
<item>upper</item>
|
||||
<item>upsert</item>
|
||||
<item>value</item>
|
||||
<item>var</item>
|
||||
<item>view</item>
|
||||
<item>views</item>
|
||||
<item>vs</item>
|
||||
<item>where</item>
|
||||
<item>wj</item>
|
||||
<item>wj1</item>
|
||||
<item>xasc</item>
|
||||
<item>xbar</item>
|
||||
<item>xcol</item>
|
||||
<item>xcols</item>
|
||||
<item>xdesc</item>
|
||||
<item>xgroup</item>
|
||||
<item>xkey</item>
|
||||
<item>xlog</item>
|
||||
<item>xprev</item>
|
||||
<item>xrank</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" >
|
||||
<keyword attribute="qKeyword" context="#stay" String="qkeywords" />
|
||||
<keyword attribute="DotQfunctions" context="#stay" String="DotQ" />
|
||||
<IncludeRules context="##k" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="qKeyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="DotQfunctions" defStyleNum="dsKeyword" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="/" />
|
||||
<comment name="multiLine" start="/" end="\" />
|
||||
</comments>
|
||||
<keywords casesensitive="1" weakDeliminator="." additionalDeliminator="`#'@$"" />
|
||||
</general>
|
||||
</language>
|
@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
copyright : (C) 2014 by Martin Sandsmark
|
||||
email : martin.sandsmark@kde.org
|
||||
|
||||
This file is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
-->
|
||||
<language version="1.00" kateversion="2.4" name="Replicode" section="Scientific" extensions="*.replicode" author="Martin Sandsmark">
|
||||
<highlighting>
|
||||
<list name="operators">
|
||||
<item>_now</item>
|
||||
<item>equ</item>
|
||||
<item>neq</item>
|
||||
<item>gtr</item>
|
||||
<item>lsr</item>
|
||||
<item>gte</item>
|
||||
<item>lse</item>
|
||||
<item>add</item>
|
||||
<item>sub</item>
|
||||
<item>mul</item>
|
||||
<item>div</item>
|
||||
<item>dis</item>
|
||||
<item>ln</item>
|
||||
<item>exp</item>
|
||||
<item>log</item>
|
||||
<item>e10</item>
|
||||
<item>syn</item>
|
||||
<item>red</item>
|
||||
<item>rnd</item>
|
||||
<item>fvw</item>
|
||||
</list>
|
||||
<list name="builtin_classes">
|
||||
<item>view</item>
|
||||
<item>grp_view</item>
|
||||
<item>pgm_view</item>
|
||||
<item>_obj</item>
|
||||
<item>ptn</item>
|
||||
<item>|ptn</item>
|
||||
<item>pgm</item>
|
||||
<item>|pgm</item>
|
||||
<item>_grp</item>
|
||||
<item>grp</item>
|
||||
<item>_fact</item>
|
||||
<item>fact</item>
|
||||
<item>|fact</item>
|
||||
<item>pred</item>
|
||||
<item>goal</item>
|
||||
<item>cst</item>
|
||||
<item>mdl</item>
|
||||
<item>icst</item>
|
||||
<item>icmd</item>
|
||||
<item>cmd</item>
|
||||
<item>ent</item>
|
||||
<item>ont</item>
|
||||
<item>dev</item>
|
||||
<item>nod</item>
|
||||
<item>ipgm</item>
|
||||
<item>icpp_pgm</item>
|
||||
<item>perf</item>
|
||||
</list>
|
||||
<list name="marker_classes">
|
||||
<item>mk.rdx</item>
|
||||
<item>mk.grp_pair</item>
|
||||
<item>mk.low_sln</item>
|
||||
<item>mk.high_sln</item>
|
||||
<item>mk.low_act</item>
|
||||
<item>mk.high_act</item>
|
||||
<item>mk.low_res</item>
|
||||
<item>mk.sln_chg</item>
|
||||
<item>mk.act_chg</item>
|
||||
<item>mk.new</item>
|
||||
</list>
|
||||
<list name="entities">
|
||||
<item>self</item>
|
||||
</list>
|
||||
<list name="groups">
|
||||
<item>stdin</item>
|
||||
<item>stdout</item>
|
||||
</list>
|
||||
<list name="functions">
|
||||
<item>_inj</item>
|
||||
<item>_eje</item>
|
||||
<item>_mod</item>
|
||||
<item>_set</item>
|
||||
<item>_new_class</item>
|
||||
<item>_del_class</item>
|
||||
<item>_ldc</item>
|
||||
<item>_swp</item>
|
||||
<item>_stop</item>
|
||||
</list>
|
||||
<list name="constants">
|
||||
<item>|nb</item>
|
||||
<item>|bl</item>
|
||||
<item>true</item>
|
||||
<item>false</item>
|
||||
<item>|[]</item>
|
||||
<item>|nid</item>
|
||||
<item>|did</item>
|
||||
<item>|fid</item>
|
||||
<item>|st</item>
|
||||
<item>|us</item>
|
||||
<item>forever</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
|
||||
<RegExpr String="[a-zA-Z0-9_\.]+:\(" attribute="Class Definition" context="open_parens" beginRegion="true" />
|
||||
<StringDetect attribute="Preprocessor" context="preprocessor_load" String="!load " />
|
||||
<RegExpr String="\![a-zA-Z0-9_\.]+" attribute="Preprocessor" context="preprocessor" />
|
||||
<RegExpr attribute="ListBracket" context="list" String="[^\|]\[" />
|
||||
<IncludeRules context="global_data_type" />
|
||||
</context>
|
||||
<context attribute="Identifier" lineEndContext="error" name="open_parens">
|
||||
<keyword attribute="Function" String="functions" context="class_definition"/>
|
||||
<keyword attribute="Operator" String="operators" context="class_definition"/>
|
||||
<keyword attribute="Builtin Class" String="builtin_classes" context="class_definition"/>
|
||||
<keyword attribute="Builtin Class" String="marker_classes" context="class_definition"/>
|
||||
<RegExpr String="[a-zA-Z0-9_\.><]+" attribute="Class Name" context="class_definition" />
|
||||
</context>
|
||||
<context attribute="Class Definition" lineEndContext="#stay" name="global_data_type">
|
||||
<DetectChar attribute="Comment" context="comment" char=";" />
|
||||
<StringDetect attribute="EmptyList" context="#stay" String="|[]" />
|
||||
<DetectChar attribute="ListBracket" context="list" char="[" />
|
||||
</context>
|
||||
<context attribute="Class Definition" lineEndContext="#stay" name="data_type">
|
||||
<keyword attribute="Operator" String="operators" context="#stay" />
|
||||
<keyword attribute="Constant" String="constants" context="#stay"/>
|
||||
<keyword attribute="Group" String="groups" context="#stay"/>
|
||||
<keyword attribute="Entity" String="entities" context="#stay"/>
|
||||
<IncludeRules context="global_data_type" />
|
||||
<HlCHex attribute="Hex" context="#stay" />
|
||||
<RegExpr attribute="Number" context="#stay" String="[0-9]+us"/>
|
||||
<Int attribute="Number" context="#stay" />
|
||||
<DetectChar attribute="String" context="string" char=""" />
|
||||
<RegExpr String="[A-Z_]+" attribute="Constant" context="#stay" />
|
||||
<RegExpr String="[a-z0-9_\.<>\.=+\-*\\/]+" attribute="Member" context="#stay" />
|
||||
<DetectChar attribute="Class Definition" context="open_parens" char="(" beginRegion="true" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="comment">
|
||||
<IncludeRules context="##Alerts" />
|
||||
<IncludeRules context="##Modelines" />
|
||||
</context>
|
||||
<context attribute="Class Definition" lineEndContext="#stay" name="class_definition">
|
||||
<DetectChar attribute="Class Definition" context="#pop#pop" char=")" endRegion="true" />
|
||||
<IncludeRules context="data_type" />
|
||||
</context>
|
||||
<context attribute="Member" lineEndContext="error" name="list">
|
||||
<DetectChar attribute="ListBracket" context="#pop" char="]" />
|
||||
<IncludeRules context="data_type" />
|
||||
</context>
|
||||
<context attribute="String" lineEndContext="error" name="string">
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
</context>
|
||||
<context attribute="Error" lineEndContext="#stay" name="error" />
|
||||
<context attribute="Preprocessor" lineEndContext="#pop" name="preprocessor">
|
||||
<IncludeRules context="data_type" />
|
||||
</context>
|
||||
<context attribute="Path" lineEndContext="#pop" name="preprocessor_load" />
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Path" defStyleNum="dsString" bold="1" />
|
||||
<itemData name="Class Definition" defStyleNum="dsOthers" />
|
||||
<itemData name="Preprocessor" defStyleNum="dsNormal" bold="1" />
|
||||
<itemData name="Class Name" defStyleNum="dsFunction" />
|
||||
<itemData name="Builtin Class" defStyleNum="dsFunction" bold="1" />
|
||||
<itemData name="Member" defStyleNum="dsKeyword" bold="0" />
|
||||
<itemData name="Constant" defStyleNum="dsKeyword" bold="1" />
|
||||
<itemData name="Group" defStyleNum="dsKeyword" italic="1" bold="0" />
|
||||
<itemData name="Entity" defStyleNum="dsKeyword" italic="1" bold="1" />
|
||||
<itemData name="Operator" defStyleNum="dsFunction" italic="1" bold="0" />
|
||||
<itemData name="Function" defStyleNum="dsFunction" italic="0" bold="1" />
|
||||
<itemData name="Bracket" defStyleNum="dsOthers" />
|
||||
<itemData name="ListBracket" defStyleNum="dsOthers" color="#0095ff" selColor="#0095ff" bold="0" italic="0" />
|
||||
<itemData name="EmptyList" defStyleNum="dsOthers" color="#0095ff" selColor="#0095ff" bold="1" italic="0" />
|
||||
<itemData name="Identifier" defStyleNum="dsFunction" />
|
||||
<itemData name="List" defStyleNum="dsRegionMarker" />
|
||||
<itemData name="MultiList" defStyleNum="dsError" />
|
||||
<itemData name="Number" defStyleNum="dsDecVal" />
|
||||
<itemData name="Float" defStyleNum="dsFloat" />
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Hex" defStyleNum="dsBaseN" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start=";" />
|
||||
</comments>
|
||||
<folding indentationsensitive="1" />
|
||||
<keywords casesensitive="1" weakDeliminator="|." />
|
||||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 4; replace-tabs on; indent-mode xml; -->
|
@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY roffidc "[^]\s]">
|
||||
<!ENTITY roffid "(&roffidc;|\(&roffidc;{2}|\[&roffidc;+\])">
|
||||
<!ENTITY roffnum "([0-9]+)">
|
||||
<!ENTITY argsep1 "([^\\]|\\[% |^{}'`-_!?@)/,&:~0acdeEprtu])">
|
||||
<!ENTITY argsep2 "([^\\0-9]|\\[%:{}'`-_!@/cep])">
|
||||
]>
|
||||
<language name="Roff" section="Markup" version="0.11" kateversion="2.4" extensions="" author="Matthew Woehlke (mw_triad@users.sourceforge.net)" license="GPL">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<list name="layout">
|
||||
<item>br</item>
|
||||
<item>sp</item>
|
||||
</list>
|
||||
|
||||
<list name="formatting">
|
||||
</list>
|
||||
|
||||
<list name="gnuext">
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
|
||||
<!-- root context -->
|
||||
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="DetectComments"/>
|
||||
<DetectChar attribute="Other Macros" context="DetectDirective" char="." column="0"/>
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
<context name="DetectComments" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="Comment" String="\.\s*\\"" column="0"/>
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="\\" char1="""/>
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="\\" char1="#"/>
|
||||
</context>
|
||||
|
||||
<!-- catch glyphc, registers, strings, etc -->
|
||||
<context name="DetectOthers" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="DetectComments"/>
|
||||
<DetectChar attribute="Escape" context="DetectEscape" char="\\" lookAhead="true"/>
|
||||
<DetectChar attribute="String" context="String" char="""/>
|
||||
</context>
|
||||
|
||||
<!-- detect escapes -->
|
||||
<context name="DetectEscape" attribute="Error" lineEndContext="#pop">
|
||||
<RegExpr attribute="Register" context="#pop" String="\\(\*|n[+-]?)&roffid;"/>
|
||||
<RegExpr attribute="Font" context="#pop" String="\\[fF]&roffid;"/>
|
||||
<RegExpr attribute="Font" context="#pop" String="\\f([0-9]|\([0-9][0-9]|\[[0-9]+\])"/>
|
||||
<RegExpr attribute="Font" context="#pop" String="\\s(\[([1-3][0-9]|[04-9])\]|[04-9]|[+-][0-9]|([+-]?\(|\([+-])[0-9][0-9])"/>
|
||||
<Detect2Chars attribute="Escape" context="#pop" char="\\" char1="\\"/>
|
||||
<RegExpr attribute="Escape" context="#pop" String="\\(\$[0-9*@]|[.:% |^{}_!?@)/,&:~0acdeEprtu])"/>
|
||||
<RegExpr attribute="Escape" context="Argument" String="\\[AbBDowXZ]&argsep1;"/>
|
||||
<RegExpr attribute="Escape" context="#pop" String="\\[gkmMVYz]&roffid;"/>
|
||||
<RegExpr attribute="Escape" context="#pop" String="\\O([0-4]|\[5[lrci][^]]\])"/>
|
||||
<RegExpr attribute="Escape" context="Measurement" String="\\[hHSvx]&argsep1;"/>
|
||||
<RegExpr attribute="Escape" context="Measurement" String="\\[lL]&argsep1;\|?"/> <!-- TODO - optional trailing &glyph; -->
|
||||
<RegExpr attribute="Escape" context="Argument" String="\\R&argsep1;"/> <!-- TODO - &roffid; (register), measurement -->
|
||||
<RegExpr attribute="Glyph" context="GlyphArgument" String="\\C&argsep1;"/>
|
||||
<RegExpr attribute="Glyph" context="#pop" String="\\N&argsep2;[0-9]+\1"/>
|
||||
<RegExpr attribute="Glyph" context="#pop" String="\\&roffid;"/>
|
||||
<RegExpr attribute="Escape" context="#pop" String="\\$"/>
|
||||
<DetectChar attribute="Error" context="#pop" char="\\"/>
|
||||
</context>
|
||||
|
||||
<!-- directive start -->
|
||||
<context name="DetectDirective" attribute="Other Macros" lineEndContext="#pop">
|
||||
<keyword attribute="Layout Macros" context="Directive" String="layout"/>
|
||||
<keyword attribute="Format Macros" context="Directive" String="formatting"/>
|
||||
<keyword attribute="GNU Macros" context="Directive" String="gnuext"/>
|
||||
<RegExpr attribute="Other Macros" context="dsDirective" String="\s*ds\b" column="1"/>
|
||||
<RegExpr attribute="Other Macros" context="deDirective" String="\s*de\b" column="1" beginRegion="de"/>
|
||||
<RegExpr attribute="Other Macros" context="daDirective" String="\s*da(?=\s+[A-Za-z]+)" column="1" beginRegion="di"/>
|
||||
<RegExpr attribute="Other Macros" context="diDirective" String="\s*di(?=\s+[A-Za-z]+)" column="1" beginRegion="di"/>
|
||||
<RegExpr attribute="Other Macros" context="Directive" String="\s*[A-Za-z]+\b" column="1"/>
|
||||
</context>
|
||||
|
||||
<!-- comment -->
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<IncludeRules context="##Alerts"/>
|
||||
</context>
|
||||
|
||||
<!-- error -->
|
||||
<context name="Error" attribute="Error" lineEndContext="#stay"/>
|
||||
|
||||
<!-- generic directive -->
|
||||
<context name="Directive" attribute="Identifier" lineEndContext="#pop">
|
||||
<Float attribute="Number" context="#stay"/>
|
||||
<Int attribute="Number" context="#stay"/>
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="\\" char1="""/>
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
<!-- quoted string -->
|
||||
<context name="String" attribute="String" lineEndContext="#pop">
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1="""/>
|
||||
<DetectChar attribute="String" context="#pop" char="""/>
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
<!-- \!, \? escapes -->
|
||||
<context name="LiteralSL" attribute="Normal Text" lineEndContext="#pop"/>
|
||||
<context name="LiteralIL" attribute="Normal Text" lineEndContext="Error">
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1="\\"/>
|
||||
<Detect2Chars attribute="Escape" context="#pop" char="\\" char1="?"/>
|
||||
</context>
|
||||
|
||||
<!-- escape argument -->
|
||||
<context name="Argument" attribute="String" lineEndContext="Error" dynamic="true">
|
||||
<RegExpr attribute="Escape" context="#pop#pop" String="%1" dynamic="true"/>
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
<!-- glyph escape argument -->
|
||||
<context name="GlyphArgument" attribute="Glyph" lineEndContext="Error" dynamic="true">
|
||||
<RegExpr attribute="Glyph" context="#pop#pop" String="%1" dynamic="true"/>
|
||||
</context>
|
||||
|
||||
<!-- measurement (or expression) escape argument -->
|
||||
<context name="Measurement" attribute="Error" lineEndContext="Error" dynamic="true">
|
||||
<RegExpr attribute="Escape" context="#pop#pop" String="%1" dynamic="true"/>
|
||||
<!-- TODO -->
|
||||
</context>
|
||||
|
||||
<!-- .de directive -->
|
||||
<context name="deDirective" attribute="Identifier" lineEndContext="deBody"/>
|
||||
<context name="deBody" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Other Macros" context="#pop#pop" char="." char1="." column="0" endRegion="de"/>
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<!-- .di directives -->
|
||||
<context name="diDirective" attribute="Identifier" lineEndContext="diBody"/>
|
||||
<context name="diBody" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Other Macros" context="#pop#pop" String="\.\s*di\b" column="0" endRegion="di"/>
|
||||
<Detect2Chars attribute="Escape" context="LiteralSL" char="\\" char1="!"/>
|
||||
<Detect2Chars attribute="Escape" context="LiteralIL" char="\\" char1="?"/>
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<!-- .da directives -->
|
||||
<context name="daDirective" attribute="Identifier" lineEndContext="daBody"/>
|
||||
<context name="daBody" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Other Macros" context="#pop#pop" String="\.\s*da\b" column="0" endRegion="di"/>
|
||||
<Detect2Chars attribute="Escape" context="LiteralSL" char="\\" char1="!"/>
|
||||
<Detect2Chars attribute="Escape" context="LiteralIL" char="\\" char1="?"/>
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<!-- .ds directive -->
|
||||
<context name="dsDirective" attribute="Identifier" lineEndContext="#pop">
|
||||
<Int attribute="Number" context="#stay"/>
|
||||
<Float attribute="Number" context="#stay"/>
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="\\" char1="""/>
|
||||
<DetectChar attribute="String" context="dsString" char="""/>
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
<!-- .ds quoted value -->
|
||||
<context name="dsString" attribute="String" lineEndContext="#pop">
|
||||
<IncludeRules context="DetectOthers"/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Layout Macros" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Format Macros" defStyleNum="dsKeyword"/>
|
||||
<itemData name="GNU Macros" defStyleNum="dsDataType"/>
|
||||
<itemData name="Other Macros" defStyleNum="dsFunction"/>
|
||||
<itemData name="Identifier" defStyleNum="dsString"/>
|
||||
<itemData name="Number" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Register" defStyleNum="dsOthers"/>
|
||||
<itemData name="Font" defStyleNum="dsOthers"/>
|
||||
<itemData name="Glyph" defStyleNum="dsOthers"/>
|
||||
<itemData name="Escape" defStyleNum="dsChar"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Error" defStyleNum="dsError"/>
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
|
||||
<comments>
|
||||
<comment name="singleLine" start=".\"" />
|
||||
</comments>
|
||||
|
||||
<keywords casesensitive="1"/>
|
||||
|
||||
</general>
|
||||
|
||||
</language>
|
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd" [ <!ENTITY number "([-]?\d+)"> ] >
|
||||
<language name="Rich Text Format" version="1.0" kateversion="2.4" section="Markup" extensions="*.rtf" mimetype="text/rtf;application/rtf" author="Lukas Sommer" license="LGPL version 2.1, or version 3 or later versions approved by the membership of KDE e.V.; or any other license appoved by the emembership of KDE e.V.">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<contexts>
|
||||
|
||||
<context attribute="Text" lineEndContext="#stay" name="context_normal">
|
||||
<DetectChar char="{" attribute="Braces" beginRegion="true" />
|
||||
<DetectChar char="}" attribute="Braces" endRegion="true" />
|
||||
<DetectChar char="\" lookAhead="true" context="context_process_backslash" />
|
||||
</context>
|
||||
|
||||
<context lineEndContext="context_normal" fallthrough="true" fallthroughContext="context_normal" attribute="Numeric parameter" name="context_process_backslash">
|
||||
<Detect2Chars char="\" char1="|" attribute="Control words" />
|
||||
<Detect2Chars char="\" char1="~" attribute="Character" />
|
||||
<Detect2Chars char="\" char1="-" attribute="Character" />
|
||||
<Detect2Chars char="\" char1="_" attribute="Character" />
|
||||
<Detect2Chars char="\" char1=":" attribute="Control words" />
|
||||
<Detect2Chars char="\" char1="*" attribute="Control words" />
|
||||
<Detect2Chars char="\" char1="\" attribute="Character" />
|
||||
<Detect2Chars char="\" char1="{" attribute="Character" />
|
||||
<Detect2Chars char="\" char1="}" attribute="Character" />
|
||||
<RegExpr String="\\u&number;" attribute="Character"/>
|
||||
<RegExpr String="\\'[01-9a-f]{2}" attribute="Character"/>
|
||||
<RegExpr String="\\[a-zA-Z]+" attribute="Control words" context="context_functionparameter" />
|
||||
<DetectChar char="\" attribute="Error" />
|
||||
</context>
|
||||
|
||||
<context attribute="Control words" lineEndContext="context_normal" fallthrough="true" fallthroughContext="context_normal" name="context_functionparameter">
|
||||
<RegExpr String="[-]?\d+" attribute="Numeric parameter" context="context_normal" />
|
||||
<DetectChar char="-" attribute="Error" />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Text" defStyleNum="dsString"/>
|
||||
<itemData name="Character" defStyleNum="dsChar"/>
|
||||
<itemData name="Braces" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Control words" defStyleNum="dsFunction"/>
|
||||
<itemData name="Numeric parameter" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Error" defStyleNum="dsError"/>
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
|
||||
</language>
|
Loading…
Reference in new issue