mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
84 lines
2.7 KiB
XML
84 lines
2.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
The OS/K Team licenses this file to you under the MIT license.
|
|
See the LICENSE file in the project root for more information.
|
|
-->
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
|
|
|
<language _name="Assembler (KVISC)" version="1.0" _section="Sources" globs="*.k" mimetypes="text/x-asm;text/x-assembler">
|
|
|
|
<escape-char>\</escape-char>
|
|
|
|
<line-comment _name="Line Comment" style="Comment">
|
|
<start-regex>@|;|/</start-regex>
|
|
</line-comment>
|
|
|
|
<block-comment _name="Block Comment" style="Comment">
|
|
<start-regex>/\*</start-regex>
|
|
<end-regex>\*/</end-regex>
|
|
</block-comment>
|
|
|
|
<pattern-item _name="Label" style="Preprocessor">
|
|
<regex>^([ ]*[A-Za-z_])[A-Za-z_0-9.]*\:</regex>
|
|
</pattern-item>
|
|
|
|
<pattern-item _name="Local Label" style="Preprocessor">
|
|
<regex>[ ]*.[A-Za-z_0-9.]*\:</regex>
|
|
</pattern-item>
|
|
|
|
<pattern-item _name="Preproc" style="Preprocessor">
|
|
<regex>^\#(include|define|if|ifdef|else|endif|undef|pragma|error)</regex>
|
|
</pattern-item>
|
|
|
|
<string _name="String" style = "String" end-at-line-end="TRUE">
|
|
<start-regex>"</start-regex>
|
|
<end-regex>"</end-regex>
|
|
</string>
|
|
|
|
<string _name="String 2" style = "String" end-at-line-end="TRUE">
|
|
<start-regex>'</start-regex>
|
|
<end-regex>'</end-regex>
|
|
</string>
|
|
|
|
<keyword-list _name="Assembler Cmds" style="def:preprocessor"
|
|
match-empty-string-at-beginning = "TRUE"
|
|
match-empty-string-at-end = "TRUE">
|
|
<keyword>(include|define|if|ifdef|else|endif|undef|pragma|error)</keyword>
|
|
</keyword-list>
|
|
|
|
<pattern-item _name="Instructions" style="def:keyword" case-sensitive="FALSE"
|
|
match-empty-string-at-beginning = "TRUE"
|
|
match-empty-string-at-end = "TRUE">
|
|
<regex>^\s+[a-zA-Z0-9_.$%]{1,}</regex>
|
|
</pattern-item>
|
|
|
|
<keyword-list _name="Registers K" style="def:type"
|
|
case-sensitive="FALSE"
|
|
match-empty-string-at-beginning = "TRUE"
|
|
match-empty-string-at-end = "TRUE">
|
|
|
|
<!-- KVISC -->
|
|
<keyword>(inv|flg|zero|[re]pc)</keyword>
|
|
<keyword>[re][abcdfgz]x</keyword>
|
|
<keyword>[re][sd]i</keyword>
|
|
<keyword>[re][sbi]p</keyword>
|
|
<keyword>[a-z]x?[0-9]+[bwdlq]?</keyword>
|
|
|
|
<!-- x86-64 -->
|
|
<keyword>[c-gs]s</keyword>
|
|
<keyword>[re]flags</keyword>
|
|
<keyword>([gil]d)tr</keyword>
|
|
<keyword>[x-z]?mmx?[0-9]+</keyword>
|
|
<keyword>(s[at]|[dc]r)[0-9]+</keyword>
|
|
</keyword-list>
|
|
|
|
<pattern-item _name = "Decimal" style = "Decimal">
|
|
<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
|
</pattern-item>
|
|
|
|
<pattern-item _name = "Hex Number" style = "Decimal">
|
|
<regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
|
</pattern-item>
|
|
</language>
|
|
|