strace.vim (1890B)
1 " Vim syntax file 2 " Language: strace output 3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> 4 " Last Change: 2022 Jan 29 5 6 " Setup 7 " quit when a syntax file was already loaded 8 if exists("b:current_syntax") 9 finish 10 endif 11 12 syn case match 13 14 " Parse the line 15 syn match straceSpecialChar "\\\o\{1,3}\|\\." contained 16 syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline 17 syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 18 syn match straceNumber "\W0x\x\+"lc=1 19 syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained 20 syn match straceOtherRHS "?" contained 21 syn match straceConstant "[A-Z_]\{2,}" 22 syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline 23 syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent 24 syn match straceEquals "\s=\s"ms=s+1,me=e-1 25 syn match straceParenthesis "[][(){}]" 26 syn match straceSysCall "^\w\+" 27 syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite 28 syn match straceSysCallEmbed "\w\+" contained 29 syn keyword stracePID pid contained 30 syn match straceOperator "[-+=*/!%&|:,]" 31 syn region straceComment start="/\*" end="\*/" oneline 32 33 " Define the default highlighting 34 35 hi def link straceComment Comment 36 hi def link straceVerbosed Comment 37 hi def link stracePID PreProc 38 hi def link straceNumber Number 39 hi def link straceNumberRHS Type 40 hi def link straceOtherRHS Type 41 hi def link straceString String 42 hi def link straceConstant Function 43 hi def link straceEquals Type 44 hi def link straceSysCallEmbed straceSysCall 45 hi def link straceSysCall Statement 46 hi def link straceParenthesis Statement 47 hi def link straceOperator Normal 48 hi def link straceSpecialChar Special 49 hi def link straceOtherPID PreProc 50 51 52 let b:current_syntax = "strace"