URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
[/] [zipcpu/] [trunk/] [zip.vim] - Rev 138
Go to most recent revision | Compare with Previous | Blame | View Log
" Vim syntax file" Language: Zip CPU Assembly Language" Maintainer: Dan Gisselquist" Last Change: 2015 Dec 20"" This is a ZipCPU syntax highlight definition file for use with VIM." Run this wih :set syntax=zip" Look up new-filetype for autodetectionif exists("b:current_syntax")finishendif"ignore case for assemblysyn case ignore" Identifier Keyword characters (defines \k)if version >= 600setlocal iskeyword=@,48-57,#,$,:,?,@-@,_,~endifsyn sync minlines=5syn region zipComment start=";" end="$" contains=zipTodo,@Spellsyn region zipComment start="//" end="$" contains=zipTodo,@Spellsyn region zipComment start="/\*" end="\*/" contains=zipTodo,@Spell" syn match zipComment ";.*" contains=zipTodosyn match zipIdentifier "[a-zA-Z_$][a-zA-Z0-9_$]*"" syn match zipDirective "\.[a-zA-Z_$][a-zA-Z_$.]\+"syn match zipLabel "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=:\>"he=e-1syn region zipstring start=+"+ skip=+\\\\\|\\"+ end=+"+syn region zipcharstr start=+'+ skip=+\\\\\|\\'+ end=+'+syn match zipOctal "\$\=0[0-7_]*\>"syn match zipBinary "\$\=0[bB][01_]*\>"syn match zipHex "\$\=0[xX][0-9a-fA-F_]*\>"syn match zipDecimal "\$\=[1-9_][0-9_]*\>"" syn match zipFloat "\$\=[0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*\)\=\>""simple instructionssyn keyword zipopcode sub and add or xor lsr lsl asr lhi llo ldihi ldilosyn keyword zipopcode mpyu mpys divu divssyn keyword zipopcode brev popc rol mov cmp tst lod sto ldisyn keyword zipopcode noop break brk locksyn keyword zipopcode fpadd fpsub fpmul fpdiv dpcvt fpintsyn keyword zipopcode bz beq bnz bc brc brv bv bra blt bgt bgesyn keyword zipopcode clr halt wait clrf jmp ljmp not trap busy neg rtu"delimiters"operatorssyn match zipoperators "[()#,]"" syn match zipoperators "\(+\|\*\|-\|/\|\\\|^\|&\|\|=\)""TODOsyn match zipTodo "\(TODO\|XXX\|FIXME\|NOTE\)"syn keyword zipCondition z ne nz ge gt lt n c v"The regex for different zip registers are given belowsyn match zipregisters "[us]\=R\([0-9]\|1[0-5]\)\>"syn keyword zipregisters gbl sp cc pc usp ucc upc"floating point classes"Data allocation syntaxsyn match zipdata "word\s*\>"syn match zipdata "fill\s*\>"syn match zipdata "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>"" Define the default highlighting." For version 5.8 and later: only when an item doesn't have highlighting yetif version >= 508 || !exists("did_zip_syn_inits")command -nargs=+ HiLink hi def link <args>"zip specific stuffHiLink zipLabel DefineHiLink zipComment CommentHiLink zipDirective TypeHiLink zipopcode StatementHiLink zipCondition StatementHiLink zipregisters OperatorHiLink zipstring StringHiLink zipcharstr CharacterHiLink zipDecimal NumberHiLink zipHex NumberHiLink zipBinary NumberHiLink zipOctal NumberHiLink zipIdentifier IdentifierHiLink zipdata TypeHiLink zipdelimiter DelimiterHiLink zipoperator OperatorHiLink zipTodo Todo" HiLink ia64Float Floatdelcommand HiLinkendiflet b:current_syntax = "zip"" vim: ts=8 sw=2
Go to most recent revision | Compare with Previous | Blame | View Log
