rack-mount 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/mount.rb +3 -13
- data/lib/rack/mount/analysis/frequency.rb +0 -2
- data/lib/rack/mount/analysis/splitting.rb +2 -2
- data/lib/rack/mount/code_generation.rb +113 -0
- data/lib/rack/mount/generatable_regexp.rb +1 -1
- data/lib/rack/mount/route.rb +69 -5
- data/lib/rack/mount/route_set.rb +289 -46
- data/lib/rack/mount/strexp.rb +53 -50
- data/lib/rack/mount/utils.rb +7 -7
- data/lib/rack/mount/vendor/reginald/reginald.rb +2 -1
- data/lib/rack/mount/vendor/reginald/reginald/alternation.rb +11 -1
- data/lib/rack/mount/vendor/reginald/reginald/atom.rb +17 -5
- data/lib/rack/mount/vendor/reginald/reginald/character.rb +11 -2
- data/lib/rack/mount/vendor/reginald/reginald/character_class.rb +8 -20
- data/lib/rack/mount/vendor/reginald/reginald/collection.rb +10 -6
- data/lib/rack/mount/vendor/reginald/reginald/expression.rb +30 -20
- data/lib/rack/mount/vendor/reginald/reginald/group.rb +22 -8
- data/lib/rack/mount/vendor/reginald/reginald/options.rb +47 -0
- data/lib/rack/mount/vendor/reginald/reginald/parser.rb +137 -273
- data/lib/rack/mount/vendor/reginald/reginald/tokenizer.rb +1 -1
- data/lib/rack/mount/vendor/reginald/reginald/version.rb +3 -0
- data/lib/rack/mount/version.rb +1 -1
- metadata +6 -10
- data/lib/rack/mount/exceptions.rb +0 -3
- data/lib/rack/mount/generation/route.rb +0 -59
- data/lib/rack/mount/generation/route_set.rb +0 -200
- data/lib/rack/mount/mixover.rb +0 -60
- data/lib/rack/mount/recognition/code_generation.rb +0 -124
- data/lib/rack/mount/recognition/route.rb +0 -62
- data/lib/rack/mount/recognition/route_set.rb +0 -121
@@ -0,0 +1,47 @@
|
|
1
|
+
module Reginald
|
2
|
+
class Options
|
3
|
+
def self.from_int(flags)
|
4
|
+
multiline = flags & Regexp::MULTILINE != 0
|
5
|
+
ignorecase = flags & Regexp::IGNORECASE != 0
|
6
|
+
extended = flags & Regexp::EXTENDED != 0
|
7
|
+
|
8
|
+
new(multiline, ignorecase, extended)
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_reader :multiline, :ignorecase, :extended
|
12
|
+
|
13
|
+
def initialize(*args)
|
14
|
+
if args.first.is_a?(Hash)
|
15
|
+
@multiline = args[0][:multiline]
|
16
|
+
@ignorecase = args[0][:ignorecase]
|
17
|
+
@extended = args[0][:extended]
|
18
|
+
else
|
19
|
+
@multiline = args[0]
|
20
|
+
@ignorecase = args[1]
|
21
|
+
@extended = args[2]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def any?(explicit = false)
|
26
|
+
if explicit
|
27
|
+
!multiline.nil? || !ignorecase.nil? || !extended.nil?
|
28
|
+
else
|
29
|
+
multiline || ignorecase || extended
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def to_h
|
34
|
+
{ :multiline => multiline,
|
35
|
+
:ignorecase => ignorecase,
|
36
|
+
:extended => extended }
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_i
|
40
|
+
flag = 0
|
41
|
+
flag |= Regexp::MULTILINE if multiline
|
42
|
+
flag |= Regexp::IGNORECASE if ignorecase
|
43
|
+
flag |= Regexp::EXTENDED if extended
|
44
|
+
flag
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -9,15 +9,13 @@ module Reginald
|
|
9
9
|
class Parser < Racc::Parser #:nodoc: all
|
10
10
|
|
11
11
|
def self.parse_regexp(regexp)
|
12
|
+
options = Options.from_int(regexp.options)
|
13
|
+
|
12
14
|
parser = new
|
13
|
-
parser.options_stack <<
|
14
|
-
:multiline => (regexp.options & Regexp::MULTILINE != 0),
|
15
|
-
:ignorecase => (regexp.options & Regexp::IGNORECASE != 0),
|
16
|
-
:extended => (regexp.options & Regexp::EXTENDED != 0)
|
17
|
-
}
|
15
|
+
parser.options_stack << options.to_h
|
18
16
|
|
19
17
|
expression = parser.scan_str(regexp.source)
|
20
|
-
expression.options
|
18
|
+
expression = expression.dup(options.to_h) if options.any?
|
21
19
|
expression
|
22
20
|
end
|
23
21
|
|
@@ -32,183 +30,146 @@ end
|
|
32
30
|
##### State transition tables begin ###
|
33
31
|
|
34
32
|
racc_action_table = [
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
33
|
+
1, 17, 18, 18, 7, 8, 10, 11, 48, 18,
|
34
|
+
1, 60, 2, 4, 7, 8, 10, 11, 45, 47,
|
35
|
+
1, 55, 2, 4, 7, 8, 10, 11, 28, 18,
|
36
|
+
1, 15, 2, 4, 7, 8, 10, 11, 64, 18,
|
37
|
+
1, 63, 2, 4, 7, 8, 10, 11, 61, 49,
|
38
|
+
1, 27, 2, 4, 7, 8, 10, 11, 36, 25,
|
39
|
+
1, 33, 2, 4, 7, 8, 10, 11, nil, nil,
|
40
|
+
1, nil, 2, 4, 7, 8, 10, 11, 42, 43,
|
41
|
+
46, 31, 2, 4, 32, 20, 44, 37, 39, 41,
|
42
|
+
21, 22, 24, 20, 58, 37, 39, 41, 21, 22,
|
43
|
+
24, 13, nil, 14, 30, 31, 15, nil, 32, 51,
|
44
|
+
37, 39, 41, 37, 39, 41, 37, 39, 41, 37,
|
45
|
+
39, 41, 37, 39, 41, 37, 39, 41, 37, 39,
|
46
|
+
41 ]
|
49
47
|
|
50
48
|
racc_action_check = [
|
51
|
-
3,
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
49
|
+
0, 3, 52, 3, 0, 0, 0, 0, 36, 26,
|
50
|
+
49, 52, 0, 0, 49, 49, 49, 49, 26, 36,
|
51
|
+
43, 48, 49, 49, 43, 43, 43, 43, 14, 56,
|
52
|
+
5, 14, 43, 43, 5, 5, 5, 5, 56, 53,
|
53
|
+
34, 55, 5, 5, 34, 34, 34, 34, 53, 38,
|
54
|
+
11, 13, 34, 34, 11, 11, 11, 11, 24, 11,
|
55
|
+
18, 17, 11, 11, 18, 18, 18, 18, nil, nil,
|
56
|
+
42, nil, 18, 18, 42, 42, 42, 42, 25, 25,
|
57
|
+
29, 29, 42, 42, 29, 19, 25, 25, 25, 25,
|
58
|
+
19, 19, 19, 6, 50, 50, 50, 50, 6, 6,
|
59
|
+
6, 1, nil, 1, 16, 16, 1, nil, 16, 40,
|
60
|
+
40, 40, 40, 54, 54, 54, 58, 58, 58, 59,
|
61
|
+
59, 59, 51, 51, 51, 62, 62, 62, 44, 44,
|
62
|
+
44 ]
|
65
63
|
|
66
64
|
racc_action_pointer = [
|
67
|
-
|
68
|
-
|
69
|
-
nil, nil,
|
70
|
-
nil,
|
71
|
-
|
72
|
-
|
73
|
-
nil, nil,
|
74
|
-
15, nil, nil, 32, 55, 65, nil, nil, nil, nil,
|
75
|
-
nil, nil ]
|
65
|
+
-3, 97, nil, 1, nil, 27, 81, nil, nil, nil,
|
66
|
+
nil, 47, nil, 46, 22, nil, 99, 61, 57, 73,
|
67
|
+
nil, nil, nil, nil, 49, 65, 7, nil, nil, 75,
|
68
|
+
nil, nil, nil, nil, 37, nil, -1, nil, 36, nil,
|
69
|
+
88, nil, 67, 17, 106, nil, nil, nil, 12, 7,
|
70
|
+
73, 100, 0, 37, 91, 21, 27, nil, 94, 97,
|
71
|
+
nil, nil, 103, nil, nil, nil, nil, nil ]
|
76
72
|
|
77
73
|
racc_action_default = [
|
78
|
-
-
|
79
|
-
|
80
|
-
-
|
81
|
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-51, -17, -18, -51, -51, -51, -47, -24, -44, -16,
|
86
|
-
-45, -46 ]
|
74
|
+
-37, -37, -19, -37, -20, -2, -6, -11, -12, -7,
|
75
|
+
-14, -37, -13, -37, -29, -28, -37, -37, -37, -4,
|
76
|
+
-23, -21, -22, -5, -37, -37, -37, -8, -29, -37,
|
77
|
+
-9, -27, -26, 68, -1, -3, -37, -34, -37, -35,
|
78
|
+
-37, -36, -37, -37, -37, -15, -10, -25, -37, -37,
|
79
|
+
-37, -37, -37, -37, -37, -37, -37, -33, -37, -37,
|
80
|
+
-17, -18, -37, -24, -16, -32, -31, -30 ]
|
87
81
|
|
88
82
|
racc_goto_table = [
|
89
|
-
|
90
|
-
nil,
|
91
|
-
nil,
|
92
|
-
|
93
|
-
nil,
|
94
|
-
nil, nil, 64, nil, 65, nil, nil, nil, nil, nil,
|
95
|
-
nil, nil, nil, nil, nil, nil, 73 ]
|
83
|
+
3, 40, 19, 38, 16, 23, 34, nil, nil, nil,
|
84
|
+
nil, 26, nil, nil, nil, nil, 50, 29, 35, nil,
|
85
|
+
54, nil, nil, nil, nil, nil, 57, 59, nil, nil,
|
86
|
+
62, 19, nil, nil, 65, 66, nil, nil, 67, nil,
|
87
|
+
nil, nil, 52, 53, nil, nil, nil, nil, nil, 56 ]
|
96
88
|
|
97
89
|
racc_goto_check = [
|
98
|
-
1, 3,
|
99
|
-
nil, 1, nil, nil,
|
100
|
-
nil,
|
101
|
-
|
102
|
-
nil,
|
103
|
-
nil, nil, 1, nil, 1, nil, nil, nil, nil, nil,
|
104
|
-
nil, nil, nil, nil, nil, nil, 1 ]
|
90
|
+
1, 9, 3, 8, 6, 4, 2, nil, nil, nil,
|
91
|
+
nil, 1, nil, nil, nil, nil, 9, 6, 4, nil,
|
92
|
+
9, nil, nil, nil, nil, nil, 9, 9, nil, nil,
|
93
|
+
9, 3, nil, nil, 9, 9, nil, nil, 9, nil,
|
94
|
+
nil, nil, 1, 1, nil, nil, nil, nil, nil, 1 ]
|
105
95
|
|
106
96
|
racc_goto_pointer = [
|
107
|
-
nil, 0, -
|
108
|
-
-37 ]
|
97
|
+
nil, 0, -12, -3, -1, nil, 3, nil, -22, -24 ]
|
109
98
|
|
110
99
|
racc_goto_default = [
|
111
|
-
nil, nil,
|
112
|
-
nil ]
|
100
|
+
nil, nil, 5, 6, nil, 9, nil, 12, nil, nil ]
|
113
101
|
|
114
102
|
racc_reduce_table = [
|
115
103
|
0, 0, :racc_error,
|
116
|
-
3,
|
117
|
-
1,
|
118
|
-
3,
|
119
|
-
2,
|
120
|
-
2,
|
121
|
-
1,
|
122
|
-
1,
|
123
|
-
3,
|
124
|
-
3,
|
125
|
-
4,
|
126
|
-
1,
|
127
|
-
1,
|
128
|
-
1,
|
129
|
-
1,
|
130
|
-
3,
|
131
|
-
6,
|
132
|
-
5,
|
133
|
-
5,
|
134
|
-
1,
|
135
|
-
1,
|
136
|
-
1,
|
137
|
-
1,
|
138
|
-
1,
|
139
|
-
5,
|
140
|
-
3,
|
141
|
-
2,
|
142
|
-
2,
|
143
|
-
1,
|
144
|
-
1,
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
1,
|
150
|
-
1,
|
151
|
-
1,
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
1, 44, :_reduce_41,
|
157
|
-
1, 44, :_reduce_42,
|
158
|
-
1, 44, :_reduce_43,
|
159
|
-
4, 47, :_reduce_44,
|
160
|
-
4, 47, :_reduce_45,
|
161
|
-
4, 47, :_reduce_46,
|
162
|
-
3, 47, :_reduce_47,
|
163
|
-
1, 48, :_reduce_48,
|
164
|
-
1, 48, :_reduce_49,
|
165
|
-
1, 48, :_reduce_50 ]
|
166
|
-
|
167
|
-
racc_reduce_n = 51
|
168
|
-
|
169
|
-
racc_shift_n = 82
|
104
|
+
3, 26, :_reduce_1,
|
105
|
+
1, 26, :_reduce_2,
|
106
|
+
3, 27, :_reduce_3,
|
107
|
+
2, 27, :_reduce_4,
|
108
|
+
2, 27, :_reduce_5,
|
109
|
+
1, 27, :_reduce_none,
|
110
|
+
1, 28, :_reduce_none,
|
111
|
+
3, 28, :_reduce_8,
|
112
|
+
3, 28, :_reduce_9,
|
113
|
+
4, 28, :_reduce_10,
|
114
|
+
1, 28, :_reduce_11,
|
115
|
+
1, 28, :_reduce_12,
|
116
|
+
1, 28, :_reduce_13,
|
117
|
+
1, 28, :_reduce_14,
|
118
|
+
3, 30, :_reduce_15,
|
119
|
+
6, 30, :_reduce_16,
|
120
|
+
5, 30, :_reduce_17,
|
121
|
+
5, 30, :_reduce_18,
|
122
|
+
1, 32, :_reduce_none,
|
123
|
+
1, 32, :_reduce_none,
|
124
|
+
1, 29, :_reduce_none,
|
125
|
+
1, 29, :_reduce_none,
|
126
|
+
1, 29, :_reduce_none,
|
127
|
+
5, 29, :_reduce_24,
|
128
|
+
3, 29, :_reduce_25,
|
129
|
+
2, 31, :_reduce_26,
|
130
|
+
2, 31, :_reduce_27,
|
131
|
+
1, 31, :_reduce_none,
|
132
|
+
1, 31, :_reduce_none,
|
133
|
+
4, 33, :_reduce_30,
|
134
|
+
4, 33, :_reduce_31,
|
135
|
+
4, 33, :_reduce_32,
|
136
|
+
3, 33, :_reduce_33,
|
137
|
+
1, 34, :_reduce_34,
|
138
|
+
1, 34, :_reduce_35,
|
139
|
+
1, 34, :_reduce_36 ]
|
140
|
+
|
141
|
+
racc_reduce_n = 37
|
142
|
+
|
143
|
+
racc_shift_n = 68
|
170
144
|
|
171
145
|
racc_token_table = {
|
172
146
|
false => 0,
|
173
147
|
:error => 1,
|
174
148
|
:BAR => 2,
|
175
149
|
:LBRACK => 3,
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
182
|
-
:
|
183
|
-
:
|
184
|
-
:
|
185
|
-
:
|
186
|
-
:
|
187
|
-
:
|
188
|
-
:
|
189
|
-
:
|
190
|
-
:
|
191
|
-
:
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
"lower" => 27,
|
200
|
-
"print" => 28,
|
201
|
-
"punct" => 29,
|
202
|
-
"space" => 30,
|
203
|
-
"upper" => 31,
|
204
|
-
"word" => 32,
|
205
|
-
"xdigit" => 33,
|
206
|
-
:MINUS => 34,
|
207
|
-
:MULTILINE => 35,
|
208
|
-
:IGNORECASE => 36,
|
209
|
-
:EXTENDED => 37 }
|
210
|
-
|
211
|
-
racc_nt_base = 38
|
150
|
+
:CTYPE => 4,
|
151
|
+
:RBRACK => 5,
|
152
|
+
:NEGATE => 6,
|
153
|
+
:CCLASS => 7,
|
154
|
+
:DOT => 8,
|
155
|
+
:CHAR => 9,
|
156
|
+
:LPAREN => 10,
|
157
|
+
:RPAREN => 11,
|
158
|
+
:QMARK => 12,
|
159
|
+
:COLON => 13,
|
160
|
+
:NAME => 14,
|
161
|
+
:L_ANCHOR => 15,
|
162
|
+
:R_ANCHOR => 16,
|
163
|
+
:STAR => 17,
|
164
|
+
:PLUS => 18,
|
165
|
+
:LCURLY => 19,
|
166
|
+
:RCURLY => 20,
|
167
|
+
:MINUS => 21,
|
168
|
+
:MULTILINE => 22,
|
169
|
+
:IGNORECASE => 23,
|
170
|
+
:EXTENDED => 24 }
|
171
|
+
|
172
|
+
racc_nt_base = 25
|
212
173
|
|
213
174
|
racc_use_result_var = true
|
214
175
|
|
@@ -233,6 +194,7 @@ Racc_token_to_s_table = [
|
|
233
194
|
"error",
|
234
195
|
"BAR",
|
235
196
|
"LBRACK",
|
197
|
+
"CTYPE",
|
236
198
|
"RBRACK",
|
237
199
|
"NEGATE",
|
238
200
|
"CCLASS",
|
@@ -249,20 +211,6 @@ Racc_token_to_s_table = [
|
|
249
211
|
"PLUS",
|
250
212
|
"LCURLY",
|
251
213
|
"RCURLY",
|
252
|
-
"\"alnum\"",
|
253
|
-
"\"alpha\"",
|
254
|
-
"\"ascii\"",
|
255
|
-
"\"blank\"",
|
256
|
-
"\"cntrl\"",
|
257
|
-
"\"digit\"",
|
258
|
-
"\"graph\"",
|
259
|
-
"\"lower\"",
|
260
|
-
"\"print\"",
|
261
|
-
"\"punct\"",
|
262
|
-
"\"space\"",
|
263
|
-
"\"upper\"",
|
264
|
-
"\"word\"",
|
265
|
-
"\"xdigit\"",
|
266
214
|
"MINUS",
|
267
215
|
"MULTILINE",
|
268
216
|
"IGNORECASE",
|
@@ -273,7 +221,6 @@ Racc_token_to_s_table = [
|
|
273
221
|
"atom",
|
274
222
|
"quantifier",
|
275
223
|
"group",
|
276
|
-
"ctype",
|
277
224
|
"bracket_expression",
|
278
225
|
"anchor",
|
279
226
|
"options",
|
@@ -296,9 +243,7 @@ def _reduce_2(val, _values, result)
|
|
296
243
|
end
|
297
244
|
|
298
245
|
def _reduce_3(val, _values, result)
|
299
|
-
|
300
|
-
result = Expression.reduce(val[0], val[1])
|
301
|
-
|
246
|
+
result = Expression.reduce(val[0], val[1].dup(:quantifier => val[2]))
|
302
247
|
result
|
303
248
|
end
|
304
249
|
|
@@ -308,9 +253,7 @@ def _reduce_4(val, _values, result)
|
|
308
253
|
end
|
309
254
|
|
310
255
|
def _reduce_5(val, _values, result)
|
311
|
-
|
312
|
-
result = val[0]
|
313
|
-
|
256
|
+
result = val[0].dup(:quantifier => val[1])
|
314
257
|
result
|
315
258
|
end
|
316
259
|
|
@@ -319,7 +262,7 @@ end
|
|
319
262
|
# reduce 7 omitted
|
320
263
|
|
321
264
|
def _reduce_8(val, _values, result)
|
322
|
-
result = val[1]
|
265
|
+
result = CharacterClass.new(val[1])
|
323
266
|
result
|
324
267
|
end
|
325
268
|
|
@@ -329,7 +272,7 @@ def _reduce_9(val, _values, result)
|
|
329
272
|
end
|
330
273
|
|
331
274
|
def _reduce_10(val, _values, result)
|
332
|
-
result = CharacterClass.new(val[2]
|
275
|
+
result = CharacterClass.new(val[2], :negate => true)
|
333
276
|
result
|
334
277
|
end
|
335
278
|
|
@@ -354,35 +297,26 @@ def _reduce_14(val, _values, result)
|
|
354
297
|
end
|
355
298
|
|
356
299
|
def _reduce_15(val, _values, result)
|
357
|
-
result = Group.new(val[1])
|
358
|
-
result.index = @capture_index_stack.pop
|
300
|
+
result = Group.new(val[1], :index => @capture_index_stack.pop)
|
359
301
|
|
360
302
|
result
|
361
303
|
end
|
362
304
|
|
363
305
|
def _reduce_16(val, _values, result)
|
364
|
-
result = Group.new(val[4])
|
365
|
-
result.capture = false;
|
366
|
-
options = val[2];
|
367
|
-
result.expression.multiline = options[:multiline];
|
368
|
-
result.expression.ignorecase = options[:ignorecase];
|
369
|
-
result.expression.extended = options[:extended];
|
306
|
+
result = Group.new(val[4], val[2].merge(:capture => false))
|
370
307
|
@options_stack.pop
|
371
308
|
|
372
309
|
result
|
373
310
|
end
|
374
311
|
|
375
312
|
def _reduce_17(val, _values, result)
|
376
|
-
result = Group.new(val[3]);
|
377
|
-
result.capture = false;
|
313
|
+
result = Group.new(val[3], :capture => false);
|
378
314
|
|
379
315
|
result
|
380
316
|
end
|
381
317
|
|
382
318
|
def _reduce_18(val, _values, result)
|
383
|
-
result = Group.new(val[3]);
|
384
|
-
result.name = val[2];
|
385
|
-
result.index = @capture_index_stack.pop
|
319
|
+
result = Group.new(val[3], :name => val[2], :index => @capture_index_stack.pop);
|
386
320
|
|
387
321
|
result
|
388
322
|
end
|
@@ -422,110 +356,40 @@ end
|
|
422
356
|
# reduce 29 omitted
|
423
357
|
|
424
358
|
def _reduce_30(val, _values, result)
|
425
|
-
result = CharacterClass::ALNUM
|
426
|
-
result
|
427
|
-
end
|
428
|
-
|
429
|
-
def _reduce_31(val, _values, result)
|
430
|
-
result = CharacterClass::ALPHA
|
431
|
-
result
|
432
|
-
end
|
433
|
-
|
434
|
-
def _reduce_32(val, _values, result)
|
435
|
-
result = CharacterClass::ASCII
|
436
|
-
result
|
437
|
-
end
|
438
|
-
|
439
|
-
def _reduce_33(val, _values, result)
|
440
|
-
result = CharacterClass::BLANK
|
441
|
-
result
|
442
|
-
end
|
443
|
-
|
444
|
-
def _reduce_34(val, _values, result)
|
445
|
-
result = CharacterClass::CNTRL
|
446
|
-
result
|
447
|
-
end
|
448
|
-
|
449
|
-
def _reduce_35(val, _values, result)
|
450
|
-
result = CharacterClass::DIGIT
|
451
|
-
result
|
452
|
-
end
|
453
|
-
|
454
|
-
def _reduce_36(val, _values, result)
|
455
|
-
result = CharacterClass::GRAPH
|
456
|
-
result
|
457
|
-
end
|
458
|
-
|
459
|
-
def _reduce_37(val, _values, result)
|
460
|
-
result = CharacterClass::LOWER
|
461
|
-
result
|
462
|
-
end
|
463
|
-
|
464
|
-
def _reduce_38(val, _values, result)
|
465
|
-
result = CharacterClass::PRINT
|
466
|
-
result
|
467
|
-
end
|
468
|
-
|
469
|
-
def _reduce_39(val, _values, result)
|
470
|
-
result = CharacterClass::PUNCT
|
471
|
-
result
|
472
|
-
end
|
473
|
-
|
474
|
-
def _reduce_40(val, _values, result)
|
475
|
-
result = CharacterClass::SPACE
|
476
|
-
result
|
477
|
-
end
|
478
|
-
|
479
|
-
def _reduce_41(val, _values, result)
|
480
|
-
result = CharacterClass::UPPER
|
481
|
-
result
|
482
|
-
end
|
483
|
-
|
484
|
-
def _reduce_42(val, _values, result)
|
485
|
-
result = CharacterClass::WORD
|
486
|
-
result
|
487
|
-
end
|
488
|
-
|
489
|
-
def _reduce_43(val, _values, result)
|
490
|
-
result = CharacterClass::XDIGIT
|
491
|
-
result
|
492
|
-
end
|
493
|
-
|
494
|
-
def _reduce_44(val, _values, result)
|
495
359
|
@options_stack << result = { val[1] => false, val[2] => false, val[3] => false }
|
496
360
|
|
497
361
|
result
|
498
362
|
end
|
499
363
|
|
500
|
-
def
|
364
|
+
def _reduce_31(val, _values, result)
|
501
365
|
@options_stack << result = { val[0] => true, val[2] => false, val[3] => false }
|
502
366
|
|
503
367
|
result
|
504
368
|
end
|
505
369
|
|
506
|
-
def
|
370
|
+
def _reduce_32(val, _values, result)
|
507
371
|
@options_stack << result = { val[0] => true, val[1] => true, val[3] => false }
|
508
372
|
|
509
373
|
result
|
510
374
|
end
|
511
375
|
|
512
|
-
def
|
376
|
+
def _reduce_33(val, _values, result)
|
513
377
|
@options_stack << result = { val[0] => true, val[1] => true, val[2] => true }
|
514
378
|
|
515
379
|
result
|
516
380
|
end
|
517
381
|
|
518
|
-
def
|
382
|
+
def _reduce_34(val, _values, result)
|
519
383
|
result = :multiline
|
520
384
|
result
|
521
385
|
end
|
522
386
|
|
523
|
-
def
|
387
|
+
def _reduce_35(val, _values, result)
|
524
388
|
result = :ignorecase
|
525
389
|
result
|
526
390
|
end
|
527
391
|
|
528
|
-
def
|
392
|
+
def _reduce_36(val, _values, result)
|
529
393
|
result = :extended
|
530
394
|
result
|
531
395
|
end
|
@@ -538,4 +402,4 @@ end
|
|
538
402
|
end # module Reginald
|
539
403
|
|
540
404
|
require 'reginald/tokenizer'
|
541
|
-
|
405
|
+
|