Skip to content

Commit

Permalink
Add a syntax file for gdbinit files
Browse files Browse the repository at this point in the history
  • Loading branch information
pope committed Jul 23, 2015
1 parent 587081f commit d646ac4
Showing 1 changed file with 279 additions and 0 deletions.
279 changes: 279 additions & 0 deletions gdb.tmLanguage
@@ -0,0 +1,279 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>gdbinit</string>
</array>
<key>name</key>
<string>GDB</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>Comment line.</string>
<key>match</key>
<string>^\s*(#).*$\n?</string>
<key>name</key>
<string>comment.line.number-sign.gdb</string>
</dict>
<dict>
<key>begin</key>
<string>^\s*(define)\ +(.*)?</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.function</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>GDB Function Define</string>
<key>end</key>
<string>^(end)$</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^\s*(document)\ +(?:.*)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>GDB Document</string>
<key>end</key>
<string>^(end)$</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>.</string>
<key>name</key>
<string>comment.block.documentation.gdb</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\"</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>GDB String</string>
<key>end</key>
<string>\"</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.gdb</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#stringEscapedChar</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>GDB Character</string>
<key>end</key>
<string>\'</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.gdb</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#stringEscapedChar</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^\s*(echo)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
</dict>
<key>comment</key>
<string>Echo statement</string>
<key>end</key>
<string>(?&lt;!\\)\n</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#stringEscapedChar</string>
</dict>
<dict>
<key>match</key>
<string>\\$</string>
<key>name</key>
<string>constant.character.escape.gdb</string>
</dict>
<dict>
<key>match</key>
<string>.</string>
<key>name</key>
<string>string.other.gdb</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>GDB Number</string>
<key>match</key>
<string>\b(?:[0-9_]+|0x[0-9a-fA-F_]+)\b</string>
<key>name</key>
<string>constant.numeric.gdb</string>
</dict>
<dict>
<key>comment</key>
<string>GDB Variables</string>
<key>match</key>
<string>\$[@_a-zA-Z][@_a-zA-Z0-9]*</string>
<key>name</key>
<string>variable.other.gdb</string>
</dict>
<dict>
<key>comment</key>
<string>GDB Info</string>
<key>match</key>
<string>\b(?:address|architecture|args|breakpoints|catch|common|copying|dcache|display|files|float|frame|functions|handle|line|locals|program|registers|scope|set|sharedlibrary|signals|source|sources|stack|symbol|target|terminal|threads|syn|keyword|tracepoints|types|udot)\b</string>
<key>name</key>
<string>storage.type.gdb</string>
</dict>
<dict>
<key>comment</key>
<string>GDB Statement</string>
<key>match</key>
<string>^\s*(?:actions|apply|attach|awatch|backtrace|break|bt|call|catch|cd|clear|collect|commands|complete|condition|continue|delete|detach|directory|disable|disassemble|display|down|else|enable|end|file|finish|frame|handle|hbreak|help|if|ignore|inspect|jump|kill|list|load|maintenance|make|next|nexti|ni|output|overlay|passcount|path|print|printf|ptype|pwd|quit|rbreak|remote|return|run|rwatch|search|section|set|sharedlibrary|shell|show|si|signal|source|step|stepi|stepping|stop|target|tbreak|tdump|tfind|thbreak|thread|tp|trace|tstart|tstatus|tstop|tty|undisplay|unset|until|up|watch|whatis|where|while|ws|x|add-shared-symbol-files|add-symbol-file|core-file|dont-repeat|down-silently|exec-file|forward-search|reverse-search|save-tracepoints|select-frame|symbol-file|up-silently|while-stepping)\b</string>
<key>name</key>
<string>keyword.other.gdb</string>
</dict>
<dict>
<key>comment</key>
<string>GDB Set</string>
<key>match</key>
<string>\b(?:annotate|architecture|args|check|complaints|confirm|editing|endian|environment|gnutarget|height|history|language|listsize|print|prompt|radix|remotebaud|remotebreak|remotecache|remotedebug|remotedevice|remotelogbase|remotelogfile|remotetimeout|remotewritesize|targetdebug|variable|verbose|watchdog|width|write|auto-solib-add|solib-absolute-prefix|solib-search-path|stop-on-solib-events|symbol-reloading|input-radix|demangle-style|output-radix)\b</string>
<key>name</key>
<string>support.constant.gdb</string>
</dict>
<dict>
<key>comment</key>
<string>GDB Info</string>
<key>match</key>
<string>^\s*info</string>
<key>name</key>
<string>constant.language.gdb</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>stringEscapedChar</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8})</string>
<key>name</key>
<string>constant.character.escape.gdb</string>
</dict>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>invalid.illegal.gdb</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.gdb</string>
<key>uuid</key>
<string>8d97021b-68d8-4b4b-b1c3-5b505e4a08e3</string>
</dict>
</plist>

0 comments on commit d646ac4

Please sign in to comment.