7
|
1 " Vim syntax file
|
|
2 " Language: SMITH
|
|
3 " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl>
|
|
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
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 syn case ignore
|
|
15
|
|
16
|
|
17 syn match smithComment ";.*$"
|
|
18
|
|
19 syn match smithNumber "\<[+-]*[0-9]\d*\>"
|
|
20
|
|
21 syn match smithRegister "R[\[]*[0-9]*[\]]*"
|
|
22
|
|
23 syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP"
|
|
24
|
|
25 syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
|
26
|
|
27
|
|
28 syn 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
|
|
33 if 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
|
|
48 endif
|
|
49
|
|
50 let b:current_syntax = "smith"
|
|
51
|
|
52 " vim: ts=2
|