rubylexer 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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?; @multi end
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
@@ -31,6 +31,8 @@ class RubyCode < Token
31
31
  @linenum=linenum
32
32
  end
33
33
 
34
+ attr :linenum
35
+
34
36
  def [](*args)
35
37
  exec? ident.huh
36
38
  end
@@ -26,10 +26,12 @@ require "assert"
26
26
  #require "term"
27
27
  #require "rubycode"
28
28
  #require "io.each_til_charset"
29
- #begin
30
- require 'rubygems'
31
- #rescue Exception:
32
- #end
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
- nl=read 1
890
+ @file.read1
886
891
  @linenum+=1
887
- @moretokens << FileAndLineToken.new( @filename, @linenum, input_position )
888
- return NewlineToken.new( nl,offset)
892
+ @moretokens << FileAndLineToken.new( @filename, @linenum, offset+1 )
893
+ return NewlineToken.new("\n",offset)
889
894
  end
890
895
 
891
896
 
@@ -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
@@ -513,7 +513,6 @@ module M34
513
513
  p(p% Q{:foo})
514
514
  p(p % Q{:foo})
515
515
  p(p^6)
516
- p(p ^6)
517
516
  p(p^ 6)
518
517
  p(p ^ 6)
519
518
  p(p&7)
@@ -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
@@ -23,7 +23,9 @@ class RubyLexer
23
23
  #-------------------------
24
24
  class Token
25
25
  attr_accessor :ident
26
- alias to_s ident
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) #not needed
55
+ def set_callsite!(x=true)
54
56
  @callsite=x
55
57
  end
56
58
 
57
59
  #-----------------------------------
58
- def callsite? #not used
59
- @callsite ||= nil
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
  #-------------------------
@@ -1,3 +1,3 @@
1
1
  class RubyLexer
2
- VERSION='0.7.2'
2
+ VERSION='0.7.3'
3
3
  end
@@ -78,74 +78,74 @@ TEST_THESE_FIRST=
78
78
 
79
79
 
80
80
 
81
- /home/caleb/sandbox/rubylexer/jewels/xrefresh-server-0.1.0/lib/xrefresh-server.rb
82
- /home/caleb/sandbox/rubylexer/jewels/shattered-0.7.0/test/acceptance/lib/mesh_test.rb
83
- /home/caleb/sandbox/rubylexer/jewels/rutils-0.2.3/lib/countries/countries.rb
84
- /home/caleb/sandbox/rubylexer/jewels/ruport-1.6.1/examples/trac_ticket_status.rb
85
- /home/caleb/sandbox/rubylexer/jewels/rubysdl-2.0.1/extconf.rb
86
- /home/caleb/sandbox/rubylexer/jewels/rubysdl-1.1.0/extconf.rb
87
- /home/caleb/sandbox/rubylexer/jewels/ruby-msg-1.3.1/lib/msg/rtf.rb
88
- /home/caleb/sandbox/rubylexer/jewels/ruby-mediawiki-0.1/apps/iso_639_leecher.rb
89
- /home/caleb/sandbox/rubylexer/jewels/ruby-finance-0.2.2/lib/finance/quote/yahoo/australia.rb
90
- /home/caleb/sandbox/rubylexer/jewels/roby-0.7.2/test/test_task.rb
91
- /home/caleb/sandbox/rubylexer/jewels/reve-0.0.94/test/test_reve.rb
92
- /home/caleb/sandbox/rubylexer/jewels/remote_api-0.2.1/test/spec_test.rb
93
- /home/caleb/sandbox/rubylexer/jewels/rbrainz-0.4.1/examples/getartist.rb
94
- /home/caleb/sandbox/rubylexer/jewels/rbrainz-0.4.1/examples/getlabel.rb
95
- /home/caleb/sandbox/rubylexer/jewels/rbrainz-0.4.1/examples/gettrack.rb
96
- /home/caleb/sandbox/rubylexer/jewels/railscart-0.0.4/starter_app/vendor/plugins/engines/init.rb
97
- /home/caleb/sandbox/rubylexer/jewels/ok-extensions-1.0.15/test/extensions/test_object.rb
98
- /home/caleb/sandbox/rubylexer/jewels/oai-0.0.8/lib/oai/harvester/logging.rb
99
- /home/caleb/sandbox/rubylexer/jewels/oai-0.0.8/examples/providers/dublin_core.rb
100
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/assert-text-equal.rbc
101
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/test-engines.rbc
102
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/test-erubis.rbc
103
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/test-users-guide.rbc
104
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/test.rbc
105
- /home/caleb/sandbox/rubylexer/jewels/erubis-2.6.2/test/testutil.rbc
106
- /home/caleb/sandbox/rubylexer/jewels/fb-0.5.5/test/CursorTestCases.rb
107
- /home/caleb/sandbox/rubylexer/jewels/flickraw-0.4.5/examples/auth.rb
108
- /home/caleb/sandbox/rubylexer/jewels/flickraw-0.4.5/examples/upload.rb
109
- /home/caleb/sandbox/rubylexer/jewels/flickraw-0.4.5/test/test.rb
110
- /home/caleb/sandbox/rubylexer/jewels/fox-tool-0.10.0-preview/fox-tool/examples/input.rbin
111
- /home/caleb/sandbox/rubylexer/jewels/fox-tool-0.10.0-preview/fox-tool/examples/cvs/Base/print.rbin
112
- /home/caleb/sandbox/rubylexer/jewels/foxGUIb_1.0.0/foxguib_1.0.0/foxguib/src/gui/_guib_genruby.rbin
113
- /home/caleb/sandbox/rubylexer/jewels/hpricot_scrub-0.3.2/test/scrubber_data.rb
114
- /home/caleb/sandbox/rubylexer/jewels/htmltools-1.10/test/tc_stacking-parser.rb
115
- /home/caleb/sandbox/rubylexer/jewels/ludy-0.1.13/test/deprecated/ts_ludy.rb
116
- /home/caleb/sandbox/rubylexer/jewels/menu_helper-0.0.5/test/unit/menu_test.rb
117
- /home/caleb/sandbox/rubylexer/jewels/mod_spox-0.0.5/data/mod_spox/extras/PhpCli.rb
118
- /home/caleb/sandbox/rubylexer/jewels/motiro-0.6.11/app/core/wiki_page_not_found.rb
119
- /home/caleb/sandbox/rubylexer/jewels/motiro-0.6.11/vendor/plugins/globalize/generators/globalize/templates/migration.rb.gz
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/rubylexer/jewels/core_ex-0.6.6.3/lib/core_ex/numeric.rb",
123
- "/home/caleb/sandbox/rubylexer/jewels/cerberus-0.3.6/test/bjam_builder_test.rb",
124
- "/home/caleb/sandbox/rubylexer/jewels/cerberus-0.3.6/test/maven2_builer_test.rb",
125
- "/home/caleb/sandbox/rubylexer/jewels/buildr-1.3.1.1/lib/buildr/java/groovyc.rb",
126
- "/home/caleb/sandbox/rubylexer/jewels/adhearsion-0.7.7/apps/default/helpers/micromenus.rb",
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/rubylexer/jewels/RuCodeGen-0.3.1/lib/rucodegen/value_incapsulator.rb",
128
+ "/home/caleb/sandbox/jewels/RuCodeGen-0.3.1/lib/rucodegen/value_incapsulator.rb",
129
129
 
130
- "/home/caleb/sandbox/rubylexer/jewels/Wiki2Go-1.17.3/test/TestWiki2GoServlet.rb",
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/rubylexer/jewels/active_form-0.0.8/test/elements/test_base_element.rb",
133
- "/home/caleb/sandbox/rubylexer/jewels/dohruby-0.2.1/bin/create_database.rb",
134
- "/home/caleb/sandbox/rubylexer/jewels/depager-0.2.2/examples/c89/c89.tab.rb",
135
-
136
- "/home/caleb/sandbox/rubylexer/jewels/samizdat-0.6.1/samizdat/lib/samizdat/storage.rb",
137
- "/home/caleb/sandbox/rubylexer/jewels/math3d-0.04/tests/make_tests.rb",
138
- "/home/caleb/sandbox/rubylexer/jewels/QuickBaseClient.rb/quickbasecontactsappbuilder.rb",
139
- "/home/caleb/sandbox/rubylexer/jewels/QuickBaseClient.rb/quickbaseclient.rb",
140
- "/home/caleb/sandbox/rubylexer/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._000-IVYTranslater.rb",
141
- "/home/caleb/sandbox/rubylexer/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._002-ApplicationList.rb",
142
- "/home/caleb/sandbox/rubylexer/jewels/ruby-ivy_0.1.0/ruby-ivy/examples/._001-UnBind.rb",
143
- "/home/caleb/sandbox/rubylexer/jewels/ruby-ivy_0.1.0/ruby-ivy/._extconf.rb",
144
- "/home/caleb/sandbox/rubylexer/jewels/smf-0.15.10/sample/virtual-samp.rb",
145
- "/home/caleb/sandbox/rubylexer/jewels/syntax/syntax.rb",
146
- "/home/caleb/sandbox/rubylexer/jewels/rex-1.0rc1/rex/packages/rex/test/rex-20060511.rb",
147
- "/home/caleb/sandbox/rubylexer/jewels/rex-1.0rc1/rex/packages/rex/test/rex-20060125.rb",
148
- # "/home/caleb/sandbox/rubylexer/jewels/japanese-zipcodes-0.0.20080227/lib/japanese/zipcodes.rb", #huge!!!!!
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",
@@ -1,6 +1,7 @@
1
1
  require 'open3'
2
2
 
3
- require 'test/code/testcases'
3
+ require 'rubygems'
4
+ require 'rubylexer/test/testcases'
4
5
  require 'test/code/rubylexervsruby'
5
6
  SEP='';
6
7
  'caleb clausen'.each_byte{|ch| SEP<<ch.to_s(2).gsub('0','-').gsub('1','+')}
@@ -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.2
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: 2008-10-13 00:00:00 +01:00
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.0
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/code/testcases.rb
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/data/illegal_oneliners.rb
143
- - test/data/illegal_stanzas.rb
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/data/oneliners.rb
148
+ - lib/rubylexer/test/oneliners.rb
152
149
  - test/data/simple_dos.rb
153
150
  - test/data/simple.rb
154
- - test/data/stanzas.rb
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
- - --main
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.0
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.