language-t8-assembly/grammars/t8-assembly.cson

128 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

2018-05-20 06:59:28 -05:00
# If this is your first time writing a language grammar, check out:
# - https://flight-manual.atom.io/hacking-atom/sections/creating-a-grammar/
'scopeName': 'source.t8-assembly'
'name': 'T8 Assembly'
'fileTypes': [
't8'
]
'patterns': [
{
'match': '\\bLOAD\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.load'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bSTOR\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.stor'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bLOADP\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.loadp'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bSTORP\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.storp'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bLODI\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.lodi'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bLODIP\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.lodip'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bARITH\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.arith'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bARITI\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.ariti'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bMOV\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.mov'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bJMPC\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.control.t8asm.jmpc'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bCALL\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.control.t8asm.call'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bHLT\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.control.t8asm.hlt'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bRET\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.control.t8asm.ret'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bIN\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.in'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bOUT\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.out'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bPUSH\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.push'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\bPOP\\b'
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.pop'
2018-05-20 06:59:28 -05:00
},
{
'match': "\\bADD\\b"
2018-05-20 11:00:12 -05:00
'name': 'keyword.other.t8asm.add'
2018-05-20 06:59:28 -05:00
},
2018-05-20 11:00:12 -05:00
{
'match': "\\bSUB\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bADC\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bSBB\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bCMP\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bAND\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bOR\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bNOT\\b"
'name': 'keyword.other.t8asm.add'
},
{
'match': "\\bXOR\\b"
'name': 'keyword.other.t8asm.add'
},
2018-05-20 06:59:28 -05:00
{
'match': '#.*'
'name': 'comment.line.number-sign'
},
{
'match': '\\b\\d+\\b'
2018-05-20 11:00:12 -05:00
'name': 'constant.numeric.t8asm'
2018-05-20 06:59:28 -05:00
},
{
'match': '\\b0x[0-9a-fA-F]+\\b'
2018-05-20 11:00:12 -05:00
'name': 'constant.numeric.t8asm'
2018-05-20 06:59:28 -05:00
}
]