regexp_parser 0.4.13 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +15 -0
- data/lib/regexp_parser/expression.rb +43 -51
- data/lib/regexp_parser/expression/classes/alternation.rb +6 -7
- data/lib/regexp_parser/expression/classes/character_class.rb +11 -0
- data/lib/regexp_parser/expression/classes/conditional.rb +10 -18
- data/lib/regexp_parser/expression/classes/free_space.rb +1 -1
- data/lib/regexp_parser/expression/classes/group.rb +9 -21
- data/lib/regexp_parser/expression/classes/property.rb +2 -2
- data/lib/regexp_parser/expression/classes/set.rb +1 -12
- data/lib/regexp_parser/expression/methods/traverse.rb +1 -1
- data/lib/regexp_parser/expression/quantifier.rb +9 -9
- data/lib/regexp_parser/expression/sequence.rb +5 -4
- data/lib/regexp_parser/expression/subexpression.rb +16 -59
- data/lib/regexp_parser/lexer.rb +31 -27
- data/lib/regexp_parser/parser.rb +179 -179
- data/lib/regexp_parser/scanner.rb +172 -166
- data/lib/regexp_parser/scanner/scanner.rl +44 -38
- data/lib/regexp_parser/syntax.rb +2 -53
- data/lib/regexp_parser/syntax/base.rb +13 -24
- data/lib/regexp_parser/syntax/tokens/character_class.rb +16 -0
- data/lib/regexp_parser/syntax/tokens/unicode_property.rb +26 -26
- data/lib/regexp_parser/syntax/version_lookup.rb +82 -0
- data/lib/regexp_parser/syntax/versions.rb +1 -5
- data/lib/regexp_parser/syntax/versions/1.8.6.rb +30 -0
- data/lib/regexp_parser/syntax/versions/1.9.1.rb +36 -0
- data/lib/regexp_parser/syntax/versions/1.9.3.rb +11 -0
- data/lib/regexp_parser/syntax/versions/2.0.0.rb +20 -0
- data/lib/regexp_parser/syntax/versions/2.2.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.3.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.1.rb +9 -0
- data/lib/regexp_parser/syntax/versions/2.5.0.rb +10 -0
- data/lib/regexp_parser/token.rb +6 -29
- data/lib/regexp_parser/version.rb +1 -1
- data/test/expression/test_strfregexp.rb +7 -0
- data/test/expression/test_to_h.rb +6 -0
- data/test/parser/test_properties.rb +12 -4
- data/test/support/warning_extractor.rb +3 -1
- data/test/syntax/test_all.rb +1 -1
- data/test/syntax/test_syntax.rb +5 -9
- data/test/syntax/{ruby → versions}/test_1.8.rb +14 -14
- data/test/syntax/{ruby → versions}/test_1.9.1.rb +7 -8
- data/test/syntax/{ruby → versions}/test_1.9.3.rb +7 -7
- data/test/syntax/versions/test_2.0.0.rb +37 -0
- data/test/syntax/{ruby → versions}/test_2.2.0.rb +7 -7
- data/test/syntax/versions/test_aliases.rb +129 -0
- data/test/syntax/{ruby → versions}/test_all.rb +1 -1
- metadata +73 -113
- data/lib/regexp_parser/syntax/ruby/1.8.6.rb +0 -37
- data/lib/regexp_parser/syntax/ruby/1.8.7.rb +0 -14
- data/lib/regexp_parser/syntax/ruby/1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/1.9.1.rb +0 -45
- data/lib/regexp_parser/syntax/ruby/1.9.2.rb +0 -9
- data/lib/regexp_parser/syntax/ruby/1.9.3.rb +0 -19
- data/lib/regexp_parser/syntax/ruby/1.9.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.0.0.rb +0 -23
- data/lib/regexp_parser/syntax/ruby/2.0.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.1.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.2.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.2.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.3.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.3.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.4.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.4.1.rb +0 -15
- data/lib/regexp_parser/syntax/ruby/2.4.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.5.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.5.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.5.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.6.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.6.rb +0 -8
- data/test/syntax/ruby/test_2.0.0.rb +0 -32
- data/test/syntax/ruby/test_files.rb +0 -353
@@ -143,8 +143,8 @@
|
|
143
143
|
}
|
144
144
|
|
145
145
|
# group (nesting) and set open/close actions
|
146
|
-
action group_opened {
|
147
|
-
action group_closed {
|
146
|
+
action group_opened { self.group_depth = group_depth + 1; in_group = true }
|
147
|
+
action group_closed { self.group_depth = group_depth - 1; in_group = group_depth > 0 ? true : false }
|
148
148
|
|
149
149
|
# Character set scanner, continues consuming characters until it meets the
|
150
150
|
# closing bracket of the set.
|
@@ -179,7 +179,7 @@
|
|
179
179
|
|
180
180
|
'^' {
|
181
181
|
text = text(data, ts, te).first
|
182
|
-
if
|
182
|
+
if tokens.last[1] == :open
|
183
183
|
emit(set_type, :negate, text, ts, te)
|
184
184
|
else
|
185
185
|
emit(set_type, :member, text, ts, te)
|
@@ -449,7 +449,7 @@
|
|
449
449
|
|
450
450
|
alternation {
|
451
451
|
if in_conditional and conditional_stack.length > 0 and
|
452
|
-
conditional_stack.last[1] ==
|
452
|
+
conditional_stack.last[1] == group_depth
|
453
453
|
emit(:conditional, :separator, *text(data, ts, te))
|
454
454
|
else
|
455
455
|
emit(:meta, :alternation, *text(data, ts, te))
|
@@ -528,7 +528,7 @@
|
|
528
528
|
|
529
529
|
in_conditional = true unless in_conditional
|
530
530
|
conditional_depth += 1
|
531
|
-
conditional_stack << [conditional_depth,
|
531
|
+
conditional_stack << [conditional_depth, group_depth]
|
532
532
|
|
533
533
|
emit(:conditional, :open, text[0..-2], ts, te-1)
|
534
534
|
emit(:conditional, :condition_open, '(', te-1, te)
|
@@ -612,7 +612,7 @@
|
|
612
612
|
|
613
613
|
group_close @group_closed {
|
614
614
|
if in_conditional and conditional_stack.last and
|
615
|
-
conditional_stack.last[1] == (
|
615
|
+
conditional_stack.last[1] == (group_depth + 1)
|
616
616
|
|
617
617
|
emit(:conditional, :close, *text(data, ts, te))
|
618
618
|
conditional_stack.pop
|
@@ -621,11 +621,11 @@
|
|
621
621
|
in_conditional = false
|
622
622
|
end
|
623
623
|
else
|
624
|
-
if
|
625
|
-
|
626
|
-
|
624
|
+
if spacing_stack.length > 1 and
|
625
|
+
spacing_stack.last[:depth] == (group_depth + 1)
|
626
|
+
spacing_stack.pop
|
627
627
|
|
628
|
-
|
628
|
+
self.free_spacing = spacing_stack.last[:free_spacing]
|
629
629
|
end
|
630
630
|
|
631
631
|
emit(:group, :close, *text(data, ts, te))
|
@@ -741,7 +741,7 @@
|
|
741
741
|
};
|
742
742
|
|
743
743
|
comment {
|
744
|
-
if
|
744
|
+
if free_spacing
|
745
745
|
emit(:free_space, :comment, *text(data, ts, te))
|
746
746
|
else
|
747
747
|
append_literal(data, ts, te)
|
@@ -749,7 +749,7 @@
|
|
749
749
|
};
|
750
750
|
|
751
751
|
space+ {
|
752
|
-
if
|
752
|
+
if free_spacing
|
753
753
|
emit(:free_space, :whitespace, *text(data, ts, te))
|
754
754
|
else
|
755
755
|
append_literal(data, ts, te)
|
@@ -837,27 +837,29 @@ class Regexp::Scanner
|
|
837
837
|
end
|
838
838
|
|
839
839
|
def scan(input_object, &block)
|
840
|
-
|
840
|
+
self.literal = nil
|
841
|
+
stack = []
|
841
842
|
|
842
843
|
if input_object.is_a?(Regexp)
|
843
|
-
input
|
844
|
-
|
844
|
+
input = input_object.source
|
845
|
+
self.free_spacing = (input_object.options & Regexp::EXTENDED != 0)
|
845
846
|
else
|
846
|
-
input
|
847
|
-
|
847
|
+
input = input_object
|
848
|
+
self.free_spacing = false
|
848
849
|
end
|
849
850
|
|
850
851
|
|
851
852
|
data = input.unpack("c*") if input.is_a?(String)
|
852
853
|
eof = data.length
|
853
854
|
|
854
|
-
|
855
|
-
|
855
|
+
self.tokens = []
|
856
|
+
self.block = block_given? ? block : nil
|
856
857
|
|
857
|
-
|
858
|
-
|
858
|
+
self.in_group = false
|
859
|
+
self.group_depth = 0
|
860
|
+
self.spacing_stack = [{:free_spacing => free_spacing, :depth => 0}]
|
859
861
|
|
860
|
-
in_set,
|
862
|
+
in_set, set_depth, set_type = false, 0, :set
|
861
863
|
in_conditional, conditional_depth, conditional_stack = false, 0, []
|
862
864
|
|
863
865
|
%% write data;
|
@@ -870,31 +872,35 @@ class Regexp::Scanner
|
|
870
872
|
end
|
871
873
|
|
872
874
|
raise PrematureEndError.new("(missing group closing paranthesis) "+
|
873
|
-
"[#{
|
875
|
+
"[#{in_group}:#{group_depth}]") if in_group
|
874
876
|
raise PrematureEndError.new("(missing set closing bracket) "+
|
875
877
|
"[#{in_set}:#{set_depth}]") if in_set
|
876
878
|
|
877
879
|
# when the entire expression is a literal run
|
878
|
-
emit_literal if
|
880
|
+
emit_literal if literal
|
879
881
|
|
880
|
-
|
882
|
+
tokens
|
881
883
|
end
|
882
884
|
|
883
885
|
# Emits an array with the details of the scanned pattern
|
884
886
|
def emit(type, token, text, ts, te)
|
885
887
|
#puts "EMIT: type: #{type}, token: #{token}, text: #{text}, ts: #{ts}, te: #{te}"
|
886
888
|
|
887
|
-
emit_literal if
|
889
|
+
emit_literal if literal
|
888
890
|
|
889
|
-
if
|
890
|
-
|
891
|
+
if block
|
892
|
+
block.call type, token, text, ts, te
|
891
893
|
end
|
892
894
|
|
893
|
-
|
895
|
+
tokens << [type, token, text, ts, te]
|
894
896
|
end
|
895
897
|
|
896
898
|
private
|
897
899
|
|
900
|
+
attr_accessor :tokens, :literal, :block,
|
901
|
+
:in_group, :group_depth,
|
902
|
+
:free_spacing, :spacing_stack
|
903
|
+
|
898
904
|
# Ragel's regex-based scan of the group options introduced a lot of
|
899
905
|
# ambiguity, so we just ask it to find the beginning of what looks
|
900
906
|
# like an options run and handle the rest in here.
|
@@ -963,19 +969,19 @@ class Regexp::Scanner
|
|
963
969
|
# Appends one or more characters to the literal buffer, to be emitted later
|
964
970
|
# by a call to emit_literal. Contents can be a mix of ASCII and UTF-8.
|
965
971
|
def append_literal(data, ts, te)
|
966
|
-
|
967
|
-
|
972
|
+
self.literal = literal || []
|
973
|
+
literal << text(data, ts, te)
|
968
974
|
end
|
969
975
|
|
970
976
|
# Emits the literal run collected by calls to the append_literal method,
|
971
977
|
# using the total start (ts) and end (te) offsets of the run.
|
972
978
|
def emit_literal
|
973
|
-
ts, te =
|
974
|
-
text =
|
979
|
+
ts, te = literal.first[1], literal.last[2]
|
980
|
+
text = literal.map {|t| t[0]}.join
|
975
981
|
|
976
982
|
text.force_encoding('utf-8') if text.respond_to?(:force_encoding)
|
977
983
|
|
978
|
-
|
984
|
+
self.literal = nil
|
979
985
|
emit(:literal, :literal, text, ts, te)
|
980
986
|
end
|
981
987
|
|
@@ -984,20 +990,20 @@ class Regexp::Scanner
|
|
984
990
|
positive, negative, group_local = $1, $2, $3
|
985
991
|
|
986
992
|
if positive.include?('x')
|
987
|
-
|
993
|
+
self.free_spacing = true
|
988
994
|
end
|
989
995
|
|
990
996
|
# If the x appears in both, treat it like ruby does, the second cancels
|
991
997
|
# the first.
|
992
998
|
if negative.include?('x')
|
993
|
-
|
999
|
+
self.free_spacing = false
|
994
1000
|
end
|
995
1001
|
|
996
1002
|
if group_local
|
997
|
-
|
1003
|
+
spacing_stack << {:free_spacing => free_spacing, :depth => group_depth}
|
998
1004
|
else
|
999
1005
|
# switch for parent group level
|
1000
|
-
|
1006
|
+
spacing_stack.last[:free_spacing] = free_spacing
|
1001
1007
|
end
|
1002
1008
|
end
|
1003
1009
|
|
data/lib/regexp_parser/syntax.rb
CHANGED
@@ -1,60 +1,9 @@
|
|
1
1
|
require File.expand_path('../syntax/tokens', __FILE__)
|
2
2
|
require File.expand_path('../syntax/base', __FILE__)
|
3
3
|
require File.expand_path('../syntax/any', __FILE__)
|
4
|
+
require File.expand_path('../syntax/version_lookup', __FILE__)
|
4
5
|
require File.expand_path('../syntax/versions', __FILE__)
|
5
6
|
|
6
7
|
module Regexp::Syntax
|
7
|
-
|
8
|
-
VERSION_FORMAT = '\Aruby/\d+\.\d+(\.\d+)?\z'
|
9
|
-
VERSION_REGEXP = /#{VERSION_FORMAT}/
|
10
|
-
|
11
|
-
class SyntaxError < StandardError
|
12
|
-
def initialize(what)
|
13
|
-
super what
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class UnknownSyntaxNameError < SyntaxError
|
18
|
-
def initialize(name)
|
19
|
-
super "Unknown syntax name '#{name}'."
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class InvalidVersionNameError < SyntaxError
|
24
|
-
def initialize(name)
|
25
|
-
super "Invalid version name '#{name}'. Expected format is '#{VERSION_FORMAT}'"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# Loads and instantiates an instance of the syntax specification class for
|
30
|
-
# the given syntax version name. The special names 'any' and '*' return an
|
31
|
-
# instance of Syntax::Any.
|
32
|
-
def self.new(name)
|
33
|
-
return Regexp::Syntax::Any.new if
|
34
|
-
['*', 'any'].include?( name.to_s )
|
35
|
-
|
36
|
-
raise UnknownSyntaxNameError.new(name) unless supported?(name)
|
37
|
-
|
38
|
-
version_class(name).new
|
39
|
-
end
|
40
|
-
|
41
|
-
def self.supported?(name)
|
42
|
-
VERSIONS.include?(name)
|
43
|
-
end
|
44
|
-
|
45
|
-
def self.version_class(version)
|
46
|
-
raise InvalidVersionNameError.new(version) unless
|
47
|
-
version =~ VERSION_REGEXP
|
48
|
-
|
49
|
-
version_const_name = version.scan(/\d+/).join
|
50
|
-
|
51
|
-
const_name = "Regexp::Syntax::Ruby::V#{version_const_name}"
|
52
|
-
|
53
|
-
if RUBY_VERSION >= '2.0.0'
|
54
|
-
Kernel.const_get(const_name)
|
55
|
-
else
|
56
|
-
Object.module_eval(const_name, __FILE__, __LINE__)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
8
|
+
class SyntaxError < StandardError; end
|
60
9
|
end
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'set'
|
2
2
|
|
3
|
+
module Regexp::Syntax
|
3
4
|
class NotImplementedError < SyntaxError
|
4
5
|
def initialize(syntax, type, token)
|
5
6
|
super "#{syntax.class.name} does not implement: [#{type}:#{token}]"
|
@@ -8,6 +9,8 @@ module Regexp::Syntax
|
|
8
9
|
|
9
10
|
# A lookup map of supported types and tokens in a given syntax
|
10
11
|
class Base
|
12
|
+
include Regexp::Syntax::Token
|
13
|
+
|
11
14
|
def initialize
|
12
15
|
@implements = {}
|
13
16
|
|
@@ -15,37 +18,20 @@ module Regexp::Syntax
|
|
15
18
|
implements Token::FreeSpace::Type, Token::FreeSpace::All
|
16
19
|
end
|
17
20
|
|
18
|
-
def
|
19
|
-
@implements
|
21
|
+
def implementations(type)
|
22
|
+
@implements[type] ||= Set.new
|
20
23
|
end
|
21
24
|
|
22
25
|
def implements(type, tokens)
|
23
|
-
|
24
|
-
@implements[type] = (@implements[type] + tokens).uniq
|
25
|
-
else
|
26
|
-
@implements[type] = tokens
|
27
|
-
end
|
26
|
+
implementations(type).merge(Array(tokens))
|
28
27
|
end
|
29
28
|
|
30
|
-
# removes
|
31
29
|
def excludes(type, tokens)
|
32
|
-
|
33
|
-
tokens = [tokens] unless tokens.is_a?(Array)
|
34
|
-
end
|
35
|
-
|
36
|
-
if @implements[type]
|
37
|
-
if tokens
|
38
|
-
@implements[type] = @implements[type] - tokens
|
39
|
-
@implements[type] = nil if @implements[type].empty?
|
40
|
-
else
|
41
|
-
@implements[type] = nil
|
42
|
-
end
|
43
|
-
end
|
30
|
+
implementations(type).subtract(Array(tokens))
|
44
31
|
end
|
45
32
|
|
46
33
|
def implements?(type, token)
|
47
|
-
|
48
|
-
false
|
34
|
+
implementations(type).include?(token)
|
49
35
|
end
|
50
36
|
alias :check? :implements?
|
51
37
|
|
@@ -97,6 +83,9 @@ module Regexp::Syntax
|
|
97
83
|
[type, token]
|
98
84
|
end
|
99
85
|
end
|
100
|
-
end
|
101
86
|
|
87
|
+
def self.inspect
|
88
|
+
"#{super} (feature set of #{ancestors[1].to_s.split('::').last})"
|
89
|
+
end
|
90
|
+
end
|
102
91
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Regexp::Syntax
|
2
|
+
module Token
|
3
|
+
module CharacterClass
|
4
|
+
Standard = [:alnum, :alpha, :blank, :cntrl, :digit, :graph,
|
5
|
+
:lower, :print, :punct, :space, :upper, :xdigit]
|
6
|
+
|
7
|
+
Extensions = [:ascii, :word]
|
8
|
+
|
9
|
+
All = Standard + Extensions
|
10
|
+
Type = :class
|
11
|
+
NonType = :nonclass
|
12
|
+
end
|
13
|
+
Map[CharacterClass::Type] = CharacterClass::All
|
14
|
+
Map[CharacterClass::NonType] = CharacterClass::All
|
15
|
+
end
|
16
|
+
end
|
@@ -2,10 +2,10 @@ module Regexp::Syntax
|
|
2
2
|
module Token
|
3
3
|
|
4
4
|
module UnicodeProperty
|
5
|
-
|
5
|
+
CharType_V1_9_0 = [:alnum, :alpha, :ascii, :blank, :cntrl, :digit, :graph,
|
6
6
|
:lower, :print, :punct, :space, :upper, :word, :xdigit]
|
7
7
|
|
8
|
-
|
8
|
+
CharType_V2_5_0 = [:xposixpunct]
|
9
9
|
|
10
10
|
POSIX = [:any, :assigned, :newline]
|
11
11
|
|
@@ -37,24 +37,24 @@ module Regexp::Syntax
|
|
37
37
|
end
|
38
38
|
|
39
39
|
# As of ruby version 1.9.3
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
Age_V1_9_3 = [:age_1_1, :age_2_0, :age_2_1, :age_3_0, :age_3_1,
|
41
|
+
:age_3_2, :age_4_0, :age_4_1, :age_5_0, :age_5_1,
|
42
|
+
:age_5_2, :age_6_0]
|
43
43
|
|
44
|
-
|
44
|
+
Age_V2_0_0 = [:age_6_1]
|
45
45
|
|
46
46
|
# These were merged (from Onigmo) in the branch for 2.2.0
|
47
|
-
|
47
|
+
Age_V2_2_0 = [:age_6_2, :age_6_3, :age_7_0]
|
48
48
|
|
49
|
-
|
49
|
+
Age_V2_3_0 = [:age_8_0]
|
50
50
|
|
51
|
-
|
51
|
+
Age_V2_4_0 = [:age_9_0]
|
52
52
|
|
53
|
-
|
53
|
+
Age_V2_5_0 = [:age_10_0]
|
54
54
|
|
55
|
-
Age =
|
55
|
+
Age = Age_V1_9_3 + Age_V2_0_0 + Age_V2_2_0 + Age_V2_3_0 + Age_V2_4_0 + Age_V2_5_0
|
56
56
|
|
57
|
-
|
57
|
+
Derived_V1_9_0 = [
|
58
58
|
:ascii_hex,
|
59
59
|
:alphabetic,
|
60
60
|
:cased,
|
@@ -108,13 +108,13 @@ module Regexp::Syntax
|
|
108
108
|
:xid_continue,
|
109
109
|
]
|
110
110
|
|
111
|
-
|
111
|
+
Derived_V2_5_0 = [
|
112
112
|
:regional_indicator
|
113
113
|
]
|
114
114
|
|
115
|
-
Derived =
|
115
|
+
Derived = Derived_V1_9_0 + Derived_V2_5_0
|
116
116
|
|
117
|
-
|
117
|
+
Script_V1_9_0 = [
|
118
118
|
:script_arabic,
|
119
119
|
:script_imperial_aramaic,
|
120
120
|
:script_armenian,
|
@@ -211,9 +211,9 @@ module Regexp::Syntax
|
|
211
211
|
:script_unknown
|
212
212
|
]
|
213
213
|
|
214
|
-
|
214
|
+
Script_V1_9_3 = [:script_brahmi, :script_batak, :script_mandaic]
|
215
215
|
|
216
|
-
|
216
|
+
Script_V2_2_0 = [
|
217
217
|
:script_caucasian_albanian,
|
218
218
|
:script_bassa_vah,
|
219
219
|
:script_duployan,
|
@@ -239,7 +239,7 @@ module Regexp::Syntax
|
|
239
239
|
:script_warang_citi
|
240
240
|
]
|
241
241
|
|
242
|
-
Script =
|
242
|
+
Script = Script_V1_9_0 + Script_V1_9_3 + Script_V2_2_0
|
243
243
|
|
244
244
|
UnicodeBlock = [
|
245
245
|
:block_inalphabetic_presentation_forms,
|
@@ -357,20 +357,20 @@ module Regexp::Syntax
|
|
357
357
|
:emoji_presentation,
|
358
358
|
]
|
359
359
|
|
360
|
-
|
361
|
-
|
360
|
+
V1_9_0 = CharType_V1_9_0 + POSIX + Category::All + Derived_V1_9_0 + Script_V1_9_0 + UnicodeBlock
|
361
|
+
V1_9_3 = Age_V1_9_3 + Script_V1_9_3
|
362
362
|
|
363
|
-
|
363
|
+
V2_0_0 = Age_V2_0_0
|
364
364
|
|
365
|
-
|
365
|
+
V2_2_0 = Age_V2_2_0 + Script_V2_2_0
|
366
366
|
|
367
|
-
|
367
|
+
V2_3_0 = Age_V2_3_0
|
368
368
|
|
369
|
-
|
369
|
+
V2_4_0 = Age_V2_4_0
|
370
370
|
|
371
|
-
|
371
|
+
V2_5_0 = Age_V2_5_0 + CharType_V2_5_0 + Derived_V2_5_0 + Emoji
|
372
372
|
|
373
|
-
All =
|
373
|
+
All = V1_9_0 + V1_9_3 + V2_0_0 + V2_2_0 + V2_3_0 + V2_4_0 + V2_5_0
|
374
374
|
|
375
375
|
Type = :property
|
376
376
|
NonType = :nonproperty
|