cc65 6502 grammar working, splitting 65X opcodes

This commit is contained in:
Georg Ziegler 2018-03-20 21:32:56 +01:00
parent 376a1e0f55
commit 6de1c1dfed
5 changed files with 32 additions and 26 deletions

View File

@ -1,23 +0,0 @@
# Adds the pseudo codes known as 6502EX to the basic 6502 instruction set
scopeName: 'source.6502ex-opcodes'
patterns: [
# The 6502 pseudo opcodes known as 6502EX
{
include: '#mnemonics-6502ex'
}
]
# Respository starts here -----------------------------------------------------
repository:
# 6502 pseudo op codes
'mnemonics-6502ex':
patterns: [
# mnemonics
{
match: '\\b(?i:ALR|ANC|ARR|AXS|DCP|ISC|LAS|LAX|RLA|RRA|SAX|SLO|SRE)\\b'
name: 'keyword.mnemonic.6502.6502ex-opcodes'
}
]

View File

@ -0,0 +1,24 @@
# Adds the pseudo codes known as 6502X to the basic 6502 instruction set
# NOTE: look for extra opcodes: jam
scopeName: 'source.6502x-opcodes'
patterns: [
# The 6502 pseudo opcodes known as 6502X
{
include: '#mnemonics-6502x'
}
]
# Respository starts here -----------------------------------------------------
repository:
# 6502 pseudo op codes
'mnemonics-6502x':
patterns: [
# mnemonics
{
match: '\\b(?i:ALR|ANC|ARR|AXS|DCP|ISC|LAS|LAX|RLA|RRA|SAX|SLO|SRE)\\b'
name: 'keyword.mnemonic.6502.6502x-opcodes'
}
]

View File

@ -1,6 +1,7 @@
# Extends the basic 6502 instruction set with the 65c02 op codes
# NOTE: rmb, bbr, smb, bbs not supported yet
scopeName: 'source.65816-opcodes'
scopeName: 'source.65c02-opcodes'
patterns: [
# The basic 6502 instruction set

View File

@ -1,7 +1,7 @@
# Syntax Highlighting for the cc65 toolchain
scopeName: 'source.cc65-toolchain'
name: '6502 Assembly (cc65) --TEST--' # Name shown in Atom Editor grammar selection
name: '6502 Assembly (cc65)' # Name shown in Atom Editor grammar selection
# File extensions associated with this package
fileTypes: [
's'
@ -9,7 +9,11 @@ fileTypes: [
patterns: [
# The 65c02 instruction set
{
include: 'source.6502-opcodes'
include: 'source.65c02-opcodes'
}
# Include the 6502ex op codes
{
include: 'source.6502x-opcodes'
}
# The cc65 toolchain considers everything after a semicolon(;) as comment
{