Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

207 lines (188 sloc) 7.068 kB
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010-2012, Jim Teeuwen
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<language id="dasm" _name="DASM" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-dasm</property>
<property name="globs">*.dasm;*.dasm16</property>
<property name="line-comment-start">//</property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="error" _name="Error" map-to="def:error"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="common-defines" _name="Common Defines" map-to="def:special-constant"/>
<style id="included-file" _name="Included File" map-to="def:string"/>
<style id="char" _name="Character" map-to="def:character"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
<style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="binary" _name="Binary number" map-to="def:base-n-integer"/>
<style id="type" _name="Data Type" map-to="def:type"/>
</styles>
<default-regex-options case-sensitive="false" />
<definitions>
<define-regex id="escaped-character" extended="true">
\\(
[\\\"\'nrbtfav\?]|
[0-7]{1,3}|
[xX][0-9A-Fa-f]+|
u[0-9A-Fa-f]{4}|
U[0-9A-Fa-f]{8}
)
</define-regex>
<context id="dasm-proper">
<include>
<context id="comment" style-ref="comment" end-at-line-end="true">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="string1" style-ref="string" end-at-line-end="false">
<start>`</start>
<end>`</end>
<include>
<context ref="escaped-character"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char">
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
([0-9]+[Ee][+-]?[0-9]*))
[fFlL]?
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+
(?![\w\.])
</match>
</context>
<context id="binary" style-ref="binary">
<match extended="true">
(?&lt;![\w\.])
0[bB][01]+
(?![\w\.])
</match>
</context>
<context id="octal" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
0[0-7]+
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+
(?![\w\.])
</match>
</context>
<context id="keywords" style-ref="keyword">
<keyword>set</keyword>
<keyword>add</keyword>
<keyword>sub</keyword>
<keyword>mul</keyword>
<keyword>mli</keyword>
<keyword>div</keyword>
<keyword>dvi</keyword>
<keyword>mod</keyword>
<keyword>mdi</keyword>
<keyword>and</keyword>
<keyword>bor</keyword>
<keyword>xor</keyword>
<keyword>shr</keyword>
<keyword>asr</keyword>
<keyword>shl</keyword>
<keyword>ifb</keyword>
<keyword>ifc</keyword>
<keyword>ife</keyword>
<keyword>ifn</keyword>
<keyword>ifg</keyword>
<keyword>ifa</keyword>
<keyword>ifl</keyword>
<keyword>ifu</keyword>
<keyword>adx</keyword>
<keyword>sbx</keyword>
<keyword>sti</keyword>
<keyword>std</keyword>
<keyword>jsr</keyword>
<keyword>int</keyword>
<keyword>iag</keyword>
<keyword>ias</keyword>
<keyword>rfi</keyword>
<keyword>iaq</keyword>
<keyword>hwn</keyword>
<keyword>hwq</keyword>
<keyword>hwi</keyword>
<keyword>dat</keyword>
<keyword>equ</keyword>
<keyword>func</keyword>
<keyword>return</keyword>
<keyword>package</keyword>
<keyword>import</keyword>
<keyword>const</keyword>
<keyword>exit</keyword>
<keyword>panic</keyword>
</context>
<context id="types" style-ref="type">
<keyword>A</keyword>
<keyword>B</keyword>
<keyword>C</keyword>
<keyword>X</keyword>
<keyword>Y</keyword>
<keyword>Z</keyword>
<keyword>I</keyword>
<keyword>J</keyword>
<keyword>PC</keyword>
<keyword>SP</keyword>
<keyword>EX</keyword>
<keyword>IA</keyword>
<keyword>PUSH</keyword>
<keyword>POP</keyword>
<keyword>PEEK</keyword>
</context>
</include>
</context>
<context id="dasm">
<include><context ref="dasm-proper"/></include>
</context>
</definitions>
</language>
Jump to Line
Something went wrong with that request. Please try again.