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
@@ -2,21 +2,21 @@
2
2
  #export DEBUG=-rdebug
3
3
 
4
4
 
5
- #export RUBYLEXERVSRUBY=testcode/rubylexervsruby.sh
6
- export RUBYLEXERVSRUBY=testcode/rubylexervsruby.rb
5
+ #export RUBYLEXERVSRUBY=test/code/rubylexervsruby.sh
6
+ export RUBYLEXERVSRUBY=test/code/rubylexervsruby.rb
7
7
  export ARGS=$*
8
8
  #something broken here
9
9
  #test -n "$ARGS" && (
10
10
 
11
11
 
12
12
  echo 'looking for ruby files in debian packages...'
13
- find testdata/ -name '_*' -print|xargs -l200 rm
13
+ find test/data/ -name '_*' -print|xargs -l200 rm
14
14
  for i in `feta find '\.rb'|cut -d: -f2-99`; do
15
- ln -s "$i" testdata/`echo $i|tr '/ ' '_'` 2>&1 |grep -v ': File exists$';
15
+ ln -s "$i" test/data/`echo $i|tr '/ ' '_'` 2>&1 |grep -v ': File exists$';
16
16
  done
17
17
  #)
18
18
 
19
- for i in testdata/*.rb; do
19
+ for i in test/data/*.rb; do
20
20
  $RUBYLEXERVSRUBY $i;
21
21
  done
22
22
 
@@ -42,10 +42,10 @@ export ARGS=$*
42
42
 
43
43
  #also look in bin and lib directories
44
44
  file -L `echo $PATH":/sbin:/usr/sbin"|tr : "\n"|sort -u|xargs -i echo "{}/*"`| \
45
- grep "ruby[^:]*script"|cut -d: -f1 > testresults/rubyexelibs
45
+ grep "ruby[^:]*script"|cut -d: -f1 > test/results/rubyexelibs
46
46
 
47
- ruby -e 'print ($:.sort.uniq+[""]).join"\n"'|xargs -i ls "{}/*.rb" >> testresults/rubyexelibs
47
+ ruby -e 'print ($:.sort.uniq+[""]).join"\n"'|xargs -i ls "{}/*.rb" >> test/results/rubyexelibs
48
48
 
49
- for i in `cat testresults/rubyexelibs`; do
49
+ for i in `cat test/results/rubyexelibs`; do
50
50
  $RUBYLEXERVSRUBY $i;
51
51
  done
@@ -0,0 +1,15 @@
1
+ gemdir="gems/"
2
+ gems=Dir[gemdir+"*.gem"]
3
+
4
+ gems.each{|gem|
5
+ dir=gem.dup
6
+ dir[/\.gem$/]=''
7
+ Dir.mkdir dir rescue nil
8
+
9
+ system "tar x -f #{gem} -C #{dir}"
10
+ system "gunzip #{dir}/metadata.gz -c > #{dir}/metadata"
11
+ system "tar xz -f #{dir}/data.tar.gz -C #{dir}"
12
+
13
+
14
+ File.unlink gem, dir+"/metadata.gz", dir+"/data.tar.gz" rescue nil
15
+ }
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ __END__
2
+ foo bar baz
@@ -0,0 +1,3 @@
1
+ 2
2
+ __END__
3
+ foo bar baz
data/test/data/and.rb ADDED
@@ -0,0 +1,5 @@
1
+ public
2
+ def printer; puts self end
3
+ alias+@printer
4
+
5
+ 0<2_500_000and+"yippeee"
@@ -0,0 +1,23 @@
1
+ proc{|(a,b)|}
2
+ proc{|a,b=10|
3
+
4
+
5
+ }
6
+ proc{|a,b="#foobar"|
7
+
8
+ }
9
+ proc{|a,b=(1|2)|
10
+
11
+ }
12
+ proc{|a,b=ccc=d=0|
13
+ ccc %(1)
14
+ }
15
+ def ccc
16
+
17
+ end
18
+ proc{|a,b=ccc()|
19
+ ccc %(1)
20
+ }
21
+
22
+ def x(a,b=10)
23
+ end
@@ -0,0 +1,75 @@
1
+ # Murphy's Chunky Bacon generator
2
+ # Chunky Bacon by why the lucky stiff
3
+ def toss
4
+ rand(2).zero?
5
+ end
6
+
7
+ class String
8
+ def randomize_case
9
+ split('').map do |c| toss ? c.upcase : c.downcase end.join
10
+ end
11
+ end
12
+
13
+ module Chunky
14
+ FONT_FAMILIES = %w(serif sans-serif cursive fantasy monospace)
15
+
16
+ def self.rand_color
17
+ '#%x' % rand(0x1_00_00_00)
18
+ end
19
+
20
+ def self.bacon n
21
+ chunky_bacon = Array.new n do
22
+ '<span style="position: fixed; top: %dpx; left: %dpx; color: %s; font-size: %d%%; font-weight: %d00; font-sytle: %s; font-family: %s;">%s</span>' % [
23
+ rand(800) - 30,
24
+ rand(1200) - 100,
25
+ rand_color,
26
+ rand(300) + 10,
27
+ rand(9) + 1,
28
+ toss ? 'italic' : 'normal',
29
+ FONT_FAMILIES[rand(FONT_FAMILIES.size)],
30
+ 'Chunky Bacon'.randomize_case,
31
+ ]
32
+ end.join "\n"
33
+
34
+ <<-OUT
35
+ <html>
36
+ <body style="background-color: #{rand_color};">
37
+ #{chunky_bacon}
38
+ </body>
39
+ </html>
40
+ OUT
41
+ end
42
+ end
43
+
44
+ require 'webrick'
45
+ class ChunkBaconServlet < WEBrick::HTTPServlet::AbstractServlet
46
+ def do_GET req, res
47
+ q = req.path
48
+ res.body =
49
+ case q
50
+ when nil, '/'
51
+ Chunky.bacon 100
52
+ when /favicon.ico$/
53
+ ''
54
+ when /\/(\d+)/
55
+ Chunky.bacon $1.to_i
56
+ else
57
+ 'what?'
58
+ end
59
+ res['Content-Type'] = 'text/html'
60
+ end
61
+ end
62
+
63
+ # 203 = 0xCB for ChunkyBacon
64
+ s = WEBrick::HTTPServer.new :Port => 203
65
+
66
+ s.mount '/', ChunkBaconServlet
67
+
68
+ s.mount_proc '/comic' do |req, res|
69
+ res.body = '<img src="http://www.poignantguide.net/ruby/i/the.foxes-4e.png" />'
70
+ res['Content-Type'] = "text/html"
71
+ end
72
+
73
+ trap("INT") { s.shutdown }
74
+ s.start
75
+ #CB
@@ -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
@@ -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
@@ -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