puma 3.12.6 → 4.3.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.md +122 -2
- data/README.md +76 -48
- data/docs/architecture.md +1 -0
- data/docs/deployment.md +24 -4
- data/docs/images/puma-connection-flow-no-reactor.png +0 -0
- data/docs/images/puma-connection-flow.png +0 -0
- data/docs/images/puma-general-arch.png +0 -0
- data/docs/plugins.md +20 -10
- data/docs/restart.md +4 -2
- data/docs/systemd.md +27 -9
- data/docs/tcp_mode.md +96 -0
- data/ext/puma_http11/PumaHttp11Service.java +2 -0
- data/ext/puma_http11/extconf.rb +13 -0
- data/ext/puma_http11/http11_parser.c +37 -62
- data/ext/puma_http11/http11_parser.java.rl +21 -37
- data/ext/puma_http11/http11_parser_common.rl +3 -3
- data/ext/puma_http11/mini_ssl.c +78 -8
- data/ext/puma_http11/org/jruby/puma/Http11.java +106 -114
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +91 -106
- data/ext/puma_http11/org/jruby/puma/IOBuffer.java +72 -0
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +15 -4
- data/ext/puma_http11/puma_http11.c +2 -0
- data/lib/puma.rb +8 -0
- data/lib/puma/accept_nonblock.rb +7 -1
- data/lib/puma/app/status.rb +35 -29
- data/lib/puma/binder.rb +38 -60
- data/lib/puma/cli.rb +4 -0
- data/lib/puma/client.rb +229 -207
- data/lib/puma/cluster.rb +53 -30
- data/lib/puma/configuration.rb +4 -3
- data/lib/puma/const.rb +22 -18
- data/lib/puma/control_cli.rb +30 -5
- data/lib/puma/dsl.rb +299 -75
- data/lib/puma/events.rb +4 -1
- data/lib/puma/io_buffer.rb +1 -6
- data/lib/puma/launcher.rb +95 -53
- data/lib/puma/minissl.rb +35 -17
- data/lib/puma/minissl/context_builder.rb +76 -0
- data/lib/puma/plugin.rb +5 -2
- data/lib/puma/plugin/tmp_restart.rb +2 -0
- data/lib/puma/rack/builder.rb +2 -0
- data/lib/puma/rack/urlmap.rb +2 -0
- data/lib/puma/rack_default.rb +2 -0
- data/lib/puma/reactor.rb +110 -57
- data/lib/puma/runner.rb +11 -3
- data/lib/puma/server.rb +59 -48
- data/lib/puma/single.rb +3 -3
- data/lib/puma/thread_pool.rb +15 -33
- data/lib/puma/util.rb +1 -6
- data/lib/rack/handler/puma.rb +3 -3
- data/tools/docker/Dockerfile +16 -0
- data/tools/jungle/init.d/puma +6 -6
- data/tools/trickletest.rb +0 -1
- metadata +21 -8
- data/lib/puma/compat.rb +0 -14
- data/lib/puma/convenient.rb +0 -25
- data/lib/puma/daemon_ext.rb +0 -33
- data/lib/puma/delegation.rb +0 -13
- data/lib/puma/java_io_buffer.rb +0 -47
- data/lib/puma/rack/backports/uri/common_193.rb +0 -33
Binary file
|
Binary file
|
Binary file
|
data/docs/plugins.md
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
## Plugins
|
2
2
|
|
3
|
-
Puma 3.0 added support for plugins that can augment configuration and service
|
3
|
+
Puma 3.0 added support for plugins that can augment configuration and service
|
4
|
+
operations.
|
4
5
|
|
5
6
|
2 canonical plugins to look to aid in development of further plugins:
|
6
7
|
|
7
|
-
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
8
|
-
|
8
|
+
* [tmp\_restart](https://github.com/puma/puma/blob/master/lib/puma/plugin/tmp_restart.rb):
|
9
|
+
Restarts the server if the file `tmp/restart.txt` is touched
|
10
|
+
* [heroku](https://github.com/puma/puma-heroku/blob/master/lib/puma/plugin/heroku.rb):
|
11
|
+
Packages up the default configuration used by puma on Heroku
|
9
12
|
|
10
|
-
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
13
|
+
Plugins are activated in a puma configuration file (such as `config/puma.rb'`)
|
14
|
+
by adding `plugin "name"`, such as `plugin "heroku"`.
|
11
15
|
|
12
|
-
Plugins are activated based simply on path requirements so, activating the
|
16
|
+
Plugins are activated based simply on path requirements so, activating the
|
17
|
+
`heroku` plugin will simply be doing `require "puma/plugin/heroku"`. This
|
18
|
+
allows gems to provide multiple plugins (as well as unrelated gems to provide
|
19
|
+
puma plugins).
|
13
20
|
|
14
21
|
The `tmp_restart` plugin is bundled with puma, so it can always be used.
|
15
22
|
|
@@ -17,12 +24,15 @@ To use the `heroku` plugin, add `puma-heroku` to your Gemfile or install it.
|
|
17
24
|
|
18
25
|
### API
|
19
26
|
|
20
|
-
|
27
|
+
## Server-wide hooks
|
21
28
|
|
22
|
-
|
29
|
+
Plugins can use a couple of hooks at server level: `start` and `config`.
|
23
30
|
|
24
|
-
`
|
31
|
+
`start` runs when the server has started and allows the plugin to start other
|
32
|
+
functionality to augment puma.
|
25
33
|
|
26
|
-
|
34
|
+
`config` runs when the server is being configured and is passed a `Puma::DSL`
|
35
|
+
object that can be used to add additional configuration.
|
27
36
|
|
28
|
-
|
37
|
+
Any public methods in `Puma::Plugin` are the public API that any plugin may
|
38
|
+
use.
|
data/docs/restart.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
To perform a restart, there are 3 builtin mechanisms:
|
4
4
|
|
5
|
-
* Send the `puma` process the `SIGUSR2` signal
|
6
|
-
* Send the `puma` process the `SIGUSR1` signal (rolling restart, cluster mode only)
|
5
|
+
* Send the `puma` process the `SIGUSR2` signal (normal restart)
|
6
|
+
* Send the `puma` process the `SIGUSR1` signal (restart in phases (a "rolling restart"), cluster mode only)
|
7
7
|
* Use the status server and issue `/restart`
|
8
8
|
|
9
9
|
No code is shared between the current and restarted process, so it should be safe to issue a restart any place where you would manually stop Puma and start it again.
|
@@ -22,6 +22,8 @@ But again beware, upgrading an application sometimes involves upgrading the data
|
|
22
22
|
|
23
23
|
If you perform a lot of database migrations, you probably should not use phased restart and use a normal/hot restart instead (`pumactl restart`). That way, no code is shared while deploying (in that case, `preload_app!` might help for quicker deployment, see ["Clustered Mode" in the README](../README.md#clustered-mode)).
|
24
24
|
|
25
|
+
**Note**: Hot and phased restarts are only available on MRI, not on JRuby. They are also unavailable on Windows servers.
|
26
|
+
|
25
27
|
### Release Directory
|
26
28
|
|
27
29
|
If your symlink releases into a common working directory (i.e., `/current` from Capistrano), Puma won't pick up your new changes when running phased restarts without additional configuration. You should set your working directory within Puma's config to specify the directory it should use. This is a change from earlier versions of Puma (< 2.15) that would infer the directory for you.
|
data/docs/systemd.md
CHANGED
@@ -32,21 +32,26 @@ Type=simple
|
|
32
32
|
# Preferably configure a non-privileged user
|
33
33
|
# User=
|
34
34
|
|
35
|
-
# The path to the
|
36
|
-
# Also replace the "<
|
37
|
-
|
35
|
+
# The path to the your application code root directory.
|
36
|
+
# Also replace the "<YOUR_APP_PATH>" place holders below with this path.
|
37
|
+
# Example /home/username/myapp
|
38
|
+
WorkingDirectory=<YOUR_APP_PATH>
|
38
39
|
|
39
40
|
# Helpful for debugging socket activation, etc.
|
40
41
|
# Environment=PUMA_DEBUG=1
|
41
42
|
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
ExecStart
|
43
|
+
# SystemD will not run puma even if it is in your path. You must specify
|
44
|
+
# an absolute URL to puma. For example /usr/local/bin/puma
|
45
|
+
# Alternatively, create a binstub with `bundle binstubs puma --path ./sbin` in the WorkingDirectory
|
46
|
+
ExecStart=/<FULLPATH>/bin/puma -C <YOUR_APP_PATH>/puma.rb
|
47
|
+
|
48
|
+
# Variant: Rails start.
|
49
|
+
# ExecStart=/<FULLPATH>/bin/puma -C <YOUR_APP_PATH>/config/puma.rb ../config.ru
|
46
50
|
|
47
|
-
# Variant: Use config file with `bind` directives instead:
|
48
|
-
# ExecStart=<WD>/sbin/puma -C config.rb
|
49
51
|
# Variant: Use `bundle exec --keep-file-descriptors puma` instead of binstub
|
52
|
+
# Variant: Specify directives inline.
|
53
|
+
# ExecStart=/<FULLPATH>/puma -b tcp://0.0.0.0:9292 -b ssl://0.0.0.0:9293?key=key.pem&cert=cert.pem
|
54
|
+
|
50
55
|
|
51
56
|
Restart=always
|
52
57
|
|
@@ -66,6 +71,13 @@ listening sockets open across puma restarts and achieves graceful
|
|
66
71
|
restarts, including when upgraded puma, and is compatible with both
|
67
72
|
clustered mode and application preload.
|
68
73
|
|
74
|
+
**Note:** Any wrapper scripts which `exec`, or other indirections in
|
75
|
+
`ExecStart`, may result in activated socket file descriptors being closed
|
76
|
+
before they reach the puma master process. For example, if using `bundle exec`,
|
77
|
+
pass the `--keep-file-descriptors` flag. `bundle exec` can be avoided by using a
|
78
|
+
`puma` executable generated by `bundle binstubs puma`. This is tracked in
|
79
|
+
[#1499].
|
80
|
+
|
69
81
|
**Note:** Socket activation doesn't currently work on jruby. This is
|
70
82
|
tracked in [#1367].
|
71
83
|
|
@@ -247,6 +259,12 @@ PIDFile=<WD>/shared/tmp/pids/puma.pid
|
|
247
259
|
# reconsider if you actually need the forking config.
|
248
260
|
Restart=no
|
249
261
|
|
262
|
+
# `puma_ctl restart` wouldn't work without this. It's because `pumactl`
|
263
|
+
# changes PID on restart and systemd stops the service afterwards
|
264
|
+
# because of the PID change. This option prevents stopping after PID
|
265
|
+
# change.
|
266
|
+
RemainAfterExit=yes
|
267
|
+
|
250
268
|
[Install]
|
251
269
|
WantedBy=multi-user.target
|
252
270
|
~~~~
|
data/docs/tcp_mode.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# TCP mode
|
2
|
+
|
3
|
+
Puma also could be used as a TCP server to process incoming TCP
|
4
|
+
connections.
|
5
|
+
|
6
|
+
|
7
|
+
## Configuration
|
8
|
+
|
9
|
+
TCP mode can be enabled with CLI option `--tcp-mode`:
|
10
|
+
|
11
|
+
```
|
12
|
+
$ puma --tcp-mode
|
13
|
+
```
|
14
|
+
|
15
|
+
Default ip and port to listen to are `0.0.0.0` and `9292`. You can configure
|
16
|
+
them with `--port` and `--bind` options:
|
17
|
+
|
18
|
+
```
|
19
|
+
$ puma --tcp-mode --bind tcp://127.0.0.1:9293
|
20
|
+
$ puma --tcp-mode --port 9293
|
21
|
+
```
|
22
|
+
|
23
|
+
TCP mode could be set with a configuration file as well with `tcp_mode`
|
24
|
+
and `tcp_mode!` methods:
|
25
|
+
|
26
|
+
```
|
27
|
+
# config/puma.rb
|
28
|
+
tcp_mode
|
29
|
+
```
|
30
|
+
|
31
|
+
When Puma starts in the TCP mode it prints the corresponding message:
|
32
|
+
|
33
|
+
```
|
34
|
+
puma --tcp-mode
|
35
|
+
Puma starting in single mode...
|
36
|
+
...
|
37
|
+
* Mode: Lopez Express (tcp)
|
38
|
+
```
|
39
|
+
|
40
|
+
|
41
|
+
## How to declare an application
|
42
|
+
|
43
|
+
An application to process TCP connections should be declared as a
|
44
|
+
callable object which accepts `env` and `socket` arguments.
|
45
|
+
|
46
|
+
`env` argument is a Hash with following structure:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
{ "thread" => {}, "REMOTE_ADDR" => "127.0.0.1:51133", "log" => "#<Proc:0x000..." }
|
50
|
+
```
|
51
|
+
|
52
|
+
It consists of:
|
53
|
+
* `thread` - a Hash for each thread in the thread pool that could be
|
54
|
+
used to store information between requests
|
55
|
+
* `REMOTE_ADDR` - a client ip address
|
56
|
+
* `log` - a proc object to write something down
|
57
|
+
|
58
|
+
`log` object could be used this way:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
env['log'].call('message to log')
|
62
|
+
#> 19/Oct/2019 20:28:53 - 127.0.0.1:51266 - message to log
|
63
|
+
```
|
64
|
+
|
65
|
+
|
66
|
+
## Example of an application
|
67
|
+
|
68
|
+
Let's look at an example of a simple application which just echoes
|
69
|
+
incoming string:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
# config/puma.rb
|
73
|
+
app do |env, socket|
|
74
|
+
s = socket.gets
|
75
|
+
socket.puts "Echo #{s}"
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
We can easily access the TCP server with `telnet` command and receive an
|
80
|
+
echo:
|
81
|
+
|
82
|
+
```shell
|
83
|
+
telnet 0.0.0.0 9293
|
84
|
+
Trying 0.0.0.0...
|
85
|
+
Connected to 0.0.0.0.
|
86
|
+
Escape character is '^]'.
|
87
|
+
sssss
|
88
|
+
Echo sssss
|
89
|
+
^CConnection closed by foreign host.
|
90
|
+
```
|
91
|
+
|
92
|
+
|
93
|
+
## Socket management
|
94
|
+
|
95
|
+
After the application finishes, Puma closes the socket. In order to
|
96
|
+
prevent this, the application should set `env['detach'] = true`.
|
@@ -6,11 +6,13 @@ import org.jruby.Ruby;
|
|
6
6
|
import org.jruby.runtime.load.BasicLibraryService;
|
7
7
|
|
8
8
|
import org.jruby.puma.Http11;
|
9
|
+
import org.jruby.puma.IOBuffer;
|
9
10
|
import org.jruby.puma.MiniSSL;
|
10
11
|
|
11
12
|
public class PumaHttp11Service implements BasicLibraryService {
|
12
13
|
public boolean basicLoad(final Ruby runtime) throws IOException {
|
13
14
|
Http11.createHttp11(runtime);
|
15
|
+
IOBuffer.createIOBuffer(runtime);
|
14
16
|
MiniSSL.createMiniSSL(runtime);
|
15
17
|
return true;
|
16
18
|
}
|
data/ext/puma_http11/extconf.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
|
3
3
|
dir_config("puma_http11")
|
4
|
+
if RUBY_PLATFORM[/mingw32/]
|
5
|
+
append_cflags '-D_FORTIFY_SOURCE=2'
|
6
|
+
append_ldflags '-fstack-protector'
|
7
|
+
have_library 'ssp'
|
8
|
+
end
|
4
9
|
|
5
10
|
unless ENV["DISABLE_SSL"]
|
6
11
|
dir_config("openssl")
|
@@ -9,6 +14,14 @@ unless ENV["DISABLE_SSL"]
|
|
9
14
|
%w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
|
10
15
|
|
11
16
|
have_header "openssl/bio.h"
|
17
|
+
|
18
|
+
# below is yes for 1.0.2 & later
|
19
|
+
have_func "DTLS_method" , "openssl/ssl.h"
|
20
|
+
|
21
|
+
# below are yes for 1.1.0 & later, may need to check func rather than macro
|
22
|
+
# with versions after 1.1.1
|
23
|
+
have_func "TLS_server_method" , "openssl/ssl.h"
|
24
|
+
have_macro "SSL_CTX_set_min_proto_version", "openssl/ssl.h"
|
12
25
|
end
|
13
26
|
end
|
14
27
|
|
@@ -40,7 +40,7 @@ static void snake_upcase_char(char *c)
|
|
40
40
|
|
41
41
|
#line 40 "ext/puma_http11/http11_parser.c"
|
42
42
|
static const int puma_parser_start = 1;
|
43
|
-
static const int puma_parser_first_final =
|
43
|
+
static const int puma_parser_first_final = 46;
|
44
44
|
static const int puma_parser_error = 0;
|
45
45
|
|
46
46
|
static const int puma_parser_en_main = 1;
|
@@ -119,17 +119,17 @@ case 2:
|
|
119
119
|
#line 118 "ext/puma_http11/http11_parser.c"
|
120
120
|
switch( (*p) ) {
|
121
121
|
case 32: goto tr2;
|
122
|
-
case 36: goto
|
123
|
-
case 95: goto
|
122
|
+
case 36: goto st27;
|
123
|
+
case 95: goto st27;
|
124
124
|
}
|
125
125
|
if ( (*p) < 48 ) {
|
126
126
|
if ( 45 <= (*p) && (*p) <= 46 )
|
127
|
-
goto
|
127
|
+
goto st27;
|
128
128
|
} else if ( (*p) > 57 ) {
|
129
129
|
if ( 65 <= (*p) && (*p) <= 90 )
|
130
|
-
goto
|
130
|
+
goto st27;
|
131
131
|
} else
|
132
|
-
goto
|
132
|
+
goto st27;
|
133
133
|
goto st0;
|
134
134
|
tr2:
|
135
135
|
#line 48 "ext/puma_http11/http11_parser.rl"
|
@@ -201,7 +201,7 @@ tr37:
|
|
201
201
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
202
202
|
}
|
203
203
|
goto st5;
|
204
|
-
|
204
|
+
tr41:
|
205
205
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
206
206
|
{ MARK(query_start, p); }
|
207
207
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -213,7 +213,7 @@ tr44:
|
|
213
213
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
214
214
|
}
|
215
215
|
goto st5;
|
216
|
-
|
216
|
+
tr44:
|
217
217
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
218
218
|
{
|
219
219
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -364,13 +364,13 @@ tr22:
|
|
364
364
|
{
|
365
365
|
parser->body_start = p - buffer + 1;
|
366
366
|
parser->header_done(parser, p + 1, pe - p - 1);
|
367
|
-
{p++; cs =
|
367
|
+
{p++; cs = 46; goto _out;}
|
368
368
|
}
|
369
|
-
goto
|
370
|
-
|
369
|
+
goto st46;
|
370
|
+
st46:
|
371
371
|
if ( ++p == pe )
|
372
|
-
goto
|
373
|
-
case
|
372
|
+
goto _test_eof46;
|
373
|
+
case 46:
|
374
374
|
#line 373 "ext/puma_http11/http11_parser.c"
|
375
375
|
goto st0;
|
376
376
|
tr21:
|
@@ -460,7 +460,7 @@ tr38:
|
|
460
460
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
461
461
|
}
|
462
462
|
goto st20;
|
463
|
-
|
463
|
+
tr42:
|
464
464
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
465
465
|
{ MARK(query_start, p); }
|
466
466
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -472,7 +472,7 @@ tr45:
|
|
472
472
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
473
473
|
}
|
474
474
|
goto st20;
|
475
|
-
|
475
|
+
tr45:
|
476
476
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
477
477
|
{
|
478
478
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -578,10 +578,9 @@ case 24:
|
|
578
578
|
case 32: goto tr37;
|
579
579
|
case 34: goto st0;
|
580
580
|
case 35: goto tr38;
|
581
|
-
case 59: goto tr39;
|
582
581
|
case 60: goto st0;
|
583
582
|
case 62: goto st0;
|
584
|
-
case 63: goto
|
583
|
+
case 63: goto tr39;
|
585
584
|
case 127: goto st0;
|
586
585
|
}
|
587
586
|
if ( 0 <= (*p) && (*p) <= 31 )
|
@@ -597,30 +596,27 @@ st25:
|
|
597
596
|
if ( ++p == pe )
|
598
597
|
goto _test_eof25;
|
599
598
|
case 25:
|
600
|
-
#line
|
599
|
+
#line 598 "ext/puma_http11/http11_parser.c"
|
601
600
|
switch( (*p) ) {
|
602
|
-
case 32: goto
|
601
|
+
case 32: goto tr41;
|
603
602
|
case 34: goto st0;
|
604
|
-
case 35: goto
|
603
|
+
case 35: goto tr42;
|
605
604
|
case 60: goto st0;
|
606
605
|
case 62: goto st0;
|
607
|
-
case 63: goto st26;
|
608
606
|
case 127: goto st0;
|
609
607
|
}
|
610
608
|
if ( 0 <= (*p) && (*p) <= 31 )
|
611
609
|
goto st0;
|
612
|
-
goto
|
610
|
+
goto tr40;
|
613
611
|
tr40:
|
614
|
-
#line
|
615
|
-
{
|
616
|
-
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
617
|
-
}
|
612
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
613
|
+
{ MARK(query_start, p); }
|
618
614
|
goto st26;
|
619
615
|
st26:
|
620
616
|
if ( ++p == pe )
|
621
617
|
goto _test_eof26;
|
622
618
|
case 26:
|
623
|
-
#line
|
619
|
+
#line 618 "ext/puma_http11/http11_parser.c"
|
624
620
|
switch( (*p) ) {
|
625
621
|
case 32: goto tr44;
|
626
622
|
case 34: goto st0;
|
@@ -631,27 +627,25 @@ case 26:
|
|
631
627
|
}
|
632
628
|
if ( 0 <= (*p) && (*p) <= 31 )
|
633
629
|
goto st0;
|
634
|
-
goto
|
635
|
-
tr43:
|
636
|
-
#line 58 "ext/puma_http11/http11_parser.rl"
|
637
|
-
{ MARK(query_start, p); }
|
638
|
-
goto st27;
|
630
|
+
goto st26;
|
639
631
|
st27:
|
640
632
|
if ( ++p == pe )
|
641
633
|
goto _test_eof27;
|
642
634
|
case 27:
|
643
|
-
#line 642 "ext/puma_http11/http11_parser.c"
|
644
635
|
switch( (*p) ) {
|
645
|
-
case 32: goto
|
646
|
-
case
|
647
|
-
case
|
648
|
-
case 60: goto st0;
|
649
|
-
case 62: goto st0;
|
650
|
-
case 127: goto st0;
|
636
|
+
case 32: goto tr2;
|
637
|
+
case 36: goto st28;
|
638
|
+
case 95: goto st28;
|
651
639
|
}
|
652
|
-
if (
|
653
|
-
|
654
|
-
|
640
|
+
if ( (*p) < 48 ) {
|
641
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
642
|
+
goto st28;
|
643
|
+
} else if ( (*p) > 57 ) {
|
644
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
645
|
+
goto st28;
|
646
|
+
} else
|
647
|
+
goto st28;
|
648
|
+
goto st0;
|
655
649
|
st28:
|
656
650
|
if ( ++p == pe )
|
657
651
|
goto _test_eof28;
|
@@ -962,24 +956,6 @@ st45:
|
|
962
956
|
if ( ++p == pe )
|
963
957
|
goto _test_eof45;
|
964
958
|
case 45:
|
965
|
-
switch( (*p) ) {
|
966
|
-
case 32: goto tr2;
|
967
|
-
case 36: goto st46;
|
968
|
-
case 95: goto st46;
|
969
|
-
}
|
970
|
-
if ( (*p) < 48 ) {
|
971
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
972
|
-
goto st46;
|
973
|
-
} else if ( (*p) > 57 ) {
|
974
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
975
|
-
goto st46;
|
976
|
-
} else
|
977
|
-
goto st46;
|
978
|
-
goto st0;
|
979
|
-
st46:
|
980
|
-
if ( ++p == pe )
|
981
|
-
goto _test_eof46;
|
982
|
-
case 46:
|
983
959
|
if ( (*p) == 32 )
|
984
960
|
goto tr2;
|
985
961
|
goto st0;
|
@@ -999,7 +975,7 @@ case 46:
|
|
999
975
|
_test_eof14: cs = 14; goto _test_eof;
|
1000
976
|
_test_eof15: cs = 15; goto _test_eof;
|
1001
977
|
_test_eof16: cs = 16; goto _test_eof;
|
1002
|
-
|
978
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1003
979
|
_test_eof17: cs = 17; goto _test_eof;
|
1004
980
|
_test_eof18: cs = 18; goto _test_eof;
|
1005
981
|
_test_eof19: cs = 19; goto _test_eof;
|
@@ -1029,7 +1005,6 @@ case 46:
|
|
1029
1005
|
_test_eof43: cs = 43; goto _test_eof;
|
1030
1006
|
_test_eof44: cs = 44; goto _test_eof;
|
1031
1007
|
_test_eof45: cs = 45; goto _test_eof;
|
1032
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1033
1008
|
|
1034
1009
|
_test_eof: {}
|
1035
1010
|
_out: {}
|