44
44
#define CALL(A, C) TRACE(A,C); if(state->actions && state->actions->A) next = state->actions->A(conn)
47
#line 86 "src/state.rl"
47
#line 87 "src/state.rl"
51
51
#line 52 "src/state.c"
52
static const int StateActions_start = 16;
53
static const int StateActions_first_final = 16;
52
static const int StateActions_start = 18;
53
static const int StateActions_first_final = 18;
54
54
static const int StateActions_error = 0;
56
static const int StateActions_en_Proxy = 10;
57
static const int StateActions_en_main = 16;
56
static const int StateActions_en_Proxy = 12;
57
static const int StateActions_en_main = 18;
58
58
static const int StateActions_en_main_Connection_Idle = 5;
59
59
static const int StateActions_en_main_Connection_HTTPRouting = 3;
62
#line 89 "src/state.rl"
62
#line 90 "src/state.rl"
64
64
int State_init(State *state, StateActions *actions)
257
#line 258 "src/state.c"
258
#line 259 "src/state.c"
258
259
if ( (*p) == 111 )
262
#line 61 "src/state.rl"
263
{ CALL(http_to_proxy, (*p)); {goto st10;} }
263
#line 62 "src/state.rl"
264
{ CALL(http_to_proxy, (*p)); {goto st12;} }
269
#line 270 "src/state.c"
270
#line 271 "src/state.c"
273
#line 57 "src/state.rl"
274
{ CALL(route_request, (*p)); }
273
278
goto _test_eof10;
281
#line 65 "src/state.rl"
282
{ CALL(proxy_deliver, (*p)); }
280
#line 281 "src/state.c"
285
#line 60 "src/state.rl"
286
{ CALL(http_to_handler, (*p)); }
289
#line 61 "src/state.rl"
290
{ CALL(websocket_established, (*p)); }
286
294
goto _test_eof11;
288
#line 289 "src/state.c"
296
#line 297 "src/state.c"
295
#line 66 "src/state.rl"
296
{ CALL(proxy_failed, (*p)); }
299
#line 71 "src/state.rl"
300
{ CALL(proxy_close, (*p)); }
304
304
goto _test_eof12;
306
#line 307 "src/state.c"
311
#line 75 "src/state.rl"
318
#line 79 "src/state.rl"
320
CALL(proxy_close, (*p));
312
#line 66 "src/state.rl"
313
{ CALL(proxy_deliver, (*p)); }
327
317
goto _test_eof13;
329
#line 330 "src/state.c"
319
#line 320 "src/state.c"
332
#line 69 "src/state.rl"
333
{ CALL(proxy_reply_parse, (*p)); }
326
#line 67 "src/state.rl"
327
{ CALL(proxy_failed, (*p)); }
330
#line 72 "src/state.rl"
331
{ CALL(proxy_close, (*p)); }
337
335
goto _test_eof14;
339
#line 340 "src/state.c"
337
#line 338 "src/state.c"
346
#line 70 "src/state.rl"
347
{ CALL(proxy_req_parse, (*p)); }
342
#line 76 "src/state.rl"
349
#line 80 "src/state.rl"
351
CALL(proxy_close, (*p));
351
358
goto _test_eof15;
353
#line 354 "src/state.c"
360
#line 361 "src/state.c"
363
#line 70 "src/state.rl"
364
{ CALL(proxy_reply_parse, (*p)); }
370
#line 371 "src/state.c"
377
#line 71 "src/state.rl"
378
{ CALL(proxy_req_parse, (*p)); }
384
#line 385 "src/state.c"
363
394
_test_eof1: state->cs = 1; goto _test_eof;
364
_test_eof17: state->cs = 17; goto _test_eof;
395
_test_eof19: state->cs = 19; goto _test_eof;
365
396
_test_eof2: state->cs = 2; goto _test_eof;
366
397
_test_eof3: state->cs = 3; goto _test_eof;
367
398
_test_eof4: state->cs = 4; goto _test_eof;
376
407
_test_eof13: state->cs = 13; goto _test_eof;
377
408
_test_eof14: state->cs = 14; goto _test_eof;
378
409
_test_eof15: state->cs = 15; goto _test_eof;
410
_test_eof16: state->cs = 16; goto _test_eof;
411
_test_eof17: state->cs = 17; goto _test_eof;