rubylexer 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/History.txt +55 -0
  2. data/Manifest.txt +67 -0
  3. data/README.txt +103 -0
  4. data/Rakefile +24 -0
  5. data/howtouse.txt +9 -6
  6. data/{assert.rb → lib/assert.rb} +11 -11
  7. data/{rubylexer.rb → lib/rubylexer.rb} +645 -342
  8. data/lib/rubylexer/0.6.2.rb +39 -0
  9. data/lib/rubylexer/0.6.rb +5 -0
  10. data/lib/rubylexer/0.7.0.rb +2 -0
  11. data/{charhandler.rb → lib/rubylexer/charhandler.rb} +4 -2
  12. data/{charset.rb → lib/rubylexer/charset.rb} +4 -3
  13. data/{context.rb → lib/rubylexer/context.rb} +48 -18
  14. data/{rubycode.rb → lib/rubylexer/rubycode.rb} +5 -3
  15. data/{rulexer.rb → lib/rubylexer/rulexer.rb} +180 -102
  16. data/{symboltable.rb → lib/rubylexer/symboltable.rb} +10 -1
  17. data/{token.rb → lib/rubylexer/token.rb} +72 -20
  18. data/{tokenprinter.rb → lib/rubylexer/tokenprinter.rb} +39 -16
  19. data/lib/rubylexer/version.rb +3 -0
  20. data/{testcode → test/code}/deletewarns.rb +0 -0
  21. data/test/code/dl_all_gems.rb +43 -0
  22. data/{testcode → test/code}/dumptokens.rb +12 -9
  23. data/test/code/locatetest +30 -0
  24. data/test/code/locatetest.rb +49 -0
  25. data/test/code/rubylexervsruby.rb +173 -0
  26. data/{testcode → test/code}/tokentest.rb +62 -51
  27. data/{testcode → test/code}/torment +8 -8
  28. data/test/code/unpack_all_gems.rb +15 -0
  29. data/{testdata → test/data}/1.rb.broken +0 -0
  30. data/{testdata → test/data}/23.rb +0 -0
  31. data/test/data/__end__.rb +2 -0
  32. data/test/data/__end__2.rb +3 -0
  33. data/test/data/and.rb +5 -0
  34. data/test/data/blockassigntest.rb +23 -0
  35. data/test/data/chunky.plain.rb +75 -0
  36. data/test/data/chunky_bacon.rb +112 -0
  37. data/test/data/chunky_bacon2.rb +112 -0
  38. data/test/data/chunky_bacon3.rb +112 -0
  39. data/test/data/chunky_bacon4.rb +112 -0
  40. data/test/data/for.rb +45 -0
  41. data/test/data/format.rb +6 -0
  42. data/{testdata → test/data}/g.rb +0 -0
  43. data/test/data/gemlist.txt +280 -0
  44. data/test/data/heart.rb +7 -0
  45. data/test/data/if.rb +6 -0
  46. data/test/data/jarh.rb +369 -0
  47. data/test/data/lbrace.rb +4 -0
  48. data/test/data/lbrack.rb +4 -0
  49. data/{testdata → test/data}/newsyntax.rb +0 -0
  50. data/{testdata → test/data}/noeolatend.rb +0 -0
  51. data/test/data/p-op.rb +8 -0
  52. data/{testdata → test/data}/p.rb +671 -79
  53. data/{testdata → test/data}/pleac.rb.broken +0 -0
  54. data/{testdata → test/data}/pre.rb +0 -0
  55. data/{testdata → test/data}/pre.unix.rb +0 -0
  56. data/{testdata → test/data}/regtest.rb +0 -0
  57. data/test/data/rescue.rb +35 -0
  58. data/test/data/s.rb +186 -0
  59. data/test/data/strinc.rb +2 -0
  60. data/{testdata → test/data}/tokentest.assert.rb.can +0 -0
  61. data/test/data/untermed_here.rb.broken +2 -0
  62. data/test/data/untermed_string.rb.broken +1 -0
  63. data/{testdata → test/data}/untitled1.rb +0 -0
  64. data/{testdata → test/data}/w.rb +0 -0
  65. data/{testdata → test/data}/wsdlDriver.rb +0 -0
  66. data/testing.txt +6 -4
  67. metadata +163 -59
  68. data/README +0 -134
  69. data/Rantfile +0 -37
  70. data/io.each_til_charset.rb +0 -247
  71. data/require.rb +0 -103
  72. data/rlold.rb +0 -12
  73. data/testcode/locatetest +0 -12
  74. data/testcode/rubylexervsruby.rb +0 -104
  75. data/testcode/rubylexervsruby.sh +0 -51
  76. data/testresults/placeholder +0 -0
@@ -0,0 +1,112 @@
1
+ puts <<FOX.gsub(/\s/,'').gsub(/=./){|c|{'=s'=>"\s",'=t'=>"\t",'=n'=>"\n",'=r'=>"\r",'=='=>'=','=#' => '#'}[c]}
2
+ =
3
+ #
4
+ =
5
+ s M ur p h y'
6
+ s=sCh un ky = s Ba c
7
+ o n = sg e n e r
8
+ a t or = n= # =s C hu
9
+ n ky =sBaco n =sby= sw h y =
10
+ st h e= s l u cky= sst i f f=n d e f= s t o
11
+ s s= n= tr a nd (2) . zero ? =n e nd = n =n clas s=sS t r in
12
+ g= n =t def= sr a nd o miz e _c a se= n = t =tspl i t (
13
+ '' ) .m a p =s d o= s|c|= s t o ss = s
14
+ ? = s c. up c as e=s := s c
15
+ . d o w nc
16
+ as e= s e
17
+ nd . j o
18
+ i n
19
+ =n =
20
+ te n
21
+ d= n
22
+ en d=
23
+ n= nm
24
+ od ul
25
+ e= sC hunk
26
+ y= n =tFO
27
+ NT_ FA MI
28
+ LIE S =s=
29
+ ==s %w (s
30
+ eri f= ss
31
+ ans- se r
32
+ if=s cu r
33
+ sive =s f
34
+ ant asy =s
35
+ monospa ce) =
36
+ n=t=n=td ef= s
37
+ self. ran d_
38
+ col or=n=t=t '= #
39
+ %x '=s%=s r an d
40
+ (0 x1_00_00_00)=n=ten d=n=t=n=td e f= ss
41
+ e lf .b ac on = s n
42
+ =n =t = tc hu n k y _b
43
+ a c o n=s= ==sA rr a y.
44
+ ne w= s n =s do= n= t =t =
45
+ t' <s p a n= ss ty l e =
46
+ = "p os it i o n: = s f ix
47
+ ed ;= sto p: = s %d p x ; =s l e ft
48
+ :=s %d px ; =sc o l o r := s % s ;
49
+ =s fo nt -size := s %d%%; = sf o nt-w ei g h
50
+ t:= s% d0 0; = sf o nt -s ytl e : =
51
+ s% s; =s fo nt - f a mil y: = s% s ;"
52
+ > %s </spa n> '= s % = s [= n =t=t=t =tr a
53
+ n d(8 00)=s-=s30,=n=t=t=t=tr a nd (1 2 0 0) =s - =s1 0 0,
54
+ =n =t =t =t =t ra n d _c o l or, = n =t
55
+ =t =t =t r an d (3 00)= s +
56
+ =s 1 0, = n = t=t =t
57
+ =t ra nd (9 )=s+ = s1
58
+ ,= n= t =t =t = tt oss =
59
+ s? =s ' i ta lic' =s:=s' no
60
+ rm al', =n = t = t=t = tFO
61
+ N T_F AMIL IE S [r a n d(
62
+ F ON T _F A MIL IE S . si
63
+ z e) ], = n=t= t=
64
+ t =t 'C hu nk
65
+ y =s Ba con
66
+ ' .r an do
67
+ m iz e_ca se, =n=
68
+ t =t= t]= n= t=t end
69
+ . jo in =s" \ n"=n = n=t=t
70
+ < <-O UT= n=t= t< html >=n
71
+ = t=t<b od y =s s tyle=="b ac kg
72
+ ro und-color := s= #{ rand_color};">=n= #{ c hu
73
+ nk y_bacon}=n=t =t </ bo dy >= n=t=t
74
+ < /html>=n=t=tOUT= n= t e nd = n en
75
+ d =n=nrequire=s'web ri ck '= ncl as s= sC
76
+ h unkBaconServlet= s< = sW EB r i ck
77
+ : :HTTPServlet:: Ab st ra ctServ le t=n=t
78
+ d ef=sdo_GET=sr e q, = s res=n
79
+ = t=tq=s===sr eq .pa th =n =t=
80
+ t res.body= s= ==n= t = t=tc a
81
+ se =sq=n=t =t=twhen =s n il,=s '/
82
+ '= n=t=t= t =tCh u n ky .bacon=s
83
+ 10 0= n =t=t= t w hen
84
+ =s / f avic o n. ico
85
+ $/ = n=t=t=t =t ''= n=t=t=twhen =s/\/(
86
+ \ d +)/= n= t=t= t=t Ch un
87
+ k y. bac on = s$ 1 .t
88
+ o _i =n =t = t= te ls e=n=t=t
89
+ =t =t 'w ha t?' =n =t=t =t e
90
+ nd= t= t= t= n =t =t re
91
+ s['C on te nt - Ty pe
92
+ ' ]= s=== s't ex t/ht
93
+ m l' =n =t e n
94
+ d = nen d =n =n
95
+ = #=s 20 3 =s
96
+ = == s0 x C B=sfor=s
97
+ C hunkyB a co n=ns= s==
98
+ = sW EB r ic k::
99
+ H T TP Se rver.n
100
+ ew = s: P ort=s==>=s203=n=n s
101
+ .m o un t=s'/',=sChunkBaconServlet= n=
102
+ ns .m ou nt_proc=s'/comic'=sdo=s|req, =
103
+ s re s |=n=tres.body=s===s'<img=ssr c=
104
+ = " ht tp://www.poignantguide.net/r u
105
+ b y /i /the.foxes-4e.png"=s/>'=n=t re
106
+ s [ 'C ontent -Type ']= s
107
+ = == s" tex t/h tm l"
108
+ = n en d= n =n tr
109
+ a p( "I NT ")= s
110
+ { =s s. shutd own=s }=
111
+ ns .s t art=n #CB
112
+ FOX
data/test/data/for.rb ADDED
@@ -0,0 +1,45 @@
1
+ for i in \
2
+ [44,55,66,77,88] do p i**Math.sqrt(i) end
3
+
4
+
5
+ (
6
+ for i in if
7
+ false then foob12345; else [44,55,66,77,88] end do p i**Math.sqrt(i) end
8
+ )
9
+ (
10
+ for i in if false then
11
+ foob12345; else [44,55,66,77,88] end do p i**Math.sqrt(i) end
12
+
13
+ c=j=0
14
+ until while j<10 do j+=1 end.nil? do p 'pppppppppp' end
15
+ for i in if false then foob12345;
16
+ else [44,55,66,77,88] end do p i**Math.sqrt(i) end
17
+
18
+ for i in if false then foob12345; else
19
+ [44,55,66,77,88] end do p i**Math.sqrt(i) end
20
+
21
+
22
+ for i in (c;
23
+ [44,55,66,77,88]) do p i**Math.sqrt(i) end
24
+ )
25
+ (
26
+
27
+ for i in (begin
28
+ [44,55,66,77,88] end) do p i**Math.sqrt(i) end
29
+
30
+ for i in if false then foob12345; else
31
+ [44,55,66,77,88] end do p i**Math.sqrt(i) end
32
+
33
+ for i in (
34
+
35
+ [44,55,66,77,88]) do p i**Math.sqrt(i) end
36
+
37
+ for i in (
38
+ [44,55,66,77,88]) do p i**Math.sqrt(i) end
39
+
40
+ )
41
+
42
+
43
+
44
+ def yy;yield end
45
+
@@ -0,0 +1,6 @@
1
+ e.hour %= 12; ( downcase == 'p')
2
+ e.hour %= 12; begin downcase == 'p'; end
3
+ e.hour %= 12; if downcase == 'p'; end
4
+ e.hour %= 12; (downcase)
5
+ e.hour %= 12; if downcase; end
6
+
File without changes
@@ -0,0 +1,280 @@
1
+ this list was compiled from the following lists found on the web:
2
+ http://www.ocssolutions.com/ruby-gems.html
3
+ http://www.codefluency.com/2007/2/20/gem-list
4
+ http://clarkware.com/cgi/blosxom/2007/02/10#GemSurvey
5
+ http://chadfowler.com/2007/2/11/show-us-your-gems
6
+
7
+
8
+
9
+ archive-tar-minitar
10
+ asciify
11
+ aws-s3
12
+ Bloglines4R
13
+ BlueCloth
14
+ Builder
15
+ capistrano
16
+ cmdparse
17
+ daemons
18
+ diff-lcs
19
+ fcgi
20
+ feedtools
21
+ gnuplot
22
+ htmltools
23
+ madeleine
24
+ mysql
25
+ needle
26
+ net-sftp
27
+ net-ssh
28
+ PageTemplate
29
+ ParseTree
30
+ payment
31
+ podcast
32
+ rake
33
+ RedCloth
34
+ rfacebook
35
+ rmagick
36
+ RubyInline
37
+ rubyzip
38
+ ruwiki
39
+ salted_login_generator
40
+ shipping
41
+ soap4r
42
+ sources
43
+ s3-ruby
44
+ syntax
45
+ Technorati-Ruby
46
+ tidy
47
+ uuidtools
48
+ vpim
49
+ webgen
50
+ wee
51
+ xml-simple
52
+ yax
53
+
54
+
55
+ actionmailer (1.3.1, 1.2.5, 1.2.3, 1.2.1, 1.0.1)
56
+ actionpack (1.13.1, 1.12.5, 1.12.3, 1.12.1, 1.9.1)
57
+ actionwebservice (1.2.1, 1.1.6, 1.1.4, 1.1.2, 0.8.1)
58
+ activerecord (1.15.1, 1.14.4, 1.14.3, 1.14.2, 1.11.1)
59
+ activesupport (1.4.0, 1.3.1, 1.1.1)
60
+ audioscrobbler (0.0.1)
61
+ badger (1.0.0)
62
+ barcode (0.2)
63
+ BlueCloth (1.0.0)
64
+ builder (2.0.0)
65
+ capistrano (1.2.0, 1.1.0)
66
+ capistrano-ext (1.1.0, 1.0.1)
67
+ cgi_multipart_eof_fix (2.0.2)
68
+ cocoa_dialog (0.0.2)
69
+ color-tools (1.3.0)
70
+ cooloptions (1.1.0)
71
+ daemons (1.0.4, 1.0.2, 0.4.4)
72
+ dhaka (0.0.6, 0.0.5)
73
+ diff-lcs (1.1.2)
74
+ fastercsv (1.0.0)
75
+ fastthread (0.6.2)
76
+ fcgi (0.8.7, 0.8.6.1)
77
+ gem_plugin (0.2.2, 0.2.1)
78
+ greenbar (1.0.1, 0.2.1)
79
+ gruff (0.2.8, 0.2.4, 0.1.2)
80
+ hoe (1.1.6, 1.1.2)
81
+ hpricot (0.4)
82
+ instiki (0.10.2)
83
+ json (0.4.2)
84
+ keybox (1.0.0)
85
+ keyword_search (1.0.2)
86
+ libxml-ruby (0.3.8)
87
+ madeleine (0.7.3, 0.7.1)
88
+ mailfactory (1.2.3)
89
+ memcache-client (1.2.0, 1.0.3)
90
+ mime-types (1.15)
91
+ mongrel (1.0.1, 0.3.13.4, 0.3.13.3, 0.3.12.4)
92
+ mongrel_cluster (0.2.1, 0.2.0)
93
+ mysql (2.7)
94
+ needle (1.3.0)
95
+ net-sftp (1.1.0)
96
+ net-ssh (1.0.10, 1.0.9, 1.0.8)
97
+ open4 (0.9.1)
98
+ paginator (1.0.8, 1.0.7, 1.0.5, 1.0.0)
99
+ pdf-writer (1.1.3)
100
+ peggy (0.1.0)
101
+ piston (1.2.0, 1.1.1)
102
+ radiant (0.5.2)
103
+ radius (0.5.1)
104
+ rails (1.2.1, 1.1.6, 1.1.4, 1.1.2, 0.13.1)
105
+ rails_gem_plugin_shim (1.0.0)
106
+ rake (0.7.1)
107
+ rcov (0.7.0.1)
108
+ RedCloth (3.0.4, 3.0.3)
109
+ rmagick (1.14.1, 1.11.1, 1.10.1)
110
+ rspec (0.6.4, 0.5.13)
111
+ rubyforge (0.3.2, 0.3.0)
112
+ rubygems-update (0.9.0)
113
+ rubyosa (0.1.0)
114
+ rubyzip (0.9.1, 0.5.8)
115
+ ruport (0.6.1)
116
+ scruffy (0.2.2)
117
+ sources (0.0.1)
118
+ spacesuit (1.2.0)
119
+ syntax (1.0.0)
120
+ tattle (1.0.3, 1.0.2, 1.0.0)
121
+ termios (0.9.4)
122
+ Text (1.1.0)
123
+ transaction-simple (1.3.0)
124
+ twfy (1.0.0)
125
+ twitter (0.0.2)
126
+ tzinfo (0.3.2, 0.3.1)
127
+ xhtmldiff (1.0.0)
128
+ ZenTest (3.4.1, 3.2.0)
129
+
130
+ actionmailer (1.3.2)
131
+ actionpack (1.13.2)
132
+ actionwebservice (1.2.2)
133
+ activerecord (1.15.2)
134
+ activesupport (1.4.1)
135
+ aws-s3 (0.3.0)
136
+ builder (2.0.0)
137
+ capistrano (1.4.0)
138
+ cgi_multipart_eof_fix (1.0.0)
139
+ cheat (1.2.1)
140
+ daemons (1.0.3)
141
+ fastthread (0.4)
142
+ flexmock (0.4.5)
143
+ gem_plugin (0.2.1)
144
+ gruff (0.2.8)
145
+ hoe (1.1.7, 1.1.4)
146
+ hpricot (0.5)
147
+ mime-types (1.15)
148
+ mocha (0.4.0)
149
+ mongrel (0.3.13.2)
150
+ mongrel_cluster (0.2.0)
151
+ net-sftp (1.1.0)
152
+ net-ssh (1.0.10)
153
+ piston (1.3.0)
154
+ rails (1.2.2)
155
+ rake (0.7.1)
156
+ rb-appscript (0.3.0)
157
+ rcov (0.7.0.1)
158
+ RedCloth (3.0.4)
159
+ rmagick (1.14.1)
160
+ ruby-prof (0.4.1)
161
+ rubyforge (0.4.0, 0.3.1)
162
+ rubygems-update (0.9.2, 0.9.1)
163
+ safariwatir (0.2.2)
164
+ sources (0.0.1)
165
+ test-spec (0.3.0)
166
+ xml-simple (1.0.10)
167
+ action_profiler (1.0.0)
168
+ actionmailer (1.3.2, 1.3.1, 1.2.5, 1.2.4, 1.2.0)
169
+ actionpack (1.13.2, 1.13.1, 1.12.5, 1.12.4, 1.12.0)
170
+ actionwebservice (1.2.2, 1.2.1, 1.1.6, 1.1.0)
171
+ activerecord (1.15.2, 1.15.1, 1.14.4, 1.14.0)
172
+ activesupport (1.4.1, 1.4.0, 1.3.1, 1.3.0)
173
+ acts_as_ferret (0.3.1)
174
+ acts_as_searchable (0.1.0)
175
+ ajax_scaffold (1.0.0)
176
+ an-app (0.0.3)
177
+ ar_mailer (1.1.0)
178
+ aws-s3 (0.3.0, 0.0.8952)
179
+ badger (1.0.1)
180
+ bfts (1.0.0)
181
+ BlueCloth (1.0.0)
182
+ builder (2.0.0)
183
+ camping (1.5)
184
+ capistrano (1.3.1, 1.2.0)
185
+ capistrano-ext (1.0.1)
186
+ cgi_multipart_eof_fix (2.0.2)
187
+ color-tools (1.3.0)
188
+ daemons (1.0.3, 0.4.3)
189
+ Dependency (1.0.0)
190
+ dhaka (2.0.0, 1.0.0, 0.0.6, 0.0.5, 0.0.2)
191
+ dnssd (0.6.0)
192
+ fastercsv (0.2.0)
193
+ fastri (0.1.1.1)
194
+ fastthread (0.6.2)
195
+ fcgi (0.8.6.1)
196
+ feedtools (0.2.26)
197
+ ferret (0.10.14, 0.10.13)
198
+ fjson (0.0.8)
199
+ flexmock (0.2.1)
200
+ gem_plugin (0.2.2, 0.2.1)
201
+ greenbar (1.0.0)
202
+ gruff (0.1.2)
203
+ highline (1.2.3)
204
+ hobo (0.4.3)
205
+ hoe (1.1.6, 1.1.4)
206
+ hpricot (0.4.59, 0.4)
207
+ icalendar (0.97)
208
+ insurance (0.3)
209
+ junebug (0.0.12)
210
+ keyword_search (1.0.4)
211
+ libxml-ruby (0.3.8)
212
+ markaby (0.5)
213
+ mechanize (0.6.4)
214
+ memcache-client (1.0.3)
215
+ metaid (1.0)
216
+ mime-types (1.15)
217
+ miniunit (1.0.0)
218
+ mocha (0.3.2)
219
+ mofo (0.1)
220
+ mongrel (1.0.1, 0.3.13.4)
221
+ mongrel_cluster (0.2.1, 0.2.0)
222
+ mylib (0.1.0)
223
+ mysql (2.7.3, 2.7)
224
+ ncurses (0.9.1)
225
+ needle (1.3.0)
226
+ net-sftp (1.1.0)
227
+ net-ssh (1.0.10, 1.0.9, 1.0.8)
228
+ newgem (0.2.0)
229
+ paginator (1.0.8, 1.0.6)
230
+ ParseTree (1.6.3, 1.6.1)
231
+ payment (1.0.1)
232
+ pdf-writer (1.1.3)
233
+ piston (1.1.1)
234
+ production_log_analyzer (1.3.0)
235
+ query_builder (1.0.0)
236
+ rails (1.2.2)
237
+ rails_analyzer_tools (1.1.0)
238
+ railsmachine (0.1.2)
239
+ rake (0.7.1)
240
+ raspell (0.0.1)
241
+ rbayes (1.0.0)
242
+ rcov (0.6.0.1)
243
+ RedCloth (3.0.4)
244
+ RedGreen (1.0)
245
+ rmail (0.17)
246
+ rspec (0.6.4)
247
+ ruby-breakpoint (0.5.1)
248
+ ruby-growl (1.0.1)
249
+ ruby2ruby (1.1.1)
250
+ rubyforge (0.3.1)
251
+ rubygems-update (0.9.2, 0.9.1, 0.9.0, 0.8.11)
252
+ RubyInline (3.6.1)
253
+ rubyosa (0.2.0, 0.1.0)
254
+ RubyToC (1.0.0.5)
255
+ rubyweather (1.0.0)
256
+ ruport (0.4.0)
257
+ selenium (0.6)
258
+ Selenium (1.0.0)
259
+ sendfile (0.9.2)
260
+ session (2.1.6)
261
+ sources (0.0.1)
262
+ sqlite (2.0.1)
263
+ sqlite3-ruby (1.1.0.1)
264
+ streamlined_generator (0.0.4)
265
+ sup (0.0.5, 0.0.1)
266
+ svn_conf_generator (0.0.3)
267
+ sydparse (1.2.2, 1.2.0, 1.0.0)
268
+ syntax (1.0.0)
269
+ tattle (1.0.1, 1.0.0)
270
+ termios (0.9.4)
271
+ Text (1.1.0)
272
+ THERuSH (0.9)
273
+ transaction-simple (1.3.0)
274
+ tzinfo (0.3.1)
275
+ unicode (0.1)
276
+ uuidtools (1.0.0)
277
+ vpim (0.360)
278
+ win32-service (0.5.0)
279
+ xml-simple (1.0.10)
280
+ ZenTest (3.4.3, 3.2.0)