rubylexer 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +25 -0
- data/Manifest.txt +5 -8
- data/Rakefile +15 -3
- data/lib/rubylexer.rb +161 -72
- data/lib/rubylexer/context.rb +8 -2
- data/lib/rubylexer/rubycode.rb +2 -0
- data/lib/rubylexer/rulexer.rb +13 -8
- data/{test/data → lib/rubylexer/test}/illegal_oneliners.rb +0 -0
- data/{test/data → lib/rubylexer/test}/illegal_stanzas.rb +0 -0
- data/{test/data → lib/rubylexer/test}/oneliners.rb +3 -0
- data/{test/data → lib/rubylexer/test}/stanzas.rb +0 -1
- data/lib/rubylexer/test/testcases.rb +11 -0
- data/lib/rubylexer/token.rb +17 -6
- data/lib/rubylexer/version.rb +1 -1
- data/test/code/locatetest.rb +63 -63
- data/test/code/regression.rb +2 -1
- data/test/code/rubylexervsruby.rb +1 -0
- metadata +10 -14
- data/rubylexer.vpj +0 -108
- data/test/code/testcases.rb +0 -11
- data/test/data/heremonsters.rb.broken.save +0 -68
- data/test/data/tokentest.assert.rb.can +0 -7
data/lib/rubylexer/context.rb
CHANGED
@@ -54,7 +54,10 @@ module NestedContexts
|
|
54
54
|
def initialize(linenum)
|
55
55
|
super('(', ')' ,linenum)
|
56
56
|
end
|
57
|
-
attr_accessor :lhs
|
57
|
+
attr_accessor :lhs,:saw_comma
|
58
|
+
def see(lxr,msg)
|
59
|
+
@saw_comma=true if msg==:comma
|
60
|
+
end
|
58
61
|
end
|
59
62
|
|
60
63
|
class BlockContext < NestedContext
|
@@ -131,12 +134,15 @@ module NestedContexts
|
|
131
134
|
when :comma,:splat; @multi=true
|
132
135
|
end
|
133
136
|
end
|
134
|
-
def multi_assign
|
137
|
+
def multi_assign?
|
138
|
+
@multi if defined? @multi
|
139
|
+
end
|
135
140
|
end
|
136
141
|
|
137
142
|
class WantsEndContext < NestedContext
|
138
143
|
def initialize(starter,linenum)
|
139
144
|
super(starter,'end',linenum)
|
145
|
+
@state=nil
|
140
146
|
end
|
141
147
|
|
142
148
|
attr_accessor :state
|
data/lib/rubylexer/rubycode.rb
CHANGED
data/lib/rubylexer/rulexer.rb
CHANGED
@@ -26,10 +26,12 @@ require "assert"
|
|
26
26
|
#require "term"
|
27
27
|
#require "rubycode"
|
28
28
|
#require "io.each_til_charset"
|
29
|
-
|
30
|
-
require 'rubygems'
|
31
|
-
|
32
|
-
|
29
|
+
begin
|
30
|
+
require 'rubygems'
|
31
|
+
rescue LoadError=>e
|
32
|
+
raise unless /rubygems/===e.message
|
33
|
+
#hope we don't need it
|
34
|
+
end
|
33
35
|
#require 'sequence'
|
34
36
|
require 'sequence/indexed'
|
35
37
|
require 'sequence/file'
|
@@ -185,7 +187,7 @@ private
|
|
185
187
|
|
186
188
|
if FASTER_STRING_ESCAPES
|
187
189
|
beg= readahead(2)=="\r\n" ? "\r\n" : nextchar.chr
|
188
|
-
assert /[\r\n]/===nextchar.chr if beg=="\r\n"
|
190
|
+
assert( /[\r\n]/===nextchar.chr ) if beg=="\r\n"
|
189
191
|
else
|
190
192
|
beg=nextchar.chr
|
191
193
|
if /^[\r\n]$/===beg then
|
@@ -652,6 +654,7 @@ end
|
|
652
654
|
rl=klass.new(@filename,@file,@linenum,offset_adjust())
|
653
655
|
rl.extend RecursiveRubyLexer
|
654
656
|
rl.enable_macros! if @enable_macro
|
657
|
+
rl.in_def=true if inside_method_def?
|
655
658
|
# rl.offset_adjust_set! offset_adjust()
|
656
659
|
assert offset_adjust()==rl.offset_adjust()
|
657
660
|
|
@@ -801,6 +804,7 @@ end
|
|
801
804
|
interp=:to_s if $1 or $2
|
802
805
|
return NumberToken.new(str.send(interp))
|
803
806
|
|
807
|
+
=begin
|
804
808
|
addl_dig_seqs= (typechar)? 0 : 2 #den 210
|
805
809
|
error=nil
|
806
810
|
|
@@ -840,6 +844,7 @@ end
|
|
840
844
|
|
841
845
|
assert(str[/[0-9]/])
|
842
846
|
lexerror NumberToken.new(str.send(interp)), error
|
847
|
+
=end
|
843
848
|
end
|
844
849
|
|
845
850
|
if (defined? DEBUGGER__ or defined? Debugger)
|
@@ -882,10 +887,10 @@ end
|
|
882
887
|
#-----------------------------------
|
883
888
|
def newline(ch)
|
884
889
|
offset= input_position
|
885
|
-
|
890
|
+
@file.read1
|
886
891
|
@linenum+=1
|
887
|
-
@moretokens << FileAndLineToken.new( @filename, @linenum,
|
888
|
-
return NewlineToken.new(
|
892
|
+
@moretokens << FileAndLineToken.new( @filename, @linenum, offset+1 )
|
893
|
+
return NewlineToken.new("\n",offset)
|
889
894
|
end
|
890
895
|
|
891
896
|
|
File without changes
|
File without changes
|
@@ -3,6 +3,8 @@ def x; yield end #this must be first!!!!
|
|
3
3
|
#modifying the list of known local variables. it may be omitted
|
4
4
|
#in cases where it is known that no local vars are defined.
|
5
5
|
|
6
|
+
module A::B; end
|
7
|
+
|
6
8
|
p a rescue b
|
7
9
|
p //e
|
8
10
|
p //u
|
@@ -38,6 +40,7 @@ x{q=1;def q.foo; end}
|
|
38
40
|
#q should be varnametoken, both times
|
39
41
|
p %(1)
|
40
42
|
|
43
|
+
p(p ^6)
|
41
44
|
p %\hah, backslash as string delimiter\
|
42
45
|
p %\hah, #{backslash} as string delimiter\
|
43
46
|
def foo(bar=5,tt=6) end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module TestCases
|
2
|
+
# fail unless File.exist 'test/data/oneliners.rb' and File.exist 'test/data/stanzas.rb'
|
3
|
+
rldir=$:.find{|dir| File.exist? dir+'/rubylexer/test/oneliners.rb' and File.exist? dir+'/rubylexer/test/stanzas.rb' }
|
4
|
+
ONELINERS=IO.readlines(rldir+'/rubylexer/test/oneliners.rb').map{|x| x.chomp}.grep(/\A\s*[^#\s\n]/).reverse
|
5
|
+
STANZAS=IO.read(rldir+'/rubylexer/test/stanzas.rb').split("\n\n").grep(/./).reverse
|
6
|
+
STANZAS.each{|stanza| stanza<<"\n" }
|
7
|
+
ILLEGAL_ONELINERS=IO.readlines(rldir+'/rubylexer/test/illegal_oneliners.rb').map{|x| x.chomp}.grep(/\A\s*[^#\s\n]/).reverse
|
8
|
+
ILLEGAL_STANZAS=IO.read(rldir+'/rubylexer/test/illegal_stanzas.rb').split("\n\n").grep(/./).reverse
|
9
|
+
TESTCASES=ONELINERS+STANZAS
|
10
|
+
ILLEGAL_TESTCASES=ILLEGAL_ONELINERS+ILLEGAL_STANZAS
|
11
|
+
end
|
data/lib/rubylexer/token.rb
CHANGED
@@ -23,7 +23,9 @@ class RubyLexer
|
|
23
23
|
#-------------------------
|
24
24
|
class Token
|
25
25
|
attr_accessor :ident
|
26
|
-
|
26
|
+
def to_s
|
27
|
+
@ident || "<#{self.class.name}>"
|
28
|
+
end
|
27
29
|
attr_accessor :offset #file offset of start of this token
|
28
30
|
attr_accessor :as #if defined, a KeywordToken which this token stands in for.
|
29
31
|
attr_accessor :allow_ooo_offset #hack
|
@@ -50,13 +52,13 @@ end
|
|
50
52
|
class KeywordToken < WToken #also some operators
|
51
53
|
|
52
54
|
#-----------------------------------
|
53
|
-
def set_callsite!(x=true)
|
55
|
+
def set_callsite!(x=true)
|
54
56
|
@callsite=x
|
55
57
|
end
|
56
58
|
|
57
59
|
#-----------------------------------
|
58
|
-
def callsite?
|
59
|
-
@callsite
|
60
|
+
def callsite?
|
61
|
+
@callsite if defined? @callsite
|
60
62
|
end
|
61
63
|
|
62
64
|
|
@@ -81,16 +83,19 @@ class KeywordToken < WToken #also some operators
|
|
81
83
|
self===RubyLexer::BEGINWORDS and @has_end||=nil
|
82
84
|
end
|
83
85
|
|
84
|
-
attr_accessor :comma_type, :ternary
|
86
|
+
attr_accessor :comma_type, :ternary, :grouping
|
85
87
|
|
86
88
|
def has_no_block!
|
87
89
|
@has_no_block=true
|
88
90
|
end
|
89
91
|
|
90
92
|
def has_no_block?
|
91
|
-
@has_no_block
|
93
|
+
@has_no_block if defined? @has_no_block
|
92
94
|
end
|
93
95
|
|
96
|
+
def infix
|
97
|
+
@infix if defined? @infix
|
98
|
+
end
|
94
99
|
end
|
95
100
|
|
96
101
|
#-------------------------
|
@@ -98,6 +103,7 @@ class OperatorToken < WToken
|
|
98
103
|
attr_accessor :unary
|
99
104
|
alias prefix? unary
|
100
105
|
def infix?; !prefix? end
|
106
|
+
|
101
107
|
end
|
102
108
|
|
103
109
|
|
@@ -128,6 +134,7 @@ end
|
|
128
134
|
#-------------------------
|
129
135
|
class NumberToken < Token
|
130
136
|
def to_s; @ident.to_s end
|
137
|
+
def negative; /\A-/ === ident end
|
131
138
|
end
|
132
139
|
|
133
140
|
#-------------------------
|
@@ -147,9 +154,11 @@ class SymbolToken < Token
|
|
147
154
|
|
148
155
|
def to_s
|
149
156
|
return @ident
|
157
|
+
=begin
|
150
158
|
raw=@raw.to_s
|
151
159
|
raw=raw[1...-1] if StringToken===@raw
|
152
160
|
@open+raw+@close
|
161
|
+
=end
|
153
162
|
end
|
154
163
|
end
|
155
164
|
|
@@ -176,6 +185,8 @@ class MethNameToken < Token # < SymbolToken
|
|
176
185
|
def has_no_block?
|
177
186
|
@has_no_block
|
178
187
|
end
|
188
|
+
|
189
|
+
def has_equals; /[a-z_0-9]=$/i===ident end
|
179
190
|
end
|
180
191
|
|
181
192
|
#-------------------------
|
data/lib/rubylexer/version.rb
CHANGED
data/test/code/locatetest.rb
CHANGED
@@ -78,74 +78,74 @@ TEST_THESE_FIRST=
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
-
/home/caleb/sandbox/
|
82
|
-
/home/caleb/sandbox/
|
83
|
-
/home/caleb/sandbox/
|
84
|
-
/home/caleb/sandbox/
|
85
|
-
/home/caleb/sandbox/
|
86
|
-
/home/caleb/sandbox/
|
87
|
-
/home/caleb/sandbox/
|
88
|
-
/home/caleb/sandbox/
|
89
|
-
/home/caleb/sandbox/
|
90
|
-
/home/caleb/sandbox/
|
91
|
-
/home/caleb/sandbox/
|
92
|
-
/home/caleb/sandbox/
|
93
|
-
/home/caleb/sandbox/
|
94
|
-
/home/caleb/sandbox/
|
95
|
-
/home/caleb/sandbox/
|
96
|
-
/home/caleb/sandbox/
|
97
|
-
/home/caleb/sandbox/
|
98
|
-
/home/caleb/sandbox/
|
99
|
-
/home/caleb/sandbox/
|
100
|
-
/home/caleb/sandbox/
|
101
|
-
/home/caleb/sandbox/
|
102
|
-
/home/caleb/sandbox/
|
103
|
-
/home/caleb/sandbox/
|
104
|
-
/home/caleb/sandbox/
|
105
|
-
/home/caleb/sandbox/
|
106
|
-
/home/caleb/sandbox/
|
107
|
-
/home/caleb/sandbox/
|
108
|
-
/home/caleb/sandbox/
|
109
|
-
/home/caleb/sandbox/
|
110
|
-
/home/caleb/sandbox/
|
111
|
-
/home/caleb/sandbox/
|
112
|
-
/home/caleb/sandbox/
|
113
|
-
/home/caleb/sandbox/
|
114
|
-
/home/caleb/sandbox/
|
115
|
-
/home/caleb/sandbox/
|
116
|
-
/home/caleb/sandbox/
|
117
|
-
/home/caleb/sandbox/
|
118
|
-
/home/caleb/sandbox/
|
119
|
-
/home/caleb/sandbox/
|
81
|
+
/home/caleb/sandbox/jewels/xrefresh-server-0.1.0/lib/xrefresh-server.rb
|
82
|
+
/home/caleb/sandbox/jewels/shattered-0.7.0/test/acceptance/lib/mesh_test.rb
|
83
|
+
/home/caleb/sandbox/jewels/rutils-0.2.3/lib/countries/countries.rb
|
84
|
+
/home/caleb/sandbox/jewels/ruport-1.6.1/examples/trac_ticket_status.rb
|
85
|
+
/home/caleb/sandbox/jewels/rubysdl-2.0.1/extconf.rb
|
86
|
+
/home/caleb/sandbox/jewels/rubysdl-1.1.0/extconf.rb
|
87
|
+
/home/caleb/sandbox/jewels/ruby-msg-1.3.1/lib/msg/rtf.rb
|
88
|
+
/home/caleb/sandbox/jewels/ruby-mediawiki-0.1/apps/iso_639_leecher.rb
|
89
|
+
/home/caleb/sandbox/jewels/ruby-finance-0.2.2/lib/finance/quote/yahoo/australia.rb
|
90
|
+
/home/caleb/sandbox/jewels/roby-0.7.2/test/test_task.rb
|
91
|
+
/home/caleb/sandbox/jewels/reve-0.0.94/test/test_reve.rb
|
92
|
+
/home/caleb/sandbox/jewels/remote_api-0.2.1/test/spec_test.rb
|
93
|
+
/home/caleb/sandbox/jewels/rbrainz-0.4.1/examples/getartist.rb
|
94
|
+
/home/caleb/sandbox/jewels/rbrainz-0.4.1/examples/getlabel.rb
|
95
|
+
/home/caleb/sandbox/jewels/rbrainz-0.4.1/examples/gettrack.rb
|
96
|
+
/home/caleb/sandbox/jewels/railscart-0.0.4/starter_app/vendor/plugins/engines/init.rb
|
97
|
+
/home/caleb/sandbox/jewels/ok-extensions-1.0.15/test/extensions/test_object.rb
|
98
|
+
/home/caleb/sandbox/jewels/oai-0.0.8/lib/oai/harvester/logging.rb
|
99
|
+
/home/caleb/sandbox/jewels/oai-0.0.8/examples/providers/dublin_core.rb
|
100
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/assert-text-equal.rbc
|
101
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/test-engines.rbc
|
102
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/test-erubis.rbc
|
103
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/test-users-guide.rbc
|
104
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/test.rbc
|
105
|
+
/home/caleb/sandbox/jewels/erubis-2.6.2/test/testutil.rbc
|
106
|
+
/home/caleb/sandbox/jewels/fb-0.5.5/test/CursorTestCases.rb
|
107
|
+
/home/caleb/sandbox/jewels/flickraw-0.4.5/examples/auth.rb
|
108
|
+
/home/caleb/sandbox/jewels/flickraw-0.4.5/examples/upload.rb
|
109
|
+
/home/caleb/sandbox/jewels/flickraw-0.4.5/test/test.rb
|
110
|
+
/home/caleb/sandbox/jewels/fox-tool-0.10.0-preview/fox-tool/examples/input.rbin
|
111
|
+
/home/caleb/sandbox/jewels/fox-tool-0.10.0-preview/fox-tool/examples/cvs/Base/print.rbin
|
112
|
+
/home/caleb/sandbox/jewels/foxGUIb_1.0.0/foxguib_1.0.0/foxguib/src/gui/_guib_genruby.rbin
|
113
|
+
/home/caleb/sandbox/jewels/hpricot_scrub-0.3.2/test/scrubber_data.rb
|
114
|
+
/home/caleb/sandbox/jewels/htmltools-1.10/test/tc_stacking-parser.rb
|
115
|
+
/home/caleb/sandbox/jewels/ludy-0.1.13/test/deprecated/ts_ludy.rb
|
116
|
+
/home/caleb/sandbox/jewels/menu_helper-0.0.5/test/unit/menu_test.rb
|
117
|
+
/home/caleb/sandbox/jewels/mod_spox-0.0.5/data/mod_spox/extras/PhpCli.rb
|
118
|
+
/home/caleb/sandbox/jewels/motiro-0.6.11/app/core/wiki_page_not_found.rb
|
119
|
+
/home/caleb/sandbox/jewels/motiro-0.6.11/vendor/plugins/globalize/generators/globalize/templates/migration.rb.gz
|
120
120
|
|
121
121
|
]+[
|
122
|
-
"/home/caleb/sandbox/
|
123
|
-
"/home/caleb/sandbox/
|
124
|
-
"/home/caleb/sandbox/
|
125
|
-
"/home/caleb/sandbox/
|
126
|
-
"/home/caleb/sandbox/
|
122
|
+
"/home/caleb/sandbox/jewels/core_ex-0.6.6.3/lib/core_ex/numeric.rb",
|
123
|
+
"/home/caleb/sandbox/jewels/cerberus-0.3.6/test/bjam_builder_test.rb",
|
124
|
+
"/home/caleb/sandbox/jewels/cerberus-0.3.6/test/maven2_builer_test.rb",
|
125
|
+
"/home/caleb/sandbox/jewels/buildr-1.3.1.1/lib/buildr/java/groovyc.rb",
|
126
|
+
"/home/caleb/sandbox/jewels/adhearsion-0.7.7/apps/default/helpers/micromenus.rb",
|
127
127
|
"/home/caleb/rubies/ruby-1.8.7/instruby.rb",
|
128
|
-
"/home/caleb/sandbox/
|
128
|
+
"/home/caleb/sandbox/jewels/RuCodeGen-0.3.1/lib/rucodegen/value_incapsulator.rb",
|
129
129
|
|
130
|
-
"/home/caleb/sandbox/
|
130
|
+
"/home/caleb/sandbox/jewels/Wiki2Go-1.17.3/test/TestWiki2GoServlet.rb",
|
131
131
|
"/home/caleb/rubies/ruby-1.8.7/test/rss/test_parser_atom_entry.rb",
|
132
|
-
"/home/caleb/sandbox/
|
133
|
-
"/home/caleb/sandbox/
|
134
|
-
"/home/caleb/sandbox/
|
135
|
-
|
136
|
-
"/home/caleb/sandbox/
|
137
|
-
"/home/caleb/sandbox/
|
138
|
-
"/home/caleb/sandbox/
|
139
|
-
"/home/caleb/sandbox/
|
140
|
-
"/home/caleb/sandbox/
|
141
|
-
"/home/caleb/sandbox/
|
142
|
-
"/home/caleb/sandbox/
|
143
|
-
"/home/caleb/sandbox/
|
144
|
-
"/home/caleb/sandbox/
|
145
|
-
"/home/caleb/sandbox/
|
146
|
-
"/home/caleb/sandbox/
|
147
|
-
"/home/caleb/sandbox/
|
148
|
-
# "/home/caleb/sandbox/
|
132
|
+
"/home/caleb/sandbox/jewels/active_form-0.0.8/test/elements/test_base_element.rb",
|
133
|
+
"/home/caleb/sandbox/jewels/dohruby-0.2.1/bin/create_database.rb",
|
134
|
+
"/home/caleb/sandbox/jewels/depager-0.2.2/examples/c89/c89.tab.rb",
|
135
|
+
|
136
|
+
"/home/caleb/sandbox/jewels/samizdat-0.6.1/samizdat/lib/samizdat/storage.rb",
|
137
|
+
"/home/caleb/sandbox/jewels/math3d-0.04/tests/make_tests.rb",
|
138
|
+
"/home/caleb/sandbox/jewels/QuickBaseClient.rb/quickbasecontactsappbuilder.rb",
|
139
|
+
"/home/caleb/sandbox/jewels/QuickBaseClient.rb/quickbaseclient.rb",
|
140
|
+
"/home/caleb/sandbox/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._000-IVYTranslater.rb",
|
141
|
+
"/home/caleb/sandbox/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._002-ApplicationList.rb",
|
142
|
+
"/home/caleb/sandbox/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._001-UnBind.rb",
|
143
|
+
"/home/caleb/sandbox/jewels/ruby-ivy_0.1.0/ruby-ivy/._extconf.rb",
|
144
|
+
"/home/caleb/sandbox/jewels/smf-0.15.10/sample/virtual-samp.rb",
|
145
|
+
"/home/caleb/sandbox/jewels/syntax/syntax.rb",
|
146
|
+
"/home/caleb/sandbox/jewels/rex-1.0rc1/rex/packages/rex/test/rex-20060511.rb",
|
147
|
+
"/home/caleb/sandbox/jewels/rex-1.0rc1/rex/packages/rex/test/rex-20060125.rb",
|
148
|
+
# "/home/caleb/sandbox/jewels/japanese-zipcodes-0.0.20080227/lib/japanese/zipcodes.rb", #huge!!!!!
|
149
149
|
]
|
150
150
|
RUBYLIST=TEST_THESE_FIRST+RUBYBINS+
|
151
151
|
[RLROOT+"/test/data/p.rb",
|
data/test/code/regression.rb
CHANGED
@@ -73,6 +73,7 @@ end
|
|
73
73
|
def rubylexervsruby(input,stringdata=nil,difflines=nil,bulk=nil,&ignore_it)
|
74
74
|
#cmdpath= `which #$0`
|
75
75
|
cmddir=Dir.getwd+"/test/code/"
|
76
|
+
Dir.mkdir 'test/results' unless File.directory? 'test/results'
|
76
77
|
base='test/results/'+File.basename(input)
|
77
78
|
_ttfile=base+'.tt'
|
78
79
|
mttfile=base+'.mtt'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubylexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Clausen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: ""
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-04-30 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.8.
|
33
|
+
version: 1.8.3
|
34
34
|
version:
|
35
35
|
description: RubyLexer is a lexer library for Ruby, written in Ruby. Rubylexer is meant as a lexer for Ruby that's complete and correct; all legal Ruby code should be lexed correctly by RubyLexer as well. Just enough parsing capability is included to give RubyLexer enough context to tokenize correctly in all cases. (This turned out to be more parsing than I had thought or wanted to take on at first.) RubyLexer handles the hard things like complicated strings, the ambiguous nature of some punctuation characters and keywords in ruby, and distinguishing methods and local variables.
|
36
36
|
email: rubylexer-owner @at@ inforadical .dot. net
|
@@ -90,7 +90,6 @@ files:
|
|
90
90
|
- test/data/lbrack.rb
|
91
91
|
- test/data/untitled1.rb
|
92
92
|
- test/data/rescue.rb
|
93
|
-
- test/data/tokentest.assert.rb.can
|
94
93
|
- test/data/pleac.rb.broken
|
95
94
|
- test/data/heart.rb
|
96
95
|
- test/data/s.rb
|
@@ -110,7 +109,6 @@ files:
|
|
110
109
|
- test/code/locatetest
|
111
110
|
- test/code/deletewarns.rb
|
112
111
|
- lib/rubylexer/0.7.1.rb
|
113
|
-
- rubylexer.vpj
|
114
112
|
- test/code/all_the_gems.rb
|
115
113
|
- test/code/all_the_raas.rb
|
116
114
|
- test/code/all_the_rubies.rb
|
@@ -120,7 +118,7 @@ files:
|
|
120
118
|
- test/code/regression.rb
|
121
119
|
- test/code/strgen.rb
|
122
120
|
- test/code/tarball.rb
|
123
|
-
- test/
|
121
|
+
- lib/rubylexer/test/testcases.rb
|
124
122
|
- test/data/cvtesc.rb
|
125
123
|
- test/data/__eof2.rb
|
126
124
|
- test/data/__eof5.rb
|
@@ -137,10 +135,9 @@ files:
|
|
137
135
|
- test/data/heremonsters_dos.rb.broken
|
138
136
|
- test/data/heremonsters.rb
|
139
137
|
- test/data/heremonsters.rb.broken
|
140
|
-
- test/data/heremonsters.rb.broken.save
|
141
138
|
- test/data/here_squote.rb
|
142
|
-
- test/
|
143
|
-
- test/
|
139
|
+
- lib/rubylexer/test/illegal_oneliners.rb
|
140
|
+
- lib/rubylexer/test/illegal_stanzas.rb
|
144
141
|
- test/data/make_ws_strdelim.rb
|
145
142
|
- test/data/maven2_builer_test.rb
|
146
143
|
- test/data/migration.rb
|
@@ -148,10 +145,10 @@ files:
|
|
148
145
|
- test/data/modl_fails.rb
|
149
146
|
- test/data/modl.rb
|
150
147
|
- test/data/multilinestring.rb
|
151
|
-
- test/
|
148
|
+
- lib/rubylexer/test/oneliners.rb
|
152
149
|
- test/data/simple_dos.rb
|
153
150
|
- test/data/simple.rb
|
154
|
-
- test/
|
151
|
+
- lib/rubylexer/test/stanzas.rb
|
155
152
|
- test/data/strdelim_crlf.rb
|
156
153
|
- test/data/stuff2.rb
|
157
154
|
- test/data/stuff3.rb
|
@@ -166,8 +163,7 @@ has_rdoc: true
|
|
166
163
|
homepage: http://rubylexer.rubyforge.org/
|
167
164
|
post_install_message:
|
168
165
|
rdoc_options:
|
169
|
-
-
|
170
|
-
- README.txt
|
166
|
+
- -x lib/rubylexer/test
|
171
167
|
require_paths:
|
172
168
|
- lib
|
173
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -185,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
181
|
requirements: []
|
186
182
|
|
187
183
|
rubyforge_project: rubylexer
|
188
|
-
rubygems_version: 1.3.
|
184
|
+
rubygems_version: 1.3.1
|
189
185
|
signing_key:
|
190
186
|
specification_version: 2
|
191
187
|
summary: RubyLexer is a lexer library for Ruby, written in Ruby.
|