regexp_parser 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -1
- data/Gemfile +2 -1
- data/LICENSE +1 -1
- data/README.md +16 -6
- data/Rakefile +1 -59
- data/lib/regexp_parser/expression/classes/escape_sequence.rb +12 -7
- data/lib/regexp_parser/expression/methods/strfregexp.rb +1 -1
- data/lib/regexp_parser/lexer.rb +1 -1
- data/lib/regexp_parser/scanner/properties/long.csv +622 -0
- data/lib/regexp_parser/scanner/properties/short.csv +246 -0
- data/lib/regexp_parser/scanner/scanner.rl +6 -4
- data/lib/regexp_parser/scanner.rb +126 -124
- data/lib/regexp_parser/syntax/any.rb +2 -5
- data/lib/regexp_parser/syntax/base.rb +91 -66
- data/lib/regexp_parser/syntax/token/backreference.rb +7 -2
- data/lib/regexp_parser/syntax/token/quantifier.rb +4 -4
- data/lib/regexp_parser/syntax/token/unicode_property.rb +26 -5
- data/lib/regexp_parser/syntax/version_lookup.rb +20 -29
- data/lib/regexp_parser/syntax/versions/1.8.6.rb +13 -20
- data/lib/regexp_parser/syntax/versions/1.9.1.rb +10 -17
- data/lib/regexp_parser/syntax/versions/1.9.3.rb +3 -10
- data/lib/regexp_parser/syntax/versions/2.0.0.rb +8 -15
- data/lib/regexp_parser/syntax/versions/2.2.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.3.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.4.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.4.1.rb +2 -8
- data/lib/regexp_parser/syntax/versions/2.5.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.6.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.6.2.rb +3 -9
- data/lib/regexp_parser/syntax/versions/2.6.3.rb +3 -9
- data/lib/regexp_parser/syntax/versions/3.1.0.rb +3 -9
- data/lib/regexp_parser/syntax/versions/3.2.0.rb +4 -0
- data/lib/regexp_parser/syntax/versions.rb +1 -1
- data/lib/regexp_parser/version.rb +1 -1
- data/regexp_parser.gemspec +20 -22
- metadata +12 -143
- data/lib/regexp_parser/scanner/properties/long.yml +0 -607
- data/lib/regexp_parser/scanner/properties/short.yml +0 -245
- data/spec/expression/base_spec.rb +0 -104
- data/spec/expression/clone_spec.rb +0 -152
- data/spec/expression/conditional_spec.rb +0 -89
- data/spec/expression/free_space_spec.rb +0 -27
- data/spec/expression/methods/match_length_spec.rb +0 -161
- data/spec/expression/methods/match_spec.rb +0 -25
- data/spec/expression/methods/strfregexp_spec.rb +0 -224
- data/spec/expression/methods/tests_spec.rb +0 -99
- data/spec/expression/methods/traverse_spec.rb +0 -161
- data/spec/expression/options_spec.rb +0 -128
- data/spec/expression/subexpression_spec.rb +0 -50
- data/spec/expression/to_h_spec.rb +0 -26
- data/spec/expression/to_s_spec.rb +0 -108
- data/spec/lexer/all_spec.rb +0 -22
- data/spec/lexer/conditionals_spec.rb +0 -53
- data/spec/lexer/delimiters_spec.rb +0 -68
- data/spec/lexer/escapes_spec.rb +0 -14
- data/spec/lexer/keep_spec.rb +0 -10
- data/spec/lexer/literals_spec.rb +0 -64
- data/spec/lexer/nesting_spec.rb +0 -99
- data/spec/lexer/refcalls_spec.rb +0 -60
- data/spec/parser/all_spec.rb +0 -43
- data/spec/parser/alternation_spec.rb +0 -88
- data/spec/parser/anchors_spec.rb +0 -17
- data/spec/parser/conditionals_spec.rb +0 -179
- data/spec/parser/errors_spec.rb +0 -30
- data/spec/parser/escapes_spec.rb +0 -133
- data/spec/parser/free_space_spec.rb +0 -130
- data/spec/parser/groups_spec.rb +0 -108
- data/spec/parser/keep_spec.rb +0 -6
- data/spec/parser/options_spec.rb +0 -28
- data/spec/parser/posix_classes_spec.rb +0 -8
- data/spec/parser/properties_spec.rb +0 -117
- data/spec/parser/quantifiers_spec.rb +0 -68
- data/spec/parser/refcalls_spec.rb +0 -117
- data/spec/parser/set/intersections_spec.rb +0 -127
- data/spec/parser/set/ranges_spec.rb +0 -121
- data/spec/parser/sets_spec.rb +0 -178
- data/spec/parser/types_spec.rb +0 -18
- data/spec/scanner/all_spec.rb +0 -18
- data/spec/scanner/anchors_spec.rb +0 -21
- data/spec/scanner/conditionals_spec.rb +0 -128
- data/spec/scanner/delimiters_spec.rb +0 -52
- data/spec/scanner/errors_spec.rb +0 -67
- data/spec/scanner/escapes_spec.rb +0 -73
- data/spec/scanner/free_space_spec.rb +0 -165
- data/spec/scanner/groups_spec.rb +0 -61
- data/spec/scanner/keep_spec.rb +0 -10
- data/spec/scanner/literals_spec.rb +0 -39
- data/spec/scanner/meta_spec.rb +0 -18
- data/spec/scanner/options_spec.rb +0 -36
- data/spec/scanner/properties_spec.rb +0 -64
- data/spec/scanner/quantifiers_spec.rb +0 -25
- data/spec/scanner/refcalls_spec.rb +0 -55
- data/spec/scanner/sets_spec.rb +0 -151
- data/spec/scanner/types_spec.rb +0 -14
- data/spec/spec_helper.rb +0 -28
- data/spec/support/capturing_stderr.rb +0 -9
- data/spec/support/shared_examples.rb +0 -77
- data/spec/syntax/syntax_spec.rb +0 -48
- data/spec/syntax/syntax_token_map_spec.rb +0 -23
- data/spec/syntax/versions/1.8.6_spec.rb +0 -17
- data/spec/syntax/versions/1.9.1_spec.rb +0 -10
- data/spec/syntax/versions/1.9.3_spec.rb +0 -9
- data/spec/syntax/versions/2.0.0_spec.rb +0 -13
- data/spec/syntax/versions/2.2.0_spec.rb +0 -9
- data/spec/syntax/versions/aliases_spec.rb +0 -38
- data/spec/token/token_spec.rb +0 -85
@@ -3,11 +3,8 @@ module Regexp::Syntax
|
|
3
3
|
# is useful during development, testing, and should be useful for some types
|
4
4
|
# of transformations as well.
|
5
5
|
class Any < Base
|
6
|
-
|
7
|
-
@implements = { :* => %i[*] }
|
8
|
-
end
|
6
|
+
implements :*, [:*]
|
9
7
|
|
10
|
-
def implements?(_type, _token) true end
|
11
|
-
def implements!(_type, _token) true end
|
8
|
+
def self.implements?(_type, _token) true end
|
12
9
|
end
|
13
10
|
end
|
@@ -1,9 +1,7 @@
|
|
1
|
-
require 'set'
|
2
|
-
|
3
1
|
module Regexp::Syntax
|
4
2
|
class NotImplementedError < Regexp::Syntax::SyntaxError
|
5
3
|
def initialize(syntax, type, token)
|
6
|
-
super "#{syntax
|
4
|
+
super "#{syntax} does not implement: [#{type}:#{token}]"
|
7
5
|
end
|
8
6
|
end
|
9
7
|
|
@@ -11,85 +9,112 @@ module Regexp::Syntax
|
|
11
9
|
class Base
|
12
10
|
include Regexp::Syntax::Token
|
13
11
|
|
14
|
-
|
15
|
-
|
12
|
+
class << self
|
13
|
+
attr_accessor :features
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
# automatically inherit features through the syntax class hierarchy
|
16
|
+
def inherited(subclass)
|
17
|
+
super
|
18
|
+
subclass.features = features.to_h.map { |k, v| [k, v.dup] }.to_h
|
19
|
+
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
def implements(type, tokens)
|
22
|
+
(features[type] ||= []).concat(tokens)
|
23
|
+
added_features[type] = tokens
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def excludes(type, tokens)
|
27
|
+
tokens.each { |tok| features[type].delete(tok) }
|
28
|
+
removed_features[type] = tokens
|
29
|
+
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
def implements?(type, token)
|
32
|
+
implementations(type).include?(token)
|
33
|
+
end
|
34
|
+
alias :check? :implements?
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
def implementations(type)
|
37
|
+
features[type] || []
|
38
|
+
end
|
36
39
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
def implements!(type, token)
|
41
|
+
raise NotImplementedError.new(self, type, token) unless
|
42
|
+
implements?(type, token)
|
43
|
+
end
|
44
|
+
alias :check! :implements!
|
41
45
|
|
42
|
-
|
43
|
-
|
44
|
-
implements?(type, token)
|
45
|
-
end
|
46
|
-
alias :check! :implements!
|
47
|
-
|
48
|
-
def normalize(type, token)
|
49
|
-
case type
|
50
|
-
when :group
|
51
|
-
normalize_group(type, token)
|
52
|
-
when :backref
|
53
|
-
normalize_backref(type, token)
|
54
|
-
else
|
55
|
-
[type, token]
|
46
|
+
def added_features
|
47
|
+
@added_features ||= {}
|
56
48
|
end
|
57
|
-
end
|
58
49
|
|
59
|
-
|
60
|
-
|
61
|
-
when :named_ab, :named_sq
|
62
|
-
%i[group named]
|
63
|
-
else
|
64
|
-
[type, token]
|
50
|
+
def removed_features
|
51
|
+
@removed_features ||= {}
|
65
52
|
end
|
53
|
+
|
54
|
+
def normalize(type, token)
|
55
|
+
case type
|
56
|
+
when :group
|
57
|
+
normalize_group(type, token)
|
58
|
+
when :backref
|
59
|
+
normalize_backref(type, token)
|
60
|
+
else
|
61
|
+
[type, token]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def normalize_group(type, token)
|
66
|
+
case token
|
67
|
+
when :named_ab, :named_sq
|
68
|
+
%i[group named]
|
69
|
+
else
|
70
|
+
[type, token]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def normalize_backref(type, token)
|
75
|
+
case token
|
76
|
+
when :name_ref_ab, :name_ref_sq
|
77
|
+
%i[backref name_ref]
|
78
|
+
when :name_call_ab, :name_call_sq
|
79
|
+
%i[backref name_call]
|
80
|
+
when :name_recursion_ref_ab, :name_recursion_ref_sq
|
81
|
+
%i[backref name_recursion_ref]
|
82
|
+
when :number_ref_ab, :number_ref_sq
|
83
|
+
%i[backref number_ref]
|
84
|
+
when :number_call_ab, :number_call_sq
|
85
|
+
%i[backref number_call]
|
86
|
+
when :number_rel_ref_ab, :number_rel_ref_sq
|
87
|
+
%i[backref number_rel_ref]
|
88
|
+
when :number_rel_call_ab, :number_rel_call_sq
|
89
|
+
%i[backref number_rel_call]
|
90
|
+
when :number_recursion_ref_ab, :number_recursion_ref_sq
|
91
|
+
%i[backref number_recursion_ref]
|
92
|
+
else
|
93
|
+
[type, token]
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# TODO: drop this backwards compatibility code in v3.0.0, do `private :new`
|
99
|
+
def initialize
|
100
|
+
warn 'Using instances of Regexp::Parser::Syntax is deprecated ' \
|
101
|
+
"and will no longer be supported in v3.0.0."
|
66
102
|
end
|
67
103
|
|
68
|
-
def
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
when :name_recursion_ref_ab, :name_recursion_ref_sq
|
75
|
-
%i[backref name_recursion_ref]
|
76
|
-
when :number_ref_ab, :number_ref_sq
|
77
|
-
%i[backref number_ref]
|
78
|
-
when :number_call_ab, :number_call_sq
|
79
|
-
%i[backref number_call]
|
80
|
-
when :number_rel_ref_ab, :number_rel_ref_sq
|
81
|
-
%i[backref number_rel_ref]
|
82
|
-
when :number_rel_call_ab, :number_rel_call_sq
|
83
|
-
%i[backref number_rel_call]
|
84
|
-
when :number_recursion_ref_ab, :number_recursion_ref_sq
|
85
|
-
%i[backref number_recursion_ref]
|
104
|
+
def method_missing(name, *args)
|
105
|
+
if self.class.respond_to?(name)
|
106
|
+
warn 'Using instances of Regexp::Parser::Syntax is deprecated ' \
|
107
|
+
"and will no longer be supported in v3.0.0. Please call "\
|
108
|
+
"methods on the class directly, e.g.: #{self.class}.#{name}"
|
109
|
+
self.class.send(name, *args)
|
86
110
|
else
|
87
|
-
|
111
|
+
super
|
88
112
|
end
|
89
113
|
end
|
90
114
|
|
91
|
-
def
|
92
|
-
|
115
|
+
def respond_to_missing?(name, include_private = false)
|
116
|
+
self.class.respond_to?(name) || super
|
93
117
|
end
|
118
|
+
# end of backwards compatibility code
|
94
119
|
end
|
95
120
|
end
|
@@ -2,12 +2,17 @@ module Regexp::Syntax
|
|
2
2
|
module Token
|
3
3
|
module Backreference
|
4
4
|
Plain = %i[number]
|
5
|
-
|
5
|
+
NumberRef = %i[number_ref number_rel_ref]
|
6
|
+
Number = Plain + NumberRef
|
6
7
|
Name = %i[name_ref]
|
7
8
|
|
8
9
|
RecursionLevel = %i[name_recursion_ref number_recursion_ref]
|
9
10
|
|
10
|
-
|
11
|
+
V1_8_6 = Plain
|
12
|
+
|
13
|
+
V1_9_1 = Name + NumberRef + RecursionLevel
|
14
|
+
|
15
|
+
All = V1_8_6 + V1_9_1
|
11
16
|
Type = :backref
|
12
17
|
end
|
13
18
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Regexp::Syntax
|
2
2
|
module Token
|
3
3
|
module Quantifier
|
4
|
-
Greedy
|
4
|
+
Greedy = %i[
|
5
5
|
zero_or_one
|
6
6
|
zero_or_more
|
7
7
|
one_or_more
|
@@ -13,7 +13,7 @@ module Regexp::Syntax
|
|
13
13
|
one_or_more_reluctant
|
14
14
|
]
|
15
15
|
|
16
|
-
Possessive
|
16
|
+
Possessive = %i[
|
17
17
|
zero_or_one_possessive
|
18
18
|
zero_or_more_possessive
|
19
19
|
one_or_more_possessive
|
@@ -23,9 +23,9 @@ module Regexp::Syntax
|
|
23
23
|
IntervalReluctant = %i[interval_reluctant]
|
24
24
|
IntervalPossessive = %i[interval_possessive]
|
25
25
|
|
26
|
-
IntervalAll = Interval + IntervalReluctant +
|
27
|
-
IntervalPossessive
|
26
|
+
IntervalAll = Interval + IntervalReluctant + IntervalPossessive
|
28
27
|
|
28
|
+
V1_8_6 = Greedy + Reluctant + Interval + IntervalReluctant
|
29
29
|
All = Greedy + Reluctant + Possessive + IntervalAll
|
30
30
|
Type = :quantifier
|
31
31
|
end
|
@@ -59,6 +59,8 @@ module Regexp::Syntax
|
|
59
59
|
|
60
60
|
Age_V3_1_0 = %i[age=13.0]
|
61
61
|
|
62
|
+
Age_V3_2_0 = %i[age=14.0]
|
63
|
+
|
62
64
|
Age = all[:Age_V]
|
63
65
|
|
64
66
|
Derived_V1_9_0 = %i[
|
@@ -304,14 +306,9 @@ module Regexp::Syntax
|
|
304
306
|
]
|
305
307
|
|
306
308
|
Script_V2_6_2 = %i[
|
307
|
-
egyptian_hieroglyph_format_controls
|
308
309
|
elymaic
|
309
310
|
nandinagari
|
310
311
|
nyiakeng_puachue_hmong
|
311
|
-
ottoman_siyaq_numbers
|
312
|
-
small_kana_extension
|
313
|
-
symbols_and_pictographs_extended_a
|
314
|
-
tamil_supplement
|
315
312
|
wancho
|
316
313
|
]
|
317
314
|
|
@@ -322,6 +319,14 @@ module Regexp::Syntax
|
|
322
319
|
yezidi
|
323
320
|
]
|
324
321
|
|
322
|
+
Script_V3_2_0 = %i[
|
323
|
+
cypro_minoan
|
324
|
+
old_uyghur
|
325
|
+
tangsa
|
326
|
+
toto
|
327
|
+
vithkuqi
|
328
|
+
]
|
329
|
+
|
325
330
|
Script = all[:Script_V]
|
326
331
|
|
327
332
|
UnicodeBlock_V1_9_0 = %i[
|
@@ -660,6 +665,21 @@ module Regexp::Syntax
|
|
660
665
|
in_yezidi
|
661
666
|
]
|
662
667
|
|
668
|
+
UnicodeBlock_V3_2_0 = %i[
|
669
|
+
in_arabic_extended_b
|
670
|
+
in_cypro_minoan
|
671
|
+
in_ethiopic_extended_b
|
672
|
+
in_kana_extended_b
|
673
|
+
in_latin_extended_f
|
674
|
+
in_latin_extended_g
|
675
|
+
in_old_uyghur
|
676
|
+
in_tangsa
|
677
|
+
in_toto
|
678
|
+
in_unified_canadian_aboriginal_syllabics_extended_a
|
679
|
+
in_vithkuqi
|
680
|
+
in_znamenny_musical_notation
|
681
|
+
]
|
682
|
+
|
663
683
|
UnicodeBlock = all[:UnicodeBlock_V]
|
664
684
|
|
665
685
|
Emoji_V2_5_0 = %i[
|
@@ -683,6 +703,7 @@ module Regexp::Syntax
|
|
683
703
|
V2_6_2 = all[:V2_6_2]
|
684
704
|
V2_6_3 = all[:V2_6_3]
|
685
705
|
V3_1_0 = all[:V3_1_0]
|
706
|
+
V3_2_0 = all[:V3_2_0]
|
686
707
|
|
687
708
|
All = all[/^V\d+_\d+_\d+$/]
|
688
709
|
|
@@ -17,29 +17,31 @@ module Regexp::Syntax
|
|
17
17
|
|
18
18
|
module_function
|
19
19
|
|
20
|
-
#
|
21
|
-
#
|
22
|
-
|
20
|
+
# Returns the syntax specification class for the given syntax
|
21
|
+
# version name. The special names 'any' and '*' return Syntax::Any.
|
22
|
+
def for(name)
|
23
|
+
(@alias_map ||= {})[name] ||= version_class(name)
|
24
|
+
end
|
25
|
+
|
23
26
|
def new(name)
|
24
|
-
|
25
|
-
|
27
|
+
warn 'Regexp::Syntax.new is deprecated in favor of Regexp::Syntax.for. '\
|
28
|
+
'It does not return distinct instances and will be removed in v3.0.0.'
|
29
|
+
self.for(name)
|
26
30
|
end
|
27
31
|
|
28
32
|
def supported?(name)
|
29
|
-
name =~ VERSION_REGEXP &&
|
30
|
-
comparable_version(name) >= comparable_version('1.8.6')
|
33
|
+
name =~ VERSION_REGEXP && comparable(name) >= comparable('1.8.6')
|
31
34
|
end
|
32
35
|
|
33
36
|
def version_class(version)
|
37
|
+
return Regexp::Syntax::Any if ['*', 'any'].include?(version.to_s)
|
38
|
+
|
34
39
|
version =~ VERSION_REGEXP || raise(InvalidVersionNameError, version)
|
35
|
-
|
40
|
+
warn_if_future_version(version)
|
41
|
+
version_const_name = "V#{version.to_s.scan(/\d+/).join('_')}"
|
36
42
|
const_get(version_const_name) || raise(UnknownSyntaxNameError, version)
|
37
43
|
end
|
38
44
|
|
39
|
-
def version_const_name(version_string)
|
40
|
-
"V#{version_string.to_s.scan(/\d+/).join('_')}"
|
41
|
-
end
|
42
|
-
|
43
45
|
def const_missing(const_name)
|
44
46
|
if const_name =~ VERSION_CONST_REGEXP
|
45
47
|
return fallback_version_class(const_name)
|
@@ -48,35 +50,24 @@ module Regexp::Syntax
|
|
48
50
|
end
|
49
51
|
|
50
52
|
def fallback_version_class(version)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
next_lower_version = sorted_versions[version_index - 1]
|
56
|
-
inherit_from_version(next_lower_version, version)
|
57
|
-
end
|
58
|
-
|
59
|
-
def inherit_from_version(parent_version, new_version)
|
60
|
-
new_const = version_const_name(new_version)
|
61
|
-
parent = const_get(version_const_name(parent_version))
|
62
|
-
const_defined?(new_const) || const_set(new_const, Class.new(parent))
|
63
|
-
warn_if_future_version(new_const)
|
64
|
-
const_get(new_const)
|
53
|
+
sorted = (specified_versions + [version]).sort_by { |ver| comparable(ver) }
|
54
|
+
index = sorted.index(version)
|
55
|
+
index > 0 && const_get(sorted[index - 1])
|
65
56
|
end
|
66
57
|
|
67
58
|
def specified_versions
|
68
59
|
constants.select { |const_name| const_name =~ VERSION_CONST_REGEXP }
|
69
60
|
end
|
70
61
|
|
71
|
-
def
|
62
|
+
def comparable(name)
|
72
63
|
# add .99 to treat versions without a patch value as latest patch version
|
73
64
|
Gem::Version.new((name.to_s.scan(/\d+/) << 99).join('.'))
|
74
65
|
end
|
75
66
|
|
76
67
|
def warn_if_future_version(const_name)
|
77
|
-
return if
|
68
|
+
return if comparable(const_name) < comparable('4.0.0')
|
78
69
|
|
79
70
|
warn('This library has only been tested up to Ruby 3.x, '\
|
80
|
-
"but you are running with #{
|
71
|
+
"but you are running with #{const_name}")
|
81
72
|
end
|
82
73
|
end
|
@@ -1,21 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
implements :escape,
|
15
|
-
Escape::Basic + Escape::ASCII + Escape::Meta + Escape::Control
|
16
|
-
implements :quantifier,
|
17
|
-
Quantifier::Greedy + Quantifier::Reluctant +
|
18
|
-
Quantifier::Interval + Quantifier::IntervalReluctant
|
19
|
-
end
|
20
|
-
end
|
1
|
+
class Regexp::Syntax::V1_8_6 < Regexp::Syntax::Base
|
2
|
+
implements :anchor, Anchor::All
|
3
|
+
implements :assertion, Assertion::Lookahead
|
4
|
+
implements :backref, Backreference::V1_8_6
|
5
|
+
implements :escape, Escape::Basic + Escape::ASCII + Escape::Meta + Escape::Control
|
6
|
+
implements :free_space, FreeSpace::All
|
7
|
+
implements :group, Group::V1_8_6
|
8
|
+
implements :literal, Literal::All
|
9
|
+
implements :meta, Meta::Extended
|
10
|
+
implements :posixclass, PosixClass::Standard
|
11
|
+
implements :quantifier, Quantifier::V1_8_6
|
12
|
+
implements :set, CharacterSet::All
|
13
|
+
implements :type, CharacterType::Extended
|
21
14
|
end
|
@@ -1,18 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
implements :type, CharacterType::Hex
|
12
|
-
implements :property, UnicodeProperty::V1_9_0
|
13
|
-
implements :nonproperty, UnicodeProperty::V1_9_0
|
14
|
-
implements :quantifier,
|
15
|
-
Quantifier::Possessive + Quantifier::IntervalPossessive
|
16
|
-
end
|
17
|
-
end
|
1
|
+
class Regexp::Syntax::V1_9_1 < Regexp::Syntax::V1_8_6
|
2
|
+
implements :assertion, Assertion::Lookbehind
|
3
|
+
implements :backref, Backreference::V1_9_1 + SubexpressionCall::All
|
4
|
+
implements :escape, Escape::Unicode + Escape::Hex + Escape::Octal
|
5
|
+
implements :posixclass, PosixClass::Extensions
|
6
|
+
implements :nonposixclass, PosixClass::All
|
7
|
+
implements :property, UnicodeProperty::V1_9_0
|
8
|
+
implements :nonproperty, UnicodeProperty::V1_9_0
|
9
|
+
implements :quantifier, Quantifier::Possessive + Quantifier::IntervalPossessive
|
10
|
+
implements :type, CharacterType::Hex
|
18
11
|
end
|
@@ -1,11 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
# these were added with update of Oniguruma to Unicode 6.0
|
7
|
-
implements :property, UnicodeProperty::V1_9_3
|
8
|
-
implements :nonproperty, UnicodeProperty::V1_9_3
|
9
|
-
end
|
10
|
-
end
|
1
|
+
class Regexp::Syntax::V1_9_3 < Regexp::Syntax::V1_9_1
|
2
|
+
implements :property, UnicodeProperty::V1_9_3
|
3
|
+
implements :nonproperty, UnicodeProperty::V1_9_3
|
11
4
|
end
|
@@ -1,17 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
class Regexp::Syntax::V2_0_0 < Regexp::Syntax::V1_9_3
|
2
|
+
implements :keep, Keep::All
|
3
|
+
implements :conditional, Conditional::All
|
4
|
+
implements :property, UnicodeProperty::V2_0_0
|
5
|
+
implements :nonproperty, UnicodeProperty::V2_0_0
|
6
|
+
implements :type, CharacterType::Clustered
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
implements :property, UnicodeProperty::V2_0_0
|
10
|
-
implements :nonproperty, UnicodeProperty::V2_0_0
|
11
|
-
implements :type, CharacterType::Clustered
|
12
|
-
|
13
|
-
excludes :property, :newline
|
14
|
-
excludes :nonproperty, :newline
|
15
|
-
end
|
16
|
-
end
|
8
|
+
excludes :property, %i[newline]
|
9
|
+
excludes :nonproperty, %i[newline]
|
17
10
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_2_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_2_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_2_0 < Regexp::Syntax::V2_0_0
|
2
|
+
implements :property, UnicodeProperty::V2_2_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_2_0
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_3_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_3_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_3_0 < Regexp::Syntax::V2_2_0
|
2
|
+
implements :property, UnicodeProperty::V2_3_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_3_0
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_4_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_4_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_4_0 < Regexp::Syntax::V2_3_0
|
2
|
+
implements :property, UnicodeProperty::V2_4_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_4_0
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_5_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_5_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_5_0 < Regexp::Syntax::V2_4_1
|
2
|
+
implements :property, UnicodeProperty::V2_5_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_5_0
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_6_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_6_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_6_0 < Regexp::Syntax::V2_5_0
|
2
|
+
implements :property, UnicodeProperty::V2_6_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_6_0
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_6_2
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_6_2
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_6_2 < Regexp::Syntax::V2_6_0
|
2
|
+
implements :property, UnicodeProperty::V2_6_2
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_6_2
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V2_6_3
|
7
|
-
implements :nonproperty, UnicodeProperty::V2_6_3
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V2_6_3 < Regexp::Syntax::V2_6_2
|
2
|
+
implements :property, UnicodeProperty::V2_6_3
|
3
|
+
implements :nonproperty, UnicodeProperty::V2_6_3
|
10
4
|
end
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
super
|
5
|
-
|
6
|
-
implements :property, UnicodeProperty::V3_1_0
|
7
|
-
implements :nonproperty, UnicodeProperty::V3_1_0
|
8
|
-
end
|
9
|
-
end
|
1
|
+
class Regexp::Syntax::V3_1_0 < Regexp::Syntax::V2_6_3
|
2
|
+
implements :property, UnicodeProperty::V3_1_0
|
3
|
+
implements :nonproperty, UnicodeProperty::V3_1_0
|
10
4
|
end
|