mirror of
https://github.com/notwa/rc
synced 2024-11-05 04:19:03 -08:00
update lips highlighting
This commit is contained in:
parent
58d91da249
commit
26c18e8118
1 changed files with 29 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
" Vim syn file
|
" Vim syn file
|
||||||
" Language: lips assembly
|
" Language: lips assembly
|
||||||
" Maintainer: notwa
|
" Maintainer: notwa
|
||||||
" Last Change: 2016-04-07
|
" Last Change: 2016-05-08
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
|
@ -17,9 +17,14 @@ syn match lipsComment /\(\/\/\|;\).*/
|
||||||
|
|
||||||
syn sync ccomment lipsComment
|
syn sync ccomment lipsComment
|
||||||
|
|
||||||
syn match lipsNumber /\<[+-]\?\d\+\>/ " Decimal numbers
|
" Decimal numbers
|
||||||
syn match lipsNumber /\<[+-]\?0x[0-9a-f]\+\>/ " Hex numbers
|
syn match lipsNumber /\<[+-]\?#\?\d\+\>/
|
||||||
syn match lipsNumber /\<[+-]\?0[0-7]\+\>/ " Octal numbers
|
" Hex numbers
|
||||||
|
syn match lipsNumber /\<[+-]\?\(0x\|$\)[0-9a-f]\+\>/
|
||||||
|
" Octal numbers
|
||||||
|
syn match lipsNumber /\<[+-]\?0o\?[0-7]\+\>/
|
||||||
|
" Binary numbers
|
||||||
|
syn match lipsNumber /\<[+-]\?\(0b\|%\)[0-9a-f]\+\>/
|
||||||
|
|
||||||
syn match lipsColon /:/ contained
|
syn match lipsColon /:/ contained
|
||||||
syn match lipsLabel /[a-z_][a-z0-9_]*:/ contains=lipsColon
|
syn match lipsLabel /[a-z_][a-z0-9_]*:/ contains=lipsColon
|
||||||
|
@ -66,14 +71,19 @@ syn match lipsDirective "\.space\>"
|
||||||
syn match lipsDirective "\.ascii\>"
|
syn match lipsDirective "\.ascii\>"
|
||||||
syn match lipsDirective "\.asciiz\>"
|
syn match lipsDirective "\.asciiz\>"
|
||||||
syn match lipsDirective "\.byte\>"
|
syn match lipsDirective "\.byte\>"
|
||||||
syn match lipsDirective "\.half\(word\)\?\>"
|
syn match lipsDirective "\.half\>"
|
||||||
|
syn match lipsDirective "\.halfword\>"
|
||||||
syn match lipsDirective "\.word\>"
|
syn match lipsDirective "\.word\>"
|
||||||
syn match lipsDirective "\.float\>"
|
syn match lipsDirective "\.float\>"
|
||||||
|
syn match lipsDirective "\.double\>"
|
||||||
syn match lipsDirective "\.inc\>"
|
syn match lipsDirective "\.inc\>"
|
||||||
syn match lipsDirective "\.incasm\>"
|
syn match lipsDirective "\.incasm\>"
|
||||||
syn match lipsDirective "\.include\>"
|
syn match lipsDirective "\.include\>"
|
||||||
syn match lipsDirective "\.incbin\>"
|
syn match lipsDirective "\.incbin\>"
|
||||||
syn match lipsDirective "\.org\>"
|
syn match lipsDirective "\.org\>"
|
||||||
|
syn match lipsDirective "\.base\>"
|
||||||
|
syn match lipsDirective "\.push\>"
|
||||||
|
syn match lipsDirective "\.pop\>"
|
||||||
|
|
||||||
syn match lipsDirective "\<HEX\>"
|
syn match lipsDirective "\<HEX\>"
|
||||||
|
|
||||||
|
@ -200,15 +210,20 @@ syn match lipsInstruction /\<C\.UN\.[DS]\>/
|
||||||
syn keyword lipsInstruction B BAL
|
syn keyword lipsInstruction B BAL
|
||||||
syn keyword lipsInstruction BEQZ BNEZ BEQZL BNEZL
|
syn keyword lipsInstruction BEQZ BNEZ BEQZL BNEZL
|
||||||
syn keyword lipsInstruction CL
|
syn keyword lipsInstruction CL
|
||||||
|
syn keyword lipsInstruction MOV DMOV
|
||||||
|
syn keyword lipsInstruction NEG NEGU
|
||||||
syn keyword lipsInstruction NOP
|
syn keyword lipsInstruction NOP
|
||||||
syn keyword lipsInstruction NOT
|
syn keyword lipsInstruction NOT
|
||||||
|
syn keyword lipsInstruction SUBI SUBIU
|
||||||
|
|
||||||
|
syn match lipsInstruction /\<[LS]\.[DS]\>/
|
||||||
|
|
||||||
syn keyword lipsInstruction LI LA
|
syn keyword lipsInstruction LI LA
|
||||||
|
|
||||||
syn keyword lipsInstruction PUSH
|
syn keyword lipsInstruction PUSH
|
||||||
syn keyword lipsInstruction POP JPOP
|
syn keyword lipsInstruction POP JPOP
|
||||||
|
|
||||||
syn keyword lipsInstruction REM
|
syn keyword lipsInstruction ABS MUL REM
|
||||||
syn keyword lipsInstruction NAND NANDI
|
syn keyword lipsInstruction NAND NANDI
|
||||||
syn keyword lipsInstruction NORI
|
syn keyword lipsInstruction NORI
|
||||||
syn keyword lipsInstruction ROL ROR
|
syn keyword lipsInstruction ROL ROR
|
||||||
|
@ -219,12 +234,14 @@ syn keyword lipsInstruction SGT SGTI SGTIU SGTU
|
||||||
syn keyword lipsInstruction SLE SLEI SLEIU SLEU
|
syn keyword lipsInstruction SLE SLEI SLEIU SLEU
|
||||||
syn keyword lipsInstruction SNE SNEI SNEIU SNEU
|
syn keyword lipsInstruction SNE SNEI SNEIU SNEU
|
||||||
|
|
||||||
syn keyword lipsInstruction BEQI BEQIL
|
syn keyword lipsInstruction BGE BLE BLT BGT
|
||||||
syn keyword lipsInstruction BNEI BNEIL
|
|
||||||
syn keyword lipsInstruction BGE BGEI BGEIL
|
syn keyword lipsInstruction BEQI BEQIU BEQIL BEQIUL
|
||||||
syn keyword lipsInstruction BLE BLEI BLEIL
|
syn keyword lipsInstruction BNEI BNEIU BNEIL BNEIUL
|
||||||
syn keyword lipsInstruction BLT BLTI BLTIL
|
syn keyword lipsInstruction BGEI BGEIU BGEIL BGEIUL
|
||||||
syn keyword lipsInstruction BGT BGTI BGTIL
|
syn keyword lipsInstruction BLEI BLEIU BLEIL BLEIUL
|
||||||
|
syn keyword lipsInstruction BLTI BLTIU BLTIL BLTIUL
|
||||||
|
syn keyword lipsInstruction BGTI BGTIU BGTIL BGTIUL
|
||||||
|
|
||||||
hi def link lipsComment Comment
|
hi def link lipsComment Comment
|
||||||
hi def link lipsNumber Number
|
hi def link lipsNumber Number
|
||||||
|
|
Loading…
Reference in a new issue