puma 3.12.2 → 4.3.1
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 +221 -199
- 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 +58 -47
- 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
|
|
@@ -38,7 +38,7 @@ static void snake_upcase_char(char *c)
|
|
38
38
|
|
39
39
|
#line 40 "ext/puma_http11/http11_parser.c"
|
40
40
|
static const int puma_parser_start = 1;
|
41
|
-
static const int puma_parser_first_final =
|
41
|
+
static const int puma_parser_first_final = 46;
|
42
42
|
static const int puma_parser_error = 0;
|
43
43
|
|
44
44
|
static const int puma_parser_en_main = 1;
|
@@ -117,17 +117,17 @@ case 2:
|
|
117
117
|
#line 118 "ext/puma_http11/http11_parser.c"
|
118
118
|
switch( (*p) ) {
|
119
119
|
case 32: goto tr2;
|
120
|
-
case 36: goto
|
121
|
-
case 95: goto
|
120
|
+
case 36: goto st27;
|
121
|
+
case 95: goto st27;
|
122
122
|
}
|
123
123
|
if ( (*p) < 48 ) {
|
124
124
|
if ( 45 <= (*p) && (*p) <= 46 )
|
125
|
-
goto
|
125
|
+
goto st27;
|
126
126
|
} else if ( (*p) > 57 ) {
|
127
127
|
if ( 65 <= (*p) && (*p) <= 90 )
|
128
|
-
goto
|
128
|
+
goto st27;
|
129
129
|
} else
|
130
|
-
goto
|
130
|
+
goto st27;
|
131
131
|
goto st0;
|
132
132
|
tr2:
|
133
133
|
#line 48 "ext/puma_http11/http11_parser.rl"
|
@@ -199,7 +199,7 @@ tr37:
|
|
199
199
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
200
200
|
}
|
201
201
|
goto st5;
|
202
|
-
|
202
|
+
tr41:
|
203
203
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
204
204
|
{ MARK(query_start, p); }
|
205
205
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -211,7 +211,7 @@ tr44:
|
|
211
211
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
212
212
|
}
|
213
213
|
goto st5;
|
214
|
-
|
214
|
+
tr44:
|
215
215
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
216
216
|
{
|
217
217
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -362,13 +362,13 @@ tr22:
|
|
362
362
|
{
|
363
363
|
parser->body_start = p - buffer + 1;
|
364
364
|
parser->header_done(parser, p + 1, pe - p - 1);
|
365
|
-
{p++; cs =
|
365
|
+
{p++; cs = 46; goto _out;}
|
366
366
|
}
|
367
|
-
goto
|
368
|
-
|
367
|
+
goto st46;
|
368
|
+
st46:
|
369
369
|
if ( ++p == pe )
|
370
|
-
goto
|
371
|
-
case
|
370
|
+
goto _test_eof46;
|
371
|
+
case 46:
|
372
372
|
#line 373 "ext/puma_http11/http11_parser.c"
|
373
373
|
goto st0;
|
374
374
|
tr21:
|
@@ -458,7 +458,7 @@ tr38:
|
|
458
458
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
459
459
|
}
|
460
460
|
goto st20;
|
461
|
-
|
461
|
+
tr42:
|
462
462
|
#line 58 "ext/puma_http11/http11_parser.rl"
|
463
463
|
{ MARK(query_start, p); }
|
464
464
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
@@ -470,7 +470,7 @@ tr45:
|
|
470
470
|
parser->request_uri(parser, PTR_TO(mark), LEN(mark, p));
|
471
471
|
}
|
472
472
|
goto st20;
|
473
|
-
|
473
|
+
tr45:
|
474
474
|
#line 59 "ext/puma_http11/http11_parser.rl"
|
475
475
|
{
|
476
476
|
parser->query_string(parser, PTR_TO(query_start), LEN(query_start, p));
|
@@ -576,10 +576,9 @@ case 24:
|
|
576
576
|
case 32: goto tr37;
|
577
577
|
case 34: goto st0;
|
578
578
|
case 35: goto tr38;
|
579
|
-
case 59: goto tr39;
|
580
579
|
case 60: goto st0;
|
581
580
|
case 62: goto st0;
|
582
|
-
case 63: goto
|
581
|
+
case 63: goto tr39;
|
583
582
|
case 127: goto st0;
|
584
583
|
}
|
585
584
|
if ( 0 <= (*p) && (*p) <= 31 )
|
@@ -595,30 +594,27 @@ st25:
|
|
595
594
|
if ( ++p == pe )
|
596
595
|
goto _test_eof25;
|
597
596
|
case 25:
|
598
|
-
#line
|
597
|
+
#line 598 "ext/puma_http11/http11_parser.c"
|
599
598
|
switch( (*p) ) {
|
600
|
-
case 32: goto
|
599
|
+
case 32: goto tr41;
|
601
600
|
case 34: goto st0;
|
602
|
-
case 35: goto
|
601
|
+
case 35: goto tr42;
|
603
602
|
case 60: goto st0;
|
604
603
|
case 62: goto st0;
|
605
|
-
case 63: goto st26;
|
606
604
|
case 127: goto st0;
|
607
605
|
}
|
608
606
|
if ( 0 <= (*p) && (*p) <= 31 )
|
609
607
|
goto st0;
|
610
|
-
goto
|
608
|
+
goto tr40;
|
611
609
|
tr40:
|
612
|
-
#line
|
613
|
-
{
|
614
|
-
parser->request_path(parser, PTR_TO(mark), LEN(mark,p));
|
615
|
-
}
|
610
|
+
#line 58 "ext/puma_http11/http11_parser.rl"
|
611
|
+
{ MARK(query_start, p); }
|
616
612
|
goto st26;
|
617
613
|
st26:
|
618
614
|
if ( ++p == pe )
|
619
615
|
goto _test_eof26;
|
620
616
|
case 26:
|
621
|
-
#line
|
617
|
+
#line 618 "ext/puma_http11/http11_parser.c"
|
622
618
|
switch( (*p) ) {
|
623
619
|
case 32: goto tr44;
|
624
620
|
case 34: goto st0;
|
@@ -629,27 +625,25 @@ case 26:
|
|
629
625
|
}
|
630
626
|
if ( 0 <= (*p) && (*p) <= 31 )
|
631
627
|
goto st0;
|
632
|
-
goto
|
633
|
-
tr43:
|
634
|
-
#line 58 "ext/puma_http11/http11_parser.rl"
|
635
|
-
{ MARK(query_start, p); }
|
636
|
-
goto st27;
|
628
|
+
goto st26;
|
637
629
|
st27:
|
638
630
|
if ( ++p == pe )
|
639
631
|
goto _test_eof27;
|
640
632
|
case 27:
|
641
|
-
#line 642 "ext/puma_http11/http11_parser.c"
|
642
633
|
switch( (*p) ) {
|
643
|
-
case 32: goto
|
644
|
-
case
|
645
|
-
case
|
646
|
-
case 60: goto st0;
|
647
|
-
case 62: goto st0;
|
648
|
-
case 127: goto st0;
|
634
|
+
case 32: goto tr2;
|
635
|
+
case 36: goto st28;
|
636
|
+
case 95: goto st28;
|
649
637
|
}
|
650
|
-
if (
|
651
|
-
|
652
|
-
|
638
|
+
if ( (*p) < 48 ) {
|
639
|
+
if ( 45 <= (*p) && (*p) <= 46 )
|
640
|
+
goto st28;
|
641
|
+
} else if ( (*p) > 57 ) {
|
642
|
+
if ( 65 <= (*p) && (*p) <= 90 )
|
643
|
+
goto st28;
|
644
|
+
} else
|
645
|
+
goto st28;
|
646
|
+
goto st0;
|
653
647
|
st28:
|
654
648
|
if ( ++p == pe )
|
655
649
|
goto _test_eof28;
|
@@ -960,24 +954,6 @@ st45:
|
|
960
954
|
if ( ++p == pe )
|
961
955
|
goto _test_eof45;
|
962
956
|
case 45:
|
963
|
-
switch( (*p) ) {
|
964
|
-
case 32: goto tr2;
|
965
|
-
case 36: goto st46;
|
966
|
-
case 95: goto st46;
|
967
|
-
}
|
968
|
-
if ( (*p) < 48 ) {
|
969
|
-
if ( 45 <= (*p) && (*p) <= 46 )
|
970
|
-
goto st46;
|
971
|
-
} else if ( (*p) > 57 ) {
|
972
|
-
if ( 65 <= (*p) && (*p) <= 90 )
|
973
|
-
goto st46;
|
974
|
-
} else
|
975
|
-
goto st46;
|
976
|
-
goto st0;
|
977
|
-
st46:
|
978
|
-
if ( ++p == pe )
|
979
|
-
goto _test_eof46;
|
980
|
-
case 46:
|
981
957
|
if ( (*p) == 32 )
|
982
958
|
goto tr2;
|
983
959
|
goto st0;
|
@@ -997,7 +973,7 @@ case 46:
|
|
997
973
|
_test_eof14: cs = 14; goto _test_eof;
|
998
974
|
_test_eof15: cs = 15; goto _test_eof;
|
999
975
|
_test_eof16: cs = 16; goto _test_eof;
|
1000
|
-
|
976
|
+
_test_eof46: cs = 46; goto _test_eof;
|
1001
977
|
_test_eof17: cs = 17; goto _test_eof;
|
1002
978
|
_test_eof18: cs = 18; goto _test_eof;
|
1003
979
|
_test_eof19: cs = 19; goto _test_eof;
|
@@ -1027,7 +1003,6 @@ case 46:
|
|
1027
1003
|
_test_eof43: cs = 43; goto _test_eof;
|
1028
1004
|
_test_eof44: cs = 44; goto _test_eof;
|
1029
1005
|
_test_eof45: cs = 45; goto _test_eof;
|
1030
|
-
_test_eof46: cs = 46; goto _test_eof;
|
1031
1006
|
|
1032
1007
|
_test_eof: {}
|
1033
1008
|
_out: {}
|