ry / ebb fork watch download tarball
public this repo is viewable by everyone
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Small parser changes

I applied a patch from Eric Wong to reduce rb_str allocation during 
parsing.
Also hacked parser.rl into a state that it compiles with Ragel 6.
Ryan Dahl (author)
2 months ago
commit  ea11c7cd84a4a38a23dcb3f02371e5fca42a71fa
tree    2c73d9de8e1f70ec0d00d7a205a87b83b83d3d05
parent  459af6a54e12fffdce5e32be04417e4cf1f9be60
...
1
 
2
3
4
...
6
7
8
9
 
10
11
12
...
15
16
17
18
 
 
19
20
21
22
23
24
 
 
 
 
25
26
27
28
29
30
31
32
33
34
35
36
37
...
83
84
85
 
 
86
87
...
1
2
3
4
5
...
7
8
9
 
10
11
12
13
...
16
17
18
 
19
20
21
22
23
24
 
 
25
26
27
28
29
30
 
31
32
33
34
35
36
 
37
38
39
...
85
86
87
88
89
90
91
0
@@ -1,4 +1,5 @@
0
 require 'rake'
0
+require 'rake/testtask'
0
 require 'rake/gempackagetask'
0
 require 'rake/clean'
0
 
0
@@ -6,7 +7,7 @@ def dir(path)
0
   File.expand_path File.join(File.dirname(__FILE__), path)
0
 end
0
 
0
-task(:default => :compile)
0
+task(:default => :test)
0
 
0
 task(:package => 'src/parser.c')
0
 
0
@@ -15,23 +16,24 @@ task(:compile => 'src/parser.c') do
0
 end
0
 
0
 file('src/parser.c' => 'src/parser.rl') do
0
- sh "ragel src/parser.rl | rlgen-cd -G2 -o src/parser.c"
0
+ #sh "ragel src/parser.rl | rlgen-cd -G2 -o src/parser.c"
0
+ sh 'ragel -G2 src/parser.rl'
0
 end
0
 
0
 task(:wc) { sh "wc -l ruby_lib/*.rb src/ebb*.{c,h}" }
0
 
0
-task(:test => :compile) do
0
- sh "ruby #{dir("benchmark/test.rb")}"
0
+task(:test => :compile)
0
+Rake::TestTask.new do |t|
0
+ t.test_files = 'test/test.rb'
0
+ t.verbose = true
0
 end
0
 
0
-
0
 task(:site_upload => :site) do
0
   sh 'scp -r site/* rydahl@rubyforge.org:/var/www/gforge-projects/ebb/'
0
 end
0
 task(:site => 'site/index.html')
0
 file('site/index.html' => %w{README site/style.css}) do
0
   require 'BlueCloth'
0
-
0
   doc = BlueCloth.new(File.read(dir('README')))
0
   template = <<-HEREDOC
0
 <html>
0
@@ -83,5 +85,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
0
   pkg.need_zip = true
0
 end
0
 
0
+
0
+
0
 CLEAN.add ["**/*.{o,bundle,so,obj,pdb,lib,def,exp}", "benchmark/*.dump", 'site/index.html']
0
 CLOBBER.add ['src/Makefile', 'src/parser.c', 'src/mkmf.log','doc', 'coverage']
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,141 +0,0 @@
0
-require File.dirname(__FILE__) + '/../ruby_lib/ebb'
0
-require 'test/unit'
0
-require 'net/http'
0
-require 'base64'
0
-
0
-
0
-class EbbTest < Test::Unit::TestCase
0
- def setup
0
- @pid = fork do
0
- server = Ebb::Server.new(self, :port => 4044)
0
- server.start
0
- end
0
- sleep 0.5
0
- end
0
-
0
- def teardown
0
- Process.kill('KILL', @pid)
0
- sleep 0.5
0
- end
0
-
0
- def get(path)
0
- Net::HTTP.get_response(URI.parse("http://0.0.0.0:4044#{path}"))
0
- end
0
-
0
- def post(path, data)
0
- Net::HTTP.post_form(URI.parse("http://0.0.0.0:4044#{path}"), data)
0
- end
0
-
0
- @@responses = {}
0
- def call(env)
0
- commands = env['PATH_INFO'].split('/')
0
-
0
- if commands.include?('bytes')
0
- n = commands.last.to_i
0
- raise "bytes called with n <= 0" if n <= 0
0
- body = @@responses[n] || "C"*n
0
- status = 200
0
-
0
- elsif commands.include?('env')
0
- env.delete('rack.input') # delete this because it's hard to marshal
0
- env.delete('rack.errors')
0
- body = Base64.encode64(Marshal.dump(env))
0
- status = 200
0
-
0
- elsif commands.include?('test_post_length')
0
- input_body = ""
0
- while chunk = env['rack.input'].read(512)
0
- input_body << chunk
0
- end
0
-
0
- content_length_header = env['HTTP_CONTENT_LENGTH'].to_i
0
-
0
- if content_length_header == input_body.length
0
- body = "Content-Length matches input length"
0
- status = 200
0
- else
0
- body = "Content-Length header is #{content_length_header} but body length is #{input_body.length}"
0
- # content_length = #{env['HTTP_CONTENT_LENGTH'].to_i}
0
- # input_body.length = #{input_body.length}"
0
- status = 500
0
- end
0
-
0
- else
0
- status = 404
0
- body = "Undefined url"
0
- end
0
-
0
- [status, {'Content-Type' => 'text/plain'}, body]
0
- end
0
-
0
- def test_get_bytes
0
- [1,10,1000].each do |i|
0
- response = get("/bytes/#{i}")
0
- assert_equal "#{'C'*i.to_i}", response.body
0
- end
0
- end
0
-
0
- def test_get_unknown
0
- response = get('/blah')
0
- assert_equal "Undefined url", response.body
0
- end
0
-
0
- def test_small_posts
0
- [1,10,321,123,1000].each do |i|
0
- response = post("/test_post_length", 'C'*i)
0
- assert_equal 200, response.code.to_i, response.body
0
- end
0
- end
0
-
0
- # this is rough but does detect major problems
0
- def test_ab
0
- r = %x{ab -n 1000 -c 50 -q http://0.0.0.0:4044/bytes/123}
0
- assert r =~ /Requests per second:\s*(\d+)/, r
0
- assert $1.to_i > 100, r
0
- end
0
-
0
- def test_large_post
0
- [50,60,100].each do |i|
0
- response = post("/test_post_length", 'C'*1024*i)
0
- assert_equal 200, response.code.to_i, response.body
0
- end
0
- end
0
-
0
- def test_env
0
- response = get('/env')
0
- env = Marshal.load(Base64.decode64(response.body))
0
- assert_equal '/env', env['PATH_INFO']
0
- assert_equal '/env', env['REQUEST_PATH']
0
- assert_equal 'HTTP/1.1', env['SERVER_PROTOCOL']
0
- assert_equal 'CGI/1.2', env['GATEWAY_INTERFACE']
0
- assert_equal '0.0.0.0', env['SERVER_NAME']
0
- assert_equal '4044', env['SERVER_PORT']
0
- assert_equal 'GET', env['REQUEST_METHOD']
0
- end
0
-end
0
-
0
-class EbbRailsTest < Test::Unit::TestCase
0
- # just to make sure there isn't some load error
0
- def test_ebb_rails_version
0
- out = %x{ruby #{Ebb::LIBDIR}/../bin/ebb_rails -v}
0
- assert_match %r{Ebb #{Ebb::VERSION}}, out
0
- end
0
-end
0
-
0
-
0
-#
0
-# class SocketTest < Test::Unit::TestCase
0
-# def test_socket_creation
0
-# filename = '/tmp/ebb.socket'
0
-# @pid = fork do
0
-# server = Ebb::Server.new(TestApp.new, {:socket => filename})
0
-# server.start
0
-# end
0
-# sleep(1)
0
-# assert File.exists?(filename)
0
-#
0
-# Process.kill('KILL', @pid)
0
-#
0
-# assert !File.exists?(filename)
0
-# end
0
-# end
...
26
27
28
 
29
30
31
32
33
34
35
36
37
38
39
...
48
49
50
51
52
53
54
55
 
 
 
 
 
 
 
 
56
57
58
 
59
60
61
...
26
27
28
29
30
31
 
32
33
 
 
 
34
35
36
...
45
46
47
 
 
 
 
 
48
49
50
51
52
53
54
55
56
57
 
58
59
60
61
0
@@ -26,14 +26,11 @@ static VALUE global_path_info;
0
 static VALUE global_content_length;
0
 static VALUE global_http_host;
0
 
0
+#define ASCII_UPPER(ch) ('a' <= ch && ch <= 'z' ? ch - 'a' + 'A' : ch)
0
 
0
 /* Variables with an underscore are C-level variables */
0
-
0
 VALUE env_field(const char *field, int length)
0
 {
0
- VALUE f;
0
- char *ch, *end;
0
-
0
   if(field == NULL) {
0
     switch(length) {
0
       case EBB_REQUEST_METHOD: return global_request_method;
0
@@ -48,14 +45,17 @@ VALUE env_field(const char *field, int length)
0
       default: assert(FALSE); /* unknown const */
0
     }
0
   } else {
0
- f = rb_str_dup(global_http_prefix);
0
- f = rb_str_buf_cat(f, field, length);
0
-
0
- for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
0
- if(*ch == '-') {
0
+ VALUE f = rb_str_new(NULL, RSTRING_LEN(global_http_prefix) + length);
0
+ memcpy( RSTRING_PTR(f)
0
+ , RSTRING_PTR(global_http_prefix)
0
+ , RSTRING_LEN(global_http_prefix)
0
+ );
0
+ for(int i = 0; i < length; i++) {
0
+ char *ch = RSTRING_PTR(f) + RSTRING_LEN(global_http_prefix) + i;
0
+ if(field[i] == '-') {
0
         *ch = '_';
0
       } else {
0
- *ch = toupper(*ch);
0
+ *ch = ASCII_UPPER(field[i]);
0
       }
0
     }
0
     return f;
...
35
36
37
38
 
39
40
41
...
35
36
37
 
38
39
40
41
0
@@ -35,7 +35,7 @@ dir = File.dirname(__FILE__)
0
 libev_dir = File.expand_path(dir + '/../libev')
0
 
0
 $LDFLAGS << " -lpthread "
0
-$CFLAGS << " -I#{libev_dir} " << flags.join(' ')
0
+$CFLAGS << " -std=c99 -I#{libev_dir} " << flags.join(' ')
0
 $defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}"
0
 
0
 
...
53
54
55
56
 
57
58
 
59
60
61
 
62
63
64
65
66
67
 
 
68
69
70
 
71
72
73
...
85
86
87
88
 
 
89
90
91
92
93
94
95
 
96
97
98
...
118
119
120
121
 
122
123
124
...
142
143
144
145
 
146
147
148
...
155
156
157
158
 
159
160
161
...
167
168
169
170
 
171
172
173
...
181
182
183
184
 
185
186
187
...
195
196
197
198
 
199
200
201
...
207
208
209
210
 
211
212
213
...
215
216
217
218
 
219
220
221
222
223
224
225
 
226
227
228
229
230
231
232
 
233
234
235
236
237
238
239
 
240
241
242
243
244
245
246
 
247
248
249
...
252
253
254
255
 
256
257
258
259
260
261
262
 
263
264
265
...
274
275
276
 
 
277
278
279
...
281
282
283
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
286
287
...
297
298
299
300
 
301
302
 
303
304
305
306
307
308
 
309
310
311
...
335
336
337
338
 
339
340
341
...
346
347
348
349
 
350
351
352
353
354
 
355
356
 
357
358
359
...
361
362
363
364
 
365
366
 
367
368
369
...
400
401
402
403
 
404
405
 
406
407
408
...
414
415
416
417
 
418
419
 
420
421
 
422
423
424
...
426
427
428
429
 
430
431
 
432
433
434
...
457
458
459
460
 
461
462
463
...
487
488
489
490
 
491
492
493
...
517
518
519
520
 
521
522
523
...
547
548
549
550
 
551
552
553
...
577
578
579
580
 
581
582
583
...
607
608
609
610
 
611
612
613
...
634
635
636
637
 
638
639
640
...
664
665
666
667
 
668
669
670
...
694
695
696
697
 
698
699
700
...
724
725
726
727
 
728
729
730
...
754
755
756
757
 
758
759
760
...
784
785
786
787
 
788
789
790
...
814
815
816
817
 
818
819
820
821
 
822
823
824
...
840
841
842
843
 
844
845
846
847
848
849
 
850
851
852
...
854
855
856
857
 
858
859
 
860
861
862
 
 
863
864
865
 
 
866
867
868
...
870
871
872
873
 
874
875
 
876
877
 
878
879
880
...
882
883
884
885
 
886
887
 
888
889
890
...
907
908
909
910
 
911
912
 
913
914
915
...
925
926
927
928
 
929
930
931
...
938
939
940
941
 
942
943
944
...
955
956
957
958
 
959
960
 
961
962
 
963
964
 
965
966
967
 
968
969
970
...
975
976
977
978
 
979
980
981
...
988
989
990
991
 
992
993
994
...
999
1000
1001
1002
 
1003
1004
1005
...
1008
1009
1010
1011
 
1012
1013
 
1014
1015
1016
...
1027
1028
1029
1030
 
1031
1032
1033
...
1040
1041
1042
1043
 
1044
1045
1046
...
1051
1052
1053
1054
 
1055
1056
1057
...
1060
1061
1062
1063
 
1064
1065
 
1066
1067
1068
 
 
1069
1070
1071
...
1075
1076
1077
1078
1079
 
 
1080
1081
1082
1083
1084
1085
 
1086
1087
 
1088
1089
 
1090
1091
1092
...
1098
1099
1100
1101
 
1102
1103
1104
1105
1106
1107
 
1108
1109
 
1110
1111
1112
...
1118
1119
1120
1121
 
1122
1123
1124
...
1131
1132
1133
1134
 
1135
1136
1137
...
1149
1150
1151
1152
 
1153
1154
1155
...
1167
1168
1169
1170
 
1171
1172
1173
...
1185
1186
1187
1188
 
1189
1190
1191
...
1203
1204
1205
1206
 
1207
1208
1209
...
1221
1222
1223
1224
 
1225
1226
1227
...
1239
1240
1241
1242
 
1243
1244
1245
...
1257
1258
1259
1260
 
1261
1262
1263
...
1275
1276
1277
1278
 
1279
1280
1281
...
1293
1294
1295
1296
 
1297
1298
1299
...
1311
1312
1313
1314
 
1315
1316
1317
...
1329
1330
1331
1332
 
1333
1334
1335
...
1347
1348
1349
1350
 
1351
1352
1353
...
1365
1366
1367
1368
 
1369
1370
1371
...
1383
1384
1385
1386
 
1387
1388
1389
...
1401
1402
1403
1404
 
1405
1406
1407
...
1419
1420
1421
1422
 
1423
1424
1425
...
1437
1438
1439
1440
 
1441
1442
1443
...
1455
1456
1457
1458
 
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1533
 
1534
1535
1536
1537
 
 
1538
1539
1540
 
1541
1542
1543
1544
1545
1546
1547
 
 
1548
1549
1550
1551
1552
 
1553
 
1554
1555
 
 
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
...
1580
1581
1582
1583
 
1584
...
53
54
55
 
56
57
 
58
59
60
 
61
62
63
 
 
64
 
65
66
67
68
 
69
70
71
72
...
84
85
86
 
87
88
89
90
91
92
93
94
 
95
96
97
98
...
118
119
120
 
121
122
123
124
...
142
143
144
 
145
146
147
148
...
155
156
157
 
158
159
160
161
...
167
168
169
 
170
171
172
173
...
181
182
183
 
184
185
186
187
...
195
196
197
 
198
199
200
201
...
207
208
209
 
210
211
212
213
...
215
216
217
 
218
219
220
221
222
223
224
 
225
226
227
228
229
230
231
 
232
233
234
235
236
237
238
 
239
240
241
242
243
244
245
 
246
247
248
249
...
252
253
254
 
255
256
257
258
259
260
261
 
262
263
264
265
...
274
275
276
277
278
279
280
281
...
283
284
285
 
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
325
326
327
 
328
329
 
330
331
332
333
334
335
 
336
337
338
339
...
363
364
365
 
366
367
368
369
...
374
375
376
 
377
378
379
380
381
 
382
383
 
384
385
386
387
...
389
390
391
 
392
393
 
394
395
396
397
...
428
429
430
 
431
432
 
433
434
435
436
...
442
443
444
 
445
446
 
447
448
 
449
450
451
452
...
454
455
456
 
457
458
 
459
460
461
462
...
485
486
487
 
488
489
490
491
...
515
516
517
 
518
519
520
521
...
545
546
547
 
548
549
550
551
...
575
576
577
 
578
579
580
581
...
605
606
607
 
608
609
610
611
...
635
636
637
 
638
639
640
641
...
662
663
664
 
665
666
667
668
...
692
693
694
 
695
696
697
698
...
722
723
724
 
725
726
727
728
...
752
753
754
 
755
756
757
758
...
782
783
784
 
785
786
787
788
...
812
813
814
 
815
816
817
818
...
842
843
844
 
845
846
847
848
 
849
850
851
852
...
868
869
870
 
871
872
873
874
875
876
 
877
878
879
880
...
882
883
884
 
885
886
 
887
888
 
 
889
890
891
 
 
892
893
894
895
896
...
898
899
900
 
901
902
 
903
904
 
905
906
907
908
...
910
911
912
 
913
914
 
915
916
917
918
...
935
936
937
 
938
939
 
940
941
942
943
...
953
954
955
 
956
957
958
959
...
966
967
968
 
969
970
971
972
...
983
984
985
 
986
987
 
988
989
 
990
991
 
992
993
994
 
995
996
997
998
...
1003
1004
1005
 
1006
1007
1008
1009
...
1016
1017
1018
 
1019
1020
1021
1022
...
1027
1028
1029
 
1030
1031
1032
1033
...
1036
1037
1038
 
1039
1040
 
1041
1042
1043
1044
...
1055
1056
1057
 
1058
1059
1060
1061
...
1068
1069
1070
 
1071
1072
1073
1074
...
1079
1080
1081
 
1082
1083
1084
1085
...
1088
1089
1090
 
1091
1092
 
1093
1094
 
 
1095
1096
1097
1098
1099
...
1103
1104
1105
 
 
1106
1107
1108
1109
1110
1111
1112
 
1113
1114
 
1115
1116
 
1117
1118
1119
1120
...
1126
1127
1128
 
1129
1130
1131
1132
1133
1134
 
1135
1136
 
1137
1138
1139
1140
...
1146
1147
1148
 
1149
1150
1151
1152
...
1159
1160
1161
 
1162
1163
1164
1165
...
1177
1178
1179
 
1180
1181
1182
1183
...
1195
1196
1197
 
1198
1199
1200
1201
...
1213
1214
1215
 
1216
1217
1218
1219
...
1231
1232
1233
 
1234
1235
1236
1237
...
1249
1250
1251
 
1252
1253
1254
1255
...
1267
1268
1269
 
1270
1271
1272
1273
...
1285
1286
1287
 
1288
1289
1290
1291
...
1303
1304
1305
 
1306
1307
1308
1309
...
1321
1322
1323
 
1324
1325
1326
1327
...
1339
1340
1341
 
1342
1343
1344
1345
...
1357
1358
1359
 
1360
1361
1362
1363
...
1375
1376
1377
 
1378
1379
1380
1381
...
1393
1394
1395
 
1396
1397
1398
1399
...
1411
1412
1413
 
1414
1415
1416
1417
...
1429
1430
1431
 
1432
1433
1434
1435
...
1447
1448
1449
 
1450
1451
1452
1453
...
1465
1466
1467
 
1468
1469
1470
1471
...
1483
1484
1485
 
1486
1487
1488
1489
1490
1491
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
 
 
1564
1565
1566
1567
 
1568
1569
1570
1571
1572
1573
1574
 
1575
1576
1577
 
 
 
 
1578
1579
1580
1581
 
1582
1583
1584
1585
1586
1587
1588
 
 
 
 
 
 
 
 
1589
1590
1591
...
1600
1601
1602
 
1603
1604
0
@@ -53,21 +53,20 @@ int http_parser_init(http_parser *parser) {
0
 size_t http_parser_execute(http_parser *parser, const char *buffer, size_t len, size_t off) {
0
   const char *p, *pe;
0
   int cs = parser->cs;
0
-
0
+
0
   assert(off <= len && "offset past end of buffer");
0
-
0
+
0
   p = buffer+off;
0
   pe = buffer+len;
0
-
0
+
0
   assert(*pe == '\0' && "pointer does not end on NUL");
0
   assert(pe - p == len - off && "pointers aren't same distance");
0
-
0
-
0
   
0
-#line 68 "src/parser.c"
0
+
0
+#line 67 "src/parser.c"
0
   {
0
   if ( p == pe )
0
-    goto _out;
0
+    goto _test_eof;
0
   switch ( cs )
0
   {
0
 case 1:
0
@@ -85,14 +84,15 @@ case 1:
0
     goto tr0;
0
   goto st0;
0
 st0:
0
-  goto _out0;
0
+cs = 0;
0
+  goto _out;
0
 tr0:
0
 #line 20 "src/parser.rl"
0
   {MARK(mark, p); }
0
   goto st2;
0
 st2:
0
   if ( ++p == pe )
0
-    goto _out2;
0
+    goto _test_eof2;
0
 case 2:
0
 #line 98 "src/parser.c"
0
   switch( (*p) ) {
0
@@ -118,7 +118,7 @@ tr2:
0
   goto st3;
0
 st3:
0
   if ( ++p == pe )
0
-    goto _out3;
0
+    goto _test_eof3;