Add Marco Baye's ACME Crossassembler from GoDot

This commit is contained in:
Matthew Callis 2018-05-27 18:51:19 -07:00
parent 05941820ac
commit 0779d70727
3 changed files with 108 additions and 3 deletions

View File

@ -2,16 +2,17 @@
Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers:
- [ACME Crossassembler](https://sourceforge.net/projects/acme-crossass/)
- [cc65 (SNES Syntax: 65816, SPC700, SuperFX)](http://oliverschmidt.github.io/cc65/)
- [DASM](http://dasm-dillon.sourceforge.net/) (6502)
- EDASM
- [EDASM](https://archive.org/details/EDASM-ProDOS_Assembler_Tools_Manual)
- [Merlin](http://en.wikipedia.org/wiki/Merlin_(assembler))
- [MPW IIgs Assembler](http://store.16sector.com/index.php?main_page=product_info&products_id=24)
- [NinjaForce Assembler](http://www.ninjaforce.com/html/products_nf_assembler.html)
- [ORCA/M](http://www.byteworks.us/Byte_Works/Products.html)
- [WLA-DX](http://www.villehelin.com/wla.html)
- [WTCTools by Western Design Center](http://westerndesigncenter.com/wdc/tools.cfm)
Originally [converted](http://atom.io/docs/latest/converting-a-text-mate-bundle)
from the various other TextMate bundles:
@ -52,3 +53,4 @@ See last line in grammar files for names.
- [Tommy Savaria](https://github.com/NewLunarFire)
- [ARM9](https://github.com/ARM9)
- [georgjz](https://github.com/georgjz)
- [GoDot](http://www.godot64.de/)

103
grammars/acme.cson Normal file
View File

@ -0,0 +1,103 @@
# Syntax Highlighting for the acme directives
scopeName: 'source.assembly.6502.acme'
name: 'ACME Crossassembler'
filetypes: [
'a'
'asm'
]
patterns: [
{ include: 'source.6502-opcodes' }
{ include: 'source.6502x-opcodes' }
{ include: '#comments' }
# symbols, constants, numbers
{ include: '#symbols' }
# directives
{ include: '#directives' }
]
# Repository starts here ------------------------------------------------------
repository:
# comments
comments:
patterns: [
# semicolon comments
{
match: ';.*$'
name: 'comment.line.semicolon.acme'
}
]
# symbols
symbols:
patterns: [
# strings
{
begin: '"'
beginCaptures:
0:
name: 'punctuation.definition.string.begin.acme'
end: '"'
endCaptures:
0:
name: 'punctuation.definition.string.end.acme'
name: 'string.quoted.double.assembly.acme'
}
# absolut addressing/numbering
{
match: '\\#(\'.\'|[^\\s\']+)'
name: 'constant.numeric.hex.acme'
}
# hex, prefixed with dollar ($)
{
match: '-?\\$[A-Fa-f0-9]+'
name: 'constant.numeric.hex.acme'
}
# binary prefixed with %
{
match: '%[01]+'
name: 'constant.numeric.binary.acme'
}
# decimal
{
match: '\\b([0-9]+)\\b'
name: 'constant.numeric.decimal.acme'
}
]
# assembler directives
directives:
patterns: [
# File and Symbol control
{
match: '\\b\!(?i:source|src|eof|endoffile|pseudopc|zn|zone|set|to|bin(ary)?|sl|warn|error|serious)\\b'
name: 'support.function.pseudo.acme'
}
# Parsing control
{
match: '\\b\!(?i:cpu|al|as|rl|rs|8|by|byte|16|wo|word|24|32|h|hex|fi|fill|align|skip|ct|convtab|tx|text|pet|scr|scrxor|raw)\\b'
name: 'support.function.pseudo.acme'
}
# Macro control
{
match: '\\b(?i:\!macro|\+[a-zA-Z0-9)\\b'
name: 'support.function.pseudo.acme'
}
# Conditional control
{
match: '\\b(?i:\!if|else|\!if(n)?def|\!for|\!do|while|until)\\b'
name: 'keyword.control.conditional.acme'
}
# Operators
{
match: '!|\\+|\\-|\\/|\\*|<<|>>|&|\\||\\^|=|<|>|\\:|\\|\\|'
name: 'keyword.operator.acme'
}
# Operators II
{
match: '\\b(?i:and|not|mod|sh[lr]|x?or|eq|u?[gl]t)\\b'
name: 'keyword.operator.acme'
}
]

View File

@ -2,7 +2,7 @@
"name": "language-65asm",
"version": "6.0.0",
"description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.",
"repository": "https://github.com/MatthewCallis/language-65asm",
"repository": "git@github.com:MatthewCallis/language-65asm.git",
"license": "MIT",
"engines": {
"atom": ">0.50.0"