2 " Language: Intel hex MCS51
3 " Maintainer: Sams Ricahrd <sams@ping.at>
4 " Last Change: 2003 Apr 25
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
18 syn match hexChecksum "[0-9a-fA-F]\{2}$"
19 syn match hexAdress "^:[0-9a-fA-F]\{6}" contains=hexDataByteCount
20 syn match hexRecType "^:[0-9a-fA-F]\{8}" contains=hexAdress
21 syn match hexDataByteCount contained "^:[0-9a-fA-F]\{2}" contains=hexStart
22 syn match hexStart contained "^:"
23 syn match hexExtAdrRec "^:02000002[0-9a-fA-F]\{4}" contains=hexSpecRec
24 syn match hexExtLinAdrRec "^:02000004[0-9a-fA-F]\{4}" contains=hexSpecRec
25 syn match hexSpecRec contained "^:0[02]00000[124]" contains=hexStart
26 syn match hexEOF "^:00000001" contains=hexStart
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_hex_syntax_inits")
35 let did_hex_syntax_inits = 1
36 command -nargs=+ HiLink hi link <args>
38 command -nargs=+ HiLink hi def link <args>
41 " The default methods for highlighting. Can be overridden later
42 HiLink hexStart SpecialKey
43 HiLink hexDataByteCount Constant
44 HiLink hexAdress Comment
45 HiLink hexRecType WarningMsg
46 HiLink hexChecksum Search
47 HiLink hexExtAdrRec hexAdress
48 HiLink hexEOF hexSpecRec
49 HiLink hexExtLinAdrRec hexAdress
50 HiLink hexSpecRec DiffAdd
55 let b:current_syntax = "hex"