comparison runtime/syntax/gprof.vim @ 4681:2eb30f341e8d

Updated runtime files and translations.
author Bram Moolenaar <bram@vim.org>
date Sat, 01 Jun 2013 14:50:56 +0200
parents
children a5352e73dc00
comparison
equal deleted inserted replaced
4680:fd8cc7fbc273 4681:2eb30f341e8d
1 " Vim syntax file
2 " Language: Syntax for Gprof Output
3 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
4 " Last Change: 2012 May 20
5
6 " Quit when a syntax file was already loaded
7 if exists("b:current_syntax")
8 finish
9 endif
10 let s:keepcpo= &cpo
11 set cpo&vim
12
13 syn case match
14 syn sync minlines=100
15
16 " Flat profile
17 syn match gprofFlatProfileTitle
18 \ "^Flat profile:$"
19 syn region gprofFlatProfileHeader
20 \ start="^Each sample counts as.*"
21 \ end="^ time.*name\s*$"
22 syn region gprofFlatProfileTrailer
23 \ start="^\s*%\s\+the percentage of the total running time.*"
24 \ end="^\s*the gprof listing if it were to be printed\."
25
26 " Call graph
27 syn match gprofCallGraphTitle "Call graph (explanation follows)"
28 syn region gprofCallGraphHeader
29 \ start="^granularity: each sample hit covers.*"
30 \ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
31 syn match gprofCallGraphFunction "\s\+\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
32 syn match gprofCallGraphSeparator "^-\+$"
33 syn region gprofCallGraphTrailer
34 \ start="This table describes the call tree of the program"
35 \ end="^\s*the cycle.$"
36
37 " Index
38 syn region gprofIndex
39 \ start="^Index by function name$"
40 \ end="\%$"
41
42 syn match gprofIndexFunctionTitle "^Index by function name$"
43
44 syn match gprofNumbers "^\s\+[0-9 ./+]\+"
45 syn match gprofFunctionIndex "\[\d\+\]"
46 syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"
47
48 hi def link gprofFlatProfileTitle Title
49 hi def link gprofFlatProfileHeader Comment
50 hi def link gprofFlatProfileFunction Number
51 hi def link gprofFlatProfileTrailer Comment
52
53 hi def link gprofCallGraphTitle Title
54 hi def link gprofCallGraphHeader Comment
55 hi def link gprofFlatProfileFunction Number
56 hi def link gprofCallGraphFunction Special
57 hi def link gprofCallGraphTrailer Comment
58 hi def link gprofCallGraphSeparator Label
59
60 hi def link gprofFunctionIndex Label
61 hi def link gprofSpecial SpecialKey
62 hi def link gprofNumbers Number
63
64 hi def link gprofIndexFunctionTitle Title
65
66 let b:current_syntax = "gprof"
67
68 let &cpo = s:keepcpo
69 unlet s:keepcpo