~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/vim/tablegen.vim

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
" Vim syntax file
2
 
" Language:   TableGen
3
 
" Maintainer: The LLVM team, http://llvm.org/
4
 
" Version:    $Revision$
5
 
 
6
 
if version < 600
7
 
  syntax clear
8
 
elseif exists("b:current_syntax")
9
 
  finish
10
 
endif
11
 
 
12
 
" May be changed if you have a really slow machine
13
 
syntax sync minlines=100
14
 
 
15
 
syn case match
16
 
 
17
 
syn keyword tgKeyword   def let in code dag field include defm
18
 
syn keyword tgType      class int string list bit bits multiclass
19
 
 
20
 
syn match   tgNumber    /\<\d\+\>/
21
 
syn match   tgNumber    /\<\d\+\.\d*\>/
22
 
syn match   tgNumber    /\<0b[01]\+\>/
23
 
syn match   tgNumber    /\<0x[0-9a-fA-F]\+\>/
24
 
syn region  tgString    start=/"/ skip=/\\"/ end=/"/    oneline
25
 
 
26
 
syn region  tgCode      start=/\[{/ end=/}\]/
27
 
 
28
 
syn keyword tgTodo             contained TODO FIXME
29
 
syn match   tgComment   /\/\/.*$/         contains=tgTodo
30
 
" Handle correctly imbricated comment
31
 
syn region  tgComment2 matchgroup=tgComment2  start=+/\*+ end=+\*/+ contains=tgTodo,tgComment2
32
 
 
33
 
if version >= 508 || !exists("did_c_syn_inits")
34
 
  if version < 508
35
 
    let did_c_syn_inits = 1
36
 
    command -nargs=+ HiLink hi link <args>
37
 
  else
38
 
    command -nargs=+ HiLink hi def link <args>
39
 
  endif
40
 
 
41
 
  HiLink tgKeyword Statement
42
 
  HiLink tgType Type
43
 
  HiLink tgNumber Number
44
 
  HiLink tgComment Comment
45
 
  HiLink tgComment2 Comment
46
 
  HiLink tgString String
47
 
  " May find a better Hilight group...
48
 
  HiLink tgCode Special
49
 
  HiLink tgTodo Todo
50
 
 
51
 
  delcommand HiLink
52
 
endif
53
 
 
54
 
let b:current_syntax = "tablegen"