thin 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Rakefile +7 -4
- data/example/thin.god +1 -1
- data/ext/thin_parser/common.rl +1 -1
- data/ext/thin_parser/parser.c +1026 -293
- data/ext/thin_parser/thin.c +3 -0
- data/lib/rack/adapter/rails.rb +2 -3
- data/lib/thin/controllers/cluster.rb +57 -6
- data/lib/thin/request.rb +6 -2
- data/lib/thin/runner.rb +5 -2
- data/lib/thin/version.rb +2 -2
- data/spec/controllers/cluster_spec.rb +32 -0
- data/spec/request/parser_spec.rb +29 -1
- data/spec/request/processing_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- data/tasks/gem.rake +5 -13
- data/tasks/spec.rake +39 -45
- metadata +6 -33
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 1.2.5 This Is Not A Web Server
|
2
|
+
* Add rolling restart support (--onebyone option) [sikachu]
|
3
|
+
* Force external_encoding of request's body to ASCII_8BIT [jeremyz]
|
4
|
+
* Ensure Rack base API is used in Rails adapter only if version >= 2.3.2 [#111 state:resolved]
|
5
|
+
|
1
6
|
== 1.2.4 Flaming Astroboy
|
2
7
|
* Fix a few issues in thin to make it a better "gem citizen" [josh]
|
3
8
|
* Fix test for rack based Rails in adapter under Ruby >= 1.8.7 [#109 state:resolved]
|
data/Rakefile
CHANGED
@@ -15,9 +15,12 @@ Dir['tasks/**/*.rake'].each { |rake| load rake }
|
|
15
15
|
task :default => :spec
|
16
16
|
|
17
17
|
Rake::ExtensionTask.new('thin_parser', Thin::GemSpec) do |ext|
|
18
|
-
|
19
|
-
ext.
|
20
|
-
|
18
|
+
# enable cross compilation (requires cross compile toolchain)
|
19
|
+
ext.cross_compile = true
|
20
|
+
|
21
|
+
# forces the Windows platform instead of the default one
|
22
|
+
# configure options only for cross compile
|
23
|
+
ext.cross_platform = %w( i386-mswin32 x86-mingw32 )
|
21
24
|
end
|
22
25
|
|
23
26
|
CLEAN.include %w(**/*.{o,bundle,jar,so,obj,pdb,lib,def,exp,log} ext/*/Makefile ext/*/conftest.dSYM)
|
@@ -27,7 +30,7 @@ task :ragel do
|
|
27
30
|
Dir.chdir 'ext/thin_parser' do
|
28
31
|
target = "parser.c"
|
29
32
|
File.unlink target if File.exist? target
|
30
|
-
sh "ragel parser.rl
|
33
|
+
sh "ragel parser.rl -G2 -o #{target}"
|
31
34
|
raise "Failed to compile Ragel state machine" unless File.exist? target
|
32
35
|
end
|
33
36
|
end
|
data/example/thin.god
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# each thin configuration file found in /etc/thin.
|
7
7
|
# In order to get it working on Ubuntu, I had to make a change to god as noted at
|
8
8
|
# the following blog:
|
9
|
-
# http://blog.alexgirard.com/
|
9
|
+
# http://blog.alexgirard.com/ruby-one-line-to-save-god/
|
10
10
|
#
|
11
11
|
require 'yaml'
|
12
12
|
|
data/ext/thin_parser/common.rl
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
query = ( uchar | reserved )* %query_string ;
|
32
32
|
param = ( pchar | "/" )* ;
|
33
33
|
params = ( param ( ";" param )* ) ;
|
34
|
-
rel_path = ( path?
|
34
|
+
rel_path = ( path? (";" params)? %request_path) ("?" %start_query query)?;
|
35
35
|
absolute_path = ( "/"+ rel_path );
|
36
36
|
|
37
37
|
Request_URI = ( "*" | absolute_uri | absolute_path ) >mark %request_uri;
|
data/ext/thin_parser/parser.c
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
#line 1 "parser.rl"
|
2
3
|
/**
|
3
4
|
* Copyright (c) 2005 Zed A. Shaw
|
@@ -16,195 +17,30 @@
|
|
16
17
|
|
17
18
|
/** Machine **/
|
18
19
|
|
20
|
+
|
19
21
|
#line 81 "parser.rl"
|
20
22
|
|
21
23
|
|
22
24
|
/** Data **/
|
23
25
|
|
24
|
-
#line
|
25
|
-
static const char _http_parser_actions[] = {
|
26
|
-
0, 1, 0, 1, 1, 1, 2, 1,
|
27
|
-
3, 1, 4, 1, 5, 1, 6, 1,
|
28
|
-
7, 1, 8, 1, 10, 1, 11, 1,
|
29
|
-
12, 2, 0, 7, 2, 3, 4, 2,
|
30
|
-
9, 6, 2, 11, 6, 3, 8, 9,
|
31
|
-
6
|
32
|
-
};
|
33
|
-
|
34
|
-
static const short _http_parser_key_offsets[] = {
|
35
|
-
0, 0, 8, 17, 27, 29, 30, 31,
|
36
|
-
32, 33, 34, 36, 39, 41, 44, 45,
|
37
|
-
61, 62, 78, 80, 81, 87, 93, 99,
|
38
|
-
105, 115, 121, 127, 133, 141, 147, 153,
|
39
|
-
160, 166, 172, 178, 184, 190, 196, 205,
|
40
|
-
214, 223, 232, 241, 250, 259, 268, 277,
|
41
|
-
286, 295, 304, 313, 322, 331, 340, 349,
|
42
|
-
358, 359
|
43
|
-
};
|
44
|
-
|
45
|
-
static const char _http_parser_trans_keys[] = {
|
46
|
-
36, 95, 45, 46, 48, 57, 65, 90,
|
47
|
-
32, 36, 95, 45, 46, 48, 57, 65,
|
48
|
-
90, 42, 43, 47, 58, 45, 57, 65,
|
49
|
-
90, 97, 122, 32, 35, 72, 84, 84,
|
50
|
-
80, 47, 48, 57, 46, 48, 57, 48,
|
51
|
-
57, 13, 48, 57, 10, 13, 33, 124,
|
52
|
-
126, 35, 39, 42, 43, 45, 46, 48,
|
53
|
-
57, 65, 90, 94, 122, 10, 33, 58,
|
54
|
-
124, 126, 35, 39, 42, 43, 45, 46,
|
55
|
-
48, 57, 65, 90, 94, 122, 13, 32,
|
56
|
-
13, 32, 35, 37, 127, 0, 31, 32,
|
57
|
-
35, 37, 127, 0, 31, 48, 57, 65,
|
58
|
-
70, 97, 102, 48, 57, 65, 70, 97,
|
59
|
-
102, 43, 58, 45, 46, 48, 57, 65,
|
60
|
-
90, 97, 122, 32, 35, 37, 127, 0,
|
61
|
-
31, 48, 57, 65, 70, 97, 102, 48,
|
62
|
-
57, 65, 70, 97, 102, 32, 35, 37,
|
63
|
-
59, 63, 127, 0, 31, 48, 57, 65,
|
64
|
-
70, 97, 102, 48, 57, 65, 70, 97,
|
65
|
-
102, 32, 35, 37, 63, 127, 0, 31,
|
66
|
-
48, 57, 65, 70, 97, 102, 48, 57,
|
67
|
-
65, 70, 97, 102, 32, 35, 37, 127,
|
68
|
-
0, 31, 32, 35, 37, 127, 0, 31,
|
69
|
-
48, 57, 65, 70, 97, 102, 48, 57,
|
70
|
-
65, 70, 97, 102, 32, 36, 95, 45,
|
71
|
-
46, 48, 57, 65, 90, 32, 36, 95,
|
72
|
-
45, 46, 48, 57, 65, 90, 32, 36,
|
73
|
-
95, 45, 46, 48, 57, 65, 90, 32,
|
74
|
-
36, 95, 45, 46, 48, 57, 65, 90,
|
75
|
-
32, 36, 95, 45, 46, 48, 57, 65,
|
76
|
-
90, 32, 36, 95, 45, 46, 48, 57,
|
77
|
-
65, 90, 32, 36, 95, 45, 46, 48,
|
78
|
-
57, 65, 90, 32, 36, 95, 45, 46,
|
79
|
-
48, 57, 65, 90, 32, 36, 95, 45,
|
80
|
-
46, 48, 57, 65, 90, 32, 36, 95,
|
81
|
-
45, 46, 48, 57, 65, 90, 32, 36,
|
82
|
-
95, 45, 46, 48, 57, 65, 90, 32,
|
83
|
-
36, 95, 45, 46, 48, 57, 65, 90,
|
84
|
-
32, 36, 95, 45, 46, 48, 57, 65,
|
85
|
-
90, 32, 36, 95, 45, 46, 48, 57,
|
86
|
-
65, 90, 32, 36, 95, 45, 46, 48,
|
87
|
-
57, 65, 90, 32, 36, 95, 45, 46,
|
88
|
-
48, 57, 65, 90, 32, 36, 95, 45,
|
89
|
-
46, 48, 57, 65, 90, 32, 36, 95,
|
90
|
-
45, 46, 48, 57, 65, 90, 32, 0
|
91
|
-
};
|
92
|
-
|
93
|
-
static const char _http_parser_single_lengths[] = {
|
94
|
-
0, 2, 3, 4, 2, 1, 1, 1,
|
95
|
-
1, 1, 0, 1, 0, 1, 1, 4,
|
96
|
-
1, 4, 2, 1, 4, 4, 0, 0,
|
97
|
-
2, 4, 0, 0, 6, 0, 0, 5,
|
98
|
-
0, 0, 4, 4, 0, 0, 3, 3,
|
99
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
100
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
101
|
-
1, 0
|
102
|
-
};
|
103
|
-
|
104
|
-
static const char _http_parser_range_lengths[] = {
|
105
|
-
0, 3, 3, 3, 0, 0, 0, 0,
|
106
|
-
0, 0, 1, 1, 1, 1, 0, 6,
|
107
|
-
0, 6, 0, 0, 1, 1, 3, 3,
|
108
|
-
4, 1, 3, 3, 1, 3, 3, 1,
|
109
|
-
3, 3, 1, 1, 3, 3, 3, 3,
|
110
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
111
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
112
|
-
0, 0
|
113
|
-
};
|
114
|
-
|
115
|
-
static const short _http_parser_index_offsets[] = {
|
116
|
-
0, 0, 6, 13, 21, 24, 26, 28,
|
117
|
-
30, 32, 34, 36, 39, 41, 44, 46,
|
118
|
-
57, 59, 70, 73, 75, 81, 87, 91,
|
119
|
-
95, 102, 108, 112, 116, 124, 128, 132,
|
120
|
-
139, 143, 147, 153, 159, 163, 167, 174,
|
121
|
-
181, 188, 195, 202, 209, 216, 223, 230,
|
122
|
-
237, 244, 251, 258, 265, 272, 279, 286,
|
123
|
-
293, 295
|
124
|
-
};
|
125
|
-
|
126
|
-
static const char _http_parser_indicies[] = {
|
127
|
-
0, 0, 0, 0, 0, 1, 2, 3,
|
128
|
-
3, 3, 3, 3, 1, 4, 5, 6,
|
129
|
-
7, 5, 5, 5, 1, 8, 9, 1,
|
130
|
-
10, 1, 11, 1, 12, 1, 13, 1,
|
131
|
-
14, 1, 15, 1, 16, 15, 1, 17,
|
132
|
-
1, 18, 17, 1, 19, 1, 20, 21,
|
133
|
-
21, 21, 21, 21, 21, 21, 21, 21,
|
134
|
-
1, 22, 1, 23, 24, 23, 23, 23,
|
135
|
-
23, 23, 23, 23, 23, 1, 26, 27,
|
136
|
-
25, 29, 28, 31, 1, 32, 1, 1,
|
137
|
-
30, 34, 1, 35, 1, 1, 33, 36,
|
138
|
-
36, 36, 1, 33, 33, 33, 1, 37,
|
139
|
-
38, 37, 37, 37, 37, 1, 8, 9,
|
140
|
-
39, 1, 1, 38, 40, 40, 40, 1,
|
141
|
-
38, 38, 38, 1, 42, 43, 44, 45,
|
142
|
-
46, 1, 1, 41, 47, 47, 47, 1,
|
143
|
-
41, 41, 41, 1, 8, 9, 49, 50,
|
144
|
-
1, 1, 48, 51, 51, 51, 1, 48,
|
145
|
-
48, 48, 1, 53, 54, 55, 1, 1,
|
146
|
-
52, 57, 58, 59, 1, 1, 56, 60,
|
147
|
-
60, 60, 1, 56, 56, 56, 1, 2,
|
148
|
-
61, 61, 61, 61, 61, 1, 2, 62,
|
149
|
-
62, 62, 62, 62, 1, 2, 63, 63,
|
150
|
-
63, 63, 63, 1, 2, 64, 64, 64,
|
151
|
-
64, 64, 1, 2, 65, 65, 65, 65,
|
152
|
-
65, 1, 2, 66, 66, 66, 66, 66,
|
153
|
-
1, 2, 67, 67, 67, 67, 67, 1,
|
154
|
-
2, 68, 68, 68, 68, 68, 1, 2,
|
155
|
-
69, 69, 69, 69, 69, 1, 2, 70,
|
156
|
-
70, 70, 70, 70, 1, 2, 71, 71,
|
157
|
-
71, 71, 71, 1, 2, 72, 72, 72,
|
158
|
-
72, 72, 1, 2, 73, 73, 73, 73,
|
159
|
-
73, 1, 2, 74, 74, 74, 74, 74,
|
160
|
-
1, 2, 75, 75, 75, 75, 75, 1,
|
161
|
-
2, 76, 76, 76, 76, 76, 1, 2,
|
162
|
-
77, 77, 77, 77, 77, 1, 2, 78,
|
163
|
-
78, 78, 78, 78, 1, 2, 1, 1,
|
164
|
-
0
|
165
|
-
};
|
166
|
-
|
167
|
-
static const char _http_parser_trans_targs[] = {
|
168
|
-
2, 0, 3, 38, 4, 24, 28, 25,
|
169
|
-
5, 20, 6, 7, 8, 9, 10, 11,
|
170
|
-
12, 13, 14, 15, 16, 17, 57, 17,
|
171
|
-
18, 19, 14, 18, 19, 14, 21, 5,
|
172
|
-
22, 21, 5, 22, 23, 24, 25, 26,
|
173
|
-
27, 28, 5, 20, 29, 31, 34, 30,
|
174
|
-
31, 32, 34, 33, 35, 5, 20, 36,
|
175
|
-
35, 5, 20, 36, 37, 39, 40, 41,
|
176
|
-
42, 43, 44, 45, 46, 47, 48, 49,
|
177
|
-
50, 51, 52, 53, 54, 55, 56
|
178
|
-
};
|
179
|
-
|
180
|
-
static const char _http_parser_trans_actions[] = {
|
181
|
-
1, 0, 11, 0, 1, 1, 1, 1,
|
182
|
-
13, 13, 1, 0, 0, 0, 0, 0,
|
183
|
-
0, 0, 19, 0, 0, 3, 23, 0,
|
184
|
-
5, 7, 28, 7, 0, 9, 1, 25,
|
185
|
-
1, 0, 15, 0, 0, 0, 0, 0,
|
186
|
-
0, 0, 34, 34, 0, 21, 21, 0,
|
187
|
-
0, 0, 0, 0, 17, 37, 37, 17,
|
188
|
-
0, 31, 31, 0, 0, 0, 0, 0,
|
189
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
190
|
-
0, 0, 0, 0, 0, 0, 0
|
191
|
-
};
|
192
|
-
|
26
|
+
#line 27 "parser.c"
|
193
27
|
static const int http_parser_start = 1;
|
194
|
-
static const int http_parser_first_final =
|
28
|
+
static const int http_parser_first_final = 54;
|
195
29
|
static const int http_parser_error = 0;
|
196
30
|
|
197
31
|
static const int http_parser_en_main = 1;
|
198
32
|
|
33
|
+
|
199
34
|
#line 85 "parser.rl"
|
200
35
|
|
201
36
|
int thin_http_parser_init(http_parser *parser) {
|
202
37
|
int cs = 0;
|
203
38
|
|
204
|
-
#line
|
39
|
+
#line 40 "parser.c"
|
205
40
|
{
|
206
41
|
cs = http_parser_start;
|
207
42
|
}
|
43
|
+
|
208
44
|
#line 89 "parser.rl"
|
209
45
|
parser->cs = cs;
|
210
46
|
parser->body_start = 0;
|
@@ -233,180 +69,1077 @@ size_t thin_http_parser_execute(http_parser *parser, const char *buffer, size_t
|
|
233
69
|
|
234
70
|
|
235
71
|
|
236
|
-
#line
|
72
|
+
#line 73 "parser.c"
|
237
73
|
{
|
238
|
-
int _klen;
|
239
|
-
unsigned int _trans;
|
240
|
-
const char *_acts;
|
241
|
-
unsigned int _nacts;
|
242
|
-
const char *_keys;
|
243
|
-
|
244
74
|
if ( p == pe )
|
245
75
|
goto _test_eof;
|
246
|
-
|
247
|
-
goto _out;
|
248
|
-
_resume:
|
249
|
-
_keys = _http_parser_trans_keys + _http_parser_key_offsets[cs];
|
250
|
-
_trans = _http_parser_index_offsets[cs];
|
251
|
-
|
252
|
-
_klen = _http_parser_single_lengths[cs];
|
253
|
-
if ( _klen > 0 ) {
|
254
|
-
const char *_lower = _keys;
|
255
|
-
const char *_mid;
|
256
|
-
const char *_upper = _keys + _klen - 1;
|
257
|
-
while (1) {
|
258
|
-
if ( _upper < _lower )
|
259
|
-
break;
|
260
|
-
|
261
|
-
_mid = _lower + ((_upper-_lower) >> 1);
|
262
|
-
if ( (*p) < *_mid )
|
263
|
-
_upper = _mid - 1;
|
264
|
-
else if ( (*p) > *_mid )
|
265
|
-
_lower = _mid + 1;
|
266
|
-
else {
|
267
|
-
_trans += (_mid - _keys);
|
268
|
-
goto _match;
|
269
|
-
}
|
270
|
-
}
|
271
|
-
_keys += _klen;
|
272
|
-
_trans += _klen;
|
273
|
-
}
|
274
|
-
|
275
|
-
_klen = _http_parser_range_lengths[cs];
|
276
|
-
if ( _klen > 0 ) {
|
277
|
-
const char *_lower = _keys;
|
278
|
-
const char *_mid;
|
279
|
-
const char *_upper = _keys + (_klen<<1) - 2;
|
280
|
-
while (1) {
|
281
|
-
if ( _upper < _lower )
|
282
|
-
break;
|
283
|
-
|
284
|
-
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
285
|
-
if ( (*p) < _mid[0] )
|
286
|
-
_upper = _mid - 2;
|
287
|
-
else if ( (*p) > _mid[1] )
|
288
|
-
_lower = _mid + 2;
|
289
|
-
else {
|
290
|
-
_trans += ((_mid - _keys)>>1);
|
291
|
-
goto _match;
|
292
|
-
}
|
293
|
-
}
|
294
|
-
_trans += _klen;
|
295
|
-
}
|
296
|
-
|
297
|
-
_match:
|
298
|
-
_trans = _http_parser_indicies[_trans];
|
299
|
-
cs = _http_parser_trans_targs[_trans];
|
300
|
-
|
301
|
-
if ( _http_parser_trans_actions[_trans] == 0 )
|
302
|
-
goto _again;
|
303
|
-
|
304
|
-
_acts = _http_parser_actions + _http_parser_trans_actions[_trans];
|
305
|
-
_nacts = (unsigned int) *_acts++;
|
306
|
-
while ( _nacts-- > 0 )
|
76
|
+
switch ( cs )
|
307
77
|
{
|
308
|
-
|
309
|
-
|
310
|
-
|
78
|
+
case 1:
|
79
|
+
switch( (*p) ) {
|
80
|
+
case 36: goto tr0;
|
81
|
+
case 95: goto tr0;
|
82
|
+
}
|
83
|
+
if ( (*p) < 48 ) {
|
84
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
85
|
+
goto tr0;
|
86
|
+
} else if ( (*p) > 57 ) {
|
87
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
88
|
+
goto tr0;
|
89
|
+
} else
|
90
|
+
goto tr0;
|
91
|
+
goto st0;
|
92
|
+
st0:
|
93
|
+
cs = 0;
|
94
|
+
goto _out;
|
95
|
+
tr0:
|
311
96
|
#line 22 "parser.rl"
|
312
97
|
{MARK(mark, p); }
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
}
|
335
|
-
break;
|
336
|
-
case 5:
|
98
|
+
goto st2;
|
99
|
+
st2:
|
100
|
+
if ( ++p == pe )
|
101
|
+
goto _test_eof2;
|
102
|
+
case 2:
|
103
|
+
#line 104 "parser.c"
|
104
|
+
switch( (*p) ) {
|
105
|
+
case 32: goto tr2;
|
106
|
+
case 36: goto st35;
|
107
|
+
case 95: goto st35;
|
108
|
+
}
|
109
|
+
if ( (*p) < 48 ) {
|
110
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
111
|
+
goto st35;
|
112
|
+
} else if ( (*p) > 57 ) {
|
113
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
114
|
+
goto st35;
|
115
|
+
} else
|
116
|
+
goto st35;
|
117
|
+
goto st0;
|
118
|
+
tr2:
|
337
119
|
#line 36 "parser.rl"
|
338
120
|
{
|
339
121
|
if (parser->request_method != NULL) {
|
340
122
|
parser->request_method(parser->data, PTR_TO(mark), LEN(mark, p));
|
341
123
|
}
|
342
124
|
}
|
343
|
-
|
344
|
-
|
125
|
+
goto st3;
|
126
|
+
st3:
|
127
|
+
if ( ++p == pe )
|
128
|
+
goto _test_eof3;
|
129
|
+
case 3:
|
130
|
+
#line 131 "parser.c"
|
131
|
+
switch( (*p) ) {
|
132
|
+
case 42: goto tr4;
|
133
|
+
case 43: goto tr5;
|
134
|
+
case 47: goto tr6;
|
135
|
+
case 58: goto tr7;
|
136
|
+
}
|
137
|
+
if ( (*p) < 65 ) {
|
138
|
+
if ( 45 <= (*p) && (*p) <= 57 )
|
139
|
+
goto tr5;
|
140
|
+
} else if ( (*p) > 90 ) {
|
141
|
+
if ( 97 <= (*p) && (*p) <= 122 )
|
142
|
+
goto tr5;
|
143
|
+
} else
|
144
|
+
goto tr5;
|
145
|
+
goto st0;
|
146
|
+
tr4:
|
147
|
+
#line 22 "parser.rl"
|
148
|
+
{MARK(mark, p); }
|
149
|
+
goto st4;
|
150
|
+
st4:
|
151
|
+
if ( ++p == pe )
|
152
|
+
goto _test_eof4;
|
153
|
+
case 4:
|
154
|
+
#line 155 "parser.c"
|
155
|
+
switch( (*p) ) {
|
156
|
+
case 32: goto tr8;
|
157
|
+
case 35: goto tr9;
|
158
|
+
}
|
159
|
+
goto st0;
|
160
|
+
tr8:
|
345
161
|
#line 41 "parser.rl"
|
346
162
|
{
|
347
163
|
if (parser->request_uri != NULL) {
|
348
164
|
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
349
165
|
}
|
350
166
|
}
|
351
|
-
|
352
|
-
|
167
|
+
goto st5;
|
168
|
+
tr31:
|
169
|
+
#line 22 "parser.rl"
|
170
|
+
{MARK(mark, p); }
|
171
|
+
#line 46 "parser.rl"
|
172
|
+
{
|
173
|
+
if (parser->fragment != NULL) {
|
174
|
+
parser->fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
175
|
+
}
|
176
|
+
}
|
177
|
+
goto st5;
|
178
|
+
tr34:
|
353
179
|
#line 46 "parser.rl"
|
354
180
|
{
|
355
181
|
if (parser->fragment != NULL) {
|
356
182
|
parser->fragment(parser->data, PTR_TO(mark), LEN(mark, p));
|
357
183
|
}
|
358
184
|
}
|
359
|
-
|
360
|
-
|
185
|
+
goto st5;
|
186
|
+
tr42:
|
187
|
+
#line 65 "parser.rl"
|
188
|
+
{
|
189
|
+
if (parser->request_path != NULL) {
|
190
|
+
parser->request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
191
|
+
}
|
192
|
+
}
|
193
|
+
#line 41 "parser.rl"
|
194
|
+
{
|
195
|
+
if (parser->request_uri != NULL) {
|
196
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
197
|
+
}
|
198
|
+
}
|
199
|
+
goto st5;
|
200
|
+
tr48:
|
361
201
|
#line 52 "parser.rl"
|
362
202
|
{MARK(query_start, p); }
|
363
|
-
break;
|
364
|
-
case 9:
|
365
203
|
#line 53 "parser.rl"
|
366
204
|
{
|
367
205
|
if (parser->query_string != NULL) {
|
368
206
|
parser->query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
369
207
|
}
|
370
208
|
}
|
371
|
-
|
372
|
-
|
209
|
+
#line 41 "parser.rl"
|
210
|
+
{
|
211
|
+
if (parser->request_uri != NULL) {
|
212
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
213
|
+
}
|
214
|
+
}
|
215
|
+
goto st5;
|
216
|
+
tr52:
|
217
|
+
#line 53 "parser.rl"
|
218
|
+
{
|
219
|
+
if (parser->query_string != NULL) {
|
220
|
+
parser->query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
221
|
+
}
|
222
|
+
}
|
223
|
+
#line 41 "parser.rl"
|
224
|
+
{
|
225
|
+
if (parser->request_uri != NULL) {
|
226
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
227
|
+
}
|
228
|
+
}
|
229
|
+
goto st5;
|
230
|
+
st5:
|
231
|
+
if ( ++p == pe )
|
232
|
+
goto _test_eof5;
|
233
|
+
case 5:
|
234
|
+
#line 235 "parser.c"
|
235
|
+
if ( (*p) == 72 )
|
236
|
+
goto tr10;
|
237
|
+
goto st0;
|
238
|
+
tr10:
|
239
|
+
#line 22 "parser.rl"
|
240
|
+
{MARK(mark, p); }
|
241
|
+
goto st6;
|
242
|
+
st6:
|
243
|
+
if ( ++p == pe )
|
244
|
+
goto _test_eof6;
|
245
|
+
case 6:
|
246
|
+
#line 247 "parser.c"
|
247
|
+
if ( (*p) == 84 )
|
248
|
+
goto st7;
|
249
|
+
goto st0;
|
250
|
+
st7:
|
251
|
+
if ( ++p == pe )
|
252
|
+
goto _test_eof7;
|
253
|
+
case 7:
|
254
|
+
if ( (*p) == 84 )
|
255
|
+
goto st8;
|
256
|
+
goto st0;
|
257
|
+
st8:
|
258
|
+
if ( ++p == pe )
|
259
|
+
goto _test_eof8;
|
260
|
+
case 8:
|
261
|
+
if ( (*p) == 80 )
|
262
|
+
goto st9;
|
263
|
+
goto st0;
|
264
|
+
st9:
|
265
|
+
if ( ++p == pe )
|
266
|
+
goto _test_eof9;
|
267
|
+
case 9:
|
268
|
+
if ( (*p) == 47 )
|
269
|
+
goto st10;
|
270
|
+
goto st0;
|
271
|
+
st10:
|
272
|
+
if ( ++p == pe )
|
273
|
+
goto _test_eof10;
|
274
|
+
case 10:
|
275
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
276
|
+
goto st11;
|
277
|
+
goto st0;
|
278
|
+
st11:
|
279
|
+
if ( ++p == pe )
|
280
|
+
goto _test_eof11;
|
281
|
+
case 11:
|
282
|
+
if ( (*p) == 46 )
|
283
|
+
goto st12;
|
284
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
285
|
+
goto st11;
|
286
|
+
goto st0;
|
287
|
+
st12:
|
288
|
+
if ( ++p == pe )
|
289
|
+
goto _test_eof12;
|
290
|
+
case 12:
|
291
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
292
|
+
goto st13;
|
293
|
+
goto st0;
|
294
|
+
st13:
|
295
|
+
if ( ++p == pe )
|
296
|
+
goto _test_eof13;
|
297
|
+
case 13:
|
298
|
+
if ( (*p) == 13 )
|
299
|
+
goto tr18;
|
300
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
301
|
+
goto st13;
|
302
|
+
goto st0;
|
303
|
+
tr18:
|
373
304
|
#line 59 "parser.rl"
|
374
305
|
{
|
375
306
|
if (parser->http_version != NULL) {
|
376
307
|
parser->http_version(parser->data, PTR_TO(mark), LEN(mark, p));
|
377
308
|
}
|
378
309
|
}
|
379
|
-
|
380
|
-
|
381
|
-
#line
|
382
|
-
{
|
383
|
-
|
384
|
-
|
310
|
+
goto st14;
|
311
|
+
tr26:
|
312
|
+
#line 30 "parser.rl"
|
313
|
+
{ MARK(mark, p); }
|
314
|
+
#line 31 "parser.rl"
|
315
|
+
{
|
316
|
+
if (parser->http_field != NULL) {
|
317
|
+
parser->http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
318
|
+
}
|
319
|
+
}
|
320
|
+
goto st14;
|
321
|
+
tr29:
|
322
|
+
#line 31 "parser.rl"
|
323
|
+
{
|
324
|
+
if (parser->http_field != NULL) {
|
325
|
+
parser->http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
|
385
326
|
}
|
386
327
|
}
|
387
|
-
|
388
|
-
|
328
|
+
goto st14;
|
329
|
+
st14:
|
330
|
+
if ( ++p == pe )
|
331
|
+
goto _test_eof14;
|
332
|
+
case 14:
|
333
|
+
#line 334 "parser.c"
|
334
|
+
if ( (*p) == 10 )
|
335
|
+
goto st15;
|
336
|
+
goto st0;
|
337
|
+
st15:
|
338
|
+
if ( ++p == pe )
|
339
|
+
goto _test_eof15;
|
340
|
+
case 15:
|
341
|
+
switch( (*p) ) {
|
342
|
+
case 13: goto st16;
|
343
|
+
case 33: goto tr21;
|
344
|
+
case 124: goto tr21;
|
345
|
+
case 126: goto tr21;
|
346
|
+
}
|
347
|
+
if ( (*p) < 45 ) {
|
348
|
+
if ( (*p) > 39 ) {
|
349
|
+
if ( 42 <= (*p) && (*p) <= 43 )
|
350
|
+
goto tr21;
|
351
|
+
} else if ( (*p) >= 35 )
|
352
|
+
goto tr21;
|
353
|
+
} else if ( (*p) > 46 ) {
|
354
|
+
if ( (*p) < 65 ) {
|
355
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
356
|
+
goto tr21;
|
357
|
+
} else if ( (*p) > 90 ) {
|
358
|
+
if ( 94 <= (*p) && (*p) <= 122 )
|
359
|
+
goto tr21;
|
360
|
+
} else
|
361
|
+
goto tr21;
|
362
|
+
} else
|
363
|
+
goto tr21;
|
364
|
+
goto st0;
|
365
|
+
st16:
|
366
|
+
if ( ++p == pe )
|
367
|
+
goto _test_eof16;
|
368
|
+
case 16:
|
369
|
+
if ( (*p) == 10 )
|
370
|
+
goto tr22;
|
371
|
+
goto st0;
|
372
|
+
tr22:
|
389
373
|
#line 71 "parser.rl"
|
390
374
|
{
|
391
375
|
parser->body_start = p - buffer + 1;
|
392
376
|
if (parser->header_done != NULL) {
|
393
377
|
parser->header_done(parser->data, p + 1, pe - p - 1);
|
394
378
|
}
|
395
|
-
{p++; goto _out;
|
379
|
+
{p++; cs = 54; goto _out;}
|
396
380
|
}
|
397
|
-
|
398
|
-
|
399
|
-
|
381
|
+
goto st54;
|
382
|
+
st54:
|
383
|
+
if ( ++p == pe )
|
384
|
+
goto _test_eof54;
|
385
|
+
case 54:
|
386
|
+
#line 387 "parser.c"
|
387
|
+
goto st0;
|
388
|
+
tr21:
|
389
|
+
#line 25 "parser.rl"
|
390
|
+
{ MARK(field_start, p); }
|
391
|
+
goto st17;
|
392
|
+
st17:
|
393
|
+
if ( ++p == pe )
|
394
|
+
goto _test_eof17;
|
395
|
+
case 17:
|
396
|
+
#line 397 "parser.c"
|
397
|
+
switch( (*p) ) {
|
398
|
+
case 33: goto st17;
|
399
|
+
case 58: goto tr24;
|
400
|
+
case 124: goto st17;
|
401
|
+
case 126: goto st17;
|
400
402
|
}
|
403
|
+
if ( (*p) < 45 ) {
|
404
|
+
if ( (*p) > 39 ) {
|
405
|
+
if ( 42 <= (*p) && (*p) <= 43 )
|
406
|
+
goto st17;
|
407
|
+
} else if ( (*p) >= 35 )
|
408
|
+
goto st17;
|
409
|
+
} else if ( (*p) > 46 ) {
|
410
|
+
if ( (*p) < 65 ) {
|
411
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
412
|
+
goto st17;
|
413
|
+
} else if ( (*p) > 90 ) {
|
414
|
+
if ( 94 <= (*p) && (*p) <= 122 )
|
415
|
+
goto st17;
|
416
|
+
} else
|
417
|
+
goto st17;
|
418
|
+
} else
|
419
|
+
goto st17;
|
420
|
+
goto st0;
|
421
|
+
tr24:
|
422
|
+
#line 26 "parser.rl"
|
423
|
+
{
|
424
|
+
parser->field_len = LEN(field_start, p);
|
425
|
+
}
|
426
|
+
goto st18;
|
427
|
+
tr27:
|
428
|
+
#line 30 "parser.rl"
|
429
|
+
{ MARK(mark, p); }
|
430
|
+
goto st18;
|
431
|
+
st18:
|
432
|
+
if ( ++p == pe )
|
433
|
+
goto _test_eof18;
|
434
|
+
case 18:
|
435
|
+
#line 436 "parser.c"
|
436
|
+
switch( (*p) ) {
|
437
|
+
case 13: goto tr26;
|
438
|
+
case 32: goto tr27;
|
439
|
+
}
|
440
|
+
goto tr25;
|
441
|
+
tr25:
|
442
|
+
#line 30 "parser.rl"
|
443
|
+
{ MARK(mark, p); }
|
444
|
+
goto st19;
|
445
|
+
st19:
|
446
|
+
if ( ++p == pe )
|
447
|
+
goto _test_eof19;
|
448
|
+
case 19:
|
449
|
+
#line 450 "parser.c"
|
450
|
+
if ( (*p) == 13 )
|
451
|
+
goto tr29;
|
452
|
+
goto st19;
|
453
|
+
tr9:
|
454
|
+
#line 41 "parser.rl"
|
455
|
+
{
|
456
|
+
if (parser->request_uri != NULL) {
|
457
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
458
|
+
}
|
459
|
+
}
|
460
|
+
goto st20;
|
461
|
+
tr43:
|
462
|
+
#line 65 "parser.rl"
|
463
|
+
{
|
464
|
+
if (parser->request_path != NULL) {
|
465
|
+
parser->request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
466
|
+
}
|
467
|
+
}
|
468
|
+
#line 41 "parser.rl"
|
469
|
+
{
|
470
|
+
if (parser->request_uri != NULL) {
|
471
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
472
|
+
}
|
473
|
+
}
|
474
|
+
goto st20;
|
475
|
+
tr49:
|
476
|
+
#line 52 "parser.rl"
|
477
|
+
{MARK(query_start, p); }
|
478
|
+
#line 53 "parser.rl"
|
479
|
+
{
|
480
|
+
if (parser->query_string != NULL) {
|
481
|
+
parser->query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
482
|
+
}
|
483
|
+
}
|
484
|
+
#line 41 "parser.rl"
|
485
|
+
{
|
486
|
+
if (parser->request_uri != NULL) {
|
487
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
488
|
+
}
|
489
|
+
}
|
490
|
+
goto st20;
|
491
|
+
tr53:
|
492
|
+
#line 53 "parser.rl"
|
493
|
+
{
|
494
|
+
if (parser->query_string != NULL) {
|
495
|
+
parser->query_string(parser->data, PTR_TO(query_start), LEN(query_start, p));
|
496
|
+
}
|
497
|
+
}
|
498
|
+
#line 41 "parser.rl"
|
499
|
+
{
|
500
|
+
if (parser->request_uri != NULL) {
|
501
|
+
parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
|
502
|
+
}
|
503
|
+
}
|
504
|
+
goto st20;
|
505
|
+
st20:
|
506
|
+
if ( ++p == pe )
|
507
|
+
goto _test_eof20;
|
508
|
+
case 20:
|
509
|
+
#line 510 "parser.c"
|
510
|
+
switch( (*p) ) {
|
511
|
+
case 32: goto tr31;
|
512
|
+
case 35: goto st0;
|
513
|
+
case 37: goto tr32;
|
514
|
+
case 127: goto st0;
|
515
|
+
}
|
516
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
517
|
+
goto st0;
|
518
|
+
goto tr30;
|
519
|
+
tr30:
|
520
|
+
#line 22 "parser.rl"
|
521
|
+
{MARK(mark, p); }
|
522
|
+
goto st21;
|
523
|
+
st21:
|
524
|
+
if ( ++p == pe )
|
525
|
+
goto _test_eof21;
|
526
|
+
case 21:
|
527
|
+
#line 528 "parser.c"
|
528
|
+
switch( (*p) ) {
|
529
|
+
case 32: goto tr34;
|
530
|
+
case 35: goto st0;
|
531
|
+
case 37: goto st22;
|
532
|
+
case 127: goto st0;
|
533
|
+
}
|
534
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
535
|
+
goto st0;
|
536
|
+
goto st21;
|
537
|
+
tr32:
|
538
|
+
#line 22 "parser.rl"
|
539
|
+
{MARK(mark, p); }
|
540
|
+
goto st22;
|
541
|
+
st22:
|
542
|
+
if ( ++p == pe )
|
543
|
+
goto _test_eof22;
|
544
|
+
case 22:
|
545
|
+
#line 546 "parser.c"
|
546
|
+
if ( (*p) < 65 ) {
|
547
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
548
|
+
goto st23;
|
549
|
+
} else if ( (*p) > 70 ) {
|
550
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
551
|
+
goto st23;
|
552
|
+
} else
|
553
|
+
goto st23;
|
554
|
+
goto st0;
|
555
|
+
st23:
|
556
|
+
if ( ++p == pe )
|
557
|
+
goto _test_eof23;
|
558
|
+
case 23:
|
559
|
+
if ( (*p) < 65 ) {
|
560
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
561
|
+
goto st21;
|
562
|
+
} else if ( (*p) > 70 ) {
|
563
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
564
|
+
goto st21;
|
565
|
+
} else
|
566
|
+
goto st21;
|
567
|
+
goto st0;
|
568
|
+
tr5:
|
569
|
+
#line 22 "parser.rl"
|
570
|
+
{MARK(mark, p); }
|
571
|
+
goto st24;
|
572
|
+
st24:
|
573
|
+
if ( ++p == pe )
|
574
|
+
goto _test_eof24;
|
575
|
+
case 24:
|
576
|
+
#line 577 "parser.c"
|
577
|
+
switch( (*p) ) {
|
578
|
+
case 43: goto st24;
|
579
|
+
case 58: goto st25;
|
580
|
+
}
|
581
|
+
if ( (*p) < 48 ) {
|
582
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
583
|
+
goto st24;
|
584
|
+
} else if ( (*p) > 57 ) {
|
585
|
+
if ( (*p) > 90 ) {
|
586
|
+
if ( 97 <= (*p) && (*p) <= 122 )
|
587
|
+
goto st24;
|
588
|
+
} else if ( (*p) >= 65 )
|
589
|
+
goto st24;
|
590
|
+
} else
|
591
|
+
goto st24;
|
592
|
+
goto st0;
|
593
|
+
tr7:
|
594
|
+
#line 22 "parser.rl"
|
595
|
+
{MARK(mark, p); }
|
596
|
+
goto st25;
|
597
|
+
st25:
|
598
|
+
if ( ++p == pe )
|
599
|
+
goto _test_eof25;
|
600
|
+
case 25:
|
601
|
+
#line 602 "parser.c"
|
602
|
+
switch( (*p) ) {
|
603
|
+
case 32: goto tr8;
|
604
|
+
case 35: goto tr9;
|
605
|
+
case 37: goto st26;
|
606
|
+
case 127: goto st0;
|
607
|
+
}
|
608
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
609
|
+
goto st0;
|
610
|
+
goto st25;
|
611
|
+
st26:
|
612
|
+
if ( ++p == pe )
|
613
|
+
goto _test_eof26;
|
614
|
+
case 26:
|
615
|
+
if ( (*p) < 65 ) {
|
616
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
617
|
+
goto st27;
|
618
|
+
} else if ( (*p) > 70 ) {
|
619
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
620
|
+
goto st27;
|
621
|
+
} else
|
622
|
+
goto st27;
|
623
|
+
goto st0;
|
624
|
+
st27:
|
625
|
+
if ( ++p == pe )
|
626
|
+
goto _test_eof27;
|
627
|
+
case 27:
|
628
|
+
if ( (*p) < 65 ) {
|
629
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
630
|
+
goto st25;
|
631
|
+
} else if ( (*p) > 70 ) {
|
632
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
633
|
+
goto st25;
|
634
|
+
} else
|
635
|
+
goto st25;
|
636
|
+
goto st0;
|
637
|
+
tr6:
|
638
|
+
#line 22 "parser.rl"
|
639
|
+
{MARK(mark, p); }
|
640
|
+
goto st28;
|
641
|
+
st28:
|
642
|
+
if ( ++p == pe )
|
643
|
+
goto _test_eof28;
|
644
|
+
case 28:
|
645
|
+
#line 646 "parser.c"
|
646
|
+
switch( (*p) ) {
|
647
|
+
case 32: goto tr42;
|
648
|
+
case 35: goto tr43;
|
649
|
+
case 37: goto st29;
|
650
|
+
case 63: goto tr45;
|
651
|
+
case 127: goto st0;
|
652
|
+
}
|
653
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
654
|
+
goto st0;
|
655
|
+
goto st28;
|
656
|
+
st29:
|
657
|
+
if ( ++p == pe )
|
658
|
+
goto _test_eof29;
|
659
|
+
case 29:
|
660
|
+
if ( (*p) < 65 ) {
|
661
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
662
|
+
goto st30;
|
663
|
+
} else if ( (*p) > 70 ) {
|
664
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
665
|
+
goto st30;
|
666
|
+
} else
|
667
|
+
goto st30;
|
668
|
+
goto st0;
|
669
|
+
st30:
|
670
|
+
if ( ++p == pe )
|
671
|
+
goto _test_eof30;
|
672
|
+
case 30:
|
673
|
+
if ( (*p) < 65 ) {
|
674
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
675
|
+
goto st28;
|
676
|
+
} else if ( (*p) > 70 ) {
|
677
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
678
|
+
goto st28;
|
679
|
+
} else
|
680
|
+
goto st28;
|
681
|
+
goto st0;
|
682
|
+
tr45:
|
683
|
+
#line 65 "parser.rl"
|
684
|
+
{
|
685
|
+
if (parser->request_path != NULL) {
|
686
|
+
parser->request_path(parser->data, PTR_TO(mark), LEN(mark,p));
|
687
|
+
}
|
688
|
+
}
|
689
|
+
goto st31;
|
690
|
+
st31:
|
691
|
+
if ( ++p == pe )
|
692
|
+
goto _test_eof31;
|
693
|
+
case 31:
|
694
|
+
#line 695 "parser.c"
|
695
|
+
switch( (*p) ) {
|
696
|
+
case 32: goto tr48;
|
697
|
+
case 35: goto tr49;
|
698
|
+
case 37: goto tr50;
|
699
|
+
case 127: goto st0;
|
700
|
+
}
|
701
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
702
|
+
goto st0;
|
703
|
+
goto tr47;
|
704
|
+
tr47:
|
705
|
+
#line 52 "parser.rl"
|
706
|
+
{MARK(query_start, p); }
|
707
|
+
goto st32;
|
708
|
+
st32:
|
709
|
+
if ( ++p == pe )
|
710
|
+
goto _test_eof32;
|
711
|
+
case 32:
|
712
|
+
#line 713 "parser.c"
|
713
|
+
switch( (*p) ) {
|
714
|
+
case 32: goto tr52;
|
715
|
+
case 35: goto tr53;
|
716
|
+
case 37: goto st33;
|
717
|
+
case 127: goto st0;
|
718
|
+
}
|
719
|
+
if ( 0 <= (*p) && (*p) <= 31 )
|
720
|
+
goto st0;
|
721
|
+
goto st32;
|
722
|
+
tr50:
|
723
|
+
#line 52 "parser.rl"
|
724
|
+
{MARK(query_start, p); }
|
725
|
+
goto st33;
|
726
|
+
st33:
|
727
|
+
if ( ++p == pe )
|
728
|
+
goto _test_eof33;
|
729
|
+
case 33:
|
730
|
+
#line 731 "parser.c"
|
731
|
+
if ( (*p) < 65 ) {
|
732
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
733
|
+
goto st34;
|
734
|
+
} else if ( (*p) > 70 ) {
|
735
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
736
|
+
goto st34;
|
737
|
+
} else
|
738
|
+
goto st34;
|
739
|
+
goto st0;
|
740
|
+
st34:
|
741
|
+
if ( ++p == pe )
|
742
|
+
goto _test_eof34;
|
743
|
+
case 34:
|
744
|
+
if ( (*p) < 65 ) {
|
745
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
746
|
+
goto st32;
|
747
|
+
} else if ( (*p) > 70 ) {
|
748
|
+
if ( 97 <= (*p) && (*p) <= 102 )
|
749
|
+
goto st32;
|
750
|
+
} else
|
751
|
+
goto st32;
|
752
|
+
goto st0;
|
753
|
+
st35:
|
754
|
+
if ( ++p == pe )
|
755
|
+
goto _test_eof35;
|
756
|
+
case 35:
|
757
|
+
switch( (*p) ) {
|
758
|
+
case 32: goto tr2;
|
759
|
+
case 36: goto st36;
|
760
|
+
case 95: goto st36;
|
761
|
+
}
|
762
|
+
if ( (*p) < 48 ) {
|
763
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
764
|
+
goto st36;
|
765
|
+
} else if ( (*p) > 57 ) {
|
766
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
767
|
+
goto st36;
|
768
|
+
} else
|
769
|
+
goto st36;
|
770
|
+
goto st0;
|
771
|
+
st36:
|
772
|
+
if ( ++p == pe )
|
773
|
+
goto _test_eof36;
|
774
|
+
case 36:
|
775
|
+
switch( (*p) ) {
|
776
|
+
case 32: goto tr2;
|
777
|
+
case 36: goto st37;
|
778
|
+
case 95: goto st37;
|
779
|
+
}
|
780
|
+
if ( (*p) < 48 ) {
|
781
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
782
|
+
goto st37;
|
783
|
+
} else if ( (*p) > 57 ) {
|
784
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
785
|
+
goto st37;
|
786
|
+
} else
|
787
|
+
goto st37;
|
788
|
+
goto st0;
|
789
|
+
st37:
|
790
|
+
if ( ++p == pe )
|
791
|
+
goto _test_eof37;
|
792
|
+
case 37:
|
793
|
+
switch( (*p) ) {
|
794
|
+
case 32: goto tr2;
|
795
|
+
case 36: goto st38;
|
796
|
+
case 95: goto st38;
|
797
|
+
}
|
798
|
+
if ( (*p) < 48 ) {
|
799
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
800
|
+
goto st38;
|
801
|
+
} else if ( (*p) > 57 ) {
|
802
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
803
|
+
goto st38;
|
804
|
+
} else
|
805
|
+
goto st38;
|
806
|
+
goto st0;
|
807
|
+
st38:
|
808
|
+
if ( ++p == pe )
|
809
|
+
goto _test_eof38;
|
810
|
+
case 38:
|
811
|
+
switch( (*p) ) {
|
812
|
+
case 32: goto tr2;
|
813
|
+
case 36: goto st39;
|
814
|
+
case 95: goto st39;
|
815
|
+
}
|
816
|
+
if ( (*p) < 48 ) {
|
817
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
818
|
+
goto st39;
|
819
|
+
} else if ( (*p) > 57 ) {
|
820
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
821
|
+
goto st39;
|
822
|
+
} else
|
823
|
+
goto st39;
|
824
|
+
goto st0;
|
825
|
+
st39:
|
826
|
+
if ( ++p == pe )
|
827
|
+
goto _test_eof39;
|
828
|
+
case 39:
|
829
|
+
switch( (*p) ) {
|
830
|
+
case 32: goto tr2;
|
831
|
+
case 36: goto st40;
|
832
|
+
case 95: goto st40;
|
833
|
+
}
|
834
|
+
if ( (*p) < 48 ) {
|
835
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
836
|
+
goto st40;
|
837
|
+
} else if ( (*p) > 57 ) {
|
838
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
839
|
+
goto st40;
|
840
|
+
} else
|
841
|
+
goto st40;
|
842
|
+
goto st0;
|
843
|
+
st40:
|
844
|
+
if ( ++p == pe )
|
845
|
+
goto _test_eof40;
|
846
|
+
case 40:
|
847
|
+
switch( (*p) ) {
|
848
|
+
case 32: goto tr2;
|
849
|
+
case 36: goto st41;
|
850
|
+
case 95: goto st41;
|
851
|
+
}
|
852
|
+
if ( (*p) < 48 ) {
|
853
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
854
|
+
goto st41;
|
855
|
+
} else if ( (*p) > 57 ) {
|
856
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
857
|
+
goto st41;
|
858
|
+
} else
|
859
|
+
goto st41;
|
860
|
+
goto st0;
|
861
|
+
st41:
|
862
|
+
if ( ++p == pe )
|
863
|
+
goto _test_eof41;
|
864
|
+
case 41:
|
865
|
+
switch( (*p) ) {
|
866
|
+
case 32: goto tr2;
|
867
|
+
case 36: goto st42;
|
868
|
+
case 95: goto st42;
|
869
|
+
}
|
870
|
+
if ( (*p) < 48 ) {
|
871
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
872
|
+
goto st42;
|
873
|
+
} else if ( (*p) > 57 ) {
|
874
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
875
|
+
goto st42;
|
876
|
+
} else
|
877
|
+
goto st42;
|
878
|
+
goto st0;
|
879
|
+
st42:
|
880
|
+
if ( ++p == pe )
|
881
|
+
goto _test_eof42;
|
882
|
+
case 42:
|
883
|
+
switch( (*p) ) {
|
884
|
+
case 32: goto tr2;
|
885
|
+
case 36: goto st43;
|
886
|
+
case 95: goto st43;
|
887
|
+
}
|
888
|
+
if ( (*p) < 48 ) {
|
889
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
890
|
+
goto st43;
|
891
|
+
} else if ( (*p) > 57 ) {
|
892
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
893
|
+
goto st43;
|
894
|
+
} else
|
895
|
+
goto st43;
|
896
|
+
goto st0;
|
897
|
+
st43:
|
898
|
+
if ( ++p == pe )
|
899
|
+
goto _test_eof43;
|
900
|
+
case 43:
|
901
|
+
switch( (*p) ) {
|
902
|
+
case 32: goto tr2;
|
903
|
+
case 36: goto st44;
|
904
|
+
case 95: goto st44;
|
905
|
+
}
|
906
|
+
if ( (*p) < 48 ) {
|
907
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
908
|
+
goto st44;
|
909
|
+
} else if ( (*p) > 57 ) {
|
910
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
911
|
+
goto st44;
|
912
|
+
} else
|
913
|
+
goto st44;
|
914
|
+
goto st0;
|
915
|
+
st44:
|
916
|
+
if ( ++p == pe )
|
917
|
+
goto _test_eof44;
|
918
|
+
case 44:
|
919
|
+
switch( (*p) ) {
|
920
|
+
case 32: goto tr2;
|
921
|
+
case 36: goto st45;
|
922
|
+
case 95: goto st45;
|
923
|
+
}
|
924
|
+
if ( (*p) < 48 ) {
|
925
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
926
|
+
goto st45;
|
927
|
+
} else if ( (*p) > 57 ) {
|
928
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
929
|
+
goto st45;
|
930
|
+
} else
|
931
|
+
goto st45;
|
932
|
+
goto st0;
|
933
|
+
st45:
|
934
|
+
if ( ++p == pe )
|
935
|
+
goto _test_eof45;
|
936
|
+
case 45:
|
937
|
+
switch( (*p) ) {
|
938
|
+
case 32: goto tr2;
|
939
|
+
case 36: goto st46;
|
940
|
+
case 95: goto st46;
|
941
|
+
}
|
942
|
+
if ( (*p) < 48 ) {
|
943
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
944
|
+
goto st46;
|
945
|
+
} else if ( (*p) > 57 ) {
|
946
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
947
|
+
goto st46;
|
948
|
+
} else
|
949
|
+
goto st46;
|
950
|
+
goto st0;
|
951
|
+
st46:
|
952
|
+
if ( ++p == pe )
|
953
|
+
goto _test_eof46;
|
954
|
+
case 46:
|
955
|
+
switch( (*p) ) {
|
956
|
+
case 32: goto tr2;
|
957
|
+
case 36: goto st47;
|
958
|
+
case 95: goto st47;
|
959
|
+
}
|
960
|
+
if ( (*p) < 48 ) {
|
961
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
962
|
+
goto st47;
|
963
|
+
} else if ( (*p) > 57 ) {
|
964
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
965
|
+
goto st47;
|
966
|
+
} else
|
967
|
+
goto st47;
|
968
|
+
goto st0;
|
969
|
+
st47:
|
970
|
+
if ( ++p == pe )
|
971
|
+
goto _test_eof47;
|
972
|
+
case 47:
|
973
|
+
switch( (*p) ) {
|
974
|
+
case 32: goto tr2;
|
975
|
+
case 36: goto st48;
|
976
|
+
case 95: goto st48;
|
977
|
+
}
|
978
|
+
if ( (*p) < 48 ) {
|
979
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
980
|
+
goto st48;
|
981
|
+
} else if ( (*p) > 57 ) {
|
982
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
983
|
+
goto st48;
|
984
|
+
} else
|
985
|
+
goto st48;
|
986
|
+
goto st0;
|
987
|
+
st48:
|
988
|
+
if ( ++p == pe )
|
989
|
+
goto _test_eof48;
|
990
|
+
case 48:
|
991
|
+
switch( (*p) ) {
|
992
|
+
case 32: goto tr2;
|
993
|
+
case 36: goto st49;
|
994
|
+
case 95: goto st49;
|
995
|
+
}
|
996
|
+
if ( (*p) < 48 ) {
|
997
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
998
|
+
goto st49;
|
999
|
+
} else if ( (*p) > 57 ) {
|
1000
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
1001
|
+
goto st49;
|
1002
|
+
} else
|
1003
|
+
goto st49;
|
1004
|
+
goto st0;
|
1005
|
+
st49:
|
1006
|
+
if ( ++p == pe )
|
1007
|
+
goto _test_eof49;
|
1008
|
+
case 49:
|
1009
|
+
switch( (*p) ) {
|
1010
|
+
case 32: goto tr2;
|
1011
|
+
case 36: goto st50;
|
1012
|
+
case 95: goto st50;
|
1013
|
+
}
|
1014
|
+
if ( (*p) < 48 ) {
|
1015
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
1016
|
+
goto st50;
|
1017
|
+
} else if ( (*p) > 57 ) {
|
1018
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
1019
|
+
goto st50;
|
1020
|
+
} else
|
1021
|
+
goto st50;
|
1022
|
+
goto st0;
|
1023
|
+
st50:
|
1024
|
+
if ( ++p == pe )
|
1025
|
+
goto _test_eof50;
|
1026
|
+
case 50:
|
1027
|
+
switch( (*p) ) {
|
1028
|
+
case 32: goto tr2;
|
1029
|
+
case 36: goto st51;
|
1030
|
+
case 95: goto st51;
|
1031
|
+
}
|
1032
|
+
if ( (*p) < 48 ) {
|
1033
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
1034
|
+
goto st51;
|
1035
|
+
} else if ( (*p) > 57 ) {
|
1036
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
1037
|
+
goto st51;
|
1038
|
+
} else
|
1039
|
+
goto st51;
|
1040
|
+
goto st0;
|
1041
|
+
st51:
|
1042
|
+
if ( ++p == pe )
|
1043
|
+
goto _test_eof51;
|
1044
|
+
case 51:
|
1045
|
+
switch( (*p) ) {
|
1046
|
+
case 32: goto tr2;
|
1047
|
+
case 36: goto st52;
|
1048
|
+
case 95: goto st52;
|
1049
|
+
}
|
1050
|
+
if ( (*p) < 48 ) {
|
1051
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
1052
|
+
goto st52;
|
1053
|
+
} else if ( (*p) > 57 ) {
|
1054
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
1055
|
+
goto st52;
|
1056
|
+
} else
|
1057
|
+
goto st52;
|
1058
|
+
goto st0;
|
1059
|
+
st52:
|
1060
|
+
if ( ++p == pe )
|
1061
|
+
goto _test_eof52;
|
1062
|
+
case 52:
|
1063
|
+
switch( (*p) ) {
|
1064
|
+
case 32: goto tr2;
|
1065
|
+
case 36: goto st53;
|
1066
|
+
case 95: goto st53;
|
1067
|
+
}
|
1068
|
+
if ( (*p) < 48 ) {
|
1069
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
1070
|
+
goto st53;
|
1071
|
+
} else if ( (*p) > 57 ) {
|
1072
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
1073
|
+
goto st53;
|
1074
|
+
} else
|
1075
|
+
goto st53;
|
1076
|
+
goto st0;
|
1077
|
+
st53:
|
1078
|
+
if ( ++p == pe )
|
1079
|
+
goto _test_eof53;
|
1080
|
+
case 53:
|
1081
|
+
if ( (*p) == 32 )
|
1082
|
+
goto tr2;
|
1083
|
+
goto st0;
|
1084
|
+
}
|
1085
|
+
_test_eof2: cs = 2; goto _test_eof;
|
1086
|
+
_test_eof3: cs = 3; goto _test_eof;
|
1087
|
+
_test_eof4: cs = 4; goto _test_eof;
|
1088
|
+
_test_eof5: cs = 5; goto _test_eof;
|
1089
|
+
_test_eof6: cs = 6; goto _test_eof;
|
1090
|
+
_test_eof7: cs = 7; goto _test_eof;
|
1091
|
+
_test_eof8: cs = 8; goto _test_eof;
|
1092
|
+
_test_eof9: cs = 9; goto _test_eof;
|
1093
|
+
_test_eof10: cs = 10; goto _test_eof;
|
1094
|
+
_test_eof11: cs = 11; goto _test_eof;
|
1095
|
+
_test_eof12: cs = 12; goto _test_eof;
|
1096
|
+
_test_eof13: cs = 13; goto _test_eof;
|
1097
|
+
_test_eof14: cs = 14; goto _test_eof;
|
1098
|
+
_test_eof15: cs = 15; goto _test_eof;
|
1099
|
+
_test_eof16: cs = 16; goto _test_eof;
|
1100
|
+
_test_eof54: cs = 54; goto _test_eof;
|
1101
|
+
_test_eof17: cs = 17; goto _test_eof;
|
1102
|
+
_test_eof18: cs = 18; goto _test_eof;
|
1103
|
+
_test_eof19: cs = 19; goto _test_eof;
|
1104
|
+
_test_eof20: cs = 20; goto _test_eof;
|
1105
|
+
_test_eof21: cs = 21; goto _test_eof;
|
1106
|
+
_test_eof22: cs = 22; goto _test_eof;
|
1107
|
+
_test_eof23: cs = 23; goto _test_eof;
|
1108
|
+
_test_eof24: cs = 24; goto _test_eof;
|
1109
|
+
_test_eof25: cs = 25; goto _test_eof;
|
1110
|
+
_test_eof26: cs = 26; goto _test_eof;
|
1111
|
+
_test_eof27: cs = 27; goto _test_eof;
|
1112
|
+
_test_eof28: cs = 28; goto _test_eof;
|
1113
|
+
_test_eof29: cs = 29; goto _test_eof;
|
1114
|
+
_test_eof30: cs = 30; goto _test_eof;
|
1115
|
+
_test_eof31: cs = 31; goto _test_eof;
|
1116
|
+
_test_eof32: cs = 32; goto _test_eof;
|
1117
|
+
_test_eof33: cs = 33; goto _test_eof;
|
1118
|
+
_test_eof34: cs = 34; goto _test_eof;
|
1119
|
+
_test_eof35: cs = 35; goto _test_eof;
|
1120
|
+
_test_eof36: cs = 36; goto _test_eof;
|
1121
|
+
_test_eof37: cs = 37; goto _test_eof;
|
1122
|
+
_test_eof38: cs = 38; goto _test_eof;
|
1123
|
+
_test_eof39: cs = 39; goto _test_eof;
|
1124
|
+
_test_eof40: cs = 40; goto _test_eof;
|
1125
|
+
_test_eof41: cs = 41; goto _test_eof;
|
1126
|
+
_test_eof42: cs = 42; goto _test_eof;
|
1127
|
+
_test_eof43: cs = 43; goto _test_eof;
|
1128
|
+
_test_eof44: cs = 44; goto _test_eof;
|
1129
|
+
_test_eof45: cs = 45; goto _test_eof;
|
1130
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1131
|
+
_test_eof47: cs = 47; goto _test_eof;
|
1132
|
+
_test_eof48: cs = 48; goto _test_eof;
|
1133
|
+
_test_eof49: cs = 49; goto _test_eof;
|
1134
|
+
_test_eof50: cs = 50; goto _test_eof;
|
1135
|
+
_test_eof51: cs = 51; goto _test_eof;
|
1136
|
+
_test_eof52: cs = 52; goto _test_eof;
|
1137
|
+
_test_eof53: cs = 53; goto _test_eof;
|
401
1138
|
|
402
|
-
_again:
|
403
|
-
if ( cs == 0 )
|
404
|
-
goto _out;
|
405
|
-
if ( ++p != pe )
|
406
|
-
goto _resume;
|
407
1139
|
_test_eof: {}
|
408
1140
|
_out: {}
|
409
1141
|
}
|
1142
|
+
|
410
1143
|
#line 116 "parser.rl"
|
411
1144
|
|
412
1145
|
parser->cs = cs;
|