Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " This is a GENERATED FILE. Please always refer to source file at the URI below. |
| 3 | " Language: strace output |
Bram Moolenaar | 8a94d87 | 2015-01-25 13:02:57 +0100 | [diff] [blame] | 4 | " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> |
| 5 | " Last Change: 2015-01-16 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 6 | |
| 7 | " Setup |
| 8 | if version >= 600 |
| 9 | if exists("b:current_syntax") |
| 10 | finish |
| 11 | endif |
| 12 | else |
| 13 | syntax clear |
| 14 | endif |
| 15 | |
| 16 | syn case match |
| 17 | |
| 18 | " Parse the line |
Bram Moolenaar | 8a94d87 | 2015-01-25 13:02:57 +0100 | [diff] [blame] | 19 | syn match straceSpecialChar "\\\o\{1,3}\|\\." contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 20 | syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline |
| 21 | syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 |
| 22 | syn match straceNumber "\W0x\x\+"lc=1 |
| 23 | syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained |
| 24 | syn match straceOtherRHS "?" contained |
| 25 | syn match straceConstant "[A-Z_]\{2,}" |
| 26 | syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline |
| 27 | syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent |
| 28 | syn match straceEquals "\s=\s"ms=s+1,me=e-1 |
| 29 | syn match straceParenthesis "[][(){}]" |
| 30 | syn match straceSysCall "^\w\+" |
| 31 | syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite |
| 32 | syn match straceSysCallEmbed "\w\+" contained |
| 33 | syn keyword stracePID pid contained |
| 34 | syn match straceOperator "[-+=*/!%&|:,]" |
| 35 | syn region straceComment start="/\*" end="\*/" oneline |
| 36 | |
| 37 | " Define the default highlighting |
| 38 | if version >= 508 || !exists("did_strace_syntax_inits") |
| 39 | if version < 508 |
| 40 | let did_strace_syntax_inits = 1 |
| 41 | command -nargs=+ HiLink hi link <args> |
| 42 | else |
| 43 | command -nargs=+ HiLink hi def link <args> |
| 44 | endif |
| 45 | |
| 46 | HiLink straceComment Comment |
| 47 | HiLink straceVerbosed Comment |
| 48 | HiLink stracePID PreProc |
| 49 | HiLink straceNumber Number |
| 50 | HiLink straceNumberRHS Type |
| 51 | HiLink straceOtherRHS Type |
| 52 | HiLink straceString String |
| 53 | HiLink straceConstant Function |
| 54 | HiLink straceEquals Type |
| 55 | HiLink straceSysCallEmbed straceSysCall |
| 56 | HiLink straceSysCall Statement |
| 57 | HiLink straceParenthesis Statement |
| 58 | HiLink straceOperator Normal |
| 59 | HiLink straceSpecialChar Special |
| 60 | HiLink straceOtherPID PreProc |
| 61 | |
| 62 | delcommand HiLink |
| 63 | endif |
| 64 | |
| 65 | let b:current_syntax = "strace" |