Created
August 21, 2008 19:49
-
-
Save bkerley/6623 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage b/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage | |
new file mode 100644 | |
index 0000000..b0ea381 | |
--- /dev/null | |
+++ b/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage | |
@@ -0,0 +1,564 @@ | |
+<?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>rl</string> | |
+ <string>ragel</string> | |
+ </array> | |
+ <key>foldingStartMarker</key> | |
+ <string>(?x) | |
+ /\*\*(?!\*) | |
+ |^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S)) | |
+ </string> | |
+ <key>foldingStopMarker</key> | |
+ <string>(?<!\*)\*\*/|^\s*\}</string> | |
+ <key>keyEquivalent</key> | |
+ <string>^~R</string> | |
+ <key>name</key> | |
+ <string>Ruby Ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>%%{</string> | |
+ <key>captures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.embedded.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>}%%</string> | |
+ <key>name</key> | |
+ <string>source.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#source_ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>%%$</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.embedded.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>$</string> | |
+ <key>name</key> | |
+ <string>source.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#source_ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>%%</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.embedded.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>$</string> | |
+ <key>name</key> | |
+ <string>support.function.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#keywords</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>source.ruby</string> | |
+ </dict> | |
+ </array> | |
+ <key>repository</key> | |
+ <dict> | |
+ <key>action_name</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>captures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.entity.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>match</key> | |
+ <string>([@$>%])\s*([\w\d]+)</string> | |
+ <key>name</key> | |
+ <string>entity.name.type.action-reference.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>comments</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>#</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.comment.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>$\n?</string> | |
+ <key>name</key> | |
+ <string>comment.line.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>embedded_code</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>\{</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.embedded.ruby</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>\}</string> | |
+ <key>name</key> | |
+ <string>source.ruby</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>source.ruby</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>keywords</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>match</key> | |
+ <string>\b(machine|action|context|include|variable|access|write|contained)\b</string> | |
+ <key>name</key> | |
+ <string>keyword.other.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>operators</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>match</key> | |
+ <string>(\:\>\>?|\<\:)</string> | |
+ <key>name</key> | |
+ <string>keyword.operator.contatenation.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>regexp</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>\[</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.begin.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>\]\s*[*?]?</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.end.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>string.regexp.character-class.ragel</string> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>\/</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.begin.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>\/\s*[*?]?</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.end.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>string.regexp.classic.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>source_ragel</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#keywords</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#regexp</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#comments</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#embedded_code</string> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>(action)\s+([\w\d]+)\s+({)</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>keyword.other.action.ragel</string> | |
+ </dict> | |
+ <key>2</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>entity.name.type.action.ragel</string> | |
+ </dict> | |
+ <key>3</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.function.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>(})</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.section.function.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>meta.function.action.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>source.ruby</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>([\w\d]+)\s*(=)</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>entity.name.type.machine-definition.ragel</string> | |
+ </dict> | |
+ <key>2</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.separator.key-value.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>(;)</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.terminator.machine-definition.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>meta.machine-definition.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#regexp</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#action_name</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#embedded_code</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#operators</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#comments</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>([\w\d]+)\s*(:=)</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>entity.name.type.machine-instantiation.ragel</string> | |
+ </dict> | |
+ <key>2</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.separator.key-value.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>;</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>1</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.terminator.machine-instantiation.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>meta.machine-instantiation.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#regexp</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#action_name</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#embedded_code</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#operators</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#comments</string> | |
+ </dict> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>\|\*</string> | |
+ <key>end</key> | |
+ <string>\*\|</string> | |
+ <key>name</key> | |
+ <string>meta.ragel.longest-match</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#source_ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>string</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>begin</key> | |
+ <string>"</string> | |
+ <key>beginCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.begin.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>"</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.end.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>string.quoted.double.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string_escaped_char</string> | |
+ </dict> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string_placeholder</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.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>end</key> | |
+ <string>'</string> | |
+ <key>endCaptures</key> | |
+ <dict> | |
+ <key>0</key> | |
+ <dict> | |
+ <key>name</key> | |
+ <string>punctuation.definition.string.end.ragel</string> | |
+ </dict> | |
+ </dict> | |
+ <key>name</key> | |
+ <string>string.quoted.single.ragel</string> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>include</key> | |
+ <string>#string_escaped_char</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>string_escaped_char</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})</string> | |
+ <key>name</key> | |
+ <string>constant.character.escape.ragel</string> | |
+ </dict> | |
+ <dict> | |
+ <key>match</key> | |
+ <string>\\.</string> | |
+ <key>name</key> | |
+ <string>invalid.illegal.unknown-escape.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ <key>string_placeholder</key> | |
+ <dict> | |
+ <key>patterns</key> | |
+ <array> | |
+ <dict> | |
+ <key>match</key> | |
+ <string>(?x)% | |
+ (\d+\$)? # field (argument #) | |
+ [#0\- +']* # flags | |
+ [,;:_]? # separator character (AltiVec) | |
+ ((-?\d+)|\*(-?\d+\$)?)? # minimum field width | |
+ (\.((-?\d+)|\*(-?\d+\$)?)?)? # precision | |
+ (hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier | |
+ [diouxXDOUeEfFgGaACcSspn%] # conversion type | |
+ </string> | |
+ <key>name</key> | |
+ <string>constant.other.placeholder.ragel</string> | |
+ </dict> | |
+ <dict> | |
+ <key>match</key> | |
+ <string>%</string> | |
+ <key>name</key> | |
+ <string>invalid.illegal.placeholder.ragel</string> | |
+ </dict> | |
+ </array> | |
+ </dict> | |
+ </dict> | |
+ <key>scopeName</key> | |
+ <string>source.ruby.ragel</string> | |
+ <key>uuid</key> | |
+ <string>5AE8E582-4C67-4604-903F-092D68109535</string> | |
+</dict> | |
+</plist> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment