Compare commits

...

28 Commits

Author SHA1 Message Date
Matthew Callis 765fce9827
Prepare v10.5.0 release 2021-02-08 15:07:05 -08:00
Matthew Callis e387111185
Merge pull request #19 from ProbablyNotArtyom/master
Various fixes for the Kick Assembler grammar
2021-02-08 15:03:58 -08:00
Matthew Callis ada325129d
Merge pull request #18 from secondsun/patch-1
Fix typo in cc65-toolchain.cson
2021-02-08 15:03:14 -08:00
ProbablyNotArtyom ca009b986b Various regex fixes for the Kick Assembler grammar
* Removed all remaining references to the 'merlin' grammar
 * Labels with trailing numbers are now detected as labels
 * Branches to positional labels are detected properly now
2020-10-01 04:25:08 -04:00
Hoyt Summers Pittman aa5faf999f
Fix typo in cc65-toolchain.cson 2020-07-11 13:49:39 -04:00
Matthew Callis 32ddd31469
Update CHANGELOG.md 2020-01-27 12:40:47 -08:00
Matthew Callis 3645d31d58
Prepare v10.4.0 release 2020-01-27 12:40:23 -08:00
Matthew Callis 118052ebc8
Update CHANGELOG 2020-01-27 12:39:27 -08:00
Matthew Callis 4a5733826e
Update README 2020-01-27 12:38:27 -08:00
Matthew Callis 6e4108ca91
Merge pull request #17 from michaellass/fix-operator-regex
Fix operator regex for ACME grammar (again)
2020-01-27 12:36:47 -08:00
Michael Lass 0c3e7c9e25 Fix operator regex for ACME grammar (again)
Currently, the regex causes the following error:

Uncaught Error: target of repeat operator is not specified

```
At /usr/lib/atom/node_modules/first-mate/lib/scanner.js:31

Error: target of repeat operator is not specified
    at Scanner.module.exports.Scanner.createScanner (/usr/lib/atom/node_modules/first-mate/lib/scanner.js:31:24)
    at Scanner.module.exports.Scanner.getScanner (/usr/lib/atom/node_modules/first-mate/lib/scanner.js:37:31)
    at Scanner.module.exports.Scanner.findNextMatch (/usr/lib/atom/node_modules/first-mate/lib/scanner.js:56:22)
    at Rule.module.exports.Rule.findNextMatch (/usr/lib/atom/node_modules/first-mate/lib/rule.js:98:28)
    at Rule.module.exports.Rule.getNextTags (/usr/lib/atom/node_modules/first-mate/lib/rule.js:154:21)
    at Grammar.module.exports.Grammar.tokenizeLine (/usr/lib/atom/node_modules/first-mate/lib/grammar.js:162:44)
    at TextMateLanguageMode.buildTokenizedLineForRowWithText (/usr/lib/atom/src/text-mate-language-mode.js:503:46)
    at TextMateLanguageMode.buildTokenizedLineForRow (/usr/lib/atom/src/text-mate-language-mode.js:488:17)
    at TextMateLanguageMode.tokenizeNextChunk (/usr/lib/atom/src/text-mate-language-mode.js:340:41)
    at _.defer (/usr/lib/atom/src/text-mate-language-mode.js:324:57)
    at /usr/lib/atom/node_modules/underscore/underscore.js:768:19
```

Fix the regex by applying the following modifications:
* use double backslashes to escape special characters
* insert missing * into regex

While here, also give the pattern a .acme suffix as all the other have.
2020-01-18 23:35:06 +01:00
Matthew Callis 2dcf07e67b
Prepare v10.3.0 release 2019-11-13 19:37:41 -08:00
Matthew Callis e7976a5a95
Fix issue in publishing 2019-11-13 19:37:30 -08:00
Matthew Callis 124e6531f4
Prepare v10.1.0 release 2019-11-13 19:36:37 -08:00
Matthew Callis a0db8c9fbd
Merge pull request #16 from ProbablyNotArtyom/master
Add KickAssembler syntax
2019-11-13 19:34:18 -08:00
ProbablyNotArtyom cbcc0bfce6 Added KickAssembler to the README
Added KickAssembler credits to the README
2019-11-13 06:35:47 -05:00
ProbablyNotArtyom 707b9c8bd3 Added KickAssembler grammar 2019-11-13 06:32:10 -05:00
Matthew Callis c5ff13055f
Merge pull request #15 from MatthewCallis/ACME
Fix bug in Acme grammar with arithmetic operators
2019-08-29 15:51:54 -07:00
Matthew Callis a198b529b7
Fix bug in Acme grammar with arithmetic operators 2019-08-29 15:50:55 -07:00
Matthew Callis 191902076a
Prepare 10.0.0 release 2018-12-19 12:18:46 -08:00
Matthew Callis c1b48c5732
v10 2018-12-19 12:18:08 -08:00
Matthew Callis 0a367c9924
Merge pull request #13 from georgjz/master
Add ASM6f support, closes #12
2018-12-19 12:13:46 -08:00
Georg Ziegler 5ad9fa0be5 Merge branch 'asm6' 2018-10-19 16:35:29 +02:00
Georg Ziegler f56e593d02 Update README 2018-10-19 16:34:51 +02:00
Georg Ziegler 2578cfb4e3 Refactor and add file extension 2018-10-19 16:27:18 +02:00
Georg Ziegler dafc148662 Add missing operators and illegal opcodes 2018-10-19 16:21:04 +02:00
Georg Ziegler 1cbcd550e1 Add support for asm6 assembler 2018-10-19 16:14:05 +02:00
Matthew Callis 032e7d76d7
Create CHANGELOG.md 2018-06-21 10:47:11 -07:00
7 changed files with 309 additions and 4 deletions

24
CHANGELOG.md Normal file
View File

@ -0,0 +1,24 @@
# v10.4.0
* Fix operator regex for ACME grammar (again) [#17](https://github.com/MatthewCallis/language-65asm/pull/17)
# v10.0.0
* Add support for asm6 assembler
# v9.0.0
Added https://github.com/georgjz as a collaborator 🎉
* Updated ACME Grammar (https://github.com/MatthewCallis/language-65asm/pull/11)
* Fix DASM & Merlin, add ASAR, improve CC65 (https://github.com/MatthewCallis/language-65asm/pull/10):
* Added a new grammar to support [Asar Assembler](https://github.com/RPGHacker/asar)
* Added SPC700 and SuperFX opcodes (extracted from the SNES cc65 grammar)
* DASM and Merlin should work now
* cc65
* Added some missing commands and constants
* Changed some scopes to improve readability
* Added a new grammar for the linker config files ld65 uses
* Updated the link in README.md
* Fixed hex numbers with a trailing h
* Add missing commands to WDC tools

View File

@ -4,6 +4,7 @@ Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with ex
- [ACME Crossassembler](https://sourceforge.net/projects/acme-crossass/)
- [Asar SNES Assembler](https://github.com/RPGHacker/asar)
- [ASM6f](https://github.com/freem/asm6f) (support for NES emulator Mesen)
- [cc65 (SNES Syntax: 65816, SPC700, SuperFX)](https://github.com/cc65/cc65)
- [DASM](http://dasm-dillon.sourceforge.net/) (6502)
- [EDASM](https://archive.org/details/EDASM-ProDOS_Assembler_Tools_Manual)
@ -13,6 +14,7 @@ Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with ex
- [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)
- [Kick Assembler](http://theweb.dk/KickAssembler/Main.html#frontpage)
Originally [converted](http://atom.io/docs/latest/converting-a-text-mate-bundle)
from the various other TextMate bundles:
@ -55,3 +57,5 @@ See last line in grammar files for names.
- [ARM9](https://github.com/ARM9)
- [georgjz](https://github.com/georgjz)
- [GoDot](http://www.godot64.de/)
- [Carson Herrington](https://github.com/ProbablyNotArtyom)
- [Michael Lass](https://github.com/michaellass)

View File

@ -124,8 +124,8 @@ repository:
}
# Operators
{
match: '\\!|\\+|\\-|\\/|\\*|<<|>>|&|\\||\\^|=|<|>|\\:|\\|\\|'
name: 'keyword.operator'
match: '\\!|\\+|\\-|\\/|\\*|<<|>>|&|\\||\\^|=|<|>|\\:'
name: 'keyword.operator.acme'
}
# Operators II
{

106
grammars/asm6.cson Normal file
View File

@ -0,0 +1,106 @@
# Syntax Highlighting for the asm6 assembler
scopeName: 'source.asm6'
name: 'ASM6f (6502)' # Name shown in Atom Editor grammar selection
# File extensions associated with this grammar
fileTypes: [
's'
'asm'
]
patterns: [
{ include: 'source.65c02-opcodes' } # extend with 6502X opcodes
{ include: 'source.6502x-opcodes' } # extend with 6502X opcodes
{ include: '#comments' } # comments
{ include: '#symbols' } # symbols, constants, numbers
{ include: '#directives' } # cc65 assembler directives
]
# Repository starts here ------------------------------------------------------
repository:
# comments
comments:
patterns: [
# semicolon comments
{
match: ';.*$'
name: 'comment.line.semicolon.cc65-directives'
}
]
# symbols
symbols:
patterns: [
# strings
{
begin: '[\"\']'
beginCaptures:
0:
name: 'punctuation.definition.string.begin.cc65-directives'
end: '[\"\']'
endCaptures:
0:
name: 'punctuation.definition.string.end.cc65-directives'
name: 'string.quoted.double.cc65-directives'
}
# absolut addressing/numbers
{
match: '\\#(\'.\'|[^\\s\']+)'
name: 'constant.numeric.hex.cc65-directives'
}
# hex, prefixed with dollar sign($)
{
match: '-?\\$\\b[a-fA-F0-9]+\\b'
name: 'constant.numeric.hex.cc65-directives'
}
# hex, suffixed with h(h)
{
match: '-?\\b([a-fA-F0-9]+)h\\b'
name: 'constant.numeric.hex.cc65-directives'
}
# binary prefixed with %
{
match: '%[01]+'
name: 'constant.numeric.binary.cc65-directives'
}
# binary suffixed with b
{
match: '[01]+[bB]'
name: 'constant.numeric.binary.cc65-directives'
}
# decimal
{
match: '\\b([0-9]+)\\b'
name: 'constant.numeric.decimal.cc65-directives'
}
]
# assembler directives
directives:
patterns: [
# ca65 pseudo variables
{
match: '(\\.)?\\b(?i:equ|include|incsrc|(inc)?bin|db|dw|byte|word|dcb|dcw|(dc\\.b)|(dc\\.w)|ignorenl|endinl|unstable|hunstable|inesprog|ineschr|inesmap|inesmir|nes2chrram|nes2prgram|nes2usb|nes2tv|nes2vs|nes2bram|nes2chrbram)\\b'
name: 'support.function.pseudo.cc65-directives'
}
# ca65 pseudo functions
{
match: '(\\.)?\\b(?i:dl|dh|hex|(ds\\.?b)|(ds\\.?w)|pad|org|align|fillvalue|base|if|elseif|else|endif|ifdef|ifndef|macro|endm|rept|endr|enum|ende|error)\\b'
name: 'support.function.pseudo.cc65-directives'
}
# address sizes, macpack packages
# {
# match: '\\b(?i:direct|zeropage|zp|absolute|abs|near|far|long|dword|atari|cbm|cpu|generic|longbranch)\\b'
# name: 'constant.language.cc65-directives'
# }
# Operators
{
match: '!|&|&&|\\^|\\*|\\/|\\-|\\+|~|=|<=|>=|<<|>>|<>|<|>|\\||\\|\\|\\%'
name: 'keyword.operator.cc65-directives'
}
# Operators II/undocumented opcodes
{
match: '(\\.)\\b(?i:slo|rla|sre|rra|sax|lax|dcp|isc|anc|alr|arr|axs|las|ahx|shy|shx|tas|xaa)\\b'
name: 'keyword.operator.cc65-directives'
}
]

View File

@ -1,4 +1,4 @@
# Syntax Highlighting for the cc65 toolchain ans 6502 support
# Syntax Highlighting for the cc65 toolchain and 6502 support
scopeName: 'source.assembly.6502.cc65-toolchain'
name: '6502 Assembly (cc65)' # Name shown in Atom Editor grammar selection

171
grammars/kickass.cson Normal file
View File

@ -0,0 +1,171 @@
scopeName: 'source.assembly.6502.kickass'
name: 'Kick Assembler'
fileTypes: [
'a'
'asm'
's'
'S'
]
patterns: [
{ include: 'source.65c02-opcodes' }
{ include: 'source.6502x-opcodes' }
{ include: '#comments' }
{ include: '#directives' }
{ include: '#symbols' }
]
repository:
comments:
patterns: [
{
match: '(\\/\\/[^\\n]+)'
name: 'comment.line'
}
{
begin: '\\/\\*'
end: '\\*\\/'
name: 'comment.block'
}
]
symbols:
patterns: [
# ===============================================================
# Assembler symbols
{ # Labels
match: '^\\s*[a-zA-Z_][a-zA-Z0-9_]*:'
name: 'entity.name.function.kickass'
}
{ # Local labels
match: '!(:|[\\+\\-]+)'
name: 'entity.name.function.kickass'
}
{ # Variable functions, like var.getValue()
match: '(\\w+(?=\\())'
name: 'entity.name.function.kickass'
}
# ===============================================================
# Data types
{ # Chars
match: "\\'\\S\\'"
name: 'string.char.kickass'
}
{ # Strings
begin: '"'
end: '"'
name: 'string.quoted.kickass'
}
{ # Hex numbers
match: '-?\\$[A-Fa-f0-9]+'
name: 'constant.numeric.hex.kickass'
}
{ # Octals
match: '@([0-7]+)\\b'
name: 'constant.numeric.octal.kickass'
}
{ # Binary numbers
match: '%[01]+'
name: 'constant.numeric.binary.kickass'
}
{ # Decimal numbers
match: '\\b([0-9]+)\\b'
name: 'constant.numeric.decimal.kickass'
}
{ # Immediate values
match: '\\#([^\\s]+)'
name: 'constant.numeric.hex.kickass'
}
{ # Constants
match: '\\b([_A-Z][_A-Z0-9]+)\\b'
name: 'variable.kickass'
}
]
directives:
patterns: [
# ===============================================================
# Preprocessor directives
{
match: '(\\#)((?:define|undef))([\\s\\w]+)'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
3: name: 'variable.kickass'
}
{
match: '(\\#)((?:endif|el(se|if)|if|importif))([\\s\\w]+)'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
4: name: 'variable.kickass'
}
{
match: '(\\#)((import(once)?))([\\s\\w]+)'
name: 'keyword.control.directive.kickass'
}
# ===============================================================
# Assembler directive conditionals
{
match: '(\\.)((?:elif|if))'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
}
{
match: '(\\}?(\\s+)?)(else)'
captures:
3: name: 'keyword.control.directive.kickass'
}
# ===============================================================
# Assembler directives misc
{ # Assembler directives that have inconsistant syntax
match: '(\\.)((?:return|namespace|print(now)?|by(te)?|align|assert(error)?|break|disk|dw(ord)?|encoding|enum|error(if)?|file(modify|namespace)?|fill(word)?|for|lohifill|memblock|modify|pc|plugin|pseudopc|segment(def|out)?|struct|te(xt)?|while|wo(rd)?|zp|import( binary| c64| source| text|once)))\\b'
name: 'keyword.control.directive.kickass'
}
{
match: '(\\}?(\\s+)?)(else)'
captures:
2: name: 'keyword.control.directive.kickass'
}
# ===============================================================
# Variables and Macros
{
match: '(\\.)(var|eval|const|label)(\\s*[a-zA-Z0-9_]*)(\\s*=)?'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
3: name: 'support.function.kickass'
4: name: 'keyword.operator.kickass'
}
{
match: '(?:\\()(var|eval|const|label)(?=\\s*[a-zA-Z0-9_]*)'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'support.function.kickass'
}
{
match: '(\\.)(function|macro)([\\s\\w_.]*)(\\()([^)]*)(\\))'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
3: name: 'entity.name.function.kickass'
4: name: 'keyword.operator.kickass'
5: name: 'constant.variable.kickass'
6: name: 'keyword.operator.kickass'
}
{
match: '(\\.)(pseudocommand)(\\s+)([^\\s\\n]+)'
captures:
1: name: 'keyword.control.directive.kickass'
2: name: 'keyword.control.directive.kickass'
4: name: 'entity.name.function.kickass'
}
]

View File

@ -1,6 +1,6 @@
{
"name": "language-65asm",
"version": "9.0.0",
"version": "10.5.0",
"description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.",
"repository": "git@github.com:MatthewCallis/language-65asm.git",
"license": "MIT",