'
#
# Returns the loaded plugin.
-def self.require_plugin path
+def require_plugin path
host_id, plugin_id = path.split '/', 2
host = PluginHost.host_by_id(host_id)
raise PluginHost::HostNotFound,
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/helpers/word_list.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/word_list.rb
similarity index 99%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/helpers/word_list.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/word_list.rb
index c8cc7ac27..5196a5d68 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/helpers/word_list.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/word_list.rb
@@ -104,7 +104,6 @@ class CaseIgnoringWordList < WordList
h[k] = h.fetch k.downcase, default
end
else
- super(default, false)
def self.[] key # :nodoc:
super(key.downcase)
end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanner.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanner.rb
similarity index 86%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanner.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanner.rb
index 229ba19c0..c956bad98 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanner.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanner.rb
@@ -4,6 +4,8 @@ module CodeRay
# = Scanners
#
+ # $Id: scanner.rb 222 2007-01-01 16:26:17Z murphy $
+ #
# This module holds the Scanner class and its subclasses.
# For example, the Ruby scanner is named CodeRay::Scanners::Ruby
# can be found in coderay/scanners/ruby.
@@ -43,7 +45,6 @@ module CodeRay
# You can also use +map+, +any?+, +find+ and even +sort_by+,
# if you want.
class Scanner < StringScanner
-
extend Plugin
plugin_host Scanners
@@ -56,8 +57,6 @@ module CodeRay
#
# Define @default_options for subclasses.
DEFAULT_OPTIONS = { :stream => false }
-
- KINDS_NOT_LOC = [:comment, :doctype]
class << self
@@ -67,16 +66,7 @@ module CodeRay
end
def normify code
- code = code.to_s
- if code.respond_to? :force_encoding
- begin
- code.force_encoding 'utf-8'
- code[/\z/] # raises an ArgumentError when code contains a non-UTF-8 char
- rescue ArgumentError
- code.force_encoding 'binary'
- end
- end
- code.to_unix
+ code = code.to_s.to_unix
end
def file_extension extension = nil
@@ -85,7 +75,7 @@ module CodeRay
else
@file_extension ||= plugin_id.to_s
end
- end
+ end
end
@@ -131,7 +121,6 @@ module CodeRay
"but :stream is #{@options[:stream]}" if block_given?
@tokens ||= Tokens.new
end
- @tokens.scanner = self
setup
end
@@ -189,16 +178,6 @@ module CodeRay
def line
string[0..pos].count("\n") + 1
end
-
- def column pos = self.pos
- return 0 if pos <= 0
- string = string()
- if string.respond_to?(:bytesize) && (defined?(@bin_string) || string.bytesize != string.size)
- @bin_string ||= string.dup.force_encoding(:binary)
- string = @bin_string
- end
- pos - (string.rindex(?\n, pos) || 0)
- end
protected
@@ -223,7 +202,6 @@ module CodeRay
def reset_instance
@tokens.clear unless @options[:keep_tokens]
@cached_tokens = nil
- @bin_string = nil if defined? @bin_string
end
# Scanner error with additional status information
@@ -236,7 +214,7 @@ module CodeRay
tokens:
%s
-current line: %d column: %d pos: %d
+current line: %d pos = %d
matched: %p state: %p
bol? = %p, eos? = %p
@@ -251,10 +229,10 @@ surrounding code:
msg,
tokens.size,
tokens.last(10).map { |t| t.inspect }.join("\n"),
- line, column, pos,
+ line, pos,
matched, state, bol?, eos?,
- string[pos - ambit, ambit],
- string[pos, ambit],
+ string[pos-ambit,ambit],
+ string[pos,ambit],
]
end
diff --git a/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/_map.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/_map.rb
new file mode 100644
index 000000000..1c5fc8922
--- /dev/null
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/_map.rb
@@ -0,0 +1,15 @@
+module CodeRay
+module Scanners
+
+ map :cpp => :c,
+ :plain => :plaintext,
+ :pascal => :delphi,
+ :irb => :ruby,
+ :xml => :html,
+ :xhtml => :nitro_xhtml,
+ :nitro => :nitro_xhtml
+
+ default :plain
+
+end
+end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/c.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/c.rb
similarity index 80%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/c.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/c.rb
index f175204c5..e5d87b233 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/c.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/c.rb
@@ -3,20 +3,22 @@ module Scanners
class C < Scanner
- include Streamable
-
register_for :c
- file_extension 'c'
+
+ include Streamable
RESERVED_WORDS = [
- 'asm', 'break', 'case', 'continue', 'default', 'do',
- 'else', 'enum', 'for', 'goto', 'if', 'return',
- 'sizeof', 'struct', 'switch', 'typedef', 'union', 'while',
- 'restrict', # C99
+ 'asm', 'break', 'case', 'continue', 'default', 'do', 'else',
+ 'for', 'goto', 'if', 'return', 'switch', 'while',
+ 'struct', 'union', 'enum', 'typedef',
+ 'static', 'register', 'auto', 'extern',
+ 'sizeof',
+ 'volatile', 'const', # C89
+ 'inline', 'restrict', # C99
]
PREDEFINED_TYPES = [
- 'int', 'long', 'short', 'char',
+ 'int', 'long', 'short', 'char', 'void',
'signed', 'unsigned', 'float', 'double',
'bool', 'complex', # C99
]
@@ -25,19 +27,13 @@ module Scanners
'EOF', 'NULL',
'true', 'false', # C99
]
- DIRECTIVES = [
- 'auto', 'extern', 'register', 'static', 'void',
- 'const', 'volatile', # C89
- 'inline', # C99
- ]
IDENT_KIND = WordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_TYPES, :pre_type).
- add(DIRECTIVES, :directive).
add(PREDEFINED_CONSTANTS, :pre_constant)
- ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
+ ESCAPE = / [rbfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
def scan_tokens tokens, options
@@ -63,19 +59,16 @@ module Scanners
match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
kind = :comment
- elsif scan(/ [-+*=<>?:;,!&^|()\[\]{}~%]+ | \/=? | \.(?!\d) /x)
+ elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) /x)
kind = :operator
elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
kind = IDENT_KIND[match]
if kind == :ident and check(/:(?!:)/)
- # FIXME: don't match a?b:c
+ match << scan(/:/)
kind = :label
end
- elsif scan(/\$/)
- kind = :ident
-
elsif match = scan(/L?"/)
tokens << [:open, :string]
if match[0] == ?L
@@ -98,7 +91,7 @@ module Scanners
elsif scan(/(?:0[0-7]+)(?![89.eEfF])/)
kind = :oct
- elsif scan(/(?:\d+)(?![.eEfF])L?L?/)
+ elsif scan(/(?:\d+)(?![.eEfF])/)
kind = :integer
elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
@@ -129,7 +122,7 @@ module Scanners
end
when :include_expected
- if scan(/<[^>\n]+>?|"[^"\n\\]*(?:\\.[^"\n\\]*)*"?/)
+ if scan(/[^\n]+/)
kind = :include
state = :initial
@@ -138,8 +131,8 @@ module Scanners
state = :initial if match.index ?\n
else
- state = :initial
- next
+ getch
+ kind = :error
end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/debug.rb
similarity index 95%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/debug.rb
index f43564efb..0dee38fa9 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/debug.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/debug.rb
@@ -6,8 +6,6 @@ module Scanners
include Streamable
register_for :debug
- file_extension 'raydebug'
- title 'CodeRay Token Dump'
protected
def scan_tokens tokens, options
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/delphi.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/delphi.rb
similarity index 99%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/delphi.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/delphi.rb
index 0975b2664..5ee07a3ad 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/delphi.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/delphi.rb
@@ -4,7 +4,6 @@ module Scanners
class Delphi < Scanner
register_for :delphi
- file_extension 'pas'
RESERVED_WORDS = [
'and', 'array', 'as', 'at', 'asm', 'at', 'begin', 'case', 'class',
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/html.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/html.rb
similarity index 92%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/html.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/html.rb
index d59fa691c..5f647d3a6 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/html.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/html.rb
@@ -2,17 +2,12 @@ module CodeRay
module Scanners
# HTML Scanner
+ #
+ # $Id$
class HTML < Scanner
include Streamable
register_for :html
-
- KINDS_NOT_LOC = [
- :comment, :doctype, :preprocessor,
- :tag, :attribute_name, :operator,
- :attribute_value, :delimiter, :content,
- :plain, :entity, :error
- ]
ATTR_NAME = /[\w.:-]+/
ATTR_VALUE_UNQUOTED = ATTR_NAME
@@ -70,14 +65,14 @@ module Scanners
if scan(//m)
kind = :comment
elsif scan(//m)
- kind = :doctype
+ kind = :preprocessor
elsif scan(/<\?xml.*?\?>/m)
kind = :preprocessor
elsif scan(/<\?.*?\?>|<%.*?%>/m)
kind = :comment
- elsif scan(/<\/[-\w.:]*>/m)
+ elsif scan(/<\/[-\w_.:]*>/m)
kind = :tag
- elsif match = scan(/<[-\w.:]+>?/m)
+ elsif match = scan(/<[-\w_.:]+>?/m)
kind = :tag
state = :attribute unless match[-1] == ?>
elsif scan(/[^<>&]+/)
diff --git a/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/java.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/java.rb
new file mode 100644
index 000000000..4c9ac0060
--- /dev/null
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/java.rb
@@ -0,0 +1,130 @@
+module CodeRay
+ module Scanners
+ class Java < Scanner
+
+ register_for :java
+
+ RESERVED_WORDS = %w(abstract assert break case catch class
+ const continue default do else enum extends final finally for
+ goto if implements import instanceof interface native new
+ package private protected public return static strictfp super switch
+ synchronized this throw throws transient try void volatile while)
+
+ PREDEFINED_TYPES = %w(boolean byte char double float int long short)
+
+ PREDEFINED_CONSTANTS = %w(true false null)
+
+ IDENT_KIND = WordList.new(:ident).
+ add(RESERVED_WORDS, :reserved).
+ add(PREDEFINED_TYPES, :pre_type).
+ add(PREDEFINED_CONSTANTS, :pre_constant)
+
+ ESCAPE = / [rbfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
+ UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
+
+ def scan_tokens tokens, options
+ state = :initial
+
+ until eos?
+ kind = nil
+ match = nil
+
+ case state
+ when :initial
+
+ if scan(/ \s+ | \\\n /x)
+ kind = :space
+
+ elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
+ kind = :comment
+
+ elsif match = scan(/ \# \s* if \s* 0 /x)
+ match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
+ kind = :comment
+
+ elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) /x)
+ kind = :operator
+
+ elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
+ kind = IDENT_KIND[match]
+ if kind == :ident and check(/:(?!:)/)
+ match << scan(/:/)
+ kind = :label
+ end
+
+ elsif match = scan(/L?"/)
+ tokens << [:open, :string]
+ if match[0] == ?L
+ tokens << ['L', :modifier]
+ match = '"'
+ end
+ state = :string
+ kind = :delimiter
+
+ elsif scan(%r! \@ .* !x)
+ kind = :preprocessor
+
+ elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox)
+ kind = :char
+
+ elsif scan(/0[xX][0-9A-Fa-f]+/)
+ kind = :hex
+
+ elsif scan(/(?:0[0-7]+)(?![89.eEfF])/)
+ kind = :oct
+
+ elsif scan(/(?:\d+)(?![.eEfF])/)
+ kind = :integer
+
+ elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
+ kind = :float
+
+ else
+ getch
+ kind = :error
+
+ end
+
+ when :string
+ if scan(/[^\\\n"]+/)
+ kind = :content
+ elsif scan(/"/)
+ tokens << ['"', :delimiter]
+ tokens << [:close, :string]
+ state = :initial
+ next
+ elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
+ kind = :char
+ elsif scan(/ \\ | $ /x)
+ tokens << [:close, :string]
+ kind = :error
+ state = :initial
+ else
+ raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
+ end
+
+ else
+ raise_inspect 'Unknown state', tokens
+
+ end
+
+ match ||= matched
+ if $DEBUG and not kind
+ raise_inspect 'Error token %p in line %d' %
+ [[match, kind], line], tokens
+ end
+ raise_inspect 'Empty token', tokens unless match
+
+ tokens << [match, kind]
+
+ end
+
+ if state == :string
+ tokens << [:close, :string]
+ end
+
+ tokens
+ end
+ end
+ end
+end
diff --git a/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/javascript.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/javascript.rb
new file mode 100644
index 000000000..419a5255b
--- /dev/null
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/javascript.rb
@@ -0,0 +1,176 @@
+# http://pastie.textmate.org/50774/
+module CodeRay module Scanners
+
+ class JavaScript < Scanner
+
+ register_for :javascript
+
+ RESERVED_WORDS = [
+ 'asm', 'break', 'case', 'continue', 'default', 'do', 'else',
+ 'for', 'goto', 'if', 'return', 'switch', 'while',
+# 'struct', 'union', 'enum', 'typedef',
+# 'static', 'register', 'auto', 'extern',
+# 'sizeof',
+ 'typeof',
+# 'volatile', 'const', # C89
+# 'inline', 'restrict', # C99
+ 'var', 'function','try','new','in',
+ 'instanceof','throw','catch'
+ ]
+
+ PREDEFINED_CONSTANTS = [
+ 'void', 'null', 'this',
+ 'true', 'false','undefined',
+ ]
+
+ IDENT_KIND = WordList.new(:ident).
+ add(RESERVED_WORDS, :reserved).
+ add(PREDEFINED_CONSTANTS, :pre_constant)
+
+ ESCAPE = / [rbfnrtv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
+ UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
+
+ def scan_tokens tokens, options
+
+ state = :initial
+ string_type = nil
+ regexp_allowed = true
+
+ until eos?
+
+ kind = :error
+ match = nil
+
+ if state == :initial
+
+ if scan(/ \s+ | \\\n /x)
+ kind = :space
+
+ elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
+ kind = :comment
+ regexp_allowed = false
+
+ elsif match = scan(/ \# \s* if \s* 0 /x)
+ match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
+ kind = :comment
+ regexp_allowed = false
+
+ elsif regexp_allowed and scan(/\//)
+ tokens << [:open, :regexp]
+ state = :regex
+ kind = :delimiter
+
+ elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%] | \.(?!\d) /x)
+ kind = :operator
+ regexp_allowed=true
+
+ elsif match = scan(/ [$A-Za-z_][A-Za-z_0-9]* /x)
+ kind = IDENT_KIND[match]
+# if kind == :ident and check(/:(?!:)/)
+# match << scan(/:/)
+# kind = :label
+# end
+ regexp_allowed=false
+
+ elsif match = scan(/["']/)
+ tokens << [:open, :string]
+ string_type = matched
+ state = :string
+ kind = :delimiter
+
+# elsif scan(/#\s*(\w*)/)
+# kind = :preprocessor # FIXME multiline preprocs
+# state = :include_expected if self[1] == 'include'
+#
+# elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox)
+# kind = :char
+
+ elsif scan(/0[xX][0-9A-Fa-f]+/)
+ kind = :hex
+ regexp_allowed=false
+
+ elsif scan(/(?:0[0-7]+)(?![89.eEfF])/)
+ kind = :oct
+ regexp_allowed=false
+
+ elsif scan(/(?:\d+)(?![.eEfF])/)
+ kind = :integer
+ regexp_allowed=false
+
+ elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
+ kind = :float
+ regexp_allowed=false
+
+ else
+ getch
+ end
+
+ elsif state == :regex
+ if scan(/[^\\\/]+/)
+ kind = :content
+ elsif scan(/\\\/|\\\\/)
+ kind = :content
+ elsif scan(/\//)
+ tokens << [matched, :delimiter]
+ tokens << [:close, :regexp]
+ state = :initial
+ next
+ else
+ getch
+ kind = :content
+ end
+
+ elsif state == :string
+ if scan(/[^\\"']+/)
+ kind = :content
+ elsif scan(/["']/)
+ if string_type==matched
+ tokens << [matched, :delimiter]
+ tokens << [:close, :string]
+ state = :initial
+ string_type=nil
+ next
+ else
+ kind = :content
+ end
+ elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
+ kind = :char
+ elsif scan(/ \\ | $ /x)
+ kind = :error
+ state = :initial
+ else
+ raise "else case \" reached; %p not handled." % peek(1), tokens
+ end
+
+# elsif state == :include_expected
+# if scan(/<[^>\n]+>?|"[^"\n\\]*(?:\\.[^"\n\\]*)*"?/)
+# kind = :include
+# state = :initial
+#
+# elsif match = scan(/\s+/)
+# kind = :space
+# state = :initial if match.index ?\n
+#
+# else
+# getch
+#
+# end
+#
+ else
+ raise 'else-case reached', tokens
+
+ end
+
+ match ||= matched
+# raise [match, kind], tokens if kind == :error
+
+ tokens << [match, kind]
+
+ end
+ tokens
+
+ end
+
+ end
+
+end end
\ No newline at end of file
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/nitro_xhtml.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/nitro_xhtml.rb
similarity index 96%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/nitro_xhtml.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/nitro_xhtml.rb
index 356e0492c..d7968cc83 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/nitro_xhtml.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/nitro_xhtml.rb
@@ -5,15 +5,13 @@ module Scanners
load :ruby
# Nitro XHTML Scanner
+ #
+ # $Id$
class NitroXHTML < Scanner
include Streamable
register_for :nitro_xhtml
- file_extension :xhtml
- title 'Nitro XHTML'
- KINDS_NOT_LOC = HTML::KINDS_NOT_LOC
-
NITRO_RUBY_BLOCK = /
<\?r
(?>
diff --git a/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/php.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/php.rb
new file mode 100644
index 000000000..0249e0ef4
--- /dev/null
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/php.rb
@@ -0,0 +1,165 @@
+module CodeRay module Scanners
+
+ class PHP < Scanner
+
+ register_for :php
+
+ RESERVED_WORDS = [
+ 'and', 'or', 'xor', '__FILE__', 'exception', '__LINE__', 'array', 'as', 'break', 'case',
+ 'class', 'const', 'continue', 'declare', 'default',
+ 'die', 'do', 'echo', 'else', 'elseif',
+ 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif',
+ 'endswitch', 'endwhile', 'eval', 'exit', 'extends',
+ 'for', 'foreach', 'function', 'global', 'if',
+ 'include', 'include_once', 'isset', 'list', 'new',
+ 'print', 'require', 'require_once', 'return', 'static',
+ 'switch', 'unset', 'use', 'var', 'while',
+ '__FUNCTION__', '__CLASS__', '__METHOD__', 'final', 'php_user_filter',
+ 'interface', 'implements', 'extends', 'public', 'private',
+ 'protected', 'abstract', 'clone', 'try', 'catch',
+ 'throw', 'cfunction', 'old_function'
+ ]
+
+ PREDEFINED_CONSTANTS = [
+ 'null', '$this', 'true', 'false'
+ ]
+
+ IDENT_KIND = WordList.new(:ident).
+ add(RESERVED_WORDS, :reserved).
+ add(PREDEFINED_CONSTANTS, :pre_constant)
+
+ ESCAPE = / [\$\wrbfnrtv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
+ UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
+
+ def scan_tokens tokens, options
+
+ state = :waiting_php
+ string_type = nil
+ regexp_allowed = true
+
+ until eos?
+
+ kind = :error
+ match = nil
+
+ if state == :initial
+
+ if scan(/ \s+ | \\\n /x)
+ kind = :space
+
+ elsif scan(/\?>/)
+ kind = :char
+ state = :waiting_php
+
+ elsif scan(%r{ (//|\#) [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) }mx)
+ kind = :comment
+ regexp_allowed = false
+
+ elsif match = scan(/ \# \s* if \s* 0 /x)
+ match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
+ kind = :comment
+ regexp_allowed = false
+
+ elsif regexp_allowed and scan(/\//)
+ tokens << [:open, :regexp]
+ state = :regex
+ kind = :delimiter
+
+ elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%] | \.(?!\d) /x)
+ kind = :operator
+ regexp_allowed=true
+
+ elsif match = scan(/ [$@A-Za-z_][A-Za-z_0-9]* /x)
+ kind = IDENT_KIND[match]
+ regexp_allowed=false
+
+ elsif match = scan(/["']/)
+ tokens << [:open, :string]
+ string_type = matched
+ state = :string
+ kind = :delimiter
+
+ elsif scan(/0[xX][0-9A-Fa-f]+/)
+ kind = :hex
+ regexp_allowed=false
+
+ elsif scan(/(?:0[0-7]+)(?![89.eEfF])/)
+ kind = :oct
+ regexp_allowed=false
+
+ elsif scan(/(?:\d+)(?![.eEfF])/)
+ kind = :integer
+ regexp_allowed=false
+
+ elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
+ kind = :float
+ regexp_allowed=false
+
+ else
+ getch
+ end
+
+ elsif state == :regex
+ if scan(/[^\\\/]+/)
+ kind = :content
+ elsif scan(/\\\/|\\/)
+ kind = :content
+ elsif scan(/\//)
+ tokens << [matched, :delimiter]
+ tokens << [:close, :regexp]
+ state = :initial
+ next
+ else
+ getch
+ kind = :content
+ end
+
+ elsif state == :string
+ if scan(/[^\\"']+/)
+ kind = :content
+ elsif scan(/["']/)
+ if string_type==matched
+ tokens << [matched, :delimiter]
+ tokens << [:close, :string]
+ state = :initial
+ string_type=nil
+ next
+ else
+ kind = :content
+ end
+ elsif scan(/ \\ (?: \S ) /mox)
+ kind = :char
+ elsif scan(/ \\ | $ /x)
+ kind = :error
+ state = :initial
+ else
+ raise "else case \" reached; %p not handled." % peek(1), tokens
+ end
+
+ elsif state == :waiting_php
+ if scan(/<\?php/m)
+ kind = :char
+ state = :initial
+ elsif scan(/[^<]+/)
+ kind = :comment
+ else
+ kind = :comment
+ getch
+ end
+ else
+ raise 'else-case reached', tokens
+
+ end
+
+ match ||= matched
+
+ tokens << [match, kind]
+
+ end
+ tokens
+
+ end
+
+ end
+
+end end
\ No newline at end of file
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/plaintext.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/plaintext.rb
similarity index 80%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/plaintext.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/plaintext.rb
index 6cbb1196c..7a08c3a55 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/plaintext.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/plaintext.rb
@@ -4,12 +4,9 @@ module Scanners
class Plaintext < Scanner
register_for :plaintext, :plain
- title 'Plain text'
include Streamable
-
- KINDS_NOT_LOC = [:plain]
-
+
def scan_tokens tokens, options
text = (scan_until(/\z/) || '')
tokens << [text, :plain]
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/rhtml.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/rhtml.rb
similarity index 95%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/rhtml.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/rhtml.rb
index 581f1f802..18cc60be6 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/rhtml.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/rhtml.rb
@@ -5,13 +5,12 @@ module Scanners
load :ruby
# RHTML Scanner
+ #
+ # $Id$
class RHTML < Scanner
include Streamable
register_for :rhtml
- title 'HTML ERB Template'
-
- KINDS_NOT_LOC = HTML::KINDS_NOT_LOC
ERB_RUBY_BLOCK = /
<%(?!%)[=-]?
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby.rb
similarity index 81%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby.rb
index cb9637b53..d49773181 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby.rb
@@ -21,10 +21,6 @@ module Scanners
file_extension 'rb'
helper :patterns
-
- if not defined? EncodingError
- EncodingError = Class.new Exception
- end
private
def scan_tokens tokens, options
@@ -35,10 +31,9 @@ module Scanners
state = :initial
depth = nil
inline_block_stack = []
- unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8'
-
+
patterns = Patterns # avoid constant lookup
-
+
until eos?
match = nil
kind = nil
@@ -129,15 +124,14 @@ module Scanners
# {{{
if match = scan(/[ \t\f]+/)
kind = :space
- match << scan(/\s*/) unless eos? || heredocs
- value_expected = true if match.index(?\n)
+ match << scan(/\s*/) unless eos? or heredocs
tokens << [match, kind]
next
elsif match = scan(/\\?\n/)
kind = :space
if match == "\n"
- value_expected = true
+ value_expected = true # FIXME not quite true
state = :initial if state == :undef_comma_expected
end
if heredocs
@@ -152,21 +146,17 @@ module Scanners
tokens << [match, kind]
next
- elsif bol? && match = scan(/\#!.*/)
- tokens << [match, :doctype]
- next
-
elsif match = scan(/\#.*/) or
( bol? and match = scan(/#{patterns::RUBYDOC_OR_DATA}/o) )
kind = :comment
+ value_expected = true
tokens << [match, kind]
next
elsif state == :initial
# IDENTS #
- if match = scan(unicode ? /#{patterns::METHOD_NAME}/uo :
- /#{patterns::METHOD_NAME}/o)
+ if match = scan(/#{patterns::METHOD_NAME}/o)
if last_token_dot
kind = if match[/^[A-Z]/] and not match?(/\(/) then :constant else :ident end
else
@@ -175,12 +165,13 @@ module Scanners
kind = :constant
elsif kind == :reserved
state = patterns::DEF_NEW_STATE[match]
- value_expected = :set if patterns::VALUE_EXPECTING_KEYWORDS[match]
end
end
- value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o)
+ ## experimental!
+ value_expected = :set if
+ patterns::REGEXP_ALLOWED[match] or check(/#{patterns::VALUE_FOLLOWS}/o)
- elsif last_token_dot and match = scan(/#{patterns::METHOD_NAME_OPERATOR}|\(/o)
+ elsif last_token_dot and match = scan(/#{patterns::METHOD_NAME_OPERATOR}/o)
kind = :ident
value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o)
@@ -199,7 +190,6 @@ module Scanners
depth -= 1
if depth == 0 # closing brace of inline block reached
state, depth, heredocs = inline_block_stack.pop
- heredocs = nil if heredocs && heredocs.empty?
tokens << [match, :inline_delimiter]
kind = :inline
match = :close
@@ -221,9 +211,8 @@ module Scanners
interpreted = true
state = patterns::StringState.new :regexp, interpreted, match
- # elsif match = scan(/[-+]?#{patterns::NUMERIC}/o)
- elsif match = value_expected ? scan(/[-+]?#{patterns::NUMERIC}/o) : scan(/#{patterns::NUMERIC}/o)
- kind = self[1] ? :float : :integer
+ elsif match = scan(/#{patterns::NUMERIC}/o)
+ kind = if self[1] then :float else :integer end
elsif match = scan(/#{patterns::SYMBOL}/o)
case delim = match[1]
@@ -285,41 +274,18 @@ module Scanners
else
kind = :error
- match = (scan(/./mu) rescue nil) || getch
- if !unicode && match.size > 1
- # warn 'Switchig to unicode mode: %p' % ['ä'[/#{patterns::METHOD_NAME}/uo]]
- unicode = true
- unscan
- next
- end
+ match = getch
end
elsif state == :def_expected
state = :initial
- if scan(/self\./)
- tokens << ['self', :pre_constant]
- tokens << ['.', :operator]
- end
- if match = scan(unicode ? /(?>#{patterns::METHOD_NAME_EX})(?!\.|::)/uo :
- /(?>#{patterns::METHOD_NAME_EX})(?!\.|::)/o)
+ if match = scan(/(?>#{patterns::METHOD_NAME_EX})(?!\.|::)/o)
kind = :method
else
next
end
- elsif state == :module_expected
- if match = scan(/<)
- kind = :operator
- else
- state = :initial
- if match = scan(/ (?:#{patterns::IDENT}::)* #{patterns::IDENT} /ox)
- kind = :class
- else
- next
- end
- end
-
elsif state == :undef_expected
state = :undef_comma_expected
if match = scan(/#{patterns::METHOD_NAME_EX}/o)
@@ -341,22 +307,6 @@ module Scanners
next
end
- elsif state == :alias_expected
- begin
- match = scan(unicode ? /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/uo :
- /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/o)
- rescue EncodingError
- raise if $DEBUG
- end
-
- if match
- tokens << [self[1], (self[1][0] == ?: ? :symbol : :method)]
- tokens << [self[2], :space]
- tokens << [self[3], (self[3][0] == ?: ? :symbol : :method)]
- end
- state = :initial
- next
-
elsif state == :undef_comma_expected
if match = scan(/,/)
kind = :operator
@@ -366,14 +316,24 @@ module Scanners
next
end
+ elsif state == :module_expected
+ if match = scan(/<)
+ kind = :operator
+ else
+ state = :initial
+ if match = scan(/ (?:#{patterns::IDENT}::)* #{patterns::IDENT} /ox)
+ kind = :class
+ else
+ next
+ end
+ end
+
end
# }}}
-
- unless kind == :error
- value_expected = value_expected == :set
- last_token_dot = last_token_dot == :set
- end
-
+
+ value_expected = value_expected == :set
+ last_token_dot = last_token_dot == :set
+
if $DEBUG and not kind
raise_inspect 'Error token %p in line %d' %
[[match, kind], line], tokens, state
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby/patterns.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby/patterns.rb
similarity index 72%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby/patterns.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby/patterns.rb
index 51ceba3c6..39962ec06 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/ruby/patterns.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby/patterns.rb
@@ -1,4 +1,3 @@
-# encoding: utf-8
module CodeRay
module Scanners
@@ -15,14 +14,19 @@ module Scanners
DEF_KEYWORDS = %w[ def ]
UNDEF_KEYWORDS = %w[ undef ]
- ALIAS_KEYWORDS = %w[ alias ]
MODULE_KEYWORDS = %w[class module]
DEF_NEW_STATE = WordList.new(:initial).
add(DEF_KEYWORDS, :def_expected).
add(UNDEF_KEYWORDS, :undef_expected).
- add(ALIAS_KEYWORDS, :alias_expected).
add(MODULE_KEYWORDS, :module_expected)
+ IDENTS_ALLOWING_REGEXP = %w[
+ and or not while until unless if then elsif when sub sub! gsub gsub!
+ scan slice slice! split
+ ]
+ REGEXP_ALLOWED = WordList.new(false).
+ add(IDENTS_ALLOWING_REGEXP, :set)
+
PREDEFINED_CONSTANTS = %w[
nil true false self
DATA ARGV ARGF __FILE__ __LINE__
@@ -32,25 +36,24 @@ module Scanners
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_CONSTANTS, :pre_constant)
- IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? /[[:alpha:]_][[:alnum:]_]*/ : /[^\W\d]\w*/
+ IDENT = /[a-z_][\w_]*/i
METHOD_NAME = / #{IDENT} [?!]? /ox
METHOD_NAME_OPERATOR = /
\*\*? # multiplication and power
- | [-+~]@? # plus, minus, tilde with and without at sign
- | [\/%&|^`] # division, modulo or format strings, and, or, xor, system
+ | [-+]@? # plus, minus
+ | [\/%&|^`~] # division, modulo or format strings, &and, |or, ^xor, `system`, tilde
| \[\]=? # array getter and setter
| << | >> # append or shift left, shift right
| <=?>? | >=? # comparison, rocket operator
- | ===? | =~ # simple equality, case equality, match
- | ![~=@]? # negation with and without at sign, not-equal and not-match
+ | ===? # simple equality and case equality
/ox
METHOD_NAME_EX = / #{IDENT} (?:[?!]|=(?!>))? | #{METHOD_NAME_OPERATOR} /ox
INSTANCE_VARIABLE = / @ #{IDENT} /ox
CLASS_VARIABLE = / @@ #{IDENT} /ox
OBJECT_VARIABLE = / @@? #{IDENT} /ox
GLOBAL_VARIABLE = / \$ (?: #{IDENT} | [1-9]\d* | 0\w* | [~&+`'=\/,;_.<>!@$?*":\\] | -[a-zA-Z_0-9] ) /ox
- PREFIX_VARIABLE = / #{GLOBAL_VARIABLE} | #{OBJECT_VARIABLE} /ox
+ PREFIX_VARIABLE = / #{GLOBAL_VARIABLE} |#{OBJECT_VARIABLE} /ox
VARIABLE = / @?@? #{IDENT} | #{GLOBAL_VARIABLE} /ox
QUOTE_TO_TYPE = {
@@ -60,7 +63,7 @@ module Scanners
QUOTE_TO_TYPE.default = :string
REGEXP_MODIFIERS = /[mixounse]*/
- REGEXP_SYMBOLS = /[|?*+(){}\[\].^$]/
+ REGEXP_SYMBOLS = /[|?*+?(){}\[\].^$]/
DECIMAL = /\d+(?:_\d+)*/
OCTAL = /0_?[0-7]+(?:_[0-7]+)*/
@@ -70,7 +73,7 @@ module Scanners
EXPONENT = / [eE] [+-]? #{DECIMAL} /ox
FLOAT_SUFFIX = / #{EXPONENT} | \. #{DECIMAL} #{EXPONENT}? /ox
FLOAT_OR_INT = / #{DECIMAL} (?: #{FLOAT_SUFFIX} () )? /ox
- NUMERIC = / (?: (?=0) (?: #{OCTAL} | #{HEXADECIMAL} | #{BINARY} ) | #{FLOAT_OR_INT} ) /ox
+ NUMERIC = / [-+]? (?: (?=0) (?: #{OCTAL} | #{HEXADECIMAL} | #{BINARY} ) | #{FLOAT_OR_INT} ) /ox
SYMBOL = /
:
@@ -80,32 +83,26 @@ module Scanners
| ['"]
)
/ox
- METHOD_NAME_OR_SYMBOL = / #{METHOD_NAME_EX} | #{SYMBOL} /ox
- SIMPLE_ESCAPE = /
+ # TODO investigste \M, \c and \C escape sequences
+ # (?: M-\\C-|C-\\M-|M-\\c|c\\M-|c|C-|M-)? (?: \\ (?: [0-7]{3} | x[0-9A-Fa-f]{2} | . ) )
+ # assert_equal(225, ?\M-a)
+ # assert_equal(129, ?\M-\C-a)
+ ESCAPE = /
[abefnrstv]
+ | M-\\C-|C-\\M-|M-\\c|c\\M-|c|C-|M-
| [0-7]{1,3}
| x[0-9A-Fa-f]{1,2}
- | .?
+ | .
/mx
-
- CONTROL_META_ESCAPE = /
- (?: M-|C-|c )
- (?: \\ (?: M-|C-|c ) )*
- (?: [^\\] | \\ #{SIMPLE_ESCAPE} )?
- /mox
-
- ESCAPE = /
- #{CONTROL_META_ESCAPE} | #{SIMPLE_ESCAPE}
- /mox
-
+
CHARACTER = /
\?
(?:
[^\s\\]
| \\ #{ESCAPE}
)
- /mox
+ /mx
# NOTE: This is not completely correct, but
# nobody needs heredoc delimiters ending with \n.
@@ -132,29 +129,25 @@ module Scanners
/mx
# Checks for a valid value to follow. This enables
- # value_expected in method calls without parentheses.
+ # fancy_allowed in method calls.
VALUE_FOLLOWS = /
- (?>[ \t\f\v]+)
+ \s+
(?:
[%\/][^\s=]
- | <<-?\S
- | [-+] \d
- | #{CHARACTER}
+ |
+ <<-?\S
+ |
+ #{CHARACTER}
)
/x
- VALUE_EXPECTING_KEYWORDS = WordList.new.add(%w[
- and end in or unless begin
- defined? ensure redo super until
- break do next rescue then
- when case else for retry
- while elsif if not return
- yield
- ])
RUBYDOC_OR_DATA = / #{RUBYDOC} | #{DATA} /xo
RDOC_DATA_START = / ^=begin (?!\S) | ^__END__$ /x
+ # FIXME: \s and = are only a workaround, they are still allowed
+ # as delimiters.
+ FANCY_START_SAVE = / % ( [qQwWxsr] | (?![a-zA-Z0-9\s=]) ) ([^a-zA-Z0-9]) /mx
FANCY_START_CORRECT = / % ( [qQwWxsr] | (?![a-zA-Z0-9]) ) ([^a-zA-Z0-9]) /mx
FancyStringType = {
@@ -177,18 +170,17 @@ module Scanners
{ }
] ]
- CLOSING_PAREN.each { |k,v| k.freeze; v.freeze } # debug, if I try to change it with <<
+ CLOSING_PAREN.values.each { |o| o.freeze } # debug, if I try to change it with <<
OPENING_PAREN = CLOSING_PAREN.invert
- STRING_PATTERN = Hash.new do |h, k|
+ STRING_PATTERN = Hash.new { |h, k|
delim, interpreted = *k
- delim_pattern = Regexp.escape(delim)
+ delim_pattern = Regexp.escape(delim.dup)
if closing_paren = CLOSING_PAREN[delim]
- delim_pattern = delim_pattern[0..-1] if defined? JRUBY_VERSION # JRuby fix
delim_pattern << Regexp.escape(closing_paren)
end
- delim_pattern << '\\\\' unless delim == '\\'
-
+
+
special_escapes =
case interpreted
when :regexp_symbols
@@ -196,16 +188,16 @@ module Scanners
when :words
'| \s'
end
-
+
h[k] =
if interpreted and not delim == '#'
- / (?= [#{delim_pattern}] | \# [{$@] #{special_escapes} ) /mx
+ / (?= [#{delim_pattern}\\] | \# [{$@] #{special_escapes} ) /mx
else
- / (?= [#{delim_pattern}] #{special_escapes} ) /mx
+ / (?= [#{delim_pattern}\\] #{special_escapes} ) /mx
end
- end
+ }
- HEREDOC_PATTERN = Hash.new do |h, k|
+ HEREDOC_PATTERN = Hash.new { |h, k|
delim, interpreted, indented = *k
delim_pattern = Regexp.escape(delim.dup)
delim_pattern = / \n #{ '(?>[\ \t]*)' if indented } #{ Regexp.new delim_pattern } $ /x
@@ -215,12 +207,12 @@ module Scanners
else
/ (?= #{delim_pattern}() | \\ ) /mx
end
- end
+ }
def initialize kind, interpreted, delim, heredoc = false
if heredoc
pattern = HEREDOC_PATTERN[ [delim, interpreted, heredoc == :indented] ]
- delim = nil
+ delim = nil
else
pattern = STRING_PATTERN[ [delim, interpreted] ]
if paren = CLOSING_PAREN[delim]
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/scheme.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/scheme.rb
similarity index 99%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/scheme.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/scheme.rb
index c869a30c4..2aee223a7 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/scheme.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/scheme.rb
@@ -6,7 +6,7 @@ module CodeRay
class Scheme < Scanner
register_for :scheme
- file_extension 'scm'
+ file_extension :scm
CORE_FORMS = %w[
lambda let let* letrec syntax-case define-syntax let-syntax
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/xml.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/xml.rb
similarity index 85%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/scanners/xml.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/xml.rb
index aeabeca86..ff923fbf5 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/xml.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/xml.rb
@@ -5,12 +5,13 @@ module Scanners
# XML Scanner
#
+ # $Id$
+ #
# Currently this is the same scanner as Scanners::HTML.
class XML < HTML
register_for :xml
- file_extension 'xml'
-
+
end
end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/style.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/style.rb
similarity index 100%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/style.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/style.rb
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/styles/_map.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/_map.rb
similarity index 100%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/styles/_map.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/_map.rb
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/styles/cycnus.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/cycnus.rb
similarity index 67%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/styles/cycnus.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/cycnus.rb
index 15ee4f4a2..7747c753f 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/styles/cycnus.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/cycnus.rb
@@ -8,7 +8,7 @@ module Styles
code_background = '#f8f8f8'
numbers_background = '#def'
border_color = 'silver'
- normal_color = '#000'
+ normal_color = '#100'
CSS_MAIN_STYLES = <<-MAIN
.CodeRay {
@@ -32,7 +32,6 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top }
text-align: right;
}
.CodeRay .line_numbers tt { font-weight: bold }
-.CodeRay .line_numbers .highlighted { color: red }
.CodeRay .no { padding: 0px 4px }
.CodeRay .code { width: 100% }
@@ -47,32 +46,28 @@ ol.CodeRay li { white-space: pre }
.af { color:#00C }
.an { color:#007 }
-.at { color:#f08 }
.av { color:#700 }
.aw { color:#C00 }
.bi { color:#509; font-weight:bold }
-.c { color:#888; }
+.c { color:#666; }
.ch { color:#04D }
.ch .k { color:#04D }
.ch .dl { color:#039 }
.cl { color:#B06; font-weight:bold }
-.cm { color:#A08; font-weight:bold }
.co { color:#036; font-weight:bold }
.cr { color:#0A0 }
.cv { color:#369 }
-.de { color:#B0B; }
.df { color:#099; font-weight:bold }
.di { color:#088; font-weight:bold }
.dl { color:black }
.do { color:#970 }
-.dt { color:#34b }
.ds { color:#D42; font-weight:bold }
.e { color:#666; font-weight:bold }
.en { color:#800; font-weight:bold }
.er { color:#F00; background-color:#FAA }
-.ex { color:#C00; font-weight:bold }
+.ex { color:#F00; font-weight:bold }
.fl { color:#60E; font-weight:bold }
.fu { color:#06B; font-weight:bold }
.gv { color:#d70; font-weight:bold }
@@ -80,13 +75,11 @@ ol.CodeRay li { white-space: pre }
.i { color:#00D; font-weight:bold }
.ic { color:#B44; font-weight:bold }
-.il { background: #ddd; color: black }
-.il .il { background: #ccc }
-.il .il .il { background: #bbb }
-.il .idl { background: #ddd; font-weight: bold; color: #666 }
-.idl { background-color: #bbb; font-weight: bold; color: #666; }
+.il { background: #eee }
+.il .il { background: #ddd }
+.il .il .il { background: #ccc }
+.il .idl { font-weight: bold; color: #888 }
-.im { color:#f00; }
.in { color:#B2B; font-weight:bold }
.iv { color:#33B }
.la { color:#970; font-weight:bold }
@@ -96,15 +89,9 @@ ol.CodeRay li { white-space: pre }
.op { }
.pc { color:#038; font-weight:bold }
.pd { color:#369; font-weight:bold }
-.pp { color:#579; }
-.ps { color:#00C; font-weight:bold; }
-.pt { color:#074; font-weight:bold }
-.r, .kw { color:#080; font-weight:bold }
-
-.ke { color: #808; }
-.ke .dl { color: #606; }
-.ke .ch { color: #80f; }
-.vl { color: #088; }
+.pp { color:#579 }
+.pt { color:#339; font-weight:bold }
+.r { color:#080; font-weight:bold }
.rx { background-color:#fff0ff }
.rx .k { color:#808 }
@@ -112,15 +99,14 @@ ol.CodeRay li { white-space: pre }
.rx .mod { color:#C2C }
.rx .fu { color:#404; font-weight: bold }
-.s { background-color:#fff0f0; color: #D20; }
-.s .s { background-color:#ffe0e0 }
-.s .s .s { background-color:#ffd0d0 }
-.s .k { }
-.s .ch { color: #b0b; }
-.s .dl { color: #710; }
+.s { background-color:#fff0f0 }
+.s .s { background-color:#ffe0e0 }
+.s .s .s { background-color:#ffd0d0 }
+.s .k { color:#D20 }
+.s .dl { color:#710 }
-.sh { background-color:#f0fff0; color:#2B2 }
-.sh .k { }
+.sh { background-color:#f0fff0 }
+.sh .k { color:#2B2 }
.sh .dl { color:#161 }
.sy { color:#A60 }
@@ -133,16 +119,6 @@ ol.CodeRay li { white-space: pre }
.ty { color:#339; font-weight:bold }
.v { color:#036 }
.xt { color:#444 }
-
-.ins { background: #afa; }
-.del { background: #faa; }
-.chg { color: #aaf; background: #007; }
-.head { color: #f8f; background: #505 }
-
-.ins .ins { color: #080; font-weight:bold }
-.del .del { color: #800; font-weight:bold }
-.chg .chg { color: #66f; }
-.head .head { color: #f4f; }
TOKENS
end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/styles/murphy.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/murphy.rb
similarity index 89%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/styles/murphy.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/murphy.rb
index 211ab6b05..b42f0e043 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/styles/murphy.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/styles/murphy.rb
@@ -84,9 +84,6 @@ ol.CodeRay li { white-space: pre; }
.pp { color:#579; }
.pt { color:#66f; font-weight:bold; }
.r { color:#5de; font-weight:bold; }
-.r, .kw { color:#5de; font-weight:bold }
-
-.ke { color: #808; }
.rx { background-color:#221133; }
.rx .k { color:#f8f; }
@@ -114,16 +111,6 @@ ol.CodeRay li { white-space: pre; }
.ty { color:#339; font-weight:bold; }
.v { color:#036; }
.xt { color:#444; }
-
-.ins { background: #afa; }
-.del { background: #faa; }
-.chg { color: #aaf; background: #007; }
-.head { color: #f8f; background: #505 }
-
-.ins .ins { color: #080; font-weight:bold }
-.del .del { color: #800; font-weight:bold }
-.chg .chg { color: #66f; }
-.head .head { color: #f4f; }
TOKENS
end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/token_classes.rb
similarity index 82%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/token_classes.rb
index ae35c0f68..d0de855a2 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/token_classes.rb
@@ -4,7 +4,6 @@ module CodeRay
h[k] = k.to_s
end
ClassOfKind.update with = {
- :annotation => 'at',
:attribute_name => 'an',
:attribute_name_fat => 'af',
:attribute_value => 'av',
@@ -15,15 +14,12 @@ module CodeRay
:class_variable => 'cv',
:color => 'cr',
:comment => 'c',
- :complex => 'cm',
:constant => 'co',
:content => 'k',
- :decorator => 'de',
:definition => 'df',
:delimiter => 'dl',
:directive => 'di',
:doc => 'do',
- :doctype => 'dt',
:doc_string => 'ds',
:entity => 'en',
:error => 'er',
@@ -33,16 +29,12 @@ module CodeRay
:function => 'fu',
:global_variable => 'gv',
:hex => 'hx',
- :imaginary => 'cm',
- :important => 'im',
:include => 'ic',
:inline => 'il',
:inline_delimiter => 'idl',
:instance_variable => 'iv',
:integer => 'i',
:interpreted => 'in',
- :keyword => 'kw',
- :key => 'ke',
:label => 'la',
:local_variable => 'lv',
:modifier => 'mod',
@@ -52,7 +44,6 @@ module CodeRay
:pre_type => 'pt',
:predefined => 'pd',
:preprocessor => 'pp',
- :pseudo_class => 'ps',
:regexp => 'rx',
:reserved => 'r',
:shell => 'sh',
@@ -63,13 +54,7 @@ module CodeRay
:tag_special => 'ts',
:type => 'ty',
:variable => 'v',
- :value => 'vl',
:xml_text => 'xt',
-
- :insert => 'ins',
- :delete => 'del',
- :change => 'chg',
- :head => 'head',
:ident => :NO_HIGHLIGHT, # 'id'
#:operator => 'op',
@@ -77,7 +62,7 @@ module CodeRay
:space => :NO_HIGHLIGHT, # 'sp'
:plain => :NO_HIGHLIGHT,
}
- ClassOfKind[:method] = ClassOfKind[:function]
+ ClassOfKind[:procedure] = ClassOfKind[:method] = ClassOfKind[:function]
ClassOfKind[:open] = ClassOfKind[:close] = ClassOfKind[:delimiter]
ClassOfKind[:nesting_delimiter] = ClassOfKind[:delimiter]
ClassOfKind[:escape] = ClassOfKind[:delimiter]
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/tokens.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/tokens.rb
similarity index 85%
rename from vendor/plugins/coderay-0.9.0/lib/coderay/tokens.rb
rename to vendor/plugins/coderay-0.7.6.227/lib/coderay/tokens.rb
index ec2b7306e..26c923f42 100644
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/tokens.rb
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/tokens.rb
@@ -46,10 +46,47 @@ module CodeRay
#
# Tokens' subclass TokenStream allows streaming to save memory.
class Tokens < Array
-
- # The Scanner instance that created the tokens.
- attr_accessor :scanner
-
+
+ class << self
+
+ # Convert the token to a string.
+ #
+ # This format is used by Encoders.Tokens.
+ # It can be reverted using read_token.
+ def write_token text, type
+ if text.is_a? String
+ "#{type}\t#{escape(text)}\n"
+ else
+ ":#{text}\t#{type}\t\n"
+ end
+ end
+
+ # Read a token from the string.
+ #
+ # Inversion of write_token.
+ #
+ # TODO Test this!
+ def read_token token
+ type, text = token.split("\t", 2)
+ if type[0] == ?:
+ [text.to_sym, type[1..-1].to_sym]
+ else
+ [type.to_sym, unescape(text)]
+ end
+ end
+
+ # Escapes a string for use in write_token.
+ def escape text
+ text.gsub(/[\n\\]/, '\\\\\&')
+ end
+
+ # Unescapes a string created by escape.
+ def unescape text
+ text.gsub(/\\[\n\\]/) { |m| m[1,1] }
+ end
+
+ end
+
# Whether the object is a TokenStream.
#
# Returns false.
@@ -109,6 +146,7 @@ module CodeRay
encode :text, options
end
+
# Redirects unknown methods to encoder calls.
#
# For example, if you call +tokens.html+, the HTML encoder
@@ -162,29 +200,25 @@ module CodeRay
#
# TODO: Test this!
def fix
- tokens = self.class.new
# Check token nesting using a stack of kinds.
opened = []
- for type, kind in self
- case type
- when :open
- opened.push [:close, kind]
- when :begin_line
- opened.push [:end_line, kind]
- when :close, :end_line
+ for token, kind in self
+ if token == :open
+ opened.push kind
+ elsif token == :close
expected = opened.pop
- if [type, kind] != expected
+ if kind != expected
# Unexpected :close; decide what to do based on the kind:
- # - token was never opened: delete the :close (just skip it)
- next unless opened.rindex expected
# - token was opened earlier: also close tokens in between
- tokens << token until (token = opened.pop) == expected
+ # - token was never opened: delete the :close (skip with next)
+ next unless opened.rindex expected
+ tokens << [:close, kind] until (kind = opened.pop) == expected
end
end
- tokens << [type, kind]
+ tokens << [token, kind]
end
# Close remaining opened tokens
- tokens << token while token = opened.pop
+ tokens << [:close, kind] while kind = opened.pop
tokens
end
@@ -192,8 +226,6 @@ module CodeRay
replace fix
end
- # TODO: Scanner#split_into_lines
- #
# Makes sure that:
# - newlines are single tokens
# (which means all other token are single-line)
@@ -321,7 +353,7 @@ module CodeRay
#
# Returns self.
def << token
- @callback.call(*token)
+ @callback.call token
@size += 1
self
end
@@ -344,48 +376,8 @@ module CodeRay
end
+
+ # Token name abbreviations
+ require 'coderay/token_classes'
+
end
-
-if $0 == __FILE__
- $VERBOSE = true
- $: << File.join(File.dirname(__FILE__), '..')
- eval DATA.read, nil, $0, __LINE__ + 4
-end
-
-__END__
-require 'test/unit'
-
-class TokensTest < Test::Unit::TestCase
-
- def test_creation
- assert CodeRay::Tokens < Array
- tokens = nil
- assert_nothing_raised do
- tokens = CodeRay::Tokens.new
- end
- assert_kind_of Array, tokens
- end
-
- def test_adding_tokens
- tokens = CodeRay::Tokens.new
- assert_nothing_raised do
- tokens << ['string', :type]
- tokens << ['()', :operator]
- end
- assert_equal tokens.size, 2
- end
-
- def test_dump_undump
- tokens = CodeRay::Tokens.new
- assert_nothing_raised do
- tokens << ['string', :type]
- tokens << ['()', :operator]
- end
- tokens2 = nil
- assert_nothing_raised do
- tokens2 = tokens.dump.undump
- end
- assert_equal tokens, tokens2
- end
-
-end
\ No newline at end of file
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/comment_filter.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/comment_filter.rb
deleted file mode 100644
index 62de6962c..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/comment_filter.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module CodeRay
-module Encoders
-
- load :token_class_filter
-
- class CommentFilter < TokenClassFilter
-
- register_for :comment_filter
-
- DEFAULT_OPTIONS = TokenClassFilter::DEFAULT_OPTIONS.merge \
- :exclude => [:comment]
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/filter.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/filter.rb
deleted file mode 100644
index cb784f612..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/filter.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module CodeRay
-module Encoders
-
- class Filter < Encoder
-
- register_for :filter
-
- protected
- def setup options
- @out = Tokens.new
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb
deleted file mode 100644
index 6d789c6d5..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-module CodeRay
-module Encoders
-
- # = JSON Encoder
- class JSON < Encoder
-
- register_for :json
- FILE_EXTENSION = 'json'
-
- protected
- def compile tokens, options
- require 'json'
- @out = tokens.to_a.to_json
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/lines_of_code.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/lines_of_code.rb
deleted file mode 100644
index 32c01927e..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/lines_of_code.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-module CodeRay
-module Encoders
-
- # Counts the LoC (Lines of Code). Returns an Integer >= 0.
- #
- # Everything that is not comment, markup, doctype/shebang, or an empty line,
- # is considered to be code.
- #
- # For example,
- # * HTML files not containing JavaScript have 0 LoC
- # * in a Java class without comments, LoC is the number of non-empty lines
- #
- # A Scanner class should define the token kinds that are not code in the
- # KINDS_NOT_LOC constant.
- class LinesOfCode < Encoder
-
- register_for :lines_of_code
-
- NON_EMPTY_LINE = /^\s*\S.*$/
-
- def compile tokens, options
- kinds_not_loc = tokens.scanner.class::KINDS_NOT_LOC
- code = tokens.token_class_filter :exclude => kinds_not_loc
- @loc = code.text.scan(NON_EMPTY_LINE).size
- end
-
- def finish options
- @loc
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/token_class_filter.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/token_class_filter.rb
deleted file mode 100644
index 97c75b73b..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/token_class_filter.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-module CodeRay
-module Encoders
-
- load :filter
-
- class TokenClassFilter < Filter
-
- include Streamable
- register_for :token_class_filter
-
- DEFAULT_OPTIONS = {
- :exclude => [],
- :include => :all
- }
-
- protected
- def setup options
- super
- @exclude = options[:exclude]
- @include = options[:include]
- end
-
- def text_token text, kind
- [text, kind] if \
- (@include == :all || @include.include?(kind)) &&
- !(@exclude == :all || @exclude.include?(kind))
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/for_redcloth.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/for_redcloth.rb
deleted file mode 100644
index 0857aba1d..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/for_redcloth.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-module CodeRay
-
- # A little hack to enable CodeRay highlighting in RedCloth.
- #
- # Usage:
- # require 'coderay'
- # require 'coderay/for_redcloth'
- # RedCloth.new('@[ruby]puts "Hello, World!"@').to_html
- #
- # Make sure you have RedCloth 4.0.3 activated, for example by calling
- # require 'rubygems'
- # before RedCloth is loaded and before calling CodeRay.for_redcloth.
- module ForRedCloth
-
- def self.install
- gem 'RedCloth', '>= 4.0.3' rescue nil
- require 'redcloth'
- unless RedCloth::VERSION.to_s >= '4.0.3'
- raise 'CodeRay.for_redcloth needs RedCloth version 4.0.3 or later.'
- end
- RedCloth::TextileDoc.send :include, ForRedCloth::TextileDoc
- RedCloth::Formatters::HTML.module_eval do
- def unescape(html)
- replacements = {
- '&' => '&',
- '"' => '"',
- '>' => '>',
- '<' => '<',
- }
- html.gsub(/&(?:amp|quot|[gl]t);/) { |entity| replacements[entity] }
- end
- undef code, bc_open, bc_close, escape_pre
- def code(opts) # :nodoc:
- opts[:block] = true
- if !opts[:lang] && RedCloth::VERSION.to_s >= '4.2.0'
- # simulating pre-4.2 behavior
- if opts[:text].sub!(/\A\[(\w+)\]/, '')
- if CodeRay::Scanners[$1].plugin_id == 'plaintext'
- opts[:text] = $& + opts[:text]
- else
- opts[:lang] = $1
- end
- end
- end
- if opts[:lang] && !filter_coderay
- require 'coderay'
- @in_bc ||= nil
- format = @in_bc ? :div : :span
- opts[:text] = unescape(opts[:text]) unless @in_bc
- highlighted_code = CodeRay.encode opts[:text], opts[:lang], format, :stream => true
- highlighted_code.sub!(/\A<(span|div)/) { |m| m + pba(@in_bc || opts) }
- highlighted_code
- else
- "#{opts[:text]}
"
- end
- end
- def bc_open(opts) # :nodoc:
- opts[:block] = true
- @in_bc = opts
- opts[:lang] ? '' : ""
- end
- def bc_close(opts) # :nodoc:
- opts = @in_bc
- @in_bc = nil
- opts[:lang] ? '' : "
\n"
- end
- def escape_pre(text)
- if @in_bc ||= nil
- text
- else
- html_esc(text, :html_escape_preformatted)
- end
- end
- end
- end
-
- module TextileDoc # :nodoc:
- attr_accessor :filter_coderay
- end
-
- end
-
-end
-
-CodeRay::ForRedCloth.install
\ No newline at end of file
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/_map.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/_map.rb
deleted file mode 100644
index 01078c1a4..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/_map.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-module CodeRay
-module Scanners
-
- map \
- :h => :c,
- :cplusplus => :cpp,
- :'c++' => :cpp,
- :ecma => :java_script,
- :ecmascript => :java_script,
- :ecma_script => :java_script,
- :irb => :ruby,
- :javascript => :java_script,
- :js => :java_script,
- :nitro => :nitro_xhtml,
- :pascal => :delphi,
- :plain => :plaintext,
- :xhtml => :html,
- :yml => :yaml
-
- default :plain
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/cpp.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/cpp.rb
deleted file mode 100644
index 0b92ef9e1..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/cpp.rb
+++ /dev/null
@@ -1,197 +0,0 @@
-module CodeRay
-module Scanners
-
- class CPlusPlus < Scanner
-
- include Streamable
-
- register_for :cpp
- file_extension 'cpp'
- title 'C++'
-
- # http://www.cppreference.com/wiki/keywords/start
- RESERVED_WORDS = [
- 'and', 'and_eq', 'asm', 'bitand', 'bitor', 'break',
- 'case', 'catch', 'class', 'compl', 'const_cast',
- 'continue', 'default', 'delete', 'do', 'dynamic_cast', 'else',
- 'enum', 'export', 'for', 'goto', 'if', 'namespace', 'new',
- 'not', 'not_eq', 'or', 'or_eq', 'reinterpret_cast', 'return',
- 'sizeof', 'static_cast', 'struct', 'switch', 'template',
- 'throw', 'try', 'typedef', 'typeid', 'typename', 'union',
- 'while', 'xor', 'xor_eq'
- ]
-
- PREDEFINED_TYPES = [
- 'bool', 'char', 'double', 'float', 'int', 'long',
- 'short', 'signed', 'unsigned', 'wchar_t', 'string'
- ]
- PREDEFINED_CONSTANTS = [
- 'false', 'true',
- 'EOF', 'NULL',
- ]
- PREDEFINED_VARIABLES = [
- 'this'
- ]
- DIRECTIVES = [
- 'auto', 'const', 'explicit', 'extern', 'friend', 'inline', 'mutable', 'operator',
- 'private', 'protected', 'public', 'register', 'static', 'using', 'virtual', 'void',
- 'volatile'
- ]
-
- IDENT_KIND = WordList.new(:ident).
- add(RESERVED_WORDS, :reserved).
- add(PREDEFINED_TYPES, :pre_type).
- add(PREDEFINED_VARIABLES, :local_variable).
- add(DIRECTIVES, :directive).
- add(PREDEFINED_CONSTANTS, :pre_constant)
-
- ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
-
- def scan_tokens tokens, options
-
- state = :initial
-
- until eos?
-
- kind = nil
- match = nil
-
- case state
-
- when :initial
-
- if scan(/ \s+ | \\\n /x)
- kind = :space
-
- elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
- kind = :comment
-
- elsif match = scan(/ \# \s* if \s* 0 /x)
- match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
- kind = :comment
-
- elsif scan(/ [-+*=<>?:;,!&^|()\[\]{}~%]+ | \/=? | \.(?!\d) /x)
- kind = :operator
-
- elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
- kind = IDENT_KIND[match]
- if kind == :ident and check(/:(?!:)/)
- # FIXME: don't match a?b:c
- kind = :label
- elsif match == 'class'
- state = :class_name_expected
- end
-
- elsif scan(/\$/)
- kind = :ident
-
- elsif match = scan(/L?"/)
- tokens << [:open, :string]
- if match[0] == ?L
- tokens << ['L', :modifier]
- match = '"'
- end
- state = :string
- kind = :delimiter
-
- elsif scan(/#\s*(\w*)/)
- kind = :preprocessor
- state = :include_expected if self[1] == 'include'
-
- elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox)
- kind = :char
-
- elsif scan(/0[xX][0-9A-Fa-f]+/)
- kind = :hex
-
- elsif scan(/(?:0[0-7]+)(?![89.eEfF])/)
- kind = :oct
-
- elsif scan(/(?:\d+)(?![.eEfF])L?L?/)
- kind = :integer
-
- elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
- kind = :float
-
- else
- getch
- kind = :error
-
- end
-
- when :string
- if scan(/[^\\"]+/)
- kind = :content
- elsif scan(/"/)
- tokens << ['"', :delimiter]
- tokens << [:close, :string]
- state = :initial
- next
- elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
- kind = :char
- elsif scan(/ \\ | $ /x)
- tokens << [:close, :string]
- kind = :error
- state = :initial
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- when :include_expected
- if scan(/<[^>\n]+>?|"[^"\n\\]*(?:\\.[^"\n\\]*)*"?/)
- kind = :include
- state = :initial
-
- elsif match = scan(/\s+/)
- kind = :space
- state = :initial if match.index ?\n
-
- else
- state = :initial
- next
-
- end
-
- when :class_name_expected
- if scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
- kind = :class
- state = :initial
-
- elsif match = scan(/\s+/)
- kind = :space
-
- else
- getch
- kind = :error
- state = :initial
-
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
-
- if state == :string
- tokens << [:close, :string]
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/css.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/css.rb
deleted file mode 100644
index 93e8d8050..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/css.rb
+++ /dev/null
@@ -1,210 +0,0 @@
-module CodeRay
-module Scanners
-
- class CSS < Scanner
-
- register_for :css
-
- KINDS_NOT_LOC = [
- :comment,
- :class, :pseudo_class, :type,
- :constant, :directive,
- :key, :value, :operator, :color, :float,
- :error, :important,
- ]
-
- module RE
- NonASCII = /[\x80-\xFF]/
- Hex = /[0-9a-fA-F]/
- Unicode = /\\#{Hex}{1,6}(?:\r\n|\s)?/ # differs from standard because it allows uppercase hex too
- Escape = /#{Unicode}|\\[^\r\n\f0-9a-fA-F]/
- NMChar = /[-_a-zA-Z0-9]|#{NonASCII}|#{Escape}/
- NMStart = /[_a-zA-Z]|#{NonASCII}|#{Escape}/
- NL = /\r\n|\r|\n|\f/
- String1 = /"(?:[^\n\r\f\\"]|\\#{NL}|#{Escape})*"?/ # FIXME: buggy regexp
- String2 = /'(?:[^\n\r\f\\']|\\#{NL}|#{Escape})*'?/ # FIXME: buggy regexp
- String = /#{String1}|#{String2}/
-
- HexColor = /#(?:#{Hex}{6}|#{Hex}{3})/
- Color = /#{HexColor}/
-
- Num = /-?(?:[0-9]+|[0-9]*\.[0-9]+)/
- Name = /#{NMChar}+/
- Ident = /-?#{NMStart}#{NMChar}*/
- AtKeyword = /@#{Ident}/
- Percentage = /#{Num}%/
-
- reldimensions = %w[em ex px]
- absdimensions = %w[in cm mm pt pc]
- Unit = Regexp.union(*(reldimensions + absdimensions))
-
- Dimension = /#{Num}#{Unit}/
-
- Comment = %r! /\* (?: .*? \*/ | .* ) !mx
- Function = /(?:url|alpha)\((?:[^)\n\r\f]|\\\))*\)?/
-
- Id = /##{Name}/
- Class = /\.#{Name}/
- PseudoClass = /:#{Name}/
- AttributeSelector = /\[[^\]]*\]?/
-
- end
-
- def scan_tokens tokens, options
-
- value_expected = nil
- states = [:initial]
-
- until eos?
-
- kind = nil
- match = nil
-
- if scan(/\s+/)
- kind = :space
-
- elsif case states.last
- when :initial, :media
- if scan(/(?>#{RE::Ident})(?!\()|\*/ox)
- kind = :type
- elsif scan RE::Class
- kind = :class
- elsif scan RE::Id
- kind = :constant
- elsif scan RE::PseudoClass
- kind = :pseudo_class
- elsif match = scan(RE::AttributeSelector)
- # TODO: Improve highlighting inside of attribute selectors.
- tokens << [:open, :string]
- tokens << [match[0,1], :delimiter]
- tokens << [match[1..-2], :content] if match.size > 2
- tokens << [match[-1,1], :delimiter] if match[-1] == ?]
- tokens << [:close, :string]
- next
- elsif match = scan(/@media/)
- kind = :directive
- states.push :media_before_name
- end
-
- when :block
- if scan(/(?>#{RE::Ident})(?!\()/ox)
- if value_expected
- kind = :value
- else
- kind = :key
- end
- end
-
- when :media_before_name
- if scan RE::Ident
- kind = :type
- states[-1] = :media_after_name
- end
-
- when :media_after_name
- if scan(/\{/)
- kind = :operator
- states[-1] = :media
- end
-
- when :comment
- if scan(/(?:[^*\s]|\*(?!\/))+/)
- kind = :comment
- elsif scan(/\*\//)
- kind = :comment
- states.pop
- elsif scan(/\s+/)
- kind = :space
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- elsif scan(/\/\*/)
- kind = :comment
- states.push :comment
-
- elsif scan(/\{/)
- value_expected = false
- kind = :operator
- states.push :block
-
- elsif scan(/\}/)
- value_expected = false
- if states.last == :block || states.last == :media
- kind = :operator
- states.pop
- else
- kind = :error
- end
-
- elsif match = scan(/#{RE::String}/o)
- tokens << [:open, :string]
- tokens << [match[0, 1], :delimiter]
- tokens << [match[1..-2], :content] if match.size > 2
- tokens << [match[-1, 1], :delimiter] if match.size >= 2
- tokens << [:close, :string]
- next
-
- elsif match = scan(/#{RE::Function}/o)
- tokens << [:open, :string]
- start = match[/^\w+\(/]
- tokens << [start, :delimiter]
- if match[-1] == ?)
- tokens << [match[start.size..-2], :content]
- tokens << [')', :delimiter]
- else
- tokens << [match[start.size..-1], :content]
- end
- tokens << [:close, :string]
- next
-
- elsif scan(/(?: #{RE::Dimension} | #{RE::Percentage} | #{RE::Num} )/ox)
- kind = :float
-
- elsif scan(/#{RE::Color}/o)
- kind = :color
-
- elsif scan(/! *important/)
- kind = :important
-
- elsif scan(/rgb\([^()\n]*\)?/)
- kind = :color
-
- elsif scan(/#{RE::AtKeyword}/o)
- kind = :directive
-
- elsif match = scan(/ [+>:;,.=()\/] /x)
- if match == ':'
- value_expected = true
- elsif match == ';'
- value_expected = false
- end
- kind = :operator
-
- else
- getch
- kind = :error
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/diff.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/diff.rb
deleted file mode 100644
index bfb400be3..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/diff.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-module CodeRay
-module Scanners
-
- class Diff < Scanner
-
- register_for :diff
- title 'diff output'
-
- def scan_tokens tokens, options
-
- line_kind = nil
- state = :initial
-
- until eos?
- kind = match = nil
-
- if match = scan(/\n/)
- if line_kind
- tokens << [:end_line, line_kind]
- line_kind = nil
- end
- tokens << [match, :space]
- next
- end
-
- case state
-
- when :initial
- if match = scan(/--- |\+\+\+ |=+|_+/)
- tokens << [:begin_line, line_kind = :head]
- tokens << [match, :head]
- next unless match = scan(/.+/)
- kind = :plain
- elsif match = scan(/Index: |Property changes on: /)
- tokens << [:begin_line, line_kind = :head]
- tokens << [match, :head]
- next unless match = scan(/.+/)
- kind = :plain
- elsif match = scan(/Added: /)
- tokens << [:begin_line, line_kind = :head]
- tokens << [match, :head]
- next unless match = scan(/.+/)
- kind = :plain
- state = :added
- elsif match = scan(/\\ /)
- tokens << [:begin_line, line_kind = :change]
- tokens << [match, :change]
- next unless match = scan(/.+/)
- kind = :plain
- elsif scan(/(@@)((?>[^@\n]*))(@@)/)
- tokens << [:begin_line, line_kind = :change]
- tokens << [self[1], :change]
- tokens << [self[2], :plain]
- tokens << [self[3], :change]
- next unless match = scan(/.+/)
- kind = :plain
- elsif match = scan(/\+/)
- tokens << [:begin_line, line_kind = :insert]
- tokens << [match, :insert]
- next unless match = scan(/.+/)
- kind = :plain
- elsif match = scan(/-/)
- tokens << [:begin_line, line_kind = :delete]
- tokens << [match, :delete]
- next unless match = scan(/.+/)
- kind = :plain
- elsif scan(/ .*/)
- kind = :comment
- elsif scan(/.+/)
- tokens << [:begin_line, line_kind = :head]
- kind = :plain
- else
- raise_inspect 'else case rached'
- end
-
- when :added
- if match = scan(/ \+/)
- tokens << [:begin_line, line_kind = :insert]
- tokens << [match, :insert]
- next unless match = scan(/.+/)
- kind = :plain
- else
- state = :initial
- next
- end
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
- end
-
- tokens << [:end_line, line_kind] if line_kind
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/groovy.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/groovy.rb
deleted file mode 100644
index e8901bf25..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/groovy.rb
+++ /dev/null
@@ -1,263 +0,0 @@
-module CodeRay
-module Scanners
-
- load :java
-
- class Groovy < Java
-
- include Streamable
- register_for :groovy
-
- # TODO: Check this!
- GROOVY_KEYWORDS = %w[
- as assert def in
- ]
- KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[
- case instanceof new return throw typeof while as assert in
- ]
- GROOVY_MAGIC_VARIABLES = %w[ it ]
-
- IDENT_KIND = Java::IDENT_KIND.dup.
- add(GROOVY_KEYWORDS, :keyword).
- add(GROOVY_MAGIC_VARIABLES, :local_variable)
-
- ESCAPE = / [bfnrtv$\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x # no 4-byte unicode chars? U[a-fA-F0-9]{8}
- REGEXP_ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | \d | [bBdDsSwW\/] /x
-
- # TODO: interpretation inside ', ", /
- STRING_CONTENT_PATTERN = {
- "'" => /(?>\\[^\\'\n]+|[^\\'\n]+)+/,
- '"' => /[^\\$"\n]+/,
- "'''" => /(?>[^\\']+|'(?!''))+/,
- '"""' => /(?>[^\\$"]+|"(?!""))+/,
- '/' => /[^\\$\/\n]+/,
- }
-
- def scan_tokens tokens, options
-
- state = :initial
- inline_block_stack = []
- inline_block_paren_depth = nil
- string_delimiter = nil
- import_clause = class_name_follows = last_token = after_def = false
- value_expected = true
-
- until eos?
-
- kind = nil
- match = nil
-
- case state
-
- when :initial
-
- if match = scan(/ \s+ | \\\n /x)
- tokens << [match, :space]
- if match.index ?\n
- import_clause = after_def = false
- value_expected = true unless value_expected
- end
- next
-
- elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
- value_expected = true
- after_def = false
- kind = :comment
-
- elsif bol? && scan(/ \#!.* /x)
- kind = :doctype
-
- elsif import_clause && scan(/ (?!as) #{IDENT} (?: \. #{IDENT} )* (?: \.\* )? /ox)
- after_def = value_expected = false
- kind = :include
-
- elsif match = scan(/ #{IDENT} | \[\] /ox)
- kind = IDENT_KIND[match]
- value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match]
- if last_token == '.'
- kind = :ident
- elsif class_name_follows
- kind = :class
- class_name_follows = false
- elsif after_def && check(/\s*[({]/)
- kind = :method
- after_def = false
- elsif kind == :ident && last_token != '?' && check(/:/)
- kind = :key
- else
- class_name_follows = true if match == 'class' || (import_clause && match == 'as')
- import_clause = match == 'import'
- after_def = true if match == 'def'
- end
-
- elsif scan(/;/)
- import_clause = after_def = false
- value_expected = true
- kind = :operator
-
- elsif scan(/\{/)
- class_name_follows = after_def = false
- value_expected = true
- kind = :operator
- if !inline_block_stack.empty?
- inline_block_paren_depth += 1
- end
-
- # TODO: ~'...', ~"..." and ~/.../ style regexps
- elsif match = scan(/ \.\. | \*?\.(?!\d)@? | \.& | \?:? | [,?:(\[] | -[->] | \+\+ |
- && | \|\| | \*\*=? | ==?~ | <=?>? | [-+*%^~&|>=!]=? | <<=? | >>>?=? /x)
- value_expected = true
- value_expected = :regexp if match == '~'
- after_def = false
- kind = :operator
-
- elsif match = scan(/ [)\]}] /x)
- value_expected = after_def = false
- if !inline_block_stack.empty? && match == '}'
- inline_block_paren_depth -= 1
- if inline_block_paren_depth == 0 # closing brace of inline block reached
- tokens << [match, :inline_delimiter]
- tokens << [:close, :inline]
- state, string_delimiter, inline_block_paren_depth = inline_block_stack.pop
- next
- end
- end
-
- elsif check(/[\d.]/)
- after_def = value_expected = false
- if scan(/0[xX][0-9A-Fa-f]+/)
- kind = :hex
- elsif scan(/(?>0[0-7]+)(?![89.eEfF])/)
- kind = :oct
- elsif scan(/\d+[fFdD]|\d*\.\d+(?:[eE][+-]?\d+)?[fFdD]?|\d+[eE][+-]?\d+[fFdD]?/)
- kind = :float
- elsif scan(/\d+[lLgG]?/)
- kind = :integer
- end
-
- elsif match = scan(/'''|"""/)
- after_def = value_expected = false
- state = :multiline_string
- tokens << [:open, :string]
- string_delimiter = match
- kind = :delimiter
-
- # TODO: record.'name'
- elsif match = scan(/["']/)
- after_def = value_expected = false
- state = match == '/' ? :regexp : :string
- tokens << [:open, state]
- string_delimiter = match
- kind = :delimiter
-
- elsif value_expected && (match = scan(/\//))
- after_def = value_expected = false
- tokens << [:open, :regexp]
- state = :regexp
- string_delimiter = '/'
- kind = :delimiter
-
- elsif scan(/ @ #{IDENT} /ox)
- after_def = value_expected = false
- kind = :annotation
-
- elsif scan(/\//)
- after_def = false
- value_expected = true
- kind = :operator
-
- else
- getch
- kind = :error
-
- end
-
- when :string, :regexp, :multiline_string
- if scan(STRING_CONTENT_PATTERN[string_delimiter])
- kind = :content
-
- elsif match = scan(state == :multiline_string ? /'''|"""/ : /["'\/]/)
- tokens << [match, :delimiter]
- if state == :regexp
- # TODO: regexp modifiers? s, m, x, i?
- modifiers = scan(/[ix]+/)
- tokens << [modifiers, :modifier] if modifiers && !modifiers.empty?
- end
- state = :string if state == :multiline_string
- tokens << [:close, state]
- string_delimiter = nil
- after_def = value_expected = false
- state = :initial
- next
-
- elsif (state == :string || state == :multiline_string) &&
- (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox))
- if string_delimiter[0] == ?' && !(match == "\\\\" || match == "\\'")
- kind = :content
- else
- kind = :char
- end
- elsif state == :regexp && scan(/ \\ (?: #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
- kind = :char
-
- elsif match = scan(/ \$ #{IDENT} /mox)
- tokens << [:open, :inline]
- tokens << ['$', :inline_delimiter]
- match = match[1..-1]
- tokens << [match, IDENT_KIND[match]]
- tokens << [:close, :inline]
- next
- elsif match = scan(/ \$ \{ /x)
- tokens << [:open, :inline]
- tokens << ['${', :inline_delimiter]
- inline_block_stack << [state, string_delimiter, inline_block_paren_depth]
- inline_block_paren_depth = 1
- state = :initial
- next
-
- elsif scan(/ \$ /mx)
- kind = :content
-
- elsif scan(/ \\. /mx)
- kind = :content
-
- elsif scan(/ \\ | \n /x)
- tokens << [:close, state]
- kind = :error
- after_def = value_expected = false
- state = :initial
-
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- last_token = match unless [:space, :comment, :doctype].include? kind
-
- tokens << [match, kind]
-
- end
-
- if [:multiline_string, :string, :regexp].include? state
- tokens << [:close, state]
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java.rb
deleted file mode 100644
index 73a2dc59c..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-module CodeRay
-module Scanners
-
- class Java < Scanner
-
- include Streamable
- register_for :java
- helper :builtin_types
-
- # http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
- KEYWORDS = %w[
- assert break case catch continue default do else
- finally for if instanceof import new package
- return switch throw try typeof while
- debugger export
- ]
- RESERVED = %w[ const goto ]
- CONSTANTS = %w[ false null true ]
- MAGIC_VARIABLES = %w[ this super ]
- TYPES = %w[
- boolean byte char class double enum float int interface long
- short void
- ] << '[]' # String[] should be highlighted as a type
- DIRECTIVES = %w[
- abstract extends final implements native private protected public
- static strictfp synchronized throws transient volatile
- ]
-
- IDENT_KIND = WordList.new(:ident).
- add(KEYWORDS, :keyword).
- add(RESERVED, :reserved).
- add(CONSTANTS, :pre_constant).
- add(MAGIC_VARIABLES, :local_variable).
- add(TYPES, :type).
- add(BuiltinTypes::List, :pre_type).
- add(BuiltinTypes::List.select { |builtin| builtin[/(Error|Exception)$/] }, :exception).
- add(DIRECTIVES, :directive)
-
- ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
- STRING_CONTENT_PATTERN = {
- "'" => /[^\\']+/,
- '"' => /[^\\"]+/,
- '/' => /[^\\\/]+/,
- }
- IDENT = /[a-zA-Z_][A-Za-z_0-9]*/
-
- def scan_tokens tokens, options
-
- state = :initial
- string_delimiter = nil
- import_clause = class_name_follows = last_token_dot = false
-
- until eos?
-
- kind = nil
- match = nil
-
- case state
-
- when :initial
-
- if match = scan(/ \s+ | \\\n /x)
- tokens << [match, :space]
- next
-
- elsif match = scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
- tokens << [match, :comment]
- next
-
- elsif import_clause && scan(/ #{IDENT} (?: \. #{IDENT} )* /ox)
- kind = :include
-
- elsif match = scan(/ #{IDENT} | \[\] /ox)
- kind = IDENT_KIND[match]
- if last_token_dot
- kind = :ident
- elsif class_name_follows
- kind = :class
- class_name_follows = false
- else
- import_clause = true if match == 'import'
- class_name_follows = true if match == 'class' || match == 'interface'
- end
-
- elsif scan(/ \.(?!\d) | [,?:()\[\]}] | -- | \+\+ | && | \|\| | \*\*=? | [-+*\/%^~&|<>=!]=? | <<=? | >>>?=? /x)
- kind = :operator
-
- elsif scan(/;/)
- import_clause = false
- kind = :operator
-
- elsif scan(/\{/)
- class_name_follows = false
- kind = :operator
-
- elsif check(/[\d.]/)
- if scan(/0[xX][0-9A-Fa-f]+/)
- kind = :hex
- elsif scan(/(?>0[0-7]+)(?![89.eEfF])/)
- kind = :oct
- elsif scan(/\d+[fFdD]|\d*\.\d+(?:[eE][+-]?\d+)?[fFdD]?|\d+[eE][+-]?\d+[fFdD]?/)
- kind = :float
- elsif scan(/\d+[lL]?/)
- kind = :integer
- end
-
- elsif match = scan(/["']/)
- tokens << [:open, :string]
- state = :string
- string_delimiter = match
- kind = :delimiter
-
- elsif scan(/ @ #{IDENT} /ox)
- kind = :annotation
-
- else
- getch
- kind = :error
-
- end
-
- when :string
- if scan(STRING_CONTENT_PATTERN[string_delimiter])
- kind = :content
- elsif match = scan(/["'\/]/)
- tokens << [match, :delimiter]
- tokens << [:close, state]
- string_delimiter = nil
- state = :initial
- next
- elsif state == :string && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox))
- if string_delimiter == "'" && !(match == "\\\\" || match == "\\'")
- kind = :content
- else
- kind = :char
- end
- elsif scan(/\\./m)
- kind = :content
- elsif scan(/ \\ | $ /x)
- tokens << [:close, :delimiter]
- kind = :error
- state = :initial
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- last_token_dot = match == '.'
-
- tokens << [match, kind]
-
- end
-
- if state == :string
- tokens << [:close, state]
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java/builtin_types.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java/builtin_types.rb
deleted file mode 100644
index 8087edd22..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java/builtin_types.rb
+++ /dev/null
@@ -1,419 +0,0 @@
-module CodeRay
-module Scanners
-
- module Java::BuiltinTypes # :nodoc:
-
- List = %w[
- AbstractAction AbstractBorder AbstractButton AbstractCellEditor AbstractCollection
- AbstractColorChooserPanel AbstractDocument AbstractExecutorService AbstractInterruptibleChannel
- AbstractLayoutCache AbstractList AbstractListModel AbstractMap AbstractMethodError AbstractPreferences
- AbstractQueue AbstractQueuedSynchronizer AbstractSelectableChannel AbstractSelectionKey AbstractSelector
- AbstractSequentialList AbstractSet AbstractSpinnerModel AbstractTableModel AbstractUndoableEdit
- AbstractWriter AccessControlContext AccessControlException AccessController AccessException Accessible
- AccessibleAction AccessibleAttributeSequence AccessibleBundle AccessibleComponent AccessibleContext
- AccessibleEditableText AccessibleExtendedComponent AccessibleExtendedTable AccessibleExtendedText
- AccessibleHyperlink AccessibleHypertext AccessibleIcon AccessibleKeyBinding AccessibleObject
- AccessibleRelation AccessibleRelationSet AccessibleResourceBundle AccessibleRole AccessibleSelection
- AccessibleState AccessibleStateSet AccessibleStreamable AccessibleTable AccessibleTableModelChange
- AccessibleText AccessibleTextSequence AccessibleValue AccountException AccountExpiredException
- AccountLockedException AccountNotFoundException Acl AclEntry AclNotFoundException Action ActionEvent
- ActionListener ActionMap ActionMapUIResource Activatable ActivateFailedException ActivationDesc
- ActivationException ActivationGroup ActivationGroupDesc ActivationGroupID ActivationGroup_Stub
- ActivationID ActivationInstantiator ActivationMonitor ActivationSystem Activator ActiveEvent
- ActivityCompletedException ActivityRequiredException Adjustable AdjustmentEvent AdjustmentListener
- Adler32 AffineTransform AffineTransformOp AlgorithmParameterGenerator AlgorithmParameterGeneratorSpi
- AlgorithmParameters AlgorithmParameterSpec AlgorithmParametersSpi AllPermission AlphaComposite
- AlreadyBoundException AlreadyConnectedException AncestorEvent AncestorListener AnnotatedElement
- Annotation AnnotationFormatError AnnotationTypeMismatchException AppConfigurationEntry Appendable Applet
- AppletContext AppletInitializer AppletStub Arc2D Area AreaAveragingScaleFilter ArithmeticException Array
- ArrayBlockingQueue ArrayIndexOutOfBoundsException ArrayList Arrays ArrayStoreException ArrayType
- AssertionError AsyncBoxView AsynchronousCloseException AtomicBoolean AtomicInteger AtomicIntegerArray
- AtomicIntegerFieldUpdater AtomicLong AtomicLongArray AtomicLongFieldUpdater AtomicMarkableReference
- AtomicReference AtomicReferenceArray AtomicReferenceFieldUpdater AtomicStampedReference Attribute
- AttributeChangeNotification AttributeChangeNotificationFilter AttributedCharacterIterator
- AttributedString AttributeException AttributeInUseException AttributeList AttributeModificationException
- AttributeNotFoundException Attributes AttributeSet AttributeSetUtilities AttributeValueExp AudioClip
- AudioFileFormat AudioFileReader AudioFileWriter AudioFormat AudioInputStream AudioPermission AudioSystem
- AuthenticationException AuthenticationNotSupportedException Authenticator AuthorizeCallback
- AuthPermission AuthProvider Autoscroll AWTError AWTEvent AWTEventListener AWTEventListenerProxy
- AWTEventMulticaster AWTException AWTKeyStroke AWTPermission BackingStoreException
- BadAttributeValueExpException BadBinaryOpValueExpException BadLocationException BadPaddingException
- BadStringOperationException BandCombineOp BandedSampleModel BaseRowSet BasicArrowButton BasicAttribute
- BasicAttributes BasicBorders BasicButtonListener BasicButtonUI BasicCheckBoxMenuItemUI BasicCheckBoxUI
- BasicColorChooserUI BasicComboBoxEditor BasicComboBoxRenderer BasicComboBoxUI BasicComboPopup
- BasicControl BasicDesktopIconUI BasicDesktopPaneUI BasicDirectoryModel BasicEditorPaneUI
- BasicFileChooserUI BasicFormattedTextFieldUI BasicGraphicsUtils BasicHTML BasicIconFactory
- BasicInternalFrameTitlePane BasicInternalFrameUI BasicLabelUI BasicListUI BasicLookAndFeel
- BasicMenuBarUI BasicMenuItemUI BasicMenuUI BasicOptionPaneUI BasicPanelUI BasicPasswordFieldUI
- BasicPermission BasicPopupMenuSeparatorUI BasicPopupMenuUI BasicProgressBarUI BasicRadioButtonMenuItemUI
- BasicRadioButtonUI BasicRootPaneUI BasicScrollBarUI BasicScrollPaneUI BasicSeparatorUI BasicSliderUI
- BasicSpinnerUI BasicSplitPaneDivider BasicSplitPaneUI BasicStroke BasicTabbedPaneUI BasicTableHeaderUI
- BasicTableUI BasicTextAreaUI BasicTextFieldUI BasicTextPaneUI BasicTextUI BasicToggleButtonUI
- BasicToolBarSeparatorUI BasicToolBarUI BasicToolTipUI BasicTreeUI BasicViewportUI BatchUpdateException
- BeanContext BeanContextChild BeanContextChildComponentProxy BeanContextChildSupport
- BeanContextContainerProxy BeanContextEvent BeanContextMembershipEvent BeanContextMembershipListener
- BeanContextProxy BeanContextServiceAvailableEvent BeanContextServiceProvider
- BeanContextServiceProviderBeanInfo BeanContextServiceRevokedEvent BeanContextServiceRevokedListener
- BeanContextServices BeanContextServicesListener BeanContextServicesSupport BeanContextSupport
- BeanDescriptor BeanInfo Beans BevelBorder Bidi BigDecimal BigInteger BinaryRefAddr BindException Binding
- BitSet Blob BlockingQueue BlockView BMPImageWriteParam Book Boolean BooleanControl Border BorderFactory
- BorderLayout BorderUIResource BoundedRangeModel Box BoxLayout BoxView BreakIterator
- BrokenBarrierException Buffer BufferCapabilities BufferedImage BufferedImageFilter BufferedImageOp
- BufferedInputStream BufferedOutputStream BufferedReader BufferedWriter BufferOverflowException
- BufferStrategy BufferUnderflowException Button ButtonGroup ButtonModel ButtonUI Byte
- ByteArrayInputStream ByteArrayOutputStream ByteBuffer ByteChannel ByteLookupTable ByteOrder CachedRowSet
- CacheRequest CacheResponse Calendar Callable CallableStatement Callback CallbackHandler
- CancelablePrintJob CancellationException CancelledKeyException CannotProceedException
- CannotRedoException CannotUndoException Canvas CardLayout Caret CaretEvent CaretListener CellEditor
- CellEditorListener CellRendererPane Certificate CertificateEncodingException CertificateException
- CertificateExpiredException CertificateFactory CertificateFactorySpi CertificateNotYetValidException
- CertificateParsingException CertPath CertPathBuilder CertPathBuilderException CertPathBuilderResult
- CertPathBuilderSpi CertPathParameters CertPathTrustManagerParameters CertPathValidator
- CertPathValidatorException CertPathValidatorResult CertPathValidatorSpi CertSelector CertStore
- CertStoreException CertStoreParameters CertStoreSpi ChangedCharSetException ChangeEvent ChangeListener
- Channel Channels Character CharacterCodingException CharacterIterator CharArrayReader CharArrayWriter
- CharBuffer CharConversionException CharSequence Charset CharsetDecoder CharsetEncoder CharsetProvider
- Checkbox CheckboxGroup CheckboxMenuItem CheckedInputStream CheckedOutputStream Checksum Choice
- ChoiceCallback ChoiceFormat Chromaticity Cipher CipherInputStream CipherOutputStream CipherSpi Class
- ClassCastException ClassCircularityError ClassDefinition ClassDesc ClassFileTransformer ClassFormatError
- ClassLoader ClassLoaderRepository ClassLoadingMXBean ClassNotFoundException Clip Clipboard
- ClipboardOwner Clob Cloneable CloneNotSupportedException Closeable ClosedByInterruptException
- ClosedChannelException ClosedSelectorException CMMException CoderMalfunctionError CoderResult CodeSigner
- CodeSource CodingErrorAction CollationElementIterator CollationKey Collator Collection
- CollectionCertStoreParameters Collections Color ColorChooserComponentFactory ColorChooserUI
- ColorConvertOp ColorModel ColorSelectionModel ColorSpace ColorSupported ColorType ColorUIResource
- ComboBoxEditor ComboBoxModel ComboBoxUI ComboPopup CommunicationException Comparable Comparator
- CompilationMXBean Compiler CompletionService Component ComponentAdapter ComponentColorModel
- ComponentEvent ComponentInputMap ComponentInputMapUIResource ComponentListener ComponentOrientation
- ComponentSampleModel ComponentUI ComponentView Composite CompositeContext CompositeData
- CompositeDataSupport CompositeName CompositeType CompositeView CompoundBorder CompoundControl
- CompoundEdit CompoundName Compression ConcurrentHashMap ConcurrentLinkedQueue ConcurrentMap
- ConcurrentModificationException Condition Configuration ConfigurationException ConfirmationCallback
- ConnectException ConnectIOException Connection ConnectionEvent ConnectionEventListener
- ConnectionPendingException ConnectionPoolDataSource ConsoleHandler Constructor Container
- ContainerAdapter ContainerEvent ContainerListener ContainerOrderFocusTraversalPolicy ContentHandler
- ContentHandlerFactory ContentModel Context ContextNotEmptyException ContextualRenderedImageFactory
- Control ControlFactory ControllerEventListener ConvolveOp CookieHandler Copies CopiesSupported
- CopyOnWriteArrayList CopyOnWriteArraySet CountDownLatch CounterMonitor CounterMonitorMBean CRC32
- CredentialException CredentialExpiredException CredentialNotFoundException CRL CRLException CRLSelector
- CropImageFilter CSS CubicCurve2D Currency Cursor Customizer CyclicBarrier DatabaseMetaData DataBuffer
- DataBufferByte DataBufferDouble DataBufferFloat DataBufferInt DataBufferShort DataBufferUShort
- DataFlavor DataFormatException DatagramChannel DatagramPacket DatagramSocket DatagramSocketImpl
- DatagramSocketImplFactory DataInput DataInputStream DataLine DataOutput DataOutputStream DataSource
- DataTruncation DatatypeConfigurationException DatatypeConstants DatatypeFactory Date DateFormat
- DateFormatSymbols DateFormatter DateTimeAtCompleted DateTimeAtCreation DateTimeAtProcessing
- DateTimeSyntax DebugGraphics DecimalFormat DecimalFormatSymbols DefaultBoundedRangeModel
- DefaultButtonModel DefaultCaret DefaultCellEditor DefaultColorSelectionModel DefaultComboBoxModel
- DefaultDesktopManager DefaultEditorKit DefaultFocusManager DefaultFocusTraversalPolicy DefaultFormatter
- DefaultFormatterFactory DefaultHighlighter DefaultKeyboardFocusManager DefaultListCellRenderer
- DefaultListModel DefaultListSelectionModel DefaultLoaderRepository DefaultMenuLayout DefaultMetalTheme
- DefaultMutableTreeNode DefaultPersistenceDelegate DefaultSingleSelectionModel DefaultStyledDocument
- DefaultTableCellRenderer DefaultTableColumnModel DefaultTableModel DefaultTextUI DefaultTreeCellEditor
- DefaultTreeCellRenderer DefaultTreeModel DefaultTreeSelectionModel Deflater DeflaterOutputStream Delayed
- DelayQueue DelegationPermission Deprecated Descriptor DescriptorAccess DescriptorSupport DESedeKeySpec
- DesignMode DESKeySpec DesktopIconUI DesktopManager DesktopPaneUI Destination Destroyable
- DestroyFailedException DGC DHGenParameterSpec DHKey DHParameterSpec DHPrivateKey DHPrivateKeySpec
- DHPublicKey DHPublicKeySpec Dialog Dictionary DigestException DigestInputStream DigestOutputStream
- Dimension Dimension2D DimensionUIResource DirContext DirectColorModel DirectoryManager DirObjectFactory
- DirStateFactory DisplayMode DnDConstants Doc DocAttribute DocAttributeSet DocFlavor DocPrintJob Document
- DocumentBuilder DocumentBuilderFactory Documented DocumentEvent DocumentFilter DocumentListener
- DocumentName DocumentParser DomainCombiner DOMLocator DOMResult DOMSource Double DoubleBuffer
- DragGestureEvent DragGestureListener DragGestureRecognizer DragSource DragSourceAdapter
- DragSourceContext DragSourceDragEvent DragSourceDropEvent DragSourceEvent DragSourceListener
- DragSourceMotionListener Driver DriverManager DriverPropertyInfo DropTarget DropTargetAdapter
- DropTargetContext DropTargetDragEvent DropTargetDropEvent DropTargetEvent DropTargetListener DSAKey
- DSAKeyPairGenerator DSAParameterSpec DSAParams DSAPrivateKey DSAPrivateKeySpec DSAPublicKey
- DSAPublicKeySpec DTD DTDConstants DuplicateFormatFlagsException Duration DynamicMBean ECField ECFieldF2m
- ECFieldFp ECGenParameterSpec ECKey ECParameterSpec ECPoint ECPrivateKey ECPrivateKeySpec ECPublicKey
- ECPublicKeySpec EditorKit Element ElementIterator ElementType Ellipse2D EllipticCurve EmptyBorder
- EmptyStackException EncodedKeySpec Encoder EncryptedPrivateKeyInfo Entity Enum
- EnumConstantNotPresentException EnumControl Enumeration EnumMap EnumSet EnumSyntax EOFException Error
- ErrorListener ErrorManager EtchedBorder Event EventContext EventDirContext EventHandler EventListener
- EventListenerList EventListenerProxy EventObject EventQueue EventSetDescriptor Exception
- ExceptionInInitializerError ExceptionListener Exchanger ExecutionException Executor
- ExecutorCompletionService Executors ExecutorService ExemptionMechanism ExemptionMechanismException
- ExemptionMechanismSpi ExpandVetoException ExportException Expression ExtendedRequest ExtendedResponse
- Externalizable FactoryConfigurationError FailedLoginException FeatureDescriptor Fidelity Field
- FieldPosition FieldView File FileCacheImageInputStream FileCacheImageOutputStream FileChannel
- FileChooserUI FileDescriptor FileDialog FileFilter FileHandler FileImageInputStream
- FileImageOutputStream FileInputStream FileLock FileLockInterruptionException FilenameFilter FileNameMap
- FileNotFoundException FileOutputStream FilePermission FileReader FileSystemView FileView FileWriter
- Filter FilteredImageSource FilteredRowSet FilterInputStream FilterOutputStream FilterReader FilterWriter
- Finishings FixedHeightLayoutCache FlatteningPathIterator FlavorEvent FlavorException FlavorListener
- FlavorMap FlavorTable Float FloatBuffer FloatControl FlowLayout FlowView Flushable FocusAdapter
- FocusEvent FocusListener FocusManager FocusTraversalPolicy Font FontFormatException FontMetrics
- FontRenderContext FontUIResource Format FormatConversionProvider FormatFlagsConversionMismatchException
- Formattable FormattableFlags Formatter FormatterClosedException FormSubmitEvent FormView Frame Future
- FutureTask GapContent GarbageCollectorMXBean GatheringByteChannel GaugeMonitor GaugeMonitorMBean
- GeneralPath GeneralSecurityException GenericArrayType GenericDeclaration GenericSignatureFormatError
- GlyphJustificationInfo GlyphMetrics GlyphVector GlyphView GradientPaint GraphicAttribute Graphics
- Graphics2D GraphicsConfigTemplate GraphicsConfiguration GraphicsDevice GraphicsEnvironment GrayFilter
- GregorianCalendar GridBagConstraints GridBagLayout GridLayout Group Guard GuardedObject GZIPInputStream
- GZIPOutputStream Handler HandshakeCompletedEvent HandshakeCompletedListener HasControls HashAttributeSet
- HashDocAttributeSet HashMap HashPrintJobAttributeSet HashPrintRequestAttributeSet
- HashPrintServiceAttributeSet HashSet Hashtable HeadlessException HierarchyBoundsAdapter
- HierarchyBoundsListener HierarchyEvent HierarchyListener Highlighter HostnameVerifier HTML HTMLDocument
- HTMLEditorKit HTMLFrameHyperlinkEvent HTMLWriter HttpRetryException HttpsURLConnection HttpURLConnection
- HyperlinkEvent HyperlinkListener ICC_ColorSpace ICC_Profile ICC_ProfileGray ICC_ProfileRGB Icon
- IconUIResource IconView Identity IdentityHashMap IdentityScope IIOByteBuffer IIOException IIOImage
- IIOInvalidTreeException IIOMetadata IIOMetadataController IIOMetadataFormat IIOMetadataFormatImpl
- IIOMetadataNode IIOParam IIOParamController IIOReadProgressListener IIOReadUpdateListener
- IIOReadWarningListener IIORegistry IIOServiceProvider IIOWriteProgressListener IIOWriteWarningListener
- IllegalAccessError IllegalAccessException IllegalArgumentException IllegalBlockingModeException
- IllegalBlockSizeException IllegalCharsetNameException IllegalClassFormatException
- IllegalComponentStateException IllegalFormatCodePointException IllegalFormatConversionException
- IllegalFormatException IllegalFormatFlagsException IllegalFormatPrecisionException
- IllegalFormatWidthException IllegalMonitorStateException IllegalPathStateException
- IllegalSelectorException IllegalStateException IllegalThreadStateException Image ImageCapabilities
- ImageConsumer ImageFilter ImageGraphicAttribute ImageIcon ImageInputStream ImageInputStreamImpl
- ImageInputStreamSpi ImageIO ImageObserver ImageOutputStream ImageOutputStreamImpl ImageOutputStreamSpi
- ImageProducer ImageReader ImageReaderSpi ImageReaderWriterSpi ImageReadParam ImageTranscoder
- ImageTranscoderSpi ImageTypeSpecifier ImageView ImageWriteParam ImageWriter ImageWriterSpi
- ImagingOpException IncompatibleClassChangeError IncompleteAnnotationException IndexColorModel
- IndexedPropertyChangeEvent IndexedPropertyDescriptor IndexOutOfBoundsException Inet4Address Inet6Address
- InetAddress InetSocketAddress Inflater InflaterInputStream InheritableThreadLocal Inherited
- InitialContext InitialContextFactory InitialContextFactoryBuilder InitialDirContext InitialLdapContext
- InlineView InputContext InputEvent InputMap InputMapUIResource InputMethod InputMethodContext
- InputMethodDescriptor InputMethodEvent InputMethodHighlight InputMethodListener InputMethodRequests
- InputMismatchException InputStream InputStreamReader InputSubset InputVerifier Insets InsetsUIResource
- InstanceAlreadyExistsException InstanceNotFoundException InstantiationError InstantiationException
- Instrument Instrumentation InsufficientResourcesException IntBuffer Integer IntegerSyntax InternalError
- InternalFrameAdapter InternalFrameEvent InternalFrameFocusTraversalPolicy InternalFrameListener
- InternalFrameUI InternationalFormatter InterruptedException InterruptedIOException
- InterruptedNamingException InterruptibleChannel IntrospectionException Introspector
- InvalidActivityException InvalidAlgorithmParameterException InvalidApplicationException
- InvalidAttributeIdentifierException InvalidAttributesException InvalidAttributeValueException
- InvalidClassException InvalidDnDOperationException InvalidKeyException InvalidKeySpecException
- InvalidMarkException InvalidMidiDataException InvalidNameException InvalidObjectException
- InvalidOpenTypeException InvalidParameterException InvalidParameterSpecException
- InvalidPreferencesFormatException InvalidPropertiesFormatException InvalidRelationIdException
- InvalidRelationServiceException InvalidRelationTypeException InvalidRoleInfoException
- InvalidRoleValueException InvalidSearchControlsException InvalidSearchFilterException
- InvalidTargetObjectTypeException InvalidTransactionException InvocationEvent InvocationHandler
- InvocationTargetException IOException ItemEvent ItemListener ItemSelectable Iterable Iterator
- IvParameterSpec JApplet JarEntry JarException JarFile JarInputStream JarOutputStream JarURLConnection
- JButton JCheckBox JCheckBoxMenuItem JColorChooser JComboBox JComponent JdbcRowSet JDesktopPane JDialog
- JEditorPane JFileChooser JFormattedTextField JFrame JInternalFrame JLabel JLayeredPane JList JMenu
- JMenuBar JMenuItem JMException JMRuntimeException JMXAuthenticator JMXConnectionNotification
- JMXConnector JMXConnectorFactory JMXConnectorProvider JMXConnectorServer JMXConnectorServerFactory
- JMXConnectorServerMBean JMXConnectorServerProvider JMXPrincipal JMXProviderException
- JMXServerErrorException JMXServiceURL JobAttributes JobHoldUntil JobImpressions JobImpressionsCompleted
- JobImpressionsSupported JobKOctets JobKOctetsProcessed JobKOctetsSupported JobMediaSheets
- JobMediaSheetsCompleted JobMediaSheetsSupported JobMessageFromOperator JobName JobOriginatingUserName
- JobPriority JobPrioritySupported JobSheets JobState JobStateReason JobStateReasons Joinable JoinRowSet
- JOptionPane JPanel JPasswordField JPEGHuffmanTable JPEGImageReadParam JPEGImageWriteParam JPEGQTable
- JPopupMenu JProgressBar JRadioButton JRadioButtonMenuItem JRootPane JScrollBar JScrollPane JSeparator
- JSlider JSpinner JSplitPane JTabbedPane JTable JTableHeader JTextArea JTextComponent JTextField
- JTextPane JToggleButton JToolBar JToolTip JTree JViewport JWindow KerberosKey KerberosPrincipal
- KerberosTicket Kernel Key KeyAdapter KeyAgreement KeyAgreementSpi KeyAlreadyExistsException
- KeyboardFocusManager KeyEvent KeyEventDispatcher KeyEventPostProcessor KeyException KeyFactory
- KeyFactorySpi KeyGenerator KeyGeneratorSpi KeyListener KeyManagementException KeyManager
- KeyManagerFactory KeyManagerFactorySpi Keymap KeyPair KeyPairGenerator KeyPairGeneratorSpi KeyRep
- KeySpec KeyStore KeyStoreBuilderParameters KeyStoreException KeyStoreSpi KeyStroke Label LabelUI
- LabelView LanguageCallback LastOwnerException LayeredHighlighter LayoutFocusTraversalPolicy
- LayoutManager LayoutManager2 LayoutQueue LDAPCertStoreParameters LdapContext LdapName
- LdapReferralException Lease Level LimitExceededException Line Line2D LineBorder LineBreakMeasurer
- LineEvent LineListener LineMetrics LineNumberInputStream LineNumberReader LineUnavailableException
- LinkageError LinkedBlockingQueue LinkedHashMap LinkedHashSet LinkedList LinkException LinkLoopException
- LinkRef List ListCellRenderer ListDataEvent ListDataListener ListenerNotFoundException ListIterator
- ListModel ListResourceBundle ListSelectionEvent ListSelectionListener ListSelectionModel ListUI ListView
- LoaderHandler Locale LocateRegistry Lock LockSupport Logger LoggingMXBean LoggingPermission LoginContext
- LoginException LoginModule LogManager LogRecord LogStream Long LongBuffer LookAndFeel LookupOp
- LookupTable Mac MacSpi MalformedInputException MalformedLinkException MalformedObjectNameException
- MalformedParameterizedTypeException MalformedURLException ManagementFactory ManagementPermission
- ManageReferralControl ManagerFactoryParameters Manifest Map MappedByteBuffer MarshalException
- MarshalledObject MaskFormatter Matcher MatchResult Math MathContext MatteBorder MBeanAttributeInfo
- MBeanConstructorInfo MBeanException MBeanFeatureInfo MBeanInfo MBeanNotificationInfo MBeanOperationInfo
- MBeanParameterInfo MBeanPermission MBeanRegistration MBeanRegistrationException MBeanServer
- MBeanServerBuilder MBeanServerConnection MBeanServerDelegate MBeanServerDelegateMBean MBeanServerFactory
- MBeanServerForwarder MBeanServerInvocationHandler MBeanServerNotification MBeanServerNotificationFilter
- MBeanServerPermission MBeanTrustPermission Media MediaName MediaPrintableArea MediaSize MediaSizeName
- MediaTracker MediaTray Member MemoryCacheImageInputStream MemoryCacheImageOutputStream MemoryHandler
- MemoryImageSource MemoryManagerMXBean MemoryMXBean MemoryNotificationInfo MemoryPoolMXBean MemoryType
- MemoryUsage Menu MenuBar MenuBarUI MenuComponent MenuContainer MenuDragMouseEvent MenuDragMouseListener
- MenuElement MenuEvent MenuItem MenuItemUI MenuKeyEvent MenuKeyListener MenuListener MenuSelectionManager
- MenuShortcut MessageDigest MessageDigestSpi MessageFormat MetaEventListener MetalBorders MetalButtonUI
- MetalCheckBoxIcon MetalCheckBoxUI MetalComboBoxButton MetalComboBoxEditor MetalComboBoxIcon
- MetalComboBoxUI MetalDesktopIconUI MetalFileChooserUI MetalIconFactory MetalInternalFrameTitlePane
- MetalInternalFrameUI MetalLabelUI MetalLookAndFeel MetalMenuBarUI MetalPopupMenuSeparatorUI
- MetalProgressBarUI MetalRadioButtonUI MetalRootPaneUI MetalScrollBarUI MetalScrollButton
- MetalScrollPaneUI MetalSeparatorUI MetalSliderUI MetalSplitPaneUI MetalTabbedPaneUI MetalTextFieldUI
- MetalTheme MetalToggleButtonUI MetalToolBarUI MetalToolTipUI MetalTreeUI MetaMessage Method
- MethodDescriptor MGF1ParameterSpec MidiChannel MidiDevice MidiDeviceProvider MidiEvent MidiFileFormat
- MidiFileReader MidiFileWriter MidiMessage MidiSystem MidiUnavailableException MimeTypeParseException
- MinimalHTMLWriter MissingFormatArgumentException MissingFormatWidthException MissingResourceException
- Mixer MixerProvider MLet MLetMBean ModelMBean ModelMBeanAttributeInfo ModelMBeanConstructorInfo
- ModelMBeanInfo ModelMBeanInfoSupport ModelMBeanNotificationBroadcaster ModelMBeanNotificationInfo
- ModelMBeanOperationInfo ModificationItem Modifier Monitor MonitorMBean MonitorNotification
- MonitorSettingException MouseAdapter MouseDragGestureRecognizer MouseEvent MouseInfo MouseInputAdapter
- MouseInputListener MouseListener MouseMotionAdapter MouseMotionListener MouseWheelEvent
- MouseWheelListener MultiButtonUI MulticastSocket MultiColorChooserUI MultiComboBoxUI MultiDesktopIconUI
- MultiDesktopPaneUI MultiDoc MultiDocPrintJob MultiDocPrintService MultiFileChooserUI
- MultiInternalFrameUI MultiLabelUI MultiListUI MultiLookAndFeel MultiMenuBarUI MultiMenuItemUI
- MultiOptionPaneUI MultiPanelUI MultiPixelPackedSampleModel MultipleDocumentHandling MultipleMaster
- MultiPopupMenuUI MultiProgressBarUI MultiRootPaneUI MultiScrollBarUI MultiScrollPaneUI MultiSeparatorUI
- MultiSliderUI MultiSpinnerUI MultiSplitPaneUI MultiTabbedPaneUI MultiTableHeaderUI MultiTableUI
- MultiTextUI MultiToolBarUI MultiToolTipUI MultiTreeUI MultiViewportUI MutableAttributeSet
- MutableComboBoxModel MutableTreeNode Name NameAlreadyBoundException NameCallback NameClassPair
- NameNotFoundException NameParser NamespaceChangeListener NamespaceContext Naming NamingEnumeration
- NamingEvent NamingException NamingExceptionEvent NamingListener NamingManager NamingSecurityException
- NavigationFilter NegativeArraySizeException NetPermission NetworkInterface NoClassDefFoundError
- NoConnectionPendingException NodeChangeEvent NodeChangeListener NoInitialContextException
- NoninvertibleTransformException NonReadableChannelException NonWritableChannelException
- NoPermissionException NoRouteToHostException NoSuchAlgorithmException NoSuchAttributeException
- NoSuchElementException NoSuchFieldError NoSuchFieldException NoSuchMethodError NoSuchMethodException
- NoSuchObjectException NoSuchPaddingException NoSuchProviderException NotActiveException
- NotBoundException NotCompliantMBeanException NotContextException Notification NotificationBroadcaster
- NotificationBroadcasterSupport NotificationEmitter NotificationFilter NotificationFilterSupport
- NotificationListener NotificationResult NotOwnerException NotSerializableException NotYetBoundException
- NotYetConnectedException NullCipher NullPointerException Number NumberFormat NumberFormatException
- NumberFormatter NumberOfDocuments NumberOfInterveningJobs NumberUp NumberUpSupported NumericShaper
- OAEPParameterSpec Object ObjectChangeListener ObjectFactory ObjectFactoryBuilder ObjectInput
- ObjectInputStream ObjectInputValidation ObjectInstance ObjectName ObjectOutput ObjectOutputStream
- ObjectStreamClass ObjectStreamConstants ObjectStreamException ObjectStreamField ObjectView ObjID
- Observable Observer OceanTheme OpenDataException OpenMBeanAttributeInfo OpenMBeanAttributeInfoSupport
- OpenMBeanConstructorInfo OpenMBeanConstructorInfoSupport OpenMBeanInfo OpenMBeanInfoSupport
- OpenMBeanOperationInfo OpenMBeanOperationInfoSupport OpenMBeanParameterInfo
- OpenMBeanParameterInfoSupport OpenType OperatingSystemMXBean Operation OperationNotSupportedException
- OperationsException Option OptionalDataException OptionPaneUI OrientationRequested OutOfMemoryError
- OutputDeviceAssigned OutputKeys OutputStream OutputStreamWriter OverlappingFileLockException
- OverlayLayout Override Owner Pack200 Package PackedColorModel Pageable PageAttributes
- PagedResultsControl PagedResultsResponseControl PageFormat PageRanges PagesPerMinute PagesPerMinuteColor
- Paint PaintContext PaintEvent Panel PanelUI Paper ParagraphView ParameterBlock ParameterDescriptor
- ParameterizedType ParameterMetaData ParseException ParsePosition Parser ParserConfigurationException
- ParserDelegator PartialResultException PasswordAuthentication PasswordCallback PasswordView Patch
- PathIterator Pattern PatternSyntaxException PBEKey PBEKeySpec PBEParameterSpec PDLOverrideSupported
- Permission PermissionCollection Permissions PersistenceDelegate PersistentMBean PhantomReference Pipe
- PipedInputStream PipedOutputStream PipedReader PipedWriter PixelGrabber PixelInterleavedSampleModel
- PKCS8EncodedKeySpec PKIXBuilderParameters PKIXCertPathBuilderResult PKIXCertPathChecker
- PKIXCertPathValidatorResult PKIXParameters PlainDocument PlainView Point Point2D PointerInfo Policy
- PolicyNode PolicyQualifierInfo Polygon PooledConnection Popup PopupFactory PopupMenu PopupMenuEvent
- PopupMenuListener PopupMenuUI Port PortableRemoteObject PortableRemoteObjectDelegate
- PortUnreachableException Position Predicate PreferenceChangeEvent PreferenceChangeListener Preferences
- PreferencesFactory PreparedStatement PresentationDirection Principal Printable PrinterAbortException
- PrinterException PrinterGraphics PrinterInfo PrinterIOException PrinterIsAcceptingJobs PrinterJob
- PrinterLocation PrinterMakeAndModel PrinterMessageFromOperator PrinterMoreInfo
- PrinterMoreInfoManufacturer PrinterName PrinterResolution PrinterState PrinterStateReason
- PrinterStateReasons PrinterURI PrintEvent PrintException PrintGraphics PrintJob PrintJobAdapter
- PrintJobAttribute PrintJobAttributeEvent PrintJobAttributeListener PrintJobAttributeSet PrintJobEvent
- PrintJobListener PrintQuality PrintRequestAttribute PrintRequestAttributeSet PrintService
- PrintServiceAttribute PrintServiceAttributeEvent PrintServiceAttributeListener PrintServiceAttributeSet
- PrintServiceLookup PrintStream PrintWriter PriorityBlockingQueue PriorityQueue PrivateClassLoader
- PrivateCredentialPermission PrivateKey PrivateMLet PrivilegedAction PrivilegedActionException
- PrivilegedExceptionAction Process ProcessBuilder ProfileDataException ProgressBarUI ProgressMonitor
- ProgressMonitorInputStream Properties PropertyChangeEvent PropertyChangeListener
- PropertyChangeListenerProxy PropertyChangeSupport PropertyDescriptor PropertyEditor
- PropertyEditorManager PropertyEditorSupport PropertyPermission PropertyResourceBundle
- PropertyVetoException ProtectionDomain ProtocolException Provider ProviderException Proxy ProxySelector
- PSource PSSParameterSpec PublicKey PushbackInputStream PushbackReader QName QuadCurve2D Query QueryEval
- QueryExp Queue QueuedJobCount Random RandomAccess RandomAccessFile Raster RasterFormatException RasterOp
- RC2ParameterSpec RC5ParameterSpec Rdn Readable ReadableByteChannel Reader ReadOnlyBufferException
- ReadWriteLock RealmCallback RealmChoiceCallback Receiver Rectangle Rectangle2D RectangularShape
- ReentrantLock ReentrantReadWriteLock Ref RefAddr Reference Referenceable ReferenceQueue
- ReferenceUriSchemesSupported ReferralException ReflectionException ReflectPermission Refreshable
- RefreshFailedException Region RegisterableService Registry RegistryHandler RejectedExecutionException
- RejectedExecutionHandler Relation RelationException RelationNotFoundException RelationNotification
- RelationService RelationServiceMBean RelationServiceNotRegisteredException RelationSupport
- RelationSupportMBean RelationType RelationTypeNotFoundException RelationTypeSupport Remote RemoteCall
- RemoteException RemoteObject RemoteObjectInvocationHandler RemoteRef RemoteServer RemoteStub
- RenderableImage RenderableImageOp RenderableImageProducer RenderContext RenderedImage
- RenderedImageFactory Renderer RenderingHints RepaintManager ReplicateScaleFilter RequestingUserName
- RequiredModelMBean RescaleOp ResolutionSyntax Resolver ResolveResult ResourceBundle ResponseCache Result
- ResultSet ResultSetMetaData Retention RetentionPolicy ReverbType RGBImageFilter RMIClassLoader
- RMIClassLoaderSpi RMIClientSocketFactory RMIConnection RMIConnectionImpl RMIConnectionImpl_Stub
- RMIConnector RMIConnectorServer RMIFailureHandler RMIIIOPServerImpl RMIJRMPServerImpl
- RMISecurityException RMISecurityManager RMIServer RMIServerImpl RMIServerImpl_Stub
- RMIServerSocketFactory RMISocketFactory Robot Role RoleInfo RoleInfoNotFoundException RoleList
- RoleNotFoundException RoleResult RoleStatus RoleUnresolved RoleUnresolvedList RootPaneContainer
- RootPaneUI RoundingMode RoundRectangle2D RowMapper RowSet RowSetEvent RowSetInternal RowSetListener
- RowSetMetaData RowSetMetaDataImpl RowSetReader RowSetWarning RowSetWriter RSAKey RSAKeyGenParameterSpec
- RSAMultiPrimePrivateCrtKey RSAMultiPrimePrivateCrtKeySpec RSAOtherPrimeInfo RSAPrivateCrtKey
- RSAPrivateCrtKeySpec RSAPrivateKey RSAPrivateKeySpec RSAPublicKey RSAPublicKeySpec RTFEditorKit
- RuleBasedCollator Runnable Runtime RuntimeErrorException RuntimeException RuntimeMBeanException
- RuntimeMXBean RuntimeOperationsException RuntimePermission SampleModel Sasl SaslClient SaslClientFactory
- SaslException SaslServer SaslServerFactory Savepoint SAXParser SAXParserFactory SAXResult SAXSource
- SAXTransformerFactory Scanner ScatteringByteChannel ScheduledExecutorService ScheduledFuture
- ScheduledThreadPoolExecutor Schema SchemaFactory SchemaFactoryLoader SchemaViolationException Scrollable
- Scrollbar ScrollBarUI ScrollPane ScrollPaneAdjustable ScrollPaneConstants ScrollPaneLayout ScrollPaneUI
- SealedObject SearchControls SearchResult SecretKey SecretKeyFactory SecretKeyFactorySpi SecretKeySpec
- SecureCacheResponse SecureClassLoader SecureRandom SecureRandomSpi Security SecurityException
- SecurityManager SecurityPermission Segment SelectableChannel SelectionKey Selector SelectorProvider
- Semaphore SeparatorUI Sequence SequenceInputStream Sequencer SerialArray SerialBlob SerialClob
- SerialDatalink SerialException Serializable SerializablePermission SerialJavaObject SerialRef
- SerialStruct ServerCloneException ServerError ServerException ServerNotActiveException ServerRef
- ServerRuntimeException ServerSocket ServerSocketChannel ServerSocketFactory ServiceNotFoundException
- ServicePermission ServiceRegistry ServiceUI ServiceUIFactory ServiceUnavailableException Set
- SetOfIntegerSyntax Severity Shape ShapeGraphicAttribute SheetCollate Short ShortBuffer
- ShortBufferException ShortLookupTable ShortMessage Sides Signature SignatureException SignatureSpi
- SignedObject Signer SimpleAttributeSet SimpleBeanInfo SimpleDateFormat SimpleDoc SimpleFormatter
- SimpleTimeZone SimpleType SinglePixelPackedSampleModel SingleSelectionModel Size2DSyntax
- SizeLimitExceededException SizeRequirements SizeSequence Skeleton SkeletonMismatchException
- SkeletonNotFoundException SliderUI Socket SocketAddress SocketChannel SocketException SocketFactory
- SocketHandler SocketImpl SocketImplFactory SocketOptions SocketPermission SocketSecurityException
- SocketTimeoutException SoftBevelBorder SoftReference SortControl SortedMap SortedSet
- SortingFocusTraversalPolicy SortKey SortResponseControl Soundbank SoundbankReader SoundbankResource
- Source SourceDataLine SourceLocator SpinnerDateModel SpinnerListModel SpinnerModel SpinnerNumberModel
- SpinnerUI SplitPaneUI Spring SpringLayout SQLData SQLException SQLInput SQLInputImpl SQLOutput
- SQLOutputImpl SQLPermission SQLWarning SSLContext SSLContextSpi SSLEngine SSLEngineResult SSLException
- SSLHandshakeException SSLKeyException SSLPeerUnverifiedException SSLPermission SSLProtocolException
- SslRMIClientSocketFactory SslRMIServerSocketFactory SSLServerSocket SSLServerSocketFactory SSLSession
- SSLSessionBindingEvent SSLSessionBindingListener SSLSessionContext SSLSocket SSLSocketFactory Stack
- StackOverflowError StackTraceElement StandardMBean StartTlsRequest StartTlsResponse StateEdit
- StateEditable StateFactory Statement StreamCorruptedException StreamHandler StreamPrintService
- StreamPrintServiceFactory StreamResult StreamSource StreamTokenizer StrictMath String StringBuffer
- StringBufferInputStream StringBuilder StringCharacterIterator StringContent
- StringIndexOutOfBoundsException StringMonitor StringMonitorMBean StringReader StringRefAddr
- StringSelection StringTokenizer StringValueExp StringWriter Stroke Struct Stub StubDelegate
- StubNotFoundException Style StyleConstants StyleContext StyledDocument StyledEditorKit StyleSheet
- Subject SubjectDelegationPermission SubjectDomainCombiner SupportedValuesAttribute SuppressWarnings
- SwingConstants SwingPropertyChangeSupport SwingUtilities SyncFactory SyncFactoryException
- SyncFailedException SynchronousQueue SyncProvider SyncProviderException SyncResolver SynthConstants
- SynthContext Synthesizer SynthGraphicsUtils SynthLookAndFeel SynthPainter SynthStyle SynthStyleFactory
- SysexMessage System SystemColor SystemFlavorMap TabableView TabbedPaneUI TabExpander TableCellEditor
- TableCellRenderer TableColumn TableColumnModel TableColumnModelEvent TableColumnModelListener
- TableHeaderUI TableModel TableModelEvent TableModelListener TableUI TableView TabSet TabStop TabularData
- TabularDataSupport TabularType TagElement Target TargetDataLine TargetedNotification Templates
- TemplatesHandler TextAction TextArea TextAttribute TextComponent TextEvent TextField TextHitInfo
- TextInputCallback TextLayout TextListener TextMeasurer TextOutputCallback TextSyntax TextUI TexturePaint
- Thread ThreadDeath ThreadFactory ThreadGroup ThreadInfo ThreadLocal ThreadMXBean ThreadPoolExecutor
- Throwable Tie TileObserver Time TimeLimitExceededException TimeoutException Timer
- TimerAlarmClockNotification TimerMBean TimerNotification TimerTask Timestamp TimeUnit TimeZone
- TitledBorder ToolBarUI Toolkit ToolTipManager ToolTipUI TooManyListenersException Track
- TransactionalWriter TransactionRequiredException TransactionRolledbackException Transferable
- TransferHandler TransformAttribute Transformer TransformerConfigurationException TransformerException
- TransformerFactory TransformerFactoryConfigurationError TransformerHandler Transmitter Transparency
- TreeCellEditor TreeCellRenderer TreeExpansionEvent TreeExpansionListener TreeMap TreeModel
- TreeModelEvent TreeModelListener TreeNode TreePath TreeSelectionEvent TreeSelectionListener
- TreeSelectionModel TreeSet TreeUI TreeWillExpandListener TrustAnchor TrustManager TrustManagerFactory
- TrustManagerFactorySpi Type TypeInfoProvider TypeNotPresentException Types TypeVariable UID UIDefaults
- UIManager UIResource UndeclaredThrowableException UndoableEdit UndoableEditEvent UndoableEditListener
- UndoableEditSupport UndoManager UnexpectedException UnicastRemoteObject UnknownError
- UnknownFormatConversionException UnknownFormatFlagsException UnknownGroupException UnknownHostException
- UnknownObjectException UnknownServiceException UnmappableCharacterException UnmarshalException
- UnmodifiableClassException UnmodifiableSetException UnrecoverableEntryException
- UnrecoverableKeyException Unreferenced UnresolvedAddressException UnresolvedPermission
- UnsatisfiedLinkError UnsolicitedNotification UnsolicitedNotificationEvent
- UnsolicitedNotificationListener UnsupportedAddressTypeException UnsupportedAudioFileException
- UnsupportedCallbackException UnsupportedCharsetException UnsupportedClassVersionError
- UnsupportedEncodingException UnsupportedFlavorException UnsupportedLookAndFeelException
- UnsupportedOperationException URI URIException URIResolver URISyntax URISyntaxException URL
- URLClassLoader URLConnection URLDecoder URLEncoder URLStreamHandler URLStreamHandlerFactory
- UTFDataFormatException Util UtilDelegate Utilities UUID Validator ValidatorHandler ValueExp ValueHandler
- ValueHandlerMultiFormat VariableHeightLayoutCache Vector VerifyError VetoableChangeListener
- VetoableChangeListenerProxy VetoableChangeSupport View ViewFactory ViewportLayout ViewportUI
- VirtualMachineError Visibility VMID VoiceStatus Void VolatileImage WeakHashMap WeakReference WebRowSet
- WildcardType Window WindowAdapter WindowConstants WindowEvent WindowFocusListener WindowListener
- WindowStateListener WrappedPlainView WritableByteChannel WritableRaster WritableRenderedImage
- WriteAbortedException Writer X500Principal X500PrivateCredential X509Certificate X509CertSelector
- X509CRL X509CRLEntry X509CRLSelector X509EncodedKeySpec X509ExtendedKeyManager X509Extension
- X509KeyManager X509TrustManager XAConnection XADataSource XAException XAResource Xid XMLConstants
- XMLDecoder XMLEncoder XMLFormatter XMLGregorianCalendar XMLParseException XmlReader XmlWriter XPath
- XPathConstants XPathException XPathExpression XPathExpressionException XPathFactory
- XPathFactoryConfigurationException XPathFunction XPathFunctionException XPathFunctionResolver
- XPathVariableResolver ZipEntry ZipException ZipFile ZipInputStream ZipOutputStream ZoneView
- ]
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java_script.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java_script.rb
deleted file mode 100644
index e7edf35f1..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/java_script.rb
+++ /dev/null
@@ -1,222 +0,0 @@
-module CodeRay
-module Scanners
-
- class JavaScript < Scanner
-
- include Streamable
-
- register_for :java_script
- file_extension 'js'
-
- # The actual JavaScript keywords.
- KEYWORDS = %w[
- break case catch continue default delete do else
- finally for function if in instanceof new
- return switch throw try typeof var void while with
- ]
- PREDEFINED_CONSTANTS = %w[
- false null true undefined
- ]
-
- MAGIC_VARIABLES = %w[ this arguments ] # arguments was introduced in JavaScript 1.4
-
- KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[
- case delete in instanceof new return throw typeof while with
- ]
-
- # Reserved for future use.
- RESERVED_WORDS = %w[
- abstract boolean byte char class debugger double enum export extends
- final float goto implements import int interface long native package
- private protected public short static super synchronized throws transient
- volatile
- ]
-
- IDENT_KIND = WordList.new(:ident).
- add(RESERVED_WORDS, :reserved).
- add(PREDEFINED_CONSTANTS, :pre_constant).
- add(MAGIC_VARIABLES, :local_variable).
- add(KEYWORDS, :keyword)
-
- ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
- REGEXP_ESCAPE = / [bBdDsSwW] /x
- STRING_CONTENT_PATTERN = {
- "'" => /[^\\']+/,
- '"' => /[^\\"]+/,
- '/' => /[^\\\/]+/,
- }
- KEY_CHECK_PATTERN = {
- "'" => / [^\\']* (?: \\.? [^\\']* )* '? \s* : /x,
- '"' => / [^\\"]* (?: \\.? [^\\"]* )* "? \s* : /x,
- }
-
- def scan_tokens tokens, options
-
- state = :initial
- string_delimiter = nil
- value_expected = true
- key_expected = false
- function_expected = false
-
- until eos?
-
- kind = nil
- match = nil
-
- case state
-
- when :initial
-
- if match = scan(/ \s+ | \\\n /x)
- value_expected = true if !value_expected && match.index(?\n)
- tokens << [match, :space]
- next
-
- elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
- value_expected = true
- kind = :comment
-
- elsif check(/\.?\d/)
- key_expected = value_expected = false
- if scan(/0[xX][0-9A-Fa-f]+/)
- kind = :hex
- elsif scan(/(?>0[0-7]+)(?![89.eEfF])/)
- kind = :oct
- elsif scan(/\d+[fF]|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/)
- kind = :float
- elsif scan(/\d+/)
- kind = :integer
- end
-
- elsif value_expected && match = scan(/<([[:alpha:]]\w*) (?: [^\/>]*\/> | .*?<\/\1>)/xim)
- html_scanner.tokenize match
- value_expected = false
- next
-
- elsif match = scan(/ [-+*=<>?:;,!&^|(\[{~%]+ | \.(?!\d) /x)
- value_expected = true
- last_operator = match[-1]
- key_expected = (last_operator == ?{) || (last_operator == ?,)
- function_expected = false
- kind = :operator
-
- elsif scan(/ [)\]}]+ /x)
- function_expected = key_expected = value_expected = false
- kind = :operator
-
- elsif match = scan(/ [$a-zA-Z_][A-Za-z_0-9$]* /x)
- kind = IDENT_KIND[match]
- value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match]
- if kind == :ident
- if match.index(?$) # $ allowed inside an identifier
- kind = :predefined
- elsif function_expected
- kind = :function
- elsif check(/\s*[=:]\s*function\b/)
- kind = :function
- elsif key_expected && check(/\s*:/)
- kind = :key
- end
- end
- function_expected = (kind == :keyword) && (match == 'function')
- key_expected = false
-
- elsif match = scan(/["']/)
- if key_expected && check(KEY_CHECK_PATTERN[match])
- state = :key
- else
- state = :string
- end
- tokens << [:open, state]
- string_delimiter = match
- kind = :delimiter
-
- elsif value_expected && (match = scan(/\/(?=\S)/))
- tokens << [:open, :regexp]
- state = :regexp
- string_delimiter = '/'
- kind = :delimiter
-
- elsif scan(/ \/ /x)
- value_expected = true
- key_expected = false
- kind = :operator
-
- else
- getch
- kind = :error
-
- end
-
- when :string, :regexp, :key
- if scan(STRING_CONTENT_PATTERN[string_delimiter])
- kind = :content
- elsif match = scan(/["'\/]/)
- tokens << [match, :delimiter]
- if state == :regexp
- modifiers = scan(/[gim]+/)
- tokens << [modifiers, :modifier] if modifiers && !modifiers.empty?
- end
- tokens << [:close, state]
- string_delimiter = nil
- key_expected = value_expected = false
- state = :initial
- next
- elsif state != :regexp && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox))
- if string_delimiter == "'" && !(match == "\\\\" || match == "\\'")
- kind = :content
- else
- kind = :char
- end
- elsif state == :regexp && scan(/ \\ (?: #{ESCAPE} | #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
- kind = :char
- elsif scan(/\\./m)
- kind = :content
- elsif scan(/ \\ | $ /x)
- tokens << [:close, state]
- kind = :error
- key_expected = value_expected = false
- state = :initial
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
-
- if [:string, :regexp].include? state
- tokens << [:close, state]
- end
-
- tokens
- end
-
- protected
-
- def reset_instance
- super
- @html_scanner.reset if defined? @html_scanner
- end
-
- def html_scanner
- @html_scanner ||= CodeRay.scanner :html, :tokens => @tokens, :keep_tokens => true, :keep_state => true
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/json.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/json.rb
deleted file mode 100644
index a9926b2a0..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/json.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-module CodeRay
-module Scanners
-
- class JSON < Scanner
-
- include Streamable
-
- register_for :json
- file_extension 'json'
-
- KINDS_NOT_LOC = [
- :float, :char, :content, :delimiter,
- :error, :integer, :operator, :value,
- ]
-
- CONSTANTS = %w( true false null )
- IDENT_KIND = WordList.new(:key).add(CONSTANTS, :value)
-
- ESCAPE = / [bfnrt\\"\/] /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x
-
- def scan_tokens tokens, options
-
- state = :initial
- stack = []
- string_delimiter = nil
- key_expected = false
-
- until eos?
-
- kind = nil
- match = nil
-
- case state
-
- when :initial
- if match = scan(/ \s+ | \\\n /x)
- tokens << [match, :space]
- next
- elsif match = scan(/ [:,\[{\]}] /x)
- kind = :operator
- case match
- when '{' then stack << :object; key_expected = true
- when '[' then stack << :array
- when ':' then key_expected = false
- when ',' then key_expected = true if stack.last == :object
- when '}', ']' then stack.pop # no error recovery, but works for valid JSON
- end
- elsif match = scan(/ true | false | null /x)
- kind = IDENT_KIND[match]
- elsif match = scan(/-?(?:0|[1-9]\d*)/)
- kind = :integer
- if scan(/\.\d+(?:[eE][-+]?\d+)?|[eE][-+]?\d+/)
- match << matched
- kind = :float
- end
- elsif match = scan(/"/)
- state = key_expected ? :key : :string
- tokens << [:open, state]
- kind = :delimiter
- else
- getch
- kind = :error
- end
-
- when :string, :key
- if scan(/[^\\"]+/)
- kind = :content
- elsif scan(/"/)
- tokens << ['"', :delimiter]
- tokens << [:close, state]
- state = :initial
- next
- elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
- kind = :char
- elsif scan(/\\./m)
- kind = :content
- elsif scan(/ \\ | $ /x)
- tokens << [:close, :delimiter]
- kind = :error
- state = :initial
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- else
- raise_inspect 'Unknown state', tokens
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
-
- if [:string, :key].include? state
- tokens << [:close, state]
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/php.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/php.rb
deleted file mode 100644
index bfbc64283..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/php.rb
+++ /dev/null
@@ -1,437 +0,0 @@
-module CodeRay
-module Scanners
-
- load :html
-
- # Original by Stefan Walk.
- class PHP < Scanner
-
- register_for :php
- file_extension 'php'
-
- KINDS_NOT_LOC = HTML::KINDS_NOT_LOC
-
- def setup
- @html_scanner = CodeRay.scanner :html, :tokens => @tokens, :keep_tokens => true, :keep_state => true
- end
-
- def reset_instance
- super
- @html_scanner.reset
- end
-
- module Words
-
- # according to http://www.php.net/manual/en/reserved.keywords.php
- KEYWORDS = %w[
- abstract and array as break case catch class clone const continue declare default do else elseif
- enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global
- goto if implements interface instanceof namespace new or private protected public static switch
- throw try use var while xor
- cfunction old_function
- ]
-
- TYPES = %w[ int integer float double bool boolean string array object resource ]
-
- LANGUAGE_CONSTRUCTS = %w[
- die echo empty exit eval include include_once isset list
- require require_once return print unset
- ]
-
- CLASSES = %w[ Directory stdClass __PHP_Incomplete_Class exception php_user_filter Closure ]
-
- # according to http://php.net/quickref.php on 2009-04-21;
- # all functions with _ excluded (module functions) and selected additional functions
- BUILTIN_FUNCTIONS = %w[
- abs acos acosh addcslashes addslashes aggregate array arsort ascii2ebcdic asin asinh asort assert atan atan2
- atanh basename bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub bin2hex bindec
- bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite
- calculhmac ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot clearstatcache closedir closelog
- compact constant copy cos cosh count crc32 crypt current date dcgettext dcngettext deaggregate decbin dechex
- decoct define defined deg2rad delete dgettext die dirname diskfreespace dl dngettext doubleval each
- ebcdic2ascii echo empty end ereg eregi escapeshellarg escapeshellcmd eval exec exit exp explode expm1 extract
- fclose feof fflush fgetc fgetcsv fgets fgetss file fileatime filectime filegroup fileinode filemtime fileowner
- fileperms filepro filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv
- fputs fread frenchtojd fscanf fseek fsockopen fstat ftell ftok ftruncate fwrite getallheaders getcwd getdate
- getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid
- getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext
- gettimeofday gettype glob gmdate gmmktime gmstrftime gregoriantojd gzclose gzcompress gzdecode gzdeflate
- gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell
- gzuncompress gzwrite hash header hebrev hebrevc hexdec htmlentities htmlspecialchars hypot iconv idate
- implode include intval ip2long iptcembed iptcparse isset
- jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd join jpeg2wbmp
- juliantojd key krsort ksort lcfirst lchgrp lchown levenshtein link linkinfo list localeconv localtime log
- log10 log1p long2ip lstat ltrim mail main max md5 metaphone mhash microtime min mkdir mktime msql natcasesort
- natsort next ngettext nl2br nthmac octdec opendir openlog
- ord overload pack passthru pathinfo pclose pfsockopen phpcredits phpinfo phpversion pi png2wbmp popen pos pow
- prev print printf putenv quotemeta rad2deg rand range rawurldecode rawurlencode readdir readfile readgzfile
- readline readlink realpath recode rename require reset rewind rewinddir rmdir round rsort rtrim scandir
- serialize setcookie setlocale setrawcookie settype sha1 shuffle signeurlpaiement sin sinh sizeof sleep snmpget
- snmpgetnext snmprealwalk snmpset snmpwalk snmpwalkoid sort soundex split spliti sprintf sqrt srand sscanf stat
- strcasecmp strchr strcmp strcoll strcspn strftime stripcslashes stripos stripslashes stristr strlen
- strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn
- strstr strtok strtolower strtotime strtoupper strtr strval substr symlink syslog system tan tanh tempnam
- textdomain time tmpfile touch trim uasort ucfirst ucwords uksort umask uniqid unixtojd unlink unpack
- unserialize unset urldecode urlencode usleep usort vfprintf virtual vprintf vsprintf wordwrap
- array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc
- array_diff_key array_diff_uassoc array_diff_ukey array_fill array_fill_keys array_filter array_flip
- array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey
- array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad
- array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift
- array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect
- array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk
- array_walk_recursive
- assert_options base_convert base64_decode base64_encode
- chunk_split class_exists class_implements class_parents
- count_chars debug_backtrace debug_print_backtrace debug_zval_dump
- error_get_last error_log error_reporting extension_loaded
- file_exists file_get_contents file_put_contents load_file
- func_get_arg func_get_args func_num_args function_exists
- get_browser get_called_class get_cfg_var get_class get_class_methods get_class_vars
- get_current_user get_declared_classes get_declared_interfaces get_defined_constants
- get_defined_functions get_defined_vars get_extension_funcs get_headers get_html_translation_table
- get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime
- get_meta_tags get_object_vars get_parent_class get_required_filesget_resource_type
- gc_collect_cycles gc_disable gc_enable gc_enabled
- halt_compiler headers_list headers_sent highlight_file highlight_string
- html_entity_decode htmlspecialchars_decode
- in_array include_once inclued_get_data
- is_a is_array is_binary is_bool is_buffer is_callable is_dir is_double is_executable is_file is_finite
- is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable
- is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_unicode is_uploaded_file
- is_writable is_writeable
- locale_get_default locale_set_default
- number_format override_function parse_str parse_url
- php_check_syntax php_ini_loaded_file php_ini_scanned_files php_logo_guid php_sapi_name
- php_strip_whitespace php_uname
- preg_filter preg_grep preg_last_error preg_match preg_match_all preg_quote preg_replace
- preg_replace_callback preg_split print_r
- require_once register_shutdown_function register_tick_function
- set_error_handler set_exception_handler set_file_buffer set_include_path
- set_magic_quotes_runtime set_time_limit shell_exec
- str_getcsv str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count
- strip_tags substr_compare substr_count substr_replace
- time_nanosleep time_sleep_until
- token_get_all token_name trigger_error
- unregister_tick_function use_soap_error_handler user_error
- utf8_decode utf8_encode var_dump var_export
- version_compare
- zend_logo_guid zend_thread_id zend_version
- ]
- # TODO: more built-in PHP functions?
-
- EXCEPTIONS = %w[
- E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING
- E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_DEPRECATED E_USER_DEPRECATED E_ALL E_STRICT
- ]
-
- CONSTANTS = %w[
- null true false self parent
- __LINE__ __DIR__ __FILE__ __LINE__
- __CLASS__ __NAMESPACE__ __METHOD__ __FUNCTION__
- PHP_VERSION PHP_MAJOR_VERSION PHP_MINOR_VERSION PHP_RELEASE_VERSION PHP_VERSION_ID PHP_EXTRA_VERSION PHP_ZTS
- PHP_DEBUG PHP_MAXPATHLEN PHP_OS PHP_SAPI PHP_EOL PHP_INT_MAX PHP_INT_SIZE DEFAULT_INCLUDE_PATH
- PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_PREFIX PHP_BINDIR PHP_LIBDIR PHP_DATADIR
- PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_CONFIG_FILE_SCAN_DIR PHP_SHLIB_SUFFIX
- PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END
- __COMPILER_HALT_OFFSET__
- EXTR_OVERWRITE EXTR_SKIP EXTR_PREFIX_SAME EXTR_PREFIX_ALL EXTR_PREFIX_INVALID EXTR_PREFIX_IF_EXISTS
- EXTR_IF_EXISTS SORT_ASC SORT_DESC SORT_REGULAR SORT_NUMERIC SORT_STRING CASE_LOWER CASE_UPPER COUNT_NORMAL
- COUNT_RECURSIVE ASSERT_ACTIVE ASSERT_CALLBACK ASSERT_BAIL ASSERT_WARNING ASSERT_QUIET_EVAL CONNECTION_ABORTED
- CONNECTION_NORMAL CONNECTION_TIMEOUT INI_USER INI_PERDIR INI_SYSTEM INI_ALL M_E M_LOG2E M_LOG10E M_LN2 M_LN10
- M_PI M_PI_2 M_PI_4 M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 CRYPT_SALT_LENGTH CRYPT_STD_DES CRYPT_EXT_DES
- CRYPT_MD5 CRYPT_BLOWFISH DIRECTORY_SEPARATOR SEEK_SET SEEK_CUR SEEK_END LOCK_SH LOCK_EX LOCK_UN LOCK_NB
- HTML_SPECIALCHARS HTML_ENTITIES ENT_COMPAT ENT_QUOTES ENT_NOQUOTES INFO_GENERAL INFO_CREDITS
- INFO_CONFIGURATION INFO_MODULES INFO_ENVIRONMENT INFO_VARIABLES INFO_LICENSE INFO_ALL CREDITS_GROUP
- CREDITS_GENERAL CREDITS_SAPI CREDITS_MODULES CREDITS_DOCS CREDITS_FULLPAGE CREDITS_QA CREDITS_ALL STR_PAD_LEFT
- STR_PAD_RIGHT STR_PAD_BOTH PATHINFO_DIRNAME PATHINFO_BASENAME PATHINFO_EXTENSION PATH_SEPARATOR CHAR_MAX
- LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_ALL LC_MESSAGES ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5
- ABDAY_6 ABDAY_7 DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7 ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6
- ABMON_7 ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12 MON_1 MON_2 MON_3 MON_4 MON_5 MON_6 MON_7 MON_8 MON_9
- MON_10 MON_11 MON_12 AM_STR PM_STR D_T_FMT D_FMT T_FMT T_FMT_AMPM ERA ERA_YEAR ERA_D_T_FMT ERA_D_FMT ERA_T_FMT
- ALT_DIGITS INT_CURR_SYMBOL CURRENCY_SYMBOL CRNCYSTR MON_DECIMAL_POINT MON_THOUSANDS_SEP MON_GROUPING
- POSITIVE_SIGN NEGATIVE_SIGN INT_FRAC_DIGITS FRAC_DIGITS P_CS_PRECEDES P_SEP_BY_SPACE N_CS_PRECEDES
- N_SEP_BY_SPACE P_SIGN_POSN N_SIGN_POSN DECIMAL_POINT RADIXCHAR THOUSANDS_SEP THOUSEP GROUPING YESEXPR NOEXPR
- YESSTR NOSTR CODESET LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG LOG_KERN
- LOG_USER LOG_MAIL LOG_DAEMON LOG_AUTH LOG_SYSLOG LOG_LPR LOG_NEWS LOG_UUCP LOG_CRON LOG_AUTHPRIV LOG_LOCAL0
- LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_PID LOG_CONS LOG_ODELAY
- LOG_NDELAY LOG_NOWAIT LOG_PERROR
- ]
-
- IDENT_KIND = CaseIgnoringWordList.new(:ident, true).
- add(KEYWORDS, :reserved).
- add(TYPES, :pre_type).
- add(LANGUAGE_CONSTRUCTS, :reserved).
- add(BUILTIN_FUNCTIONS, :predefined).
- add(CLASSES, :pre_constant).
- add(EXCEPTIONS, :exception).
- add(CONSTANTS, :pre_constant)
- end
-
- module RE
-
- PHP_START = /
- |
- \?>
- !xi
-
- HTML_INDICATOR = / ]/i
-
- IDENTIFIER = /[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*/i
- VARIABLE = /\$#{IDENTIFIER}/
-
- OPERATOR = /
- \.(?!\d)=? | # dot that is not decimal point, string concatenation
- && | \|\| | # logic
- :: | -> | => | # scope, member, dictionary
- \+\+ | -- | # increment, decrement
- [,;?:()\[\]{}] | # simple delimiters
- [-+*\/%&|^]=? | # ordinary math, binary logic, assignment shortcuts
- [~@$] | # whatever
- [=!]=?=? | <> | # comparison and assignment
- <<=? | >>=? | [<>]=? # comparison and shift
- /x
-
- end
-
- def scan_tokens tokens, options
-
- states = [:initial]
- if match?(RE::PHP_START) || # starts with
- (match?(/\s*<\S/) && exist?(RE::PHP_START)) || # starts with tag and contains
- exist?(RE::HTML_INDICATOR)
- # is PHP inside HTML, so start with HTML
- else
- states << :php
- end
-
- # heredocdelim = nil
- delimiter = nil
-
- until eos?
-
- match = nil
- kind = nil
-
- case states.last
-
- when :initial # HTML
- if scan RE::PHP_START
- kind = :inline_delimiter
- states << :php
- else
- match = scan_until(/(?=#{RE::PHP_START})/o) || scan_until(/\z/)
- @html_scanner.tokenize match unless match.empty?
- next
- end
-
- when :php
- if scan RE::PHP_END
- kind = :inline_delimiter
- states = [:initial]
-
- elsif scan(/\s+/)
- kind = :space
-
- elsif scan(/ \/\* (?: .*? \*\/ | .* ) /mx)
- kind = :comment
-
- elsif scan(%r!(?://|#).*?(?=#{RE::PHP_END}|$)!o)
- kind = :comment
-
- elsif match = scan(RE::IDENTIFIER)
- kind = Words::IDENT_KIND[match]
- if kind == :ident && check(/:(?!:)/) #&& tokens[-2][0] == 'case'
- # FIXME: don't match a?b:c
- kind = :label
- elsif kind == :ident && match =~ /^[A-Z]/
- kind = :constant
- elsif kind == :reserved && match == 'class'
- states << :class_expected
- elsif kind == :reserved && match == 'function'
- states << :function_expected
- end
-
- elsif scan(/(?:\d+\.\d*|\d*\.\d+)(?:e[-+]?\d+)?|\d+e[-+]?\d+/i)
- kind = :float
-
- elsif scan(/0x[0-9a-fA-F]+/)
- kind = :hex
-
- elsif scan(/\d+/)
- kind = :integer
-
- elsif scan(/'/)
- tokens << [:open, :string]
- kind = :delimiter
- states.push :sqstring
-
- elsif match = scan(/["`]/)
- tokens << [:open, :string]
- delimiter = match
- kind = :delimiter
- states.push :dqstring
-
- # TODO: Heredocs
- # See http://de2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
- elsif match = scan(/<<<(#{RE::IDENTIFIER})/o)
- tokens << [:open, :string]
- heredocdelim = Regexp.escape self[1]
- tokens << [match, :delimiter]
- next if eos?
- tokens << [scan_until(/\n(?=#{heredocdelim};?$)|\z/), :content]
- next if eos?
- tokens << [scan(/#{heredocdelim}/), :delimiter]
- tokens << [:close, :string]
- next
-
- elsif scan RE::VARIABLE
- kind = :local_variable
-
- elsif scan(/\{/)
- kind = :operator
- states.push :php
-
- elsif scan(/\}/)
- if states.size == 1
- kind = :error
- else
- states.pop
- if states.last.is_a?(::Array)
- delimiter = states.last[1]
- states[-1] = states.last[0]
- tokens << [matched, :delimiter]
- tokens << [:close, :inline]
- next
- else
- kind = :operator
- end
- end
-
- elsif scan(/#{RE::OPERATOR}/o)
- kind = :operator
-
- else
- getch
- kind = :error
-
- end
-
- when :sqstring
- if scan(/[^'\\]+/)
- kind = :content
- elsif scan(/'/)
- tokens << [matched, :delimiter]
- tokens << [:close, :string]
- delimiter = nil
- states.pop
- next
- elsif scan(/\\[\\'\n]/)
- kind = :char
- elsif scan(/\\./m)
- kind = :content
- elsif scan(/\\/)
- kind = :error
- end
-
- when :dqstring
- if scan(delimiter == '"' ? /[^"${\\]+/ : /[^`${\\]+/)
- kind = :content
- elsif scan(delimiter == '"' ? /"/ : /`/)
- tokens << [matched, :delimiter]
- tokens << [:close, :string]
- delimiter = nil
- states.pop
- next
- elsif scan(/\\(?:x[0-9a-fA-F]{2}|\d{3})/)
- kind = :char
- elsif scan(delimiter == '"' ? /\\["\\\nfnrtv]/ : /\\[`\\\nfnrtv]/)
- kind = :char
- elsif scan(/\\./m)
- kind = :content
- elsif scan(/\\/)
- kind = :error
- elsif match = scan(/#{RE::VARIABLE}/o)
- kind = :local_variable
- # $foo[bar] and $foo->bar kind of stuff
- # TODO: highlight tokens separately!
- if check(/\[#{RE::IDENTIFIER}\]/o)
- match << scan(/\[#{RE::IDENTIFIER}\]/o)
- elsif check(/\[/)
- match << scan(/\[#{RE::IDENTIFIER}?/o)
- kind = :error
- elsif check(/->#{RE::IDENTIFIER}/o)
- match << scan(/->#{RE::IDENTIFIER}/o)
- elsif check(/->/)
- match << scan(/->/)
- kind = :error
- end
- elsif match = scan(/\{/)
- if check(/\$/)
- kind = :delimiter
- states[-1] = [states.last, delimiter]
- delimiter = nil
- states.push :php
- tokens << [:open, :inline]
- else
- kind = :string
- end
- elsif scan(/\$\{#{RE::IDENTIFIER}\}/o)
- kind = :local_variable
- elsif scan(/\$/)
- kind = :content
- end
-
- when :class_expected
- if scan(/\s+/)
- kind = :space
- elsif match = scan(/#{RE::IDENTIFIER}/o)
- kind = :class
- states.pop
- else
- states.pop
- next
- end
-
- when :function_expected
- if scan(/\s+/)
- kind = :space
- elsif scan(/&/)
- kind = :operator
- elsif match = scan(/#{RE::IDENTIFIER}/o)
- kind = :function
- states.pop
- else
- states.pop
- next
- end
-
- else
- raise_inspect 'Unknown state!', tokens, states
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens, states
- end
- raise_inspect 'Empty token', tokens, states unless match
-
- tokens << [match, kind]
-
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/python.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/python.rb
deleted file mode 100644
index b0aa82ada..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/python.rb
+++ /dev/null
@@ -1,285 +0,0 @@
-module CodeRay
-module Scanners
-
- # Bases on pygments' PythonLexer, see
- # http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py.
- class Python < Scanner
-
- include Streamable
-
- register_for :python
- file_extension 'py'
-
- KEYWORDS = [
- 'and', 'as', 'assert', 'break', 'class', 'continue', 'def',
- 'del', 'elif', 'else', 'except', 'finally', 'for',
- 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not',
- 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield',
- 'nonlocal', # new in Python 3
- ]
-
- OLD_KEYWORDS = [
- 'exec', 'print', # gone in Python 3
- ]
-
- PREDEFINED_METHODS_AND_TYPES = %w[
- __import__ abs all any apply basestring bin bool buffer
- bytearray bytes callable chr classmethod cmp coerce compile
- complex delattr dict dir divmod enumerate eval execfile exit
- file filter float frozenset getattr globals hasattr hash hex id
- input int intern isinstance issubclass iter len list locals
- long map max min next object oct open ord pow property range
- raw_input reduce reload repr reversed round set setattr slice
- sorted staticmethod str sum super tuple type unichr unicode
- vars xrange zip
- ]
-
- PREDEFINED_EXCEPTIONS = %w[
- ArithmeticError AssertionError AttributeError
- BaseException DeprecationWarning EOFError EnvironmentError
- Exception FloatingPointError FutureWarning GeneratorExit IOError
- ImportError ImportWarning IndentationError IndexError KeyError
- KeyboardInterrupt LookupError MemoryError NameError
- NotImplemented NotImplementedError OSError OverflowError
- OverflowWarning PendingDeprecationWarning ReferenceError
- RuntimeError RuntimeWarning StandardError StopIteration
- SyntaxError SyntaxWarning SystemError SystemExit TabError
- TypeError UnboundLocalError UnicodeDecodeError
- UnicodeEncodeError UnicodeError UnicodeTranslateError
- UnicodeWarning UserWarning ValueError Warning ZeroDivisionError
- ]
-
- PREDEFINED_VARIABLES_AND_CONSTANTS = [
- 'False', 'True', 'None', # "keywords" since Python 3
- 'self', 'Ellipsis', 'NotImplemented',
- ]
-
- IDENT_KIND = WordList.new(:ident).
- add(KEYWORDS, :keyword).
- add(OLD_KEYWORDS, :old_keyword).
- add(PREDEFINED_METHODS_AND_TYPES, :predefined).
- add(PREDEFINED_VARIABLES_AND_CONSTANTS, :pre_constant).
- add(PREDEFINED_EXCEPTIONS, :exception)
-
- NAME = / [^\W\d] \w* /x
- ESCAPE = / [abfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} | N\{[-\w ]+\} /x
-
- OPERATOR = /
- \.\.\. | # ellipsis
- \.(?!\d) | # dot but not decimal point
- [,;:()\[\]{}] | # simple delimiters
- \/\/=? | \*\*=? | # special math
- [-+*\/%&|^]=? | # ordinary math and binary logic
- [~`] | # binary complement and inspection
- <<=? | >>=? | [<>=]=? | != # comparison and assignment
- /x
-
- STRING_DELIMITER_REGEXP = Hash.new do |h, delimiter|
- h[delimiter] = Regexp.union delimiter
- end
-
- STRING_CONTENT_REGEXP = Hash.new do |h, delimiter|
- h[delimiter] = / [^\\\n]+? (?= \\ | $ | #{Regexp.escape(delimiter)} ) /x
- end
-
- DEF_NEW_STATE = WordList.new(:initial).
- add(%w(def), :def_expected).
- add(%w(import from), :include_expected).
- add(%w(class), :class_expected)
-
- DESCRIPTOR = /
- #{NAME}
- (?: \. #{NAME} )*
- | \*
- /x
-
- def scan_tokens tokens, options
-
- state = :initial
- string_delimiter = nil
- string_raw = false
- import_clause = class_name_follows = last_token_dot = false
- unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8'
- from_import_state = []
-
- until eos?
-
- kind = nil
- match = nil
-
- if state == :string
- if scan(STRING_DELIMITER_REGEXP[string_delimiter])
- tokens << [matched, :delimiter]
- tokens << [:close, :string]
- state = :initial
- next
- elsif string_delimiter.size == 3 && scan(/\n/)
- kind = :content
- elsif scan(STRING_CONTENT_REGEXP[string_delimiter])
- kind = :content
- elsif !string_raw && scan(/ \\ #{ESCAPE} /ox)
- kind = :char
- elsif scan(/ \\ #{UNICODE_ESCAPE} /ox)
- kind = :char
- elsif scan(/ \\ . /x)
- kind = :content
- elsif scan(/ \\ | $ /x)
- tokens << [:close, :string]
- kind = :error
- state = :initial
- else
- raise_inspect "else case \" reached; %p not handled." % peek(1), tokens, state
- end
-
- elsif match = scan(/ [ \t]+ | \\\n /x)
- tokens << [match, :space]
- next
-
- elsif match = scan(/\n/)
- tokens << [match, :space]
- state = :initial if state == :include_expected
- next
-
- elsif match = scan(/ \# [^\n]* /mx)
- tokens << [match, :comment]
- next
-
- elsif state == :initial
-
- if scan(/#{OPERATOR}/o)
- kind = :operator
-
- elsif match = scan(/(u?r?|b)?("""|"|'''|')/i)
- tokens << [:open, :string]
- string_delimiter = self[2]
- string_raw = false
- modifiers = self[1]
- unless modifiers.empty?
- string_raw = !!modifiers.index(?r)
- tokens << [modifiers, :modifier]
- match = string_delimiter
- end
- state = :string
- kind = :delimiter
-
- # TODO: backticks
-
- elsif match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o)
- kind = IDENT_KIND[match]
- # TODO: keyword arguments
- kind = :ident if last_token_dot
- if kind == :old_keyword
- kind = check(/\(/) ? :ident : :keyword
- elsif kind == :predefined && check(/ *=/)
- kind = :ident
- elsif kind == :keyword
- state = DEF_NEW_STATE[match]
- from_import_state << match.to_sym if state == :include_expected
- end
-
- elsif scan(/@[a-zA-Z0-9_.]+[lL]?/)
- kind = :decorator
-
- elsif scan(/0[xX][0-9A-Fa-f]+[lL]?/)
- kind = :hex
-
- elsif scan(/0[bB][01]+[lL]?/)
- kind = :bin
-
- elsif match = scan(/(?:\d*\.\d+|\d+\.\d*)(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+/)
- kind = :float
- if scan(/[jJ]/)
- match << matched
- kind = :imaginary
- end
-
- elsif scan(/0[oO][0-7]+|0[0-7]+(?![89.eE])[lL]?/)
- kind = :oct
-
- elsif match = scan(/\d+([lL])?/)
- kind = :integer
- if self[1] == nil && scan(/[jJ]/)
- match << matched
- kind = :imaginary
- end
-
- else
- getch
- kind = :error
-
- end
-
- elsif state == :def_expected
- state = :initial
- if match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o)
- kind = :method
- else
- next
- end
-
- elsif state == :class_expected
- state = :initial
- if match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o)
- kind = :class
- else
- next
- end
-
- elsif state == :include_expected
- if match = scan(unicode ? /#{DESCRIPTOR}/uo : /#{DESCRIPTOR}/o)
- kind = :include
- if match == 'as'
- kind = :keyword
- from_import_state << :as
- elsif from_import_state.first == :from && match == 'import'
- kind = :keyword
- from_import_state << :import
- elsif from_import_state.last == :as
- # kind = match[0,1][unicode ? /[[:upper:]]/u : /[[:upper:]]/] ? :class : :method
- kind = :ident
- from_import_state.pop
- elsif IDENT_KIND[match] == :keyword
- unscan
- match = nil
- state = :initial
- next
- end
- elsif match = scan(/,/)
- from_import_state.pop if from_import_state.last == :as
- kind = :operator
- else
- from_import_state = []
- state = :initial
- next
- end
-
- else
- raise_inspect 'Unknown state', tokens, state
-
- end
-
- match ||= matched
- if $DEBUG and not kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens, state
- end
- raise_inspect 'Empty token', tokens, state unless match
-
- last_token_dot = match == '.'
-
- tokens << [match, kind]
-
- end
-
- if state == :string
- tokens << [:close, :string]
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/sql.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/sql.rb
deleted file mode 100644
index 2b21c79d0..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/sql.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-module CodeRay module Scanners
-
- # by Josh Goebel
- class SQL < Scanner
-
- register_for :sql
-
- RESERVED_WORDS = %w(
- create database table index trigger drop primary key set select
- insert update delete replace into
- on from values before and or if exists case when
- then else as group order by avg where
- join inner outer union engine not
- like end using collate show columns begin
- )
-
- PREDEFINED_TYPES = %w(
- char varchar enum binary text tinytext mediumtext
- longtext blob tinyblob mediumblob longblob timestamp
- date time datetime year double decimal float int
- integer tinyint mediumint bigint smallint unsigned bit
- bool boolean hex bin oct
- )
-
- PREDEFINED_FUNCTIONS = %w( sum cast abs pi count min max avg )
-
- DIRECTIVES = %w( auto_increment unique default charset )
-
- PREDEFINED_CONSTANTS = %w( null true false )
-
- IDENT_KIND = CaseIgnoringWordList.new(:ident).
- add(RESERVED_WORDS, :reserved).
- add(PREDEFINED_TYPES, :pre_type).
- add(PREDEFINED_CONSTANTS, :pre_constant).
- add(PREDEFINED_FUNCTIONS, :predefined).
- add(DIRECTIVES, :directive)
-
- ESCAPE = / [rbfntv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | . /mx
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
-
- STRING_PREFIXES = /[xnb]|_\w+/i
-
- def scan_tokens tokens, options
-
- state = :initial
- string_type = nil
- string_content = ''
-
- until eos?
-
- kind = nil
- match = nil
-
- if state == :initial
-
- if scan(/ \s+ | \\\n /x)
- kind = :space
-
- elsif scan(/^(?:--\s?|#).*/)
- kind = :comment
-
- elsif scan(%r! /\* (?: .*? \*/ | .* ) !mx)
- kind = :comment
-
- elsif scan(/ [-+*\/=<>;,!&^|()\[\]{}~%] | \.(?!\d) /x)
- kind = :operator
-
- elsif scan(/(#{STRING_PREFIXES})?([`"'])/o)
- prefix = self[1]
- string_type = self[2]
- tokens << [:open, :string]
- tokens << [prefix, :modifier] if prefix
- match = string_type
- state = :string
- kind = :delimiter
-
- elsif match = scan(/ @? [A-Za-z_][A-Za-z_0-9]* /x)
- kind = match[0] == ?@ ? :variable : IDENT_KIND[match.downcase]
-
- elsif scan(/0[xX][0-9A-Fa-f]+/)
- kind = :hex
-
- elsif scan(/0[0-7]+(?![89.eEfF])/)
- kind = :oct
-
- elsif scan(/(?>\d+)(?![.eEfF])/)
- kind = :integer
-
- elsif scan(/\d[fF]|\d*\.\d+(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+/)
- kind = :float
-
- else
- getch
- kind = :error
-
- end
-
- elsif state == :string
- if match = scan(/[^\\"'`]+/)
- string_content << match
- next
- elsif match = scan(/["'`]/)
- if string_type == match
- if peek(1) == string_type # doubling means escape
- string_content << string_type << getch
- next
- end
- unless string_content.empty?
- tokens << [string_content, :content]
- string_content = ''
- end
- tokens << [matched, :delimiter]
- tokens << [:close, :string]
- state = :initial
- string_type = nil
- next
- else
- string_content << match
- end
- next
- elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
- unless string_content.empty?
- tokens << [string_content, :content]
- string_content = ''
- end
- kind = :char
- elsif match = scan(/ \\ . /mox)
- string_content << match
- next
- elsif scan(/ \\ | $ /x)
- unless string_content.empty?
- tokens << [string_content, :content]
- string_content = ''
- end
- kind = :error
- state = :initial
- else
- raise "else case \" reached; %p not handled." % peek(1), tokens
- end
-
- else
- raise 'else-case reached', tokens
-
- end
-
- match ||= matched
- unless kind
- raise_inspect 'Error token %p in line %d' %
- [[match, kind], line], tokens, state
- end
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
- tokens
-
- end
-
- end
-
-end end
\ No newline at end of file
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/yaml.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/yaml.rb
deleted file mode 100644
index 52fca90db..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/coderay/scanners/yaml.rb
+++ /dev/null
@@ -1,144 +0,0 @@
-module CodeRay
-module Scanners
-
- # YAML Scanner
- #
- # Based on the YAML scanner from Syntax by Jamis Buck.
- class YAML < Scanner
-
- register_for :yaml
- file_extension 'yml'
-
- KINDS_NOT_LOC = :all
-
- def scan_tokens tokens, options
-
- value_expected = nil
- state = :initial
- key_indent = indent = 0
-
- until eos?
-
- kind = nil
- match = nil
-
- if bol?
- key_indent = nil
- if $DEBUG
- indent = check(/ +/) ? matched.size : 0
- tokens << [indent.to_s, :debug]
- end
- end
-
- if match = scan(/ +[\t ]*/)
- kind = :space
-
- elsif match = scan(/\n+/)
- kind = :space
- state = :initial if match.index(?\n)
-
- elsif match = scan(/#.*/)
- kind = :comment
-
- elsif bol? and case
- when match = scan(/---|\.\.\./)
- tokens << [:open, :head]
- tokens << [match, :head]
- tokens << [:close, :head]
- next
- when match = scan(/%.*/)
- tokens << [match, :doctype]
- next
- end
-
- elsif state == :value and case
- when !check(/(?:"[^"]*")(?=: |:$)/) && scan(/"/)
- tokens << [:open, :string]
- tokens << [matched, :delimiter]
- tokens << [matched, :content] if scan(/ [^"\\]* (?: \\. [^"\\]* )* /mx)
- tokens << [matched, :delimiter] if scan(/"/)
- tokens << [:close, :string]
- next
- when match = scan(/[|>][-+]?/)
- tokens << [:open, :string]
- tokens << [match, :delimiter]
- string_indent = key_indent || column(pos - match.size - 1)
- tokens << [matched, :content] if scan(/(?:\n+ {#{string_indent + 1}}.*)+/)
- tokens << [:close, :string]
- next
- when match = scan(/(?![!"*&]).+?(?=$|\s+#)/)
- tokens << [match, :string]
- string_indent = key_indent || column(pos - match.size - 1)
- tokens << [matched, :string] if scan(/(?:\n+ {#{string_indent + 1}}.*)+/)
- next
- end
-
- elsif case
- when match = scan(/[-:](?= |$)/)
- state = :value if state == :colon && (match == ':' || match == '-')
- state = :value if state == :initial && match == '-'
- kind = :operator
- when match = scan(/[,{}\[\]]/)
- kind = :operator
- when state == :initial && match = scan(/[\w.() ]*\S(?=: |:$)/)
- kind = :key
- key_indent = column(pos - match.size - 1)
- # tokens << [key_indent.inspect, :debug]
- state = :colon
- when match = scan(/(?:"[^"\n]*"|'[^'\n]*')(?=: |:$)/)
- tokens << [:open, :key]
- tokens << [match[0,1], :delimiter]
- tokens << [match[1..-2], :content]
- tokens << [match[-1,1], :delimiter]
- tokens << [:close, :key]
- key_indent = column(pos - match.size - 1)
- # tokens << [key_indent.inspect, :debug]
- state = :colon
- next
- when scan(/(![\w\/]+)(:([\w:]+))?/)
- tokens << [self[1], :type]
- if self[2]
- tokens << [':', :operator]
- tokens << [self[3], :class]
- end
- next
- when scan(/&\S+/)
- kind = :variable
- when scan(/\*\w+/)
- kind = :global_variable
- when scan(/<)
- kind = :class_variable
- when scan(/\d\d:\d\d:\d\d/)
- kind = :oct
- when scan(/\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d(\.\d+)? [-+]\d\d:\d\d/)
- kind = :oct
- when scan(/:\w+/)
- kind = :symbol
- when scan(/[^:\s]+(:(?! |$)[^:\s]*)* .*/)
- kind = :error
- when scan(/[^:\s]+(:(?! |$)[^:\s]*)*/)
- kind = :error
- end
-
- else
- getch
- kind = :error
-
- end
-
- match ||= matched
-
- raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens if $DEBUG && !kind
- raise_inspect 'Empty token', tokens unless match
-
- tokens << [match, kind]
-
- end
-
- tokens
- end
-
- end
-
-end
-end
diff --git a/vendor/plugins/coderay-0.9.0/lib/term/ansicolor.rb b/vendor/plugins/coderay-0.9.0/lib/term/ansicolor.rb
deleted file mode 100644
index fb7dbd3ce..000000000
--- a/vendor/plugins/coderay-0.9.0/lib/term/ansicolor.rb
+++ /dev/null
@@ -1,220 +0,0 @@
-# = Term::ANSIColor - ANSI escape sequences in Ruby
-#
-# == Description
-#
-# This library can be used to color/uncolor strings using ANSI escape sequences.
-#
-# == Author
-#
-# Florian Frank mailto:flori@ping.de
-#
-# == License
-#
-# This is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License Version 2 as published by the Free
-# Software Foundation: www.gnu.org/copyleft/gpl.html
-#
-# == Download
-#
-# The latest version of this library can be downloaded at
-#
-# * http://rubyforge.org/frs?group_id=391
-#
-# The homepage of this library is located at
-#
-# * http://term-ansicolor.rubyforge.org
-#
-# == Examples
-#
-# The file examples/example.rb in the source/gem-distribution shows how
-# this library can be used:
-# require 'term/ansicolor'
-#
-# # Use this trick to work around namespace cluttering that
-# # happens if you just include Term::ANSIColor:
-#
-# class Color
-# class << self
-# include Term::ANSIColor
-# end
-# end
-#
-# print Color.red, Color.bold, "No Namespace cluttering:", Color.clear, "\n"
-# print Color.green + "green" + Color.clear, "\n"
-# print Color.on_red(Color.green("green")), "\n"
-# print Color.yellow { Color.on_black { "yellow on_black" } }, "\n\n"
-#
-# # Or shortcut Term::ANSIColor by assignment:
-# c = Term::ANSIColor
-#
-# print c.red, c.bold, "No Namespace cluttering (alternative):", c.clear, "\n"
-# print c.green + "green" + c.clear, "\n"
-# print c.on_red(c.green("green")), "\n"
-# print c.yellow { c.on_black { "yellow on_black" } }, "\n\n"
-#
-# # Anyway, I don't define any of Term::ANSIColor's methods in this example
-# # and I want to keep it short:
-# include Term::ANSIColor
-#
-# print red, bold, "Usage as constants:", reset, "\n"
-# print clear, "clear", reset, reset, "reset", reset,
-# bold, "bold", reset, dark, "dark", reset,
-# underscore, "underscore", reset, blink, "blink", reset,
-# negative, "negative", reset, concealed, "concealed", reset, "|\n",
-# black, "black", reset, red, "red", reset, green, "green", reset,
-# yellow, "yellow", reset, blue, "blue", reset, magenta, "magenta", reset,
-# cyan, "cyan", reset, white, "white", reset, "|\n",
-# on_black, "on_black", reset, on_red, "on_red", reset,
-# on_green, "on_green", reset, on_yellow, "on_yellow", reset,
-# on_blue, "on_blue", reset, on_magenta, "on_magenta", reset,
-# on_cyan, "on_cyan", reset, on_white, "on_white", reset, "|\n\n"
-#
-# print red, bold, "Usage as unary argument methods:", reset, "\n"
-# print clear("clear"), reset("reset"), bold("bold"), dark("dark"),
-# underscore("underscore"), blink("blink"), negative("negative"),
-# concealed("concealed"), "|\n",
-# black("black"), red("red"), green("green"), yellow("yellow"),
-# blue("blue"), magenta("magenta"), cyan("cyan"), white("white"), "|\n",
-# on_black("on_black"), on_red("on_red"), on_green("on_green"),#
-# on_yellow("on_yellow"), on_blue("on_blue"), on_magenta("on_magenta"),
-# on_cyan("on_cyan"), on_white("on_white"), "|\n\n"
-#
-# print red { bold { "Usage as block forms:" } }, "\n"
-# print clear { "clear" }, reset { "reset" }, bold { "bold" },
-# dark { "dark" }, underscore { "underscore" }, blink { "blink" },
-# negative { "negative" }, concealed { "concealed" }, "|\n",
-# black { "black" }, red { "red" }, green { "green" },
-# yellow { "yellow" }, blue { "blue" }, magenta { "magenta" },
-# cyan { "cyan" }, white { "white" }, "|\n",
-# on_black { "on_black" }, on_red { "on_red" }, on_green { "on_green" },
-# on_yellow { "on_yellow" }, on_blue { "on_blue" },
-# on_magenta { "on_magenta" }, on_cyan { "on_cyan" },
-# on_white { "on_white" }, "|\n\n"
-#
-# # Usage as Mixin into String or its Subclasses
-# class String
-# include Term::ANSIColor
-# end
-#
-# print "Usage as String Mixins:".red.bold, "\n"
-# print "clear".clear, "reset".reset, "bold".bold, "dark".dark,
-# "underscore".underscore, "blink".blink, "negative".negative,
-# "concealed".concealed, "|\n",
-# "black".black, "red".red, "green".green, "yellow".yellow,
-# "blue".blue, "magenta".magenta, "cyan".cyan, "white".white, "|\n",
-# "on_black".on_black, "on_red".on_red, "on_green".on_green,
-# "on_yellow".on_yellow, "on_blue".on_blue, "on_magenta".on_magenta,
-# "on_cyan".on_cyan, "on_white".on_white, "|\n\n"
-#
-# symbols = Term::ANSIColor::attributes
-# print red { bold { "All supported attributes = " } },
-# blue { symbols.inspect }, "\n\n"
-#
-# print "Send symbols to strings:".send(:red).send(:bold), "\n"
-# print symbols[12, 8].map { |c| c.to_s.send(c) }, "\n\n"
-#
-# print red { bold { "Make strings monochromatic again:" } }, "\n"
-# print [ "red".red, "not red anymore".red.uncolored,
-# uncolored { "not red anymore".red }, uncolored("not red anymore".red)
-# ].map { |x| x + "\n" }
-module Term
- # The ANSIColor module can be used for namespacing and mixed into your own
- # classes.
- module ANSIColor
- # :stopdoc:
- ATTRIBUTES = [
- [ :clear , 0 ],
- [ :reset , 0 ], # synonym for :clear
- [ :bold , 1 ],
- [ :dark , 2 ],
- [ :italic , 3 ], # not widely implemented
- [ :underline , 4 ],
- [ :underscore , 4 ], # synonym for :underline
- [ :blink , 5 ],
- [ :rapid_blink , 6 ], # not widely implemented
- [ :negative , 7 ], # no reverse because of String#reverse
- [ :concealed , 8 ],
- [ :strikethrough, 9 ], # not widely implemented
- [ :black , 30 ],
- [ :red , 31 ],
- [ :green , 32 ],
- [ :yellow , 33 ],
- [ :blue , 34 ],
- [ :magenta , 35 ],
- [ :cyan , 36 ],
- [ :white , 37 ],
- [ :on_black , 40 ],
- [ :on_red , 41 ],
- [ :on_green , 42 ],
- [ :on_yellow , 43 ],
- [ :on_blue , 44 ],
- [ :on_magenta , 45 ],
- [ :on_cyan , 46 ],
- [ :on_white , 47 ],
- ]
-
- ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
- # :startdoc:
-
- # Returns true, if the coloring function of this module
- # is switched on, false otherwise.
- def self.coloring?
- @coloring
- end
-
- # Turns the coloring on or off globally, so you can easily do
- # this for example:
- # Term::ANSIColor::coloring = STDOUT.isatty
- def self.coloring=(val)
- @coloring = val
- end
- self.coloring = true
-
- ATTRIBUTES.each do |c, v|
- eval %Q{
- def #{c}(string = nil)
- result = ''
- result << "\e[#{v}m" if Term::ANSIColor.coloring?
- if block_given?
- result << yield
- elsif string
- result << string
- elsif respond_to?(:to_str)
- result << self
- else
- return result #only switch on
- end
- result << "\e[0m" if Term::ANSIColor.coloring?
- result
- end
- }
- end
-
- # Regular expression that is used to scan for ANSI-sequences while
- # uncoloring strings.
- COLORED_REGEXP = /\e\[([34][0-7]|[0-9])m/
-
- # Returns an uncolored version of the string, that is all
- # ANSI-sequences are stripped from the string.
- def uncolored(string = nil) # :yields:
- if block_given?
- yield.gsub(COLORED_REGEXP, '')
- elsif string
- string.gsub(COLORED_REGEXP, '')
- elsif respond_to?(:to_str)
- gsub(COLORED_REGEXP, '')
- else
- ''
- end
- end
-
- module_function
-
- # Returns an array of all Term::ANSIColor attributes as symbols.
- def attributes
- ATTRIBUTE_NAMES
- end
- extend self
- end
-end
- # vim: set et sw=2 ts=2: