summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/coderay/scanners/ruby.rb17
-rw-r--r--lib/coderay/scanners/ruby/patterns.rb13
-rw-r--r--test/scanners/ruby/diffed.expected.raydebug4
-rw-r--r--test/scanners/ruby/evil.expected.raydebug14
-rw-r--r--test/scanners/ruby/example.expected.raydebug10
-rw-r--r--test/scanners/ruby/pleac.expected.raydebug18
-rw-r--r--test/scanners/ruby/strange.expected.raydebug34
-rw-r--r--test/scanners/ruby/tk-calc.expected.raydebug2
8 files changed, 58 insertions, 54 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index f8f27b7..1bbfe07 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -124,7 +124,8 @@ module Scanners
# {{{
if match = scan(/[ \t\f]+/)
kind = :space
- match << scan(/\s*/) unless eos? or heredocs
+ match << scan(/\s*/) unless eos? || heredocs
+ value_expected = true if match.index(?\n) # FIXME not quite true
tokens << [match, kind]
next
@@ -175,6 +176,7 @@ module Scanners
value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o)
# OPERATORS #
+ # TODO: match (), [], {} as one single operator
elsif not last_token_dot and match = scan(/ \.\.\.? | (?:\.|::)() | [,\(\)\[\]\{\}] | ==?=? /x)
if match !~ / [.\)\]\}] /x or match =~ /\.\.\.?/
value_expected = :set
@@ -210,8 +212,9 @@ module Scanners
interpreted = true
state = patterns::StringState.new :regexp, interpreted, match
- elsif match = scan(/#{patterns::NUMERIC}/o)
- kind = if self[1] then :float else :integer end
+ # 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::SYMBOL}/o)
case delim = match[1]
@@ -338,9 +341,11 @@ module Scanners
end
# }}}
-
- value_expected = value_expected == :set
- last_token_dot = last_token_dot == :set
+
+ unless kind == :error
+ value_expected = value_expected == :set
+ last_token_dot = last_token_dot == :set
+ end
if $DEBUG and not kind
raise_inspect 'Error token %p in line %d' %
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb
index 88fd1e0..6f044f2 100644
--- a/lib/coderay/scanners/ruby/patterns.rb
+++ b/lib/coderay/scanners/ruby/patterns.rb
@@ -69,7 +69,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 = /
:
@@ -126,15 +126,14 @@ module Scanners
/mx
# Checks for a valid value to follow. This enables
- # fancy_allowed in method calls.
+ # value_expected in method calls without parentheses.
VALUE_FOLLOWS = /
- \s+
+ (?>[ \t\f\v]+)
(?:
[%\/][^\s=]
- |
- <<-?\S
- |
- #{CHARACTER}
+ | <<-?\S
+ | [-+] \d
+ | #{CHARACTER}
)
/x
diff --git a/test/scanners/ruby/diffed.expected.raydebug b/test/scanners/ruby/diffed.expected.raydebug
index 8881649..36b4528 100644
--- a/test/scanners/ruby/diffed.expected.raydebug
+++ b/test/scanners/ruby/diffed.expected.raydebug
@@ -3,7 +3,7 @@ constant(Index)operator(:) regexp<delimiter(/)content(Users)delimiter(/)>ident(j
operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(=)
operator(-)operator(-)operator(-) regexp<delimiter(/)content(Users)delimiter(/)>ident(jgoebel)operator(/)ident(rails)operator(/)ident(pastie)operator(/)ident(app)operator(/)ident(controllers)operator(/)ident(pastes_controller)operator(.)ident(rb) operator(()ident(revision) integer(1431)operator(\))
operator(+)operator(+)operator(+) regexp<delimiter(/)content(Users)delimiter(/)>ident(jgoebel)operator(/)ident(rails)operator(/)ident(pastie)operator(/)ident(app)operator(/)ident(controllers)operator(/)ident(pastes_controller)operator(.)ident(rb) operator(()ident(revision) integer(1437)operator(\))
-error(@)error(@) integer(-1)operator(,)integer(6) integer(+1)operator(,)integer(10) error(@)error(@)
+error(@)error(@) integer(-1)operator(,)integer(6) operator(+)integer(1)operator(,)integer(10) error(@)error(@)
operator(+)ident(require) string<delimiter(')content(login_system)delimiter(')>
ident(require) string<delimiter(')content(coderay)delimiter(')>
@@ -14,7 +14,7 @@ operator(+) ident(before_filter) symbol(:attempt_cookie_login)
comment(# caches_action :recent)
-error(@)error(@) integer(-10)operator(,)integer(11) integer(+14)operator(,)integer(7) error(@)error(@)
+error(@)error(@) integer(-10)operator(,)integer(11) operator(+)integer(14)operator(,)integer(7) error(@)error(@)
reserved(def) method(show)
instance_variable(@paste) operator(=) constant(Paste)operator(.)ident(find)operator(()ident(params)operator([)symbol(:id)operator(])operator(\))
diff --git a/test/scanners/ruby/evil.expected.raydebug b/test/scanners/ruby/evil.expected.raydebug
index 84ac855..439e04c 100644
--- a/test/scanners/ruby/evil.expected.raydebug
+++ b/test/scanners/ruby/evil.expected.raydebug
@@ -184,11 +184,11 @@ comment(# p(p $ a\) #work)
ident(p)operator(()operator(()ident(p) ident(p)operator(,)ident(p)operator(\))operator(\))
ident(p)operator(()operator(()ident(p) ident(p)operator(\))operator(\))
ident(p)operator(()operator(()ident(p) ident(p)operator(,)ident(p)operator(\))operator(\))
- ident(p)operator(()ident(p)integer(-0)operator(\))
+ ident(p)operator(()ident(p)operator(-)integer(0)operator(\))
ident(p)operator(()ident(p) integer(-0)operator(\))
ident(p)operator(()ident(p)operator(-) integer(0)operator(\))
ident(p)operator(()ident(p) operator(-) integer(0)operator(\))
- ident(p)operator(()ident(p)integer(+9)operator(\))
+ ident(p)operator(()ident(p)operator(+)integer(9)operator(\))
ident(p)operator(()ident(p) integer(+9)operator(\))
ident(p)operator(()ident(p)operator(+) integer(9)operator(\))
ident(p)operator(()ident(p) operator(+) integer(9)operator(\))
@@ -406,7 +406,7 @@ reserved(def) pre_constant(nil)operator(.)ident(+)operator(()ident(x)operator(\)
reserved(def) pre_constant(nil)operator(.)ident([])operator(()operator(*)ident(x)operator(\)) operator([)ident(x)operator(]) reserved(end)
ident(p)operator(() ident(p) operator(+) integer(5) operator(\))
ident(p)operator(() ident(p) integer(+5) operator(\))
-ident(p)operator(() ident(p)integer(+5) operator(\))
+ident(p)operator(() ident(p)operator(+)integer(5) operator(\))
ident(p)operator(() ident(p)operator([)operator(]) operator(\))
ident(p)operator(() ident(p) operator([)operator(]) operator(\))
ident(p)operator(() ident(p) operator([) operator(]) operator(\))
@@ -421,8 +421,8 @@ ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])operator(!)pre_c
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([]) operator(!)pre_constant(false) comment(#value)
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])operator(~)integer(9) comment(#value)
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([]) operator(~)integer(9) comment(#value)
-ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])integer(-9) comment(#op)
-ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])integer(+9) comment(#op)
+ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])operator(-)integer(9) comment(#op)
+ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])operator(+)integer(9) comment(#op)
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([]) integer(-9) comment(#value)
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([]) integer(+9) comment(#value)
ident(p) constant(Foou)operator(.)ident(new)operator(.)ident([])operator(<<)integer(9) comment(#op)
@@ -1076,7 +1076,7 @@ reserved(def) method(printem0)operator(()ident(a)operator(,)ident(b)operator(,)i
ident(p)operator(()ident(c) integer(+77)operator(\))
reserved(end)
reserved(def) method(printem2) ident(a)operator(,)ident(b)operator(,)ident(c)operator(;) ident(p)operator(()ident(a) integer(+77)operator(\))operator(;) ident(p)operator(()ident(b) integer(+77)operator(\))operator(;) ident(p)operator(()ident(c) integer(+77)operator(\)) reserved(end)
-reserved(def) method(three)operator(()operator(\)) operator(()integer(1)integer(+2)operator(\)) reserved(end)
+reserved(def) method(three)operator(()operator(\)) operator(()integer(1)operator(+)integer(2)operator(\)) reserved(end)
reserved(def) method(d)operator(;)reserved(end)
reserved(def) method(d)operator(()operator(\))reserved(end)
@@ -1092,7 +1092,7 @@ ident(printem) integer(1)operator(,)integer(2)operator(,)integer(3)
ident(a)operator(=)integer(1)
ident(p)operator(()ident(a) integer(+77)operator(\))
-reserved(def) method(hhh)operator(()ident(a)operator(=)operator(()integer(1)integer(+2)operator(\))operator(\)) ident(a) reserved(end)
+reserved(def) method(hhh)operator(()ident(a)operator(=)operator(()integer(1)operator(+)integer(2)operator(\))operator(\)) ident(a) reserved(end)
diff --git a/test/scanners/ruby/example.expected.raydebug b/test/scanners/ruby/example.expected.raydebug
index 5a684e6..9e17af6 100644
--- a/test/scanners/ruby/example.expected.raydebug
+++ b/test/scanners/ruby/example.expected.raydebug
@@ -747,7 +747,7 @@ comment(# end)
comment(# end)
reserved(if) global_variable($0) operator(==) pre_constant(__FILE__)
- ident(eval) pre_constant(DATA)operator(.)ident(read)operator(,) pre_constant(nil)operator(,) global_variable($0)operator(,) pre_constant(__LINE__)integer(+4)
+ ident(eval) pre_constant(DATA)operator(.)ident(read)operator(,) pre_constant(nil)operator(,) global_variable($0)operator(,) pre_constant(__LINE__)operator(+)integer(4)
reserved(end)
comment(# = rweb - CGI Support Library)
@@ -984,7 +984,7 @@ reserved(class) class(Rweb)
comment(# If the index is numerical convert it to an Integer)
ident(key) operator(=) ident(key)operator(.)ident(to_i)
reserved(elsif) ident(key)operator([)integer(0)operator(])operator(.)ident(chr) operator(==) string<delimiter(")content(')delimiter(")> operator(||) ident(key)operator([)integer(0)operator(])operator(.)ident(chr) operator(==) string<delimiter(')content(")delimiter(')>
- ident(key) operator(=) ident(key)operator([)integer(1)operator(,) ident(key)operator(.)ident(length)operator(()operator(\)) integer(-2)operator(])
+ ident(key) operator(=) ident(key)operator([)integer(1)operator(,) ident(key)operator(.)ident(length)operator(()operator(\)) operator(-)integer(2)operator(])
reserved(end)
reserved(if) operator(!)ident(akt)operator(.)ident(has_key?)operator(()ident(key)operator(\)) operator(||) operator(!)ident(akt)operator([)ident(key)operator(])operator(.)ident(class) operator(==) constant(Hash)
comment(# create an empty Hash if there isn't already one)
@@ -1033,7 +1033,7 @@ reserved(class) class(Rweb)
comment(# If the index is numerical convert it to an Integer)
ident(key) operator(=) ident(key)operator(.)ident(to_i)
reserved(elsif) ident(key)operator([)integer(0)operator(])operator(.)ident(chr) operator(==) string<delimiter(")content(')delimiter(")> operator(||) ident(key)operator([)integer(0)operator(])operator(.)ident(chr) operator(==) string<delimiter(')content(")delimiter(')>
- ident(key) operator(=) ident(key)operator([)integer(1)operator(,) ident(key)operator(.)ident(length)operator(()operator(\)) integer(-2)operator(])
+ ident(key) operator(=) ident(key)operator([)integer(1)operator(,) ident(key)operator(.)ident(length)operator(()operator(\)) operator(-)integer(2)operator(])
reserved(end)
reserved(if) operator(!)ident(akt)operator(.)ident(has_key?)operator(()ident(key)operator(\)) operator(||) operator(!)ident(akt)operator([)ident(key)operator(])operator(.)ident(class) operator(==) constant(Hash)
comment(# create an empty Hash if there isn't already one)
@@ -2397,7 +2397,7 @@ ident(private)
reserved(end)
reserved(if) global_variable($0) operator(==) pre_constant(__FILE__)
- ident(eval) pre_constant(DATA)operator(.)ident(read)operator(,) pre_constant(nil)operator(,) global_variable($0)operator(,) pre_constant(__LINE__)integer(+4)
+ ident(eval) pre_constant(DATA)operator(.)ident(read)operator(,) pre_constant(nil)operator(,) global_variable($0)operator(,) pre_constant(__LINE__)operator(+)integer(4)
reserved(end)
ident(require) string<delimiter(')content(test/unit)delimiter(')>
@@ -3381,7 +3381,7 @@ reserved(end)
comment(#$stdin = DATA)
ident(gets)operator(.)ident(to_i)operator(.)ident(times) reserved(do) operator(|)ident(i)operator(|)
- ident(puts) string<delimiter(")content(Scenario #)inline<inline_delimiter(#{)ident(i)integer(+1)inline_delimiter(})>content(:)delimiter(")>
+ ident(puts) string<delimiter(")content(Scenario #)inline<inline_delimiter(#{)ident(i)operator(+)integer(1)inline_delimiter(})>content(:)delimiter(")>
ident(fs) operator(=) string<delimiter(')delimiter(')>
integer(9)operator(.)ident(times) operator({) ident(fs) operator(<<) ident(gets) operator(})
ident(cube) operator(=) constant(Cube)operator(.)ident(new)
diff --git a/test/scanners/ruby/pleac.expected.raydebug b/test/scanners/ruby/pleac.expected.raydebug
index 0a9a6ac..07ef0f2 100644
--- a/test/scanners/ruby/pleac.expected.raydebug
+++ b/test/scanners/ruby/pleac.expected.raydebug
@@ -200,8 +200,8 @@ string<delimiter(")content(thIS is a loNG liNE)delimiter(")>operator(.)ident(gsu
comment(# @@PLEAC@@_1.10)
-string<delimiter(")content(I have )inline<inline_delimiter(#{)ident(n)integer(+1)inline_delimiter(})>content( guanacos.)delimiter(")>
-ident(print) string<delimiter(")content(I have )delimiter(")>operator(,) ident(n)integer(+1)operator(,) string<delimiter(")content( guanacos.)delimiter(")>
+string<delimiter(")content(I have )inline<inline_delimiter(#{)ident(n)operator(+)integer(1)inline_delimiter(})>content( guanacos.)delimiter(")>
+ident(print) string<delimiter(")content(I have )delimiter(")>operator(,) ident(n)operator(+)integer(1)operator(,) string<delimiter(")content( guanacos.)delimiter(")>
comment(# @@PLEAC@@_1.11)
@@ -459,7 +459,7 @@ reserved(end)
comment(# @@PLEAC@@_2.7)
-ident(random) operator(=) ident(rand)operator(()ident(y)operator(-)ident(x)integer(+1)operator(\))operator(+)ident(x)
+ident(random) operator(=) ident(rand)operator(()ident(y)operator(-)ident(x)operator(+)integer(1)operator(\))operator(+)ident(x)
ident(chars) operator(=) operator([)string<delimiter(")content(A)delimiter(")>operator(..)string<delimiter(")content(Z)delimiter(")>operator(,)string<delimiter(")content(a)delimiter(")>operator(..)string<delimiter(")content(z)delimiter(")>operator(,)string<delimiter(")content(0)delimiter(")>operator(..)string<delimiter(")content(9)delimiter(")>operator(])operator(.)ident(collect) operator({) operator(|)ident(r)operator(|) ident(r)operator(.)ident(to_a) operator(})operator(.)ident(join) operator(+) string<delimiter(%q()content(!@$%^&*)delimiter(\))>
ident(password) operator(=) operator(()integer(1)operator(..)integer(8)operator(\))operator(.)ident(collect) operator({) ident(chars)operator([)ident(rand)operator(()ident(chars)operator(.)ident(size)operator(\))operator(]) operator(})operator(.)ident(pack)operator(()string<delimiter(")content(C*)delimiter(")>operator(\))
@@ -953,7 +953,7 @@ reserved(end)
comment(# @@PLEAC@@_4.3)
comment(# (note: AFAIK Ruby doesn't allow gory change of Array length\))
comment(# grow the array by assigning nil to past the end of array)
-ident(ary)operator([)ident(new_size)integer(-1)operator(]) operator(=) pre_constant(nil)
+ident(ary)operator([)ident(new_size)operator(-)integer(1)operator(]) operator(=) pre_constant(nil)
comment(# shrink the array by slicing it down)
ident(ary)operator(.)ident(slice!)operator(()ident(new_size)operator(..)integer(-1)operator(\))
comment(# init the array with given size)
@@ -1207,8 +1207,8 @@ reserved(end)
comment(# @@PLEAC@@_4.17)
reserved(def) method(fisher_yates_shuffle)operator(()ident(a)operator(\))
- operator(()ident(a)operator(.)ident(size)integer(-1)operator(\))operator(.)ident(downto)operator(()integer(1)operator(\)) operator({) operator(|)ident(i)operator(|)
- ident(j) operator(=) ident(rand)operator(()ident(i)integer(+1)operator(\))
+ operator(()ident(a)operator(.)ident(size)operator(-)integer(1)operator(\))operator(.)ident(downto)operator(()integer(1)operator(\)) operator({) operator(|)ident(i)operator(|)
+ ident(j) operator(=) ident(rand)operator(()ident(i)operator(+)integer(1)operator(\))
ident(a)operator([)ident(i)operator(])operator(,) ident(a)operator([)ident(j)operator(]) operator(=) ident(a)operator([)ident(j)operator(])operator(,) ident(a)operator([)ident(i)operator(]) reserved(if) ident(i) operator(!=) ident(j)
operator(})
reserved(end)
@@ -1252,7 +1252,7 @@ reserved(class) class(WordFormatter)
comment(# now process each item, picking out proper piece for this position)
integer(0)operator(.)ident(upto)operator(()ident(rows) operator(*) ident(columns) operator(-) integer(1)operator(\)) operator({) operator(|)ident(item)operator(|)
ident(target) operator(=) operator(()ident(item) operator(%) ident(columns)operator(\)) operator(*) ident(rows) operator(+) operator(()ident(item) operator(/) ident(columns)operator(\))
- ident(eol) operator(=) operator(()operator(()ident(item)integer(+1)operator(\)) operator(%) ident(columns) operator(==) integer(0)operator(\))
+ ident(eol) operator(=) operator(()operator(()ident(item)operator(+)integer(1)operator(\)) operator(%) ident(columns) operator(==) integer(0)operator(\))
ident(piece) operator(=) ident(wordlist)operator([)ident(target)operator(]) operator(||) string<delimiter(")delimiter(")>
ident(piece) operator(=) ident(piece)operator(.)ident(ljust)operator(()ident(collen)operator(\)) reserved(unless) ident(eol)
ident(print) ident(piece)
@@ -5256,7 +5256,7 @@ ident(lines)operator(.)ident(tie)operator(()ident(filename)operator(,) constant(
comment(# print the records in order.)
comment(# Opposed to perl, the tied array behaves exactly as a normal array)
ident(puts) string<delimiter(")char(\\n)content(Original)delimiter(")>
- reserved(for) ident(i) reserved(in) integer(0)operator(..)operator(()ident(lines)operator(.)ident(length)integer(-1)operator(\))
+ reserved(for) ident(i) reserved(in) integer(0)operator(..)operator(()ident(lines)operator(.)ident(length)operator(-)integer(1)operator(\))
ident(puts) string<delimiter(")inline<inline_delimiter(#{)ident(i)inline_delimiter(})>content(: )inline<inline_delimiter(#{)ident(lines)operator([)ident(i)operator(])inline_delimiter(})>delimiter(")>
reserved(end)
@@ -5505,7 +5505,7 @@ ident(values) operator(=) operator(()integer(1)operator(..)integer(5)operator(\)
reserved(for) ident(i) reserved(in) ident(values)
ident(max) operator(=) ident(i) reserved(if) ident(max) operator(<) ident(i)
reserved(end)
-ident(ratio) operator(=) ident(Float)operator(()ident(ws_col)integer(-12)operator(\))operator(/)ident(max) comment(# chars per unit)
+ident(ratio) operator(=) ident(Float)operator(()ident(ws_col)operator(-)integer(12)operator(\))operator(/)ident(max) comment(# chars per unit)
reserved(for) ident(i) reserved(in) ident(values)
ident(printf) string<delimiter(")content(%8.1f %s)char(\\n)delimiter(")>operator(,) ident(i)operator(,) string<delimiter(")content(*)delimiter(")> operator(*) operator(()ident(ratio)operator(*)ident(i)operator(\))
reserved(end)
diff --git a/test/scanners/ruby/strange.expected.raydebug b/test/scanners/ruby/strange.expected.raydebug
index fcab30e..de94983 100644
--- a/test/scanners/ruby/strange.expected.raydebug
+++ b/test/scanners/ruby/strange.expected.raydebug
@@ -1,10 +1,10 @@
-ident(a)operator(.)ident(each)operator({)operator(|)ident(el)operator(|)ident(anz)operator([)ident(el)operator(])operator(=)ident(anz)operator([)ident(el)operator(])operator(?)ident(anz)operator([)ident(el)operator(])integer(+1)operator(:)integer(1)operator(})
+ident(a)operator(.)ident(each)operator({)operator(|)ident(el)operator(|)ident(anz)operator([)ident(el)operator(])operator(=)ident(anz)operator([)ident(el)operator(])operator(?)ident(anz)operator([)ident(el)operator(])operator(+)integer(1)operator(:)integer(1)operator(})
reserved(while) ident(x)operator(<)integer(10000)
comment(#a bis f dienen dazu die Nachbarschaft festzulegen. Man stelle sich die #Zahl von 1 bis 64 im Binärcode vor 1 bedeutet an 0 aus)
ident(b)operator(=)operator(()ident(p)operator([)ident(x)operator(])operator(%)integer(32)operator(\))operator(/)integer(16)operator(<)integer(1) operator(?) integer(0) operator(:) integer(1)
- operator(()ident(x)integer(-102)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)integer(-102)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(a)operator(+)operator(()ident(x)integer(-101)operator(>)operator(=)integer(0)operator(?)ident(n)operator([)ident(x)integer(-101)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(e)operator(+)ident(n)operator([)ident(x)integer(-100)operator(])operator(.)ident(to_i)operator(+)operator(()ident(x)integer(-99)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)integer(-99)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(f)operator(+)operator(()ident(x)integer(-98)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)integer(-98)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(a)operator(+)
- ident(n)operator([)ident(x)integer(+199)operator(])operator(.)ident(to_i)operator(*)ident(b)operator(+)ident(n)operator([)ident(x)integer(+200)operator(])operator(.)ident(to_i)operator(*)ident(d)operator(+)ident(n)operator([)ident(x)integer(+201)operator(])operator(.)ident(to_i)operator(*)ident(b)
+ operator(()ident(x)operator(-)integer(102)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)operator(-)integer(102)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(a)operator(+)operator(()ident(x)operator(-)integer(101)operator(>)operator(=)integer(0)operator(?)ident(n)operator([)ident(x)operator(-)integer(101)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(e)operator(+)ident(n)operator([)ident(x)operator(-)integer(100)operator(])operator(.)ident(to_i)operator(+)operator(()ident(x)operator(-)integer(99)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)operator(-)integer(99)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(f)operator(+)operator(()ident(x)operator(-)integer(98)operator(>)operator(=)integer(0)operator(?) ident(n)operator([)ident(x)operator(-)integer(98)operator(])operator(.)ident(to_i) operator(:) integer(0)operator(\))operator(*)ident(a)operator(+)
+ ident(n)operator([)ident(x)operator(+)integer(199)operator(])operator(.)ident(to_i)operator(*)ident(b)operator(+)ident(n)operator([)ident(x)operator(+)integer(200)operator(])operator(.)ident(to_i)operator(*)ident(d)operator(+)ident(n)operator([)ident(x)operator(+)integer(201)operator(])operator(.)ident(to_i)operator(*)ident(b)
comment(#und die Ausgabe folgt)
ident(g)operator(=)string<delimiter(%w{)delimiter(})>
@@ -145,11 +145,11 @@ comment(# license ( http://www.ruby-lang.org/en/LICENSE.txt \))
global_variable($e)operator(=)string<delimiter(")delimiter(")>
reserved(def) method(a)operator(()operator(\))
- global_variable($a)operator(=)global_variable($a)integer(+1)
+ global_variable($a)operator(=)global_variable($a)operator(+)integer(1)
reserved(end)
reserved(def) method(b)operator(()operator(\))
- global_variable($a)operator(=)global_variable($a)integer(+5)
+ global_variable($a)operator(=)global_variable($a)operator(+)integer(5)
reserved(end)
reserved(def) method(c)operator(()operator(\))
@@ -161,7 +161,7 @@ reserved(def) method(d)operator(()operator(\))
reserved(end)
reserved(def) method(e)operator(()operator(\))
- global_variable($a)operator(=)global_variable($a)integer(+16)
+ global_variable($a)operator(=)global_variable($a)operator(+)integer(16)
reserved(end)
ident(d)operator(;)ident(e)operator(;)ident(b)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(c)operator(;)ident(d)operator(;)ident(e)operator(;)ident(e)operator(;)ident(e)operator(;)ident(e)operator(;)ident(e)operator(;)ident(e)operator(;)ident(b)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(c)operator(;)ident(d)operator(;)ident(e)operator(;)ident(e)operator(;)ident(e)operator(;)ident(a)operator(;)ident(a)operator(;)ident(a)operator(;)ident(c)operator(;)ident(d)operator(;)ident(e)operator(;)ident(e)operator(;)ident(b)operator(;)ident(b)operator(;)
@@ -229,7 +229,7 @@ inline_delimiter(})>content(n("http://www.)char(\\#)nesting_delimiter({)content(
)char(\\160)content(ut)char(\\x73)content((s\) : )inline<inline_delimiter(#{)string<delimiter(%w{)content(s p)delimiter(})>operator([)integer(-1)operator(])inline_delimiter(})>content(rint("%-38s "%s\))nesting_delimiter(})content(;p)char(\\x72)char(\\x69)char(\\x6e)content(t")char(\\n)content(? ";e)char(\\x76)content(al(
['puts")char(\\n)char(\\#)nesting_delimiter({)content(l[0..3])nesting_delimiter(})content(ing...)char(\\n)char(\\n)content("','$c=gets.chomp.to_i'].sort.join(";"\)\);)inline<inline_delimiter(#{)integer(111)operator(.)ident(chr)
inline_delimiter(})>content(pen("http://www.)char(\\#)nesting_delimiter({)content(n)nesting_delimiter(})content("+$F[$c-1][0]\))nesting_delimiter({)content(|n|$_=n.read[/^)char(\\\\)content(s+<span.+/m];)inline<inline_delimiter(#{)operator(()string<delimiter(')content(a)delimiter(')>operator(..)string<delimiter(")content(z)delimiter(")>operator(\))operator(.)
-ident(to_a)operator([)integer(10)integer(-5)operator(*)integer(2)operator(])inline_delimiter(})>content(.e)char(\\141)content(ch)nesting_delimiter({)content(|(z,f\)|)char(\\x67)content(sub!(z,f\))nesting_delimiter(})content(;)char(\\147)content(sub!(/&()char(\\\\)content(w+\);/\))nesting_delimiter({)content(|y|p.
+ident(to_a)operator([)integer(10)operator(-)integer(5)operator(*)integer(2)operator(])inline_delimiter(})>content(.e)char(\\141)content(ch)nesting_delimiter({)content(|(z,f\)|)char(\\x67)content(sub!(z,f\))nesting_delimiter(})content(;)char(\\147)content(sub!(/&()char(\\\\)content(w+\);/\))nesting_delimiter({)content(|y|p.
ke)char(\\171)char(\\077)content(($1\)?p[$1]:y)nesting_delimiter(})content(;while$_=~/([^)char(\\n)content(])nesting_delimiter({)content(81,)nesting_delimiter(})content(\)/:z=$1.dup;f=$1.dup;f[f.rindex(
" ",80\),1]=")char(\\n)content(";f.s)char(\\165)content(b!(/)char(\\n)content([ )char(\\t)content(]+/,")char(\\n)content("\);s)char(\\165)content(b!(/)char(\\#)nesting_delimiter({)content(R)char(\\x65)content(g)char(\\x65)content(xp.
)char(\\x65)content(scap)char(\\x65)content((z\))nesting_delimiter(})content(/,f\)end)nesting_delimiter(})content(;while)char(\\040)char(\\163)content(ub!(/^(?:[^)char(\\n)content(]*)char(\\n)content(\))nesting_delimiter({)content(20)nesting_delimiter(})content(/, ""\):puts")char(\\#)content($&
@@ -318,20 +318,20 @@ ident(c)operator(,)ident(d)operator(=)ident(a) operator([)integer(1) operator
ident(call)operator(() ident(e)operator(+)ident(b)operator([) integer(0)operator(]) operator(,)ident(c)operator(*) ident(e)operator(/)ident(d)operator(+)ident(b) operator([)integer(1)operator(])operator(\))operator(})operator(;)reserved(end)operator(;)constant(V)operator(=)integer(0)operator(;)reserved(def) method(bo)operator(&)ident(u)
global_variable($u)operator(||=) constant(V)operator(;) operator(;)global_variable($u) operator(+=) integer(1)operator(+)constant(V) operator(;)operator(;) reserved(return) ident(u)operator(.)ident(call) reserved(if)global_variable($u)operator(>)integer(1)operator(;)ident(q)operator(=)float(128.0)
operator(;)ident(x)operator(=)operator(()constant(V) operator(..) integer(255) operator(\))operator(.) ident(map) operator({)operator(|) ident(y)operator(|)ident(f1)operator(,)ident(z) operator(=)ident(sin)operator(()ident(y)operator(.)ident(to_f)operator(*)constant(PI)operator(/)ident(q)operator(\))operator(,)
-ident(sin)operator(()operator(() ident(y)operator(.) ident(to_f) operator(+) integer(200) operator(\))operator(*)constant(PI)operator(/)operator(() ident(q)operator(\))operator(\))operator(;)operator([)operator(()ident(f1)operator(*)float(30.0)float(+110.0)operator(\))operator(.)
-ident(to_i)operator(,)operator(()operator(()ident(f1)operator(+)ident(z)operator(\))operator(*)float(10.0)float(+40.0)operator(\))operator(.)ident(to_i)operator(,)operator(()ident(z)operator(*)float(20.0)float(+120.0)operator(\))operator(.)ident(to_i)operator(])operator(})operator(;)constant(Y)operator(.)ident(times)operator({)operator(|)ident(i)operator(|)constant(X)operator(.)
-ident(times)operator({)operator(|)ident(j)operator(|)ident(i1)operator(=)operator(()operator(()ident(i)operator(*)float(0.3)integer(+150)operator(\))operator(*)operator(()ident(j)operator(*)float(1.1)integer(+50)operator(\))operator(/)float(50.0)operator(\))operator(.)ident(to_i)operator(;)ident(i2)operator(=)operator(()operator(()ident(i)operator(*)float(0.8)integer(+510)operator(\))operator(*)operator(()
-ident(j)operator(*)float(0.9)integer(+1060)operator(\))operator(/)float(51.0)operator(\))operator(.)ident(to_i)operator(;)global_variable($s)operator([)ident(i)operator(])operator([)ident(j)operator(])operator(=)ident(x)operator([)operator(()ident(i1)operator(*)ident(i2)operator(\))operator(%)integer(255)operator(])operator(.)ident(clone)operator(})operator(})operator(;)global_variable($a)operator(=)operator(()integer(0)operator(..)integer(25)operator(\))operator(.)
+ident(sin)operator(()operator(() ident(y)operator(.) ident(to_f) operator(+) integer(200) operator(\))operator(*)constant(PI)operator(/)operator(() ident(q)operator(\))operator(\))operator(;)operator([)operator(()ident(f1)operator(*)float(30.0)operator(+)float(110.0)operator(\))operator(.)
+ident(to_i)operator(,)operator(()operator(()ident(f1)operator(+)ident(z)operator(\))operator(*)float(10.0)operator(+)float(40.0)operator(\))operator(.)ident(to_i)operator(,)operator(()ident(z)operator(*)float(20.0)operator(+)float(120.0)operator(\))operator(.)ident(to_i)operator(])operator(})operator(;)constant(Y)operator(.)ident(times)operator({)operator(|)ident(i)operator(|)constant(X)operator(.)
+ident(times)operator({)operator(|)ident(j)operator(|)ident(i1)operator(=)operator(()operator(()ident(i)operator(*)float(0.3)operator(+)integer(150)operator(\))operator(*)operator(()ident(j)operator(*)float(1.1)operator(+)integer(50)operator(\))operator(/)float(50.0)operator(\))operator(.)ident(to_i)operator(;)ident(i2)operator(=)operator(()operator(()ident(i)operator(*)float(0.8)operator(+)integer(510)operator(\))operator(*)operator(()
+ident(j)operator(*)float(0.9)operator(+)integer(1060)operator(\))operator(/)float(51.0)operator(\))operator(.)ident(to_i)operator(;)global_variable($s)operator([)ident(i)operator(])operator([)ident(j)operator(])operator(=)ident(x)operator([)operator(()ident(i1)operator(*)ident(i2)operator(\))operator(%)integer(255)operator(])operator(.)ident(clone)operator(})operator(})operator(;)global_variable($a)operator(=)operator(()integer(0)operator(..)integer(25)operator(\))operator(.)
ident(inject)operator(()operator([)operator(])operator(\))operator({)operator(|)ident(a)operator(,)ident(i)operator(|)ident(a)operator(<<)operator(()constant(V)operator(..)integer(3)operator(\))operator(.)ident(inject)operator(()operator([)operator(])operator(\))operator({)operator(|)ident(r)operator(,)ident(j)operator(|)ident(r)operator(<<)global_variable($c)operator([)ident(i)operator(*)integer(4)operator(+)ident(j)operator(])operator(})operator(})operator(;)ident(u)operator(.)ident(call)operator(;)reserved(end)
constant(I)operator(=)constant(LocalJumpError)operator(;)reserved(def) method(run)operator(*)ident(a)operator(,)operator(&)ident(b)operator(;)reserved(return) reserved(if) ident(a)operator(.)ident(size)operator(==)constant(V)operator(;)reserved(if) ident(a)operator([)constant(V)operator(])operator(==)integer(666)operator(;)global_variable($b)operator(=)ident(b)
reserved(elsif)global_variable($b)operator(;)global_variable($b)operator(.)ident(call)operator(;)reserved(end)operator(;)reserved(end)operator(;)reserved(def) method(main) ident(s)operator(,)operator(&)ident(u)operator(;)global_variable($m)operator(=)constant(V)operator(;)ident(u)operator(.)ident(call) reserved(rescue) constant(I)operator(;)reserved(end)
reserved(def) method(rb_eval_string)operator(()operator(*)ident(a)operator(\))operator(;)reserved(end) comment(# you promised not to look here)
-reserved(def) method(ruby_init)operator(;)ident(q)operator(=)float(2.0)operator(;)ident(l)operator(=)operator(()operator(()constant(X)operator(**)ident(q)operator(\))operator(*)constant(A)operator(+)operator(()constant(Y)operator(**)ident(q)operator(\))operator(*)constant(A)operator(\))operator(**)constant(A)operator(;)constant(V)operator(.)ident(upto)operator(()constant(Y)integer(-4)operator(\))operator({)operator(|)ident(s)operator(|)constant(V)operator(.)
-ident(upto)operator(()constant(X)integer(-4)operator(\))operator({)operator(|)ident(q)operator(|)ident(d)operator(=)operator(()operator(()ident(q)operator(-)constant(X)operator(/)constant(A)operator(\))operator(**)ident(q)operator(+)operator(()ident(s)operator(-)constant(Y)operator(/)constant(A)operator(\))operator(**)ident(q)operator(\))operator(**)constant(A)operator(;)ident(e)operator(=)operator(()ident(cos)operator(()ident(d)operator(*)constant(PI)operator(/)operator(()ident(l)operator(/)ident(q)operator(\))operator(\))operator(/)ident(q)
-operator(+)constant(A)operator(\))operator(*)float(3.0)float(+1.0)operator(;)ident(v)operator(=)integer(2)operator(;)ident(f)operator(=)ident(v)operator(/)ident(e)operator(;)ident(a)operator(,)ident(p)operator(,)ident(b)operator(=)global_variable($s)operator([)ident(s)operator(])operator(,)global_variable($s)operator([)ident(s)integer(+1)operator(])operator(,)global_variable($s)operator([)ident(s)operator(+)ident(v)operator(])operator(;)ident(r)operator(=)ident(a)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(*)ident(e)operator(+)
-ident(p)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(+)ident(a)operator([)ident(q)integer(+1)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(+)ident(a)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(+)ident(v)operator(/)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(p)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(+)
+reserved(def) method(ruby_init)operator(;)ident(q)operator(=)float(2.0)operator(;)ident(l)operator(=)operator(()operator(()constant(X)operator(**)ident(q)operator(\))operator(*)constant(A)operator(+)operator(()constant(Y)operator(**)ident(q)operator(\))operator(*)constant(A)operator(\))operator(**)constant(A)operator(;)constant(V)operator(.)ident(upto)operator(()constant(Y)operator(-)integer(4)operator(\))operator({)operator(|)ident(s)operator(|)constant(V)operator(.)
+ident(upto)operator(()constant(X)operator(-)integer(4)operator(\))operator({)operator(|)ident(q)operator(|)ident(d)operator(=)operator(()operator(()ident(q)operator(-)constant(X)operator(/)constant(A)operator(\))operator(**)ident(q)operator(+)operator(()ident(s)operator(-)constant(Y)operator(/)constant(A)operator(\))operator(**)ident(q)operator(\))operator(**)constant(A)operator(;)ident(e)operator(=)operator(()ident(cos)operator(()ident(d)operator(*)constant(PI)operator(/)operator(()ident(l)operator(/)ident(q)operator(\))operator(\))operator(/)ident(q)
+operator(+)constant(A)operator(\))operator(*)float(3.0)operator(+)float(1.0)operator(;)ident(v)operator(=)integer(2)operator(;)ident(f)operator(=)ident(v)operator(/)ident(e)operator(;)ident(a)operator(,)ident(p)operator(,)ident(b)operator(=)global_variable($s)operator([)ident(s)operator(])operator(,)global_variable($s)operator([)ident(s)operator(+)integer(1)operator(])operator(,)global_variable($s)operator([)ident(s)operator(+)ident(v)operator(])operator(;)ident(r)operator(=)ident(a)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(*)ident(e)operator(+)
+ident(p)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(+)ident(a)operator([)ident(q)operator(+)integer(1)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(+)ident(a)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(+)ident(v)operator(/)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(p)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(+)ident(b)operator([)ident(q)operator(+)
ident(v)operator(])operator([)constant(V)operator(])operator(*)ident(f)operator(;)ident(g)operator(=)operator([)ident(a)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(,)ident(b)operator([)ident(q)operator(])operator([)constant(V)operator(])operator(,)ident(a)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(,)ident(b)operator([)ident(q)operator(+)ident(v)operator(])operator([)constant(V)operator(])operator(])operator(;)ident(h)operator(=)operator(()ident(g)operator(.)ident(max)operator(-)ident(g)operator(.)ident(min)
-operator(\))operator(*)ident(f)operator(;)global_variable($s)operator([)ident(s)operator(])operator([)ident(q)operator(])operator([)constant(V)operator(])operator(=)operator([)operator([)operator(()ident(r)operator(/)operator(()ident(e)operator(+)ident(f)float(+6.0)operator(\))operator(+)constant(A)operator(+)operator(()ident(h)operator(*)float(0.4)operator(\))operator(\))operator(.)ident(to_i)operator(,)integer(255)operator(])operator(.)ident(min)operator(,)constant(V)operator(])operator(.)ident(max)
+operator(\))operator(*)ident(f)operator(;)global_variable($s)operator([)ident(s)operator(])operator([)ident(q)operator(])operator([)constant(V)operator(])operator(=)operator([)operator([)operator(()ident(r)operator(/)operator(()ident(e)operator(+)ident(f)operator(+)float(6.0)operator(\))operator(+)constant(A)operator(+)operator(()ident(h)operator(*)float(0.4)operator(\))operator(\))operator(.)ident(to_i)operator(,)integer(255)operator(])operator(.)ident(min)operator(,)constant(V)operator(])operator(.)ident(max)
operator(})operator(})operator(;)constant(File)operator(.)ident(open)operator(()string<delimiter(")content(res.ppm)delimiter(")>operator(,)string<delimiter(")content(w+)delimiter(")>operator(\))operator({)operator(|)ident(f)operator(|)ident(f)operator(.)ident(write)operator(()comment(# secret.greetings :-\))
string<delimiter(")content(P3)char(\\n)content(# res.ppm)char(\\n)inline<inline_delimiter(#{)constant(X)inline_delimiter(})>content( )inline<inline_delimiter(#{)constant(Y)inline_delimiter(})>char(\\n)content(255)char(\\n)delimiter(")>operator(+)global_variable($s)operator(.)ident(map)operator({)operator(|)ident(a)operator(|)ident(a)operator(.)ident(map)operator({)operator(|)ident(b)operator(|)ident(b)operator(.)ident(join)string<delimiter(')content( )delimiter(')>
operator(})operator(.)ident(join)operator(()string<delimiter(')content( )delimiter(')>operator(\))operator(+)string<delimiter(")char(\\n)delimiter(")>operator(})operator(.)ident(join)operator(\))operator(})operator(;)reserved(end)operator(;)reserved(def) method(switch) ident(i)operator(,)operator(&)ident(b)operator(;)ident(b)operator(.)ident(call)operator(;)reserved(return) reserved(unless)
@@ -339,7 +339,7 @@ reserved(defined?)operator(()global_variable($m)operator(\))operator(;)ident(b)o
ident(a)operator(=)global_variable($a)operator(.)ident(map)operator({)operator(|)operator(()ident(f)operator(,)ident(g)operator(,)ident(h)operator(,)ident(j)operator(\))operator(|)operator([)ident(f)operator(*)ident(d)operator(,)ident(g)operator(*)ident(e)operator(,)ident(h)operator(*)ident(d)operator(,)ident(j)operator(*)ident(e)operator(])operator(})operator(;)ident(a)operator(.)ident(each)operator({)operator(|)operator(()ident(k)operator(,)ident(l)operator(,)ident(m)operator(,)ident(n)operator(\))operator(|)ident(u)operator(()global_variable($s)operator(,)operator(()ident(k)operator(*)constant(X)
operator(\))operator(.)ident(to_i)operator(+)ident(b)operator(+)ident(i)operator(,)operator(()ident(l)operator(*)constant(Y)operator(\))operator(.)ident(to_i)operator(+)ident(c)operator(+)ident(i)operator(,)operator(()ident(m)operator(*)constant(X)operator(\))operator(.)ident(to_i)operator(+)ident(b)operator(+)ident(i)operator(,)operator(()ident(n)operator(*)constant(Y)operator(\))operator(.)ident(to_i)operator(+)ident(c)operator(+)ident(i)operator(,)operator([)constant(Z)operator(])operator(*)integer(3)operator(\))operator(})
ident(a)operator(.)ident(each)operator({)operator(|)operator(()ident(o)operator(,)ident(q)operator(,)ident(r)operator(,)ident(s)operator(\))operator(|)ident(u)operator(()global_variable($s)operator(,)operator(()ident(o)operator(*)operator(()constant(X)operator(-)constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator(()ident(q)operator(*)operator(()constant(Y)operator(-)constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator(()ident(r)operator(*)operator(()constant(X)operator(-)
-constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator(()ident(s)operator(*)operator(()constant(Y)operator(-)constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator([)operator(()integer(1)operator(<<)integer(8)operator(\))integer(-1)operator(])operator(*)integer(3)operator(\))operator(})operator(;)reserved(end)operator(;)constant(Q)operator(=)constant(Object)operator(;)reserved(class)
+constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator(()ident(s)operator(*)operator(()constant(Y)operator(-)constant(Z)operator(\))operator(\))operator(.)ident(to_i)operator(+)ident(i)operator(,)operator([)operator(()integer(1)operator(<<)integer(8)operator(\))operator(-)integer(1)operator(])operator(*)integer(3)operator(\))operator(})operator(;)reserved(end)operator(;)constant(Q)operator(=)constant(Object)operator(;)reserved(class)
class(Regexp)operator(;)reserved(def) method([]=)operator(()ident(v)operator(,)ident(is)operator(\))operator(;)ident(is)operator(.)ident(each)operator({)operator(|)ident(s)operator(|)constant(Q)operator(.)ident(send)operator(()symbol(:remove_const)operator(,)ident(s)operator(\))reserved(if) constant(Q)operator(.)
ident(const_defined?) ident(s)operator(;)constant(Q)operator(.)ident(const_set)operator(()ident(s)operator(,)ident(v)operator(\))operator(})operator(;)reserved(end)operator(;)reserved(end)operator(;)reserved(def) method(int)operator(*)ident(ptr)operator(;)integer(666)
reserved(end)operator(;)reserved(class) class(O)operator(;)reserved(def) method([]=)operator(()ident(a)operator(,)ident(b)operator(=)pre_constant(nil)operator(\))operator(;)global_variable($c)operator(=)ident(a)operator(;)reserved(end)operator(;)reserved(end)operator(;)reserved(alias)symbol(:void)symbol(:goto)
diff --git a/test/scanners/ruby/tk-calc.expected.raydebug b/test/scanners/ruby/tk-calc.expected.raydebug
index 4bd4db0..7c8f5a1 100644
--- a/test/scanners/ruby/tk-calc.expected.raydebug
+++ b/test/scanners/ruby/tk-calc.expected.raydebug
@@ -1,5 +1,5 @@
ident(require) string<delimiter(')content(tk)delimiter(')>operator(;)constant(TkRoot)operator(.)ident(new)operator(;)ident(r)operator(,)ident(c)operator(,)ident(b)operator(=)integer(1)operator(,)integer(1)operator(,)string<delimiter(%w#)content(7 8 9 + 4 5 6 - 1 2 3 * 0 . /)delimiter(#)>operator(;)ident(d)operator(=)constant(TkEntry)operator(.)ident(new)operator({)
ident(grid)operator(()string<delimiter(")content(row)delimiter(")>operator(=)operator(>)integer(0)operator(,)string<delimiter(")content(column)delimiter(")>operator(=)operator(>)integer(1)operator(,)string<delimiter(")content(columnspan)delimiter(")>operator(=)operator(>)integer(4)operator(\))operator(})operator(;)ident(b)operator(.)ident(each_index)operator({)operator(|)ident(i)operator(|)constant(TkButton)operator(.)ident(new)operator({)ident(text) ident(b)operator([)ident(i)operator(])
-ident(command) ident(proc)operator({)ident(d)operator(.)ident(insert)operator(()string<delimiter(")content(end)delimiter(")>operator(,)ident(b)operator([)ident(i)operator(])operator(\))operator(})operator(;)ident(grid)operator(()string<delimiter(")content(row)delimiter(")>operator(=)operator(>)ident(r)operator(,)string<delimiter(")content(column)delimiter(")>operator(=)operator(>)ident(c)operator(\))operator(})operator(;)ident(c)operator(+=)integer(1)operator(;)reserved(if) ident(i)operator(&&)operator(()ident(i)integer(+1)operator(\))operator(%)comment(##)
+ident(command) ident(proc)operator({)ident(d)operator(.)ident(insert)operator(()string<delimiter(")content(end)delimiter(")>operator(,)ident(b)operator([)ident(i)operator(])operator(\))operator(})operator(;)ident(grid)operator(()string<delimiter(")content(row)delimiter(")>operator(=)operator(>)ident(r)operator(,)string<delimiter(")content(column)delimiter(")>operator(=)operator(>)ident(c)operator(\))operator(})operator(;)ident(c)operator(+=)integer(1)operator(;)reserved(if) ident(i)operator(&&)operator(()ident(i)operator(+)integer(1)operator(\))operator(%)comment(##)
integer(4)operator(==)integer(0)reserved(then) ident(r)operator(+=)integer(1)operator(;)ident(c)operator(=)integer(1) reserved(end)operator(})operator(;)constant(TkButton)operator(.)ident(new)operator({)ident(text)string<delimiter(")content(=)delimiter(")>operator(;)ident(command) ident(proc)operator({)ident(t)operator(=)ident(d)operator(.)ident(get)operator(;)ident(d)operator(.)ident(delete)operator(()integer(0)operator(,)string<delimiter(")content(end)delimiter(")>operator(\))
ident(d)operator(.)ident(insert)operator(()string<delimiter(")content(end)delimiter(")>operator(,)ident(eval)operator(()ident(t)operator(\))operator(\))operator(})operator(;)ident(grid)operator(()string<delimiter(")content(row)delimiter(")>operator(=)operator(>)ident(r)operator(,)string<delimiter(")content(column)delimiter(")>operator(=)operator(>)ident(c)operator(\))operator(})operator(;)constant(Tk)operator(.)ident(mainloop)comment(### by mawe :\) ###)