2019-05-29 22:27:49 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2019-05-30 12:44:56 +02:00
|
|
|
<!--
|
|
|
|
The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
See the LICENSE file in the project root for more information.
|
|
|
|
-->
|
2019-05-29 22:27:49 +02:00
|
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
|
|
|
|
2019-06-30 13:46:44 +02:00
|
|
|
<language _name="Assembler (KVISC)" version="1.0" _section="Sources" globs="*.k" mimetypes="text/x-asm;text/x-assembler">
|
2019-05-29 22:27:49 +02:00
|
|
|
|
|
|
|
<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>
|
2019-05-30 12:44:56 +02:00
|
|
|
|
2019-05-29 22:27:49 +02:00
|
|
|
<pattern-item _name="Label" style="Preprocessor">
|
2019-06-27 23:00:35 +02:00
|
|
|
<regex>^([ ]*[A-Za-z_])[A-Za-z_0-9.]*\:</regex>
|
2019-05-29 22:27:49 +02:00
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<pattern-item _name="Local Label" style="Preprocessor">
|
2019-06-27 23:00:35 +02:00
|
|
|
<regex>[ ]*.[A-Za-z_0-9.]*\:</regex>
|
2019-05-29 22:27:49 +02:00
|
|
|
</pattern-item>
|
|
|
|
|
|
|
|
<string _name="String" style = "String" end-at-line-end="TRUE">
|
|
|
|
<start-regex>"</start-regex>
|
|
|
|
<end-regex>"</end-regex>
|
|
|
|
</string>
|
2019-05-30 12:44:56 +02:00
|
|
|
|
2019-05-29 22:27:49 +02:00
|
|
|
<string _name="String 2" style = "String" end-at-line-end="TRUE">
|
|
|
|
<start-regex>'</start-regex>
|
|
|
|
<end-regex>'</end-regex>
|
|
|
|
</string>
|
2019-05-30 12:44:56 +02:00
|
|
|
|
2019-05-29 22:27:49 +02:00
|
|
|
<keyword-list _name="Assembler Cmds" style="def:preprocessor"
|
|
|
|
case-sensitive="TRUE"
|
|
|
|
match-empty-string-at-beginning = "TRUE"
|
|
|
|
match-empty-string-at-end = "TRUE">
|
|
|
|
<keyword>include</keyword>
|
|
|
|
</keyword-list>
|
2019-05-30 12:44:56 +02:00
|
|
|
|
2019-05-29 22:27:49 +02:00
|
|
|
<pattern-item _name="Instructions" style="def:keyword" case-sensitive="FALSE"
|
|
|
|
match-empty-string-at-beginning = "TRUE"
|
|
|
|
match-empty-string-at-end = "TRUE">
|
2019-06-14 16:47:01 +02:00
|
|
|
<regex>^\s+[a-zA-Z0-9_.$%]{1,}</regex>
|
2019-05-29 22:27:49 +02:00
|
|
|
</pattern-item>
|
2019-05-30 12:44:56 +02:00
|
|
|
|
2019-05-29 22:27:49 +02:00
|
|
|
<keyword-list _name="Registers K" style="def:type"
|
|
|
|
case-sensitive="FALSE"
|
|
|
|
match-empty-string-at-beginning = "TRUE"
|
|
|
|
match-empty-string-at-end = "TRUE">
|
2019-06-27 23:00:35 +02:00
|
|
|
|
|
|
|
<!-- KVISC -->
|
|
|
|
<keyword>(inv|flg|[re]?pc)</keyword>
|
2019-06-30 13:46:44 +02:00
|
|
|
<keyword>[re][a-z][xi]l?</keyword>
|
|
|
|
<keyword>[a-z]x[0-9]+[bwdlq]?</keyword>
|
2019-06-27 23:00:35 +02:00
|
|
|
|
|
|
|
<!-- x86-64 -->
|
|
|
|
<keyword>[c-gs]s</keyword>
|
|
|
|
<keyword>[re]?flags</keyword>
|
|
|
|
<keyword>([gil]d)?tr</keyword>
|
|
|
|
<keyword>[re]?[sbi]pl?</keyword>
|
|
|
|
<keyword>[x-z]mm[0-9]+</keyword>
|
|
|
|
<keyword>[re]?[a-d][xhl]</keyword>
|
2019-07-01 00:52:37 +02:00
|
|
|
<keyword>[a-z][0-9]+[bwdlq]?</keyword>
|
2019-06-27 23:00:35 +02:00
|
|
|
<keyword>(s[at]|[dc]r)[0-9]+</keyword>
|
2019-05-29 22:27:49 +02:00
|
|
|
</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>
|
|
|
|
|