Start anew
[msysgit.git] / share / vim / vim58 / syntax / strace.vim
blob3f45d16a28552f768ac29347a8d900b00611ded3
1 " Vim syntax file
2 " Language: strace output
3 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
4 " Last Change: 2001-04-26
5 " URI: http://physics.muni.cz/~yeti/download/strace.vim
7 " Notes: Still APLHA.  The parsing works, more-or-less, but the result is
8 "        somewhat over-highlighted.
10 " Setup {{{
11 " React to possibly already-defined syntax.
12 " For version 5.x: Clear all syntax items unconditionally
13 " For version 6.x: Quit when a syntax file was already loaded
14 if version >= 600
15   if exists("b:current_syntax")
16     finish
17   endif
18 else
19   syntax clear
20 endif
22 syn case match
23 " }}}
24 " Parse the line {{{
25 syn match straceSpecialChar "\\\d\d\d\|\\." contained
26 syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline
27 syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1
28 syn match straceNumber "\W0x\x\+"lc=1
29 syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained
30 syn match straceOtherRHS "?" contained
31 syn match straceConstant "[A-Z_]\{2,}"
32 syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline
33 syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent
34 syn match straceEquals "\s=\s"ms=s+1,me=e-1
35 syn match straceSysCall "^\w\+"
36 syn match straceParenthesis "[][(){}]"
37 syn match straceOperator "[-+=*/!%&|:,]"
38 syn region straceComment start="/\*" end="\*/" oneline
39 " }}}
40 " Define the default highlighting {{{
41 " For version 5.7 and earlier: Only when not done already
42 " For version 5.8 and later: Only when an item doesn't have highlighting yet
43 if version >= 508 || !exists("did_strace_syntax_inits")
44   if version < 508
45     let did_strace_syntax_inits = 1
46     command -nargs=+ HiLink hi link <args>
47   else
48     command -nargs=+ HiLink hi def link <args>
49   endif
51   HiLink straceComment     Comment
52   HiLink straceVerbosed    Comment
53   HiLink straceNumber      Number
54   HiLink straceNumberRHS   Type
55   HiLink straceOtherRHS    Type
56   HiLink straceString      String
57   HiLink straceConstant    Function
58   HiLink straceEquals      Type
59   HiLink straceSysCall     Statement
60   HiLink straceParenthesis Statement
61   HiLink straceOperator    Normal
62   HiLink straceSpecialChar Special
64   delcommand HiLink
65 endif
66 " }}}
67 let b:current_syntax = "strace"