This commit is contained in:
Kelvin Sherlock 2013-03-31 19:57:48 -04:00
parent fd0d5b516f
commit 421263b005
6 changed files with 405 additions and 10 deletions

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>EDASM Folding</string>
<key>scope</key>
<string>source.asm.6502.edasm</string>
<key>settings</key>
<dict>
<key>foldingStartMarker</key>
<string>\b(?i:DSECT|DO|IFNE|IFEQ|IFLT|IFLE|IFGT|IFGE)\b</string>
<key>foldingStopMarker</key>
<string>\b(?i:DEND|FIN)\b</string>
</dict>
<key>uuid</key>
<string>3B1A516B-A7C6-47A2-B7A4-C60D3E5CABAE</string>
</dict>
</plist>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>MPW Folding</string>
<key>scope</key>
<string>source.asm.65816.mpw</string>
<key>settings</key>
<dict>
<key>foldingStartMarker</key>
<string>\b(?i:FUNC|INIT|PROC|RECORD|STACKDP|WITH|MACRO)\b</string>
<key>foldingStopMarker</key>
<string>\b(?i:ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|ENDR|ENDSTACK|ENDWITH|ENDM|ENDMACRO|MEND)\b</string>
</dict>
<key>uuid</key>
<string>0336F07E-4801-40D6-8AB0-0D3F8DF88070</string>
</dict>
</plist>

View File

@ -17,6 +17,27 @@
</array>
<key>repository</key>
<dict>
<key>M6502</key>
<dict>
<key>match</key>
<string>\b(?i:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\b</string>
<key>name</key>
<string>keyword.mnemonic.6502</string>
</dict>
<key>M65816</key>
<dict>
<key>match</key>
<string>\b(?i:BRL|COP|JML|JSL|MVN|MVP|PEA|PEI|PER|PHB|PHD|PHK|PLB|PLD|REP|RTL|SEP|TCD|TCS|TDC|TSC|TXY|TYX|WDM|XBA|XCE)\b</string>
<key>name</key>
<string>keyword.mnemonic.65816</string>
</dict>
<key>M65C02</key>
<dict>
<key>match</key>
<string>\b(?i:BRA|PHX|PHY|PLX|PLY|STP|STZ|TRB|TSB|WAI)\b</string>
<key>name</key>
<string>keyword.mnemonic.65c02</string>
</dict>
<key>binary_number</key>
<dict>
<key>match</key>
@ -45,6 +66,13 @@
<key>name</key>
<string>keyword.mnemonic.65816.long</string>
</dict>
<key>octal_number</key>
<dict>
<key>match</key>
<string>@([0-7]+)\b</string>
<key>name</key>
<string>constant.numeric.octal</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.asm.65816</string>

114
Syntaxes/EDAsm.tmLanguage Normal file
View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array/>
<key>name</key>
<string>EDASM</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.asm.65816#M6502</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#M65C02</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#hex_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#binary_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#decimal_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#octal_number</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:BLT|BGE|DEA|INA|LSL)\b</string>
<key>name</key>
<string>keyword.mnemonic.6502.alt</string>
</dict>
<dict>
<key>match</key>
<string>^[A-Za-z][A-Za-z0-9@]*\b</string>
<key>name</key>
<string>entity.name.label</string>
</dict>
<dict>
<key>match</key>
<string>^[*;].*</string>
<key>name</key>
<string>comment.line</string>
</dict>
<dict>
<key>match</key>
<string>;.*</string>
<key>name</key>
<string>comment.line</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.directive.string</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>string.delimited.begin</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>string.delimited</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>string.delimited.end</string>
</dict>
</dict>
<key>comment</key>
<string>delimited strings.</string>
<key>match</key>
<string>\b((?i)ASC|STR|DCI)\s+(\S)(.*?)(\2|$)</string>
<key>name</key>
<string>meta.string.delimited</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:ASC|CHN|CHR|DATE|DCI|DDB|DEF|DFB|DS|DSECT|DW|ENTRY|EQU|EXTRN|FAIL|FIN|IBUFSIZ|IDNUM|INCLUDE|INTERP|LST|MACLIB|MSB|OBJ|ORG|PAGE|REF|REL|REP|SBTL|SBUFSIZ|SKP|STR|SYS|TIME|ZDEF|ZREF)\b</string>
<key>name</key>
<string>keyword.directive</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:DO|ELSE|FIN|IFEQ|IFGE|IFGT|IFNE|IFLE|IFLT)\b</string>
<key>name</key>
<string>keyword.control.conditional</string>
</dict>
<dict>
<key>match</key>
<string>[-+/|^!&lt;&gt;*#()]</string>
<key>name</key>
<string>keyword.operator</string>
</dict>
</array>
<key>scopeName</key>
<string>source.asm.6502.edasm</string>
<key>uuid</key>
<string>3B702721-C1B1-4DB6-A163-0FD9D6A83F4C</string>
</dict>
</plist>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>aii</string>
</array>
<key>name</key>
<string>MPW Asm IIgs</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.asm.65816</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#hex_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#binary_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#decimal_number</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:BLT|BGE|CPA|DEA|INA|SWA|TAS|TSA)\b</string>
<key>name</key>
<string>keyword.mnemonic.65816.alt</string>
</dict>
<dict>
<key>comment</key>
<string>Rockwell/m740</string>
<key>match</key>
<string>\b(?:BBC|BBR|BBS|CLB|RMB|SEB|SMB)[0-9]\b</string>
<key>name</key>
<string>keyword.mnemonic.other</string>
</dict>
<dict>
<key>comment</key>
<string>Rockwell/m740</string>
<key>match</key>
<string>\b(?i:CLT|COM|LDM|RRF|SETT|TST)\b</string>
<key>name</key>
<string>keyword.mnemonic.other</string>
</dict>
<dict>
<key>match</key>
<string>^[A-Za-z@_~][A-Za-z0-9@_~%$#]*\b</string>
<key>name</key>
<string>entity.name.label</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;=,)([xXyYsS])\b</string>
<key>name</key>
<string>variable.language.register</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:NOT|DIV|MOD|AND|OR|XOR|EOR)\b</string>
<key>name</key>
<string>keyword.operator</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double</string>
</dict>
<dict>
<key>begin</key>
<string>'</string>
<key>end</key>
<string>'</string>
<key>name</key>
<string>string.quoted.single</string>
</dict>
<dict>
<key>match</key>
<string>^[*;].*</string>
<key>name</key>
<string>comment.line</string>
</dict>
<dict>
<key>match</key>
<string>;.*</string>
<key>name</key>
<string>comment.line</string>
</dict>
<dict>
<key>match</key>
<string>[=&lt;&gt;+-/|*#()^]|(&lt;&gt;|&lt;=|&gt;=)</string>
<key>name</key>
<string>keyword.operator</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:NOT|DIV|MOD|AND|OR|XOR|EOR)\b</string>
<key>name</key>
<string>keyword.operator</string>
</dict>
<dict>
<key>begin</key>
<string>\b((?i)MACRO)\b</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.directive</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.directive</string>
</dict>
</dict>
<key>comment</key>
<string>enable &amp;# macro parameters w/in a MAC ... ^^^ definition.</string>
<key>end</key>
<string>\b((?i)ENDMACRO|ENDM|MEND)\b</string>
<key>name</key>
<string>meta.macro</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
<dict>
<key>match</key>
<string>&amp;[A-Za-z][A-Za-z0-9]*</string>
<key>name</key>
<string>variable.parameter</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\b(?i:ALIGN|BLANKS|CASE|CODE|CODECHK|DATACHK|DIRECT|DUMP|EJECT|END|ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|END_PROC|ENDR|ENDSTACK|ENDWITH|ENTRY|EQU|EXPORT|FUNC|IMPORT|INCLUDE|INIT|LOAD|LONGA|LONGI|MACHINE|MSB|ORG|PAGESIZE|PRINT|PROC|RECORD|SEG|SEGATTR|SET|SPACE|STACKDP|STRING|TITLE|WITH)\b</string>
<key>name</key>
<string>keyword.directive</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:(DC|DCB|DS))([.].)?\b</string>
<key>name</key>
<string>keyword.directive.data</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:ACTR|AERROR|ANOP|CYCLE|ELSE|ELSEIF|ENDIF|ENDM|ENDMACRO|ENDWHILE|EXITM|GOTO|IF|LEAVE|MACRO|MEND|MEXIT|THEN|WHILE|WRITE|WRITELN|SET|SETA|SETC)\b</string>
<key>name</key>
<string>support.function.macro</string>
</dict>
<dict>
<key>match</key>
<string>&amp;(?i:ABS|CHR|CONCAT|DEFAULT|DELSYMTBL|ENTERSYM|EVAL|FINDSYM|GETENV|INTTOSTR|I2S|ISINT|LEN|LEX|LIST|LOWCASE|LC|MAX|MIN|NBR|NEWSYMTBL|ORD|POS|SCANEQ|SCANNE|STRTOINT|S2I|SETTING|SUBSTR|SYSDATE|SYSINDEX|SYSLIST|SYSLST|SYSLOCAL|SYSGLOBAL|SYSMOD|SYSSEG|SYSTIME|SYSTOKEN|SYSTOKSTR|SYSVALUE|SYSFLAGS|TRIM|TYPE|UPCASE|UC)\b</string>
<key>name</key>
<string>support.function.macro</string>
</dict>
</array>
<key>scopeName</key>
<string>source.asm.65816.mpw</string>
<key>uuid</key>
<string>64362FB8-D779-440E-ABF7-5D238FF4A65D</string>
</dict>
</plist>

View File

@ -27,6 +27,10 @@
<key>include</key>
<string>source.asm.65816#decimal_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#octal_number</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:BLT|BGE|CPA)\b</string>
@ -72,33 +76,69 @@
<key>name</key>
<string>entity.name.label</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.directive</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>constant.language</string>
</dict>
</dict>
<key>comment</key>
<string>eg: LONGA ON</string>
<key>match</key>
<string>\b((?i)ABSADDR|CASE|CODECHK|DATACHECK|DYNCHK|ERR|EXPAND|IEEE|INSTIME|LIST|LONGA|LONGI|MSB|NUMSEX|OBJCASE|PRINTER|SYMBOL|65C02|65816)\s+((?i)ON|OFF)</string>
<key>name</key>
<string>meta.onoff.directive</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.directive</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>string.quoted.other.path</string>
</dict>
</dict>
<key>comment</key>
<string>eg: KEEP pathname</string>
<key>match</key>
<string>\b((?i)APPEND|COPY|KEEP|MCOPY)\s+(\S*)</string>
<key>name</key>
<string>meta.path.directive</string>
</dict>
<dict>
<key>match</key>
<string>\b(?i:ABSADDR|ALIGN|ANOP|APPEND|CASE|CODECHK|COPY|DATA|DATACHK|DC|DIRECT|DS|DYNCHK|EJECT|END|ENTRY|EQU|ERR|EXPAND|GEQU|IEEE|INSTIME|KEEP|KIND|LIST|LONGA|LONGI|MCOPY|MEM|MERR|MSB|NUMSEX|OBJ|OBJCASE|OBJEND|ORG|PRINTER|PRIVATE|PRIVDATA|RENAME|SETCOM|START|SYMBOL|TITLE|USING|65C02|65816)\b</string>
<key>name</key>
<string>keyword.directive</string>
</dict>
<dict>
<key>match</key>
<string>@[0-7]+</string>
<key>name</key>
<string>constant.numeric.octal</string>
</dict>
<dict>
<key>match</key>
<string>\b[aA]\b</string>
<key>name</key>
<string>variable.language</string>
<string>variable.language.register</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;=,)([xXyY])\b</string>
<string>(?&lt;=,)([xXyYsS])\b</string>
<key>name</key>
<string>variable.language</string>
<string>variable.language.register</string>
</dict>
<dict>
<key>match</key>
<string>[=&lt;&gt;+-/|*#()^]|(&lt;&gt;|&lt;=|&gt;=)</string>
<string>[=&lt;&gt;+-/|*#()^\[\]]|(&lt;&gt;|&lt;=|&gt;=)</string>
<key>name</key>
<string>keyword.operator</string>
</dict>