From 0d919d07f67166981cea476e1febbc40af2eae9c Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 24 Mar 2006 21:58:29 +0000 Subject: Ruby Scanner: Capital methods (Kernel#Array etc.) are now highlighted as idents. Tests adjusted. highlight.rb updated. --- lib/coderay/scanners/ruby.rb | 4 +- test/ruby/evil.out.raydebug | 2 +- test/ruby/example.out.raydebug | 92 +++++++++++++++++++++--------------------- test/ruby/jarh.out.raydebug | 2 +- test/ruby/pleac.out.raydebug | 16 ++++---- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index 8952422..dd92caf 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -188,10 +188,10 @@ module CodeRay module Scanners # IDENTS # if match = scan(/#{METHOD_NAME}/o) if last_token_dot - type = if match[/^[A-Z]/] then :constant else :ident end + type = if match[/^[A-Z]/] and not match?(/\(/) then :constant else :ident end else type = IDENT_KIND[match] - if type == :ident and match[/^[A-Z]/] and not match[/[!?]$/] + if type == :ident and match[/^[A-Z]/] and not match[/[!?]$/] and not match?(/\(/) type = :constant elsif type == :reserved state = DEF_NEW_STATE[match] diff --git a/test/ruby/evil.out.raydebug b/test/ruby/evil.out.raydebug index b62d778..eaa455a 100644 --- a/test/ruby/evil.out.raydebug +++ b/test/ruby/evil.out.raydebug @@ -480,7 +480,7 @@ ident(p) ident(x) -ident(p) constant(Array)operator(()stringoperator(\)) +ident(p) ident(Array)operator(()stringoperator(\)) diff --git a/test/ruby/example.out.raydebug b/test/ruby/example.out.raydebug index bd32f36..4e16094 100644 --- a/test/ruby/example.out.raydebug +++ b/test/ruby/example.out.raydebug @@ -2949,93 +2949,93 @@ comment(# @size = 0.5 + 0.2 * Math.cos(Deg2Rad * @angle\)) comment(# Make context current) instance_variable(@glcanvas)operator(.)ident(makeCurrent)operator(()operator(\)) - constant(GL)operator(.)constant(Viewport)operator(()integer(0)operator(,) integer(0)operator(,) instance_variable(@glcanvas)operator(.)ident(width)operator(,) instance_variable(@glcanvas)operator(.)ident(height)operator(\)) + constant(GL)operator(.)ident(Viewport)operator(()integer(0)operator(,) integer(0)operator(,) instance_variable(@glcanvas)operator(.)ident(width)operator(,) instance_variable(@glcanvas)operator(.)ident(height)operator(\)) - constant(GL)operator(.)constant(ClearColor)operator(()float(1.0)operator(/)integer(256)operator(,) float(0.0)operator(,) float(5.0)operator(/)integer(256)operator(,) float(1.0)operator(\)) - constant(GL)operator(.)constant(Clear)operator(()constant(GL)operator(::)constant(COLOR_BUFFER_BIT)operator(|)constant(GL)operator(::)constant(DEPTH_BUFFER_BIT)operator(\)) - constant(GL)operator(.)constant(Enable)operator(()constant(GL)operator(::)constant(DEPTH_TEST)operator(\)) + constant(GL)operator(.)ident(ClearColor)operator(()float(1.0)operator(/)integer(256)operator(,) float(0.0)operator(,) float(5.0)operator(/)integer(256)operator(,) float(1.0)operator(\)) + constant(GL)operator(.)ident(Clear)operator(()constant(GL)operator(::)constant(COLOR_BUFFER_BIT)operator(|)constant(GL)operator(::)constant(DEPTH_BUFFER_BIT)operator(\)) + constant(GL)operator(.)ident(Enable)operator(()constant(GL)operator(::)constant(DEPTH_TEST)operator(\)) - constant(GL)operator(.)constant(Disable)operator(()constant(GL)operator(::)constant(DITHER)operator(\)) + constant(GL)operator(.)ident(Disable)operator(()constant(GL)operator(::)constant(DITHER)operator(\)) - constant(GL)operator(.)constant(MatrixMode)operator(()constant(GL)operator(::)constant(PROJECTION)operator(\)) - constant(GL)operator(.)constant(LoadIdentity)operator(()operator(\)) - constant(GLU)operator(.)constant(Perspective)operator(()float(30.0)operator(,) ident(aspect)operator(,) float(1.0)operator(,) float(100.0)operator(\)) + constant(GL)operator(.)ident(MatrixMode)operator(()constant(GL)operator(::)constant(PROJECTION)operator(\)) + constant(GL)operator(.)ident(LoadIdentity)operator(()operator(\)) + constant(GLU)operator(.)ident(Perspective)operator(()float(30.0)operator(,) ident(aspect)operator(,) float(1.0)operator(,) float(100.0)operator(\)) - constant(GL)operator(.)constant(MatrixMode)operator(()constant(GL)operator(::)constant(MODELVIEW)operator(\)) - constant(GL)operator(.)constant(LoadIdentity)operator(()operator(\)) - constant(GLU)operator(.)constant(LookAt)operator(()float(5.0)operator(,) float(10.0)operator(,) float(15.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(1.0)operator(,) float(0.0)operator(\)) + constant(GL)operator(.)ident(MatrixMode)operator(()constant(GL)operator(::)constant(MODELVIEW)operator(\)) + constant(GL)operator(.)ident(LoadIdentity)operator(()operator(\)) + constant(GLU)operator(.)ident(LookAt)operator(()float(5.0)operator(,) float(10.0)operator(,) float(15.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(0.0)operator(,) float(1.0)operator(,) float(0.0)operator(\)) - constant(GL)operator(.)constant(ShadeModel)operator(()constant(GL)operator(::)constant(SMOOTH)operator(\)) - constant(GL)operator(.)constant(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(POSITION)operator(,) ident(lightPosition)operator(\)) - constant(GL)operator(.)constant(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(lightAmbient)operator(\)) - constant(GL)operator(.)constant(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(lightDiffuse)operator(\)) - constant(GL)operator(.)constant(Enable)operator(()constant(GL)operator(::)constant(LIGHT0)operator(\)) - constant(GL)operator(.)constant(Enable)operator(()constant(GL)operator(::)constant(LIGHTING)operator(\)) + constant(GL)operator(.)ident(ShadeModel)operator(()constant(GL)operator(::)constant(SMOOTH)operator(\)) + constant(GL)operator(.)ident(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(POSITION)operator(,) ident(lightPosition)operator(\)) + constant(GL)operator(.)ident(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(lightAmbient)operator(\)) + constant(GL)operator(.)ident(Light)operator(()constant(GL)operator(::)constant(LIGHT0)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(lightDiffuse)operator(\)) + constant(GL)operator(.)ident(Enable)operator(()constant(GL)operator(::)constant(LIGHT0)operator(\)) + constant(GL)operator(.)ident(Enable)operator(()constant(GL)operator(::)constant(LIGHTING)operator(\)) - constant(GL)operator(.)constant(Rotated)operator(()float(0.1)operator(*)instance_variable(@angle)operator(,) float(0.0)operator(,) float(1.0)operator(,) float(0.0)operator(\)) + constant(GL)operator(.)ident(Rotated)operator(()float(0.1)operator(*)instance_variable(@angle)operator(,) float(0.0)operator(,) float(1.0)operator(,) float(0.0)operator(\)) reserved(for) ident(x) reserved(in) operator(-)constant(D_MAX)operator(..)constant(D_MAX) reserved(for) ident(y) reserved(in) operator(-)constant(D_MAX)operator(..)constant(D_MAX) ident(h1) operator(=) operator(()ident(x) operator(+) ident(y) operator(-) integer(2)operator(\))operator(.)ident(abs) ident(h2) operator(=) operator(()ident(y) operator(-) ident(x) operator(+) integer(1)operator(\))operator(.)ident(abs) constant(GL)operator(.)constant(PushMatrix) ident(c) operator(=) operator([)integer(1)operator(,) integer(0)operator(,) integer(0)operator(,) integer(1)operator(]) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Translated)operator(() + constant(GL)operator(.)ident(Translated)operator(() ident(y) operator(*) constant(SQUARE_DISTANCE)operator(,) constant(AMPLITUDE) operator(*) ident(h1)operator(,) ident(x) operator(*) constant(SQUARE_DISTANCE) operator(\)) - constant(GL)operator(.)constant(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) - constant(GL)operator(.)constant(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) + constant(GL)operator(.)ident(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) constant(GL)operator(.)constant(End) constant(GL)operator(.)constant(PopMatrix) constant(GL)operator(.)constant(PushMatrix) ident(c) operator(=) operator([)integer(0)operator(,) integer(0)operator(,) integer(1)operator(,) integer(1)operator(]) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Translated)operator(() + constant(GL)operator(.)ident(Translated)operator(() ident(y) operator(*) constant(SQUARE_DISTANCE)operator(,) constant(AMPLITUDE) operator(*) ident(h2)operator(,) ident(x) operator(*) constant(SQUARE_DISTANCE) operator(\)) - constant(GL)operator(.)constant(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) - constant(GL)operator(.)constant(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) + constant(GL)operator(.)ident(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) constant(GL)operator(.)constant(End) constant(GL)operator(.)constant(PopMatrix) constant(GL)operator(.)constant(PushMatrix) ident(c) operator(=) operator([)float(0.0) operator(+) operator(()ident(x)operator(/)float(10.0)operator(\))operator(,) float(0.0) operator(+) operator(()ident(y)operator(/)float(10.0)operator(\))operator(,) integer(0)operator(,) integer(1)operator(]) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(AMBIENT)operator(,) ident(c)operator(\)) + constant(GL)operator(.)ident(Material)operator(()constant(GL)operator(::)constant(FRONT)operator(,) constant(GL)operator(::)constant(DIFFUSE)operator(,) ident(c)operator(\)) - constant(GL)operator(.)constant(Translated)operator(() + constant(GL)operator(.)ident(Translated)operator(() ident(y) operator(*) constant(SQUARE_DISTANCE)operator(,) integer(0)operator(,) ident(x) operator(*) constant(SQUARE_DISTANCE) operator(\)) - constant(GL)operator(.)constant(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) - constant(GL)operator(.)constant(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) - constant(GL)operator(.)constant(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Begin)operator(()constant(GL)operator(::)constant(TRIANGLE_STRIP)operator(\)) + constant(GL)operator(.)ident(Normal)operator(()float(1.0)operator(,) float(0.0)operator(,) float(0.0)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(-)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(-)constant(SQUARE_SIZE)operator(\)) + constant(GL)operator(.)ident(Vertex)operator(()operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(,) operator(+)constant(SQUARE_SIZE)operator(\)) constant(GL)operator(.)constant(End) constant(GL)operator(.)constant(PopMatrix) @@ -3090,7 +3090,7 @@ comment(# @size = 0.5 + 0.2 * Math.cos(Deg2Rad * @angle\)) operator(}) instance_variable(@glcanvas)operator(.)ident(connect)operator(()constant(SEL_CONFIGURE)operator(\)) operator({) reserved(if) instance_variable(@glcanvas)operator(.)ident(makeCurrent) - constant(GL)operator(.)constant(Viewport)operator(()integer(0)operator(,) integer(0)operator(,) instance_variable(@glcanvas)operator(.)ident(width)operator(,) instance_variable(@glcanvas)operator(.)ident(height)operator(\)) + constant(GL)operator(.)ident(Viewport)operator(()integer(0)operator(,) integer(0)operator(,) instance_variable(@glcanvas)operator(.)ident(width)operator(,) instance_variable(@glcanvas)operator(.)ident(height)operator(\)) instance_variable(@glcanvas)operator(.)ident(makeNonCurrent) reserved(end) operator(}) diff --git a/test/ruby/jarh.out.raydebug b/test/ruby/jarh.out.raydebug index 5fc2f3f..0c3b36d 100644 --- a/test/ruby/jarh.out.raydebug +++ b/test/ruby/jarh.out.raydebug @@ -263,7 +263,7 @@ ident(print) stringo ident(print) string -ident(print) constant(String)operator(()operator([)stringoperator(])operator(\)) +ident(print) ident(String)operator(()operator([)stringoperator(])operator(\)) ident(print) ident(catch)operator(()symbol(:x)operator(\))operator({)ident(throw) symbol(:x)operator(,) stringoperator(}) diff --git a/test/ruby/pleac.out.raydebug b/test/ruby/pleac.out.raydebug index 9465bcd..fbf465f 100644 --- a/test/ruby/pleac.out.raydebug +++ b/test/ruby/pleac.out.raydebug @@ -317,15 +317,15 @@ comment(# @@INCLUDE@@ include/ruby/psgrep.rb) comment(# @@PLEAC@@_2.1) comment(# Matz tells that you can use Integer(\) for strict checked conversion.) -constant(Integer)operator(()stringoperator(\)) +ident(Integer)operator(()stringoperator(\)) comment(#=> `Integer': invalid value for Integer: "abc" (ArgumentError\)) -constant(Integer)operator(()stringoperator(\)) +ident(Integer)operator(()stringoperator(\)) comment(#=> 567) comment(# You may use Float(\) for floating point stuff) -constant(Integer)operator(()stringoperator(\)) +ident(Integer)operator(()stringoperator(\)) comment(#=> `Integer': invalid value for Integer: "56.7" (ArgumentError\)) -constant(Float)operator(()stringoperator(\)) +ident(Float)operator(()stringoperator(\)) comment(#=> 56.7) comment(# You may also use a regexp for that) @@ -598,8 +598,8 @@ comment(# @@PLEAC@@_2.15) ident(require) string ident(require) string -ident(a) operator(=) constant(Complex)operator(()integer(3)operator(,) integer(5)operator(\)) comment(# 3 + 5i) -ident(b) operator(=) constant(Complex)operator(()integer(2)operator(,) integer(-2)operator(\)) comment(# 2 - 2i) +ident(a) operator(=) ident(Complex)operator(()integer(3)operator(,) integer(5)operator(\)) comment(# 3 + 5i) +ident(b) operator(=) ident(Complex)operator(()integer(2)operator(,) integer(-2)operator(\)) comment(# 2 - 2i) ident(puts) stringdelimiter(")> ident(c) operator(=) ident(a) operator(*) ident(b) @@ -799,7 +799,7 @@ ident(number_of_times)operator(.)ident(times) operator({) ident(total_time) operator(+=) ident(time) operator(}) ident(printf) stringoperator(,) - ident(size)operator(,) operator(()ident(total_time)operator(/)constant(Float)operator(()ident(number_of_times)operator(\))operator(\)) + ident(size)operator(,) operator(()ident(total_time)operator(/)ident(Float)operator(()ident(number_of_times)operator(\))operator(\)) comment(# @@PLEAC@@_3.10) @@ -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(=) constant(Float)operator(()ident(ws_col)integer(-12)operator(\))operator(/)ident(max) comment(# chars per unit) +ident(ratio) operator(=) ident(Float)operator(()ident(ws_col)integer(-12)operator(\))operator(/)ident(max) comment(# chars per unit) reserved(for) ident(i) reserved(in) ident(values) ident(printf) stringoperator(,) ident(i)operator(,) string operator(*) operator(()ident(ratio)operator(*)ident(i)operator(\)) reserved(end) -- cgit v1.2.1