Added a TableGen syntax highlighting mode for VIM and a README that describes
[oota-llvm.git] / utils / vim / tablegen.vim
1 " Vim syntax file
2 " Language:   TableGen
3 " Maintainer: The LLVM team, http://llvm.cs.uiuc.edu/
4 " Updated:    2003-08-11
5
6 if version < 600
7   syntax clear
8 elseif exists("b:current_syntax")
9   finish
10 endif
11
12 syn case match
13
14 syn keyword tgKeyword   def let in code dag
15 syn keyword tgType      class int string list bit bits
16 syn match   tgNumber    /\<\d\+\>/
17 syn match   tgNumber    /\<\d\+\.\d*\>/
18 syn match   tgComment   /\/\/.*$/
19 syn region  tgString    start=/"/ skip=/\\"/ end=/"/
20
21 if version >= 508 || !exists("did_c_syn_inits")
22   if version < 508
23     let did_c_syn_inits = 1
24     command -nargs=+ HiLink hi link <args>
25   else
26     command -nargs=+ HiLink hi def link <args>
27   endif
28
29   HiLink tgKeyword Type
30   HiLink tgType Type
31   "HiLink llvmStatement Statement
32   HiLink tgNumber Number
33   HiLink tgComment Comment
34   HiLink tgString String
35
36   delcommand HiLink
37 endif
38  
39 let b:current_syntax = "tablegen"