annotate runtime/syntax/valgrind.vim @ 28161:acfb2cedbe8d

Added tag v8.2.4604 for changeset 859b037faea84ef1cbad52dff5ed4d88d58c16b5
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Mar 2022 21:00:06 +0100
parents 2704c4e3e20a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Valgrind Memory Debugger Output
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Roger Luethi <rl@hellgate.ch>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Program URL: http://devel-home.kde.org/~sewardj/
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 6583
diff changeset
5 " Last Change: 2019 Jul 24
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Notes: mostly based on strace.vim and xml.vim
6259
bd18da914be9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
8 "
bd18da914be9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
9 " Contributors: Christoph Gysin <christoph.gysin@gmail.com>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 let s:keepcpo= &cpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
6583
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
18 " Lines can be long with demangled c++ functions.
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
19 setlocal synmaxcol=8000
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn region valgrindRegion
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 \ start=+^==\z(\d\+\)== \w.*$+
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 6583
diff changeset
28 \ skip=+^==\z1==\( \| .*\| \S.*\)$+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 \ end=+^+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 \ fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 \ contains=valgrindPidChunk,valgrindLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn region valgrindPidChunk
6583
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
35 \ start=+^==\zs+
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
36 \ end=+\ze==+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match valgrindPid0 "\d\+0=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match valgrindPid1 "\d\+1=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match valgrindPid2 "\d\+2=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match valgrindPid3 "\d\+3=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match valgrindPid4 "\d\+4=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match valgrindPid5 "\d\+5=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match valgrindPid6 "\d\+6=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match valgrindPid7 "\d\+7=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match valgrindPid8 "\d\+8=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match valgrindPid9 "\d\+9=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region valgrindLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 \ start=+\(^==\d\+== \)\@<=+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 \ end=+$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 \ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 \ contains=valgrindOptions,valgrindMsg,valgrindLoc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match valgrindOptions "[ ]\{3}-.*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match valgrindMsg "\S.*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 \ contains=valgrindError,valgrindNote,valgrindSummary
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match valgrindNote ".*still reachable.*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match valgrindSummary ".*SUMMARY:" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match valgrindAt "at\s\@=" contained
6583
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
70 syn match valgrindAddr "\W\zs0x\x\+" contained
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
71
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 6583
diff changeset
72 syn match valgrindFunc ": \zs\h[a-zA-Z0-9_:\[\]()<>&*+\-,=%!|^ @.]*\ze([^)]*)$" contained
6583
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
73 syn match valgrindBin "(\(with\)\=in \zs\S\+)\@=" contained
b0a227941705 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6259
diff changeset
74 syn match valgrindSrc "(\zs[^)]*:\d\+)\@=" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Define the default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 hi def link valgrindSpecLine Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 "hi def link valgrindRegion Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 hi def link valgrindPid0 Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 hi def link valgrindPid1 Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 hi def link valgrindPid2 Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 hi def link valgrindPid3 Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 hi def link valgrindPid4 Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 hi def link valgrindPid5 Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 hi def link valgrindPid6 Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 hi def link valgrindPid7 Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 hi def link valgrindPid8 LineNr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 hi def link valgrindPid9 Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 "hi def link valgrindLine Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 hi def link valgrindOptions Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 "hi def link valgrindMsg Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 "hi def link valgrindLoc Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 hi def link valgrindError Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 hi def link valgrindNote Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 hi def link valgrindSummary Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 hi def link valgrindAt Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 hi def link valgrindAddr Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 hi def link valgrindFunc Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 hi def link valgrindBin Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 hi def link valgrindSrc Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 let b:current_syntax = "valgrind"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
108
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
109 let &cpo = s:keepcpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
110 unlet s:keepcpo