1" Vim syntax file 2" Language: SMITH 3" Maintainer: Rafal M. Sulejman <[email protected]> 4" Last Change: 21.07.2000 5 6" For version 5.x: Clear all syntax items 7" For version 6.x: Quit when a syntax file was already loaded 8if version < 600 9 syntax clear 10elseif exists("b:current_syntax") 11 finish 12endif 13 14syn case ignore 15 16 17syn match smithComment ";.*$" 18 19syn match smithNumber "\<[+-]*[0-9]\d*\>" 20 21syn match smithRegister "R[\[]*[0-9]*[\]]*" 22 23syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP" 24 25syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ 26 27 28syn case match 29 30" Define the default highlighting. 31" For version 5.7 and earlier: only when not done already 32" For version 5.8 and later: only when an item doesn't have highlighting yet 33if version >= 508 || !exists("did_smith_syntax_inits") 34 if version < 508 35 let did_smith_syntax_inits = 1 36 command -nargs=+ HiLink hi link <args> 37 else 38 command -nargs=+ HiLink hi def link <args> 39 endif 40 41 HiLink smithRegister Identifier 42 HiLink smithKeyword Keyword 43 HiLink smithComment Comment 44 HiLink smithString String 45 HiLink smithNumber Number 46 47 delcommand HiLink 48endif 49 50let b:current_syntax = "smith" 51 52" vim: ts=2 53