vim updates
[~madcoder/dotfiles.git] / vim / syntax / massif.vim
1 " Vim syntax file
2 " Language:     valgrind massif outputs
3
4 " Quit when a (custom) syntax file was already loaded
5 if exists("b:current_syntax")
6   finish
7 endif
8
9 syn region massifStanza start=/^== \d* ===*$/ end=/^==/
10   \ contains=massifHead,massifResult,massifSpecLine,massifSep
11
12 syn region massifHead contained start=/^==/ end=/==$/ contains=massifSection
13 syn match  massifSection /\d\+/ contained
14 syn match  massifSep  /^--*$/ contained
15 syn match  massifSpecLine /^[A-Z].*$/ contained contains=massifRate
16
17 syn region massifResult contained start=/^\s*\d\+/ end=/$/
18   \ contains=massifFile,massifFunc,massifRate,massifAddr
19
20 syn match  massifRate "\d\+\(\.\d\+\)\?%" contained
21 syn match  massifAddr "0x[0-9A-Fa-f]*" contained
22 syn match  massifFile "\((\)\@<=.*:\d\+\()\)\@=" contained
23
24 hi def link massifHead     Type
25 hi def link massifSection  Normal
26 hi def link massifSep      Comment
27 hi def link massifFile     Statement
28 hi def link massifSpecLine Type
29
30 hi def link massifRate     Constant
31 hi def link massifAddr     NonText
32
33 let b:current_syntax = "massif"
34
35 " vim: ts=8 sw=2