From 5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 20:43:42 +0200 Subject: Add syntax files from upstream vim repository --- syntax/gdb.vim | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 syntax/gdb.vim (limited to 'syntax/gdb.vim') diff --git a/syntax/gdb.vim b/syntax/gdb.vim new file mode 100644 index 00000000..1a9ed905 --- /dev/null +++ b/syntax/gdb.vim @@ -0,0 +1,107 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1 + +" Vim syntax file +" Language: GDB command files +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/gdb.vim +" Last Change: 2012 Oct 05 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache +syn keyword gdbInfo contained display files float frame functions handle line +syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals +syn keyword gdbInfo contained source sources stack symbol target terminal threads +syn keyword gdbInfo contained syn keyword tracepoints types udot variables warranty watchpoints +syn match gdbInfo contained "all-registers" + + +syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands +syn keyword gdbStatement contained complete condition continue delete detach directory disable disassemble display down +syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore +syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay +syn keyword gdbStatement contained passcount path print printf ptype pwd quit rbreak remote return run rwatch +syn keyword gdbStatement contained search section set sharedlibrary shell show si signal source step stepi stepping +syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop +syn keyword gdbStatement contained tty undisplay unset until up watch whatis where while ws x +syn match gdbFuncDef "\.*" +syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef +syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty + +" some commonly used abbreviations +syn keyword gdbStatement c disp undisp disas p + +syn region gdbDocument matchgroup=gdbFuncDef start="\.*$" matchgroup=gdbFuncDef end="^end\s*$" + +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" + +syn keyword gdbSet annotate architecture args check complaints confirm editing endian +syn keyword gdbSet environment gnutarget height history language listsize print prompt +syn keyword gdbSet radix remotebaud remotebreak remotecache remotedebug remotedevice remotelogbase +syn keyword gdbSet remotelogfile remotetimeout remotewritesize targetdebug variable verbose +syn keyword gdbSet watchdog width write +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" + +syn match gdbComment "^\s*#.*" contains=@Spell + +syn match gdbVariable "\$\K\k*" + +" Strings and constants +syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell +syn match gdbCharacter "'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError +syn match gdbCharacter "'\\''" contains=gdbSpecialChar +syn match gdbCharacter "'[^\\]'" +syn match gdbNumber "\<[0-9_]\+\>" +syn match gdbNumber "\<0x[0-9a-fA-F_]\+\>" + + +if !exists("gdb_minlines") + let gdb_minlines = 10 +endif +exec "syn sync ccomment gdbComment minlines=" . gdb_minlines + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link gdbFuncDef Function +hi def link gdbComment Comment +hi def link gdbStatement Statement +hi def link gdbString String +hi def link gdbCharacter Character +hi def link gdbVariable Identifier +hi def link gdbSet Constant +hi def link gdbInfo Type +hi def link gdbDocument Special +hi def link gdbNumber Number + +let b:current_syntax = "gdb" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 + +endif -- cgit v1.2.3