regexp_parser 0.4.13 → 0.5.0

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.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +15 -0
  3. data/lib/regexp_parser/expression.rb +43 -51
  4. data/lib/regexp_parser/expression/classes/alternation.rb +6 -7
  5. data/lib/regexp_parser/expression/classes/character_class.rb +11 -0
  6. data/lib/regexp_parser/expression/classes/conditional.rb +10 -18
  7. data/lib/regexp_parser/expression/classes/free_space.rb +1 -1
  8. data/lib/regexp_parser/expression/classes/group.rb +9 -21
  9. data/lib/regexp_parser/expression/classes/property.rb +2 -2
  10. data/lib/regexp_parser/expression/classes/set.rb +1 -12
  11. data/lib/regexp_parser/expression/methods/traverse.rb +1 -1
  12. data/lib/regexp_parser/expression/quantifier.rb +9 -9
  13. data/lib/regexp_parser/expression/sequence.rb +5 -4
  14. data/lib/regexp_parser/expression/subexpression.rb +16 -59
  15. data/lib/regexp_parser/lexer.rb +31 -27
  16. data/lib/regexp_parser/parser.rb +179 -179
  17. data/lib/regexp_parser/scanner.rb +172 -166
  18. data/lib/regexp_parser/scanner/scanner.rl +44 -38
  19. data/lib/regexp_parser/syntax.rb +2 -53
  20. data/lib/regexp_parser/syntax/base.rb +13 -24
  21. data/lib/regexp_parser/syntax/tokens/character_class.rb +16 -0
  22. data/lib/regexp_parser/syntax/tokens/unicode_property.rb +26 -26
  23. data/lib/regexp_parser/syntax/version_lookup.rb +82 -0
  24. data/lib/regexp_parser/syntax/versions.rb +1 -5
  25. data/lib/regexp_parser/syntax/versions/1.8.6.rb +30 -0
  26. data/lib/regexp_parser/syntax/versions/1.9.1.rb +36 -0
  27. data/lib/regexp_parser/syntax/versions/1.9.3.rb +11 -0
  28. data/lib/regexp_parser/syntax/versions/2.0.0.rb +20 -0
  29. data/lib/regexp_parser/syntax/versions/2.2.0.rb +10 -0
  30. data/lib/regexp_parser/syntax/versions/2.3.0.rb +10 -0
  31. data/lib/regexp_parser/syntax/versions/2.4.0.rb +10 -0
  32. data/lib/regexp_parser/syntax/versions/2.4.1.rb +9 -0
  33. data/lib/regexp_parser/syntax/versions/2.5.0.rb +10 -0
  34. data/lib/regexp_parser/token.rb +6 -29
  35. data/lib/regexp_parser/version.rb +1 -1
  36. data/test/expression/test_strfregexp.rb +7 -0
  37. data/test/expression/test_to_h.rb +6 -0
  38. data/test/parser/test_properties.rb +12 -4
  39. data/test/support/warning_extractor.rb +3 -1
  40. data/test/syntax/test_all.rb +1 -1
  41. data/test/syntax/test_syntax.rb +5 -9
  42. data/test/syntax/{ruby → versions}/test_1.8.rb +14 -14
  43. data/test/syntax/{ruby → versions}/test_1.9.1.rb +7 -8
  44. data/test/syntax/{ruby → versions}/test_1.9.3.rb +7 -7
  45. data/test/syntax/versions/test_2.0.0.rb +37 -0
  46. data/test/syntax/{ruby → versions}/test_2.2.0.rb +7 -7
  47. data/test/syntax/versions/test_aliases.rb +129 -0
  48. data/test/syntax/{ruby → versions}/test_all.rb +1 -1
  49. metadata +73 -113
  50. data/lib/regexp_parser/syntax/ruby/1.8.6.rb +0 -37
  51. data/lib/regexp_parser/syntax/ruby/1.8.7.rb +0 -14
  52. data/lib/regexp_parser/syntax/ruby/1.8.rb +0 -13
  53. data/lib/regexp_parser/syntax/ruby/1.9.1.rb +0 -45
  54. data/lib/regexp_parser/syntax/ruby/1.9.2.rb +0 -9
  55. data/lib/regexp_parser/syntax/ruby/1.9.3.rb +0 -19
  56. data/lib/regexp_parser/syntax/ruby/1.9.rb +0 -8
  57. data/lib/regexp_parser/syntax/ruby/2.0.0.rb +0 -23
  58. data/lib/regexp_parser/syntax/ruby/2.0.rb +0 -8
  59. data/lib/regexp_parser/syntax/ruby/2.1.0.rb +0 -13
  60. data/lib/regexp_parser/syntax/ruby/2.1.10.rb +0 -13
  61. data/lib/regexp_parser/syntax/ruby/2.1.2.rb +0 -13
  62. data/lib/regexp_parser/syntax/ruby/2.1.3.rb +0 -13
  63. data/lib/regexp_parser/syntax/ruby/2.1.4.rb +0 -13
  64. data/lib/regexp_parser/syntax/ruby/2.1.5.rb +0 -13
  65. data/lib/regexp_parser/syntax/ruby/2.1.6.rb +0 -13
  66. data/lib/regexp_parser/syntax/ruby/2.1.7.rb +0 -13
  67. data/lib/regexp_parser/syntax/ruby/2.1.8.rb +0 -13
  68. data/lib/regexp_parser/syntax/ruby/2.1.9.rb +0 -13
  69. data/lib/regexp_parser/syntax/ruby/2.1.rb +0 -8
  70. data/lib/regexp_parser/syntax/ruby/2.2.0.rb +0 -16
  71. data/lib/regexp_parser/syntax/ruby/2.2.1.rb +0 -13
  72. data/lib/regexp_parser/syntax/ruby/2.2.10.rb +0 -13
  73. data/lib/regexp_parser/syntax/ruby/2.2.2.rb +0 -13
  74. data/lib/regexp_parser/syntax/ruby/2.2.3.rb +0 -13
  75. data/lib/regexp_parser/syntax/ruby/2.2.4.rb +0 -13
  76. data/lib/regexp_parser/syntax/ruby/2.2.5.rb +0 -13
  77. data/lib/regexp_parser/syntax/ruby/2.2.6.rb +0 -13
  78. data/lib/regexp_parser/syntax/ruby/2.2.7.rb +0 -13
  79. data/lib/regexp_parser/syntax/ruby/2.2.8.rb +0 -13
  80. data/lib/regexp_parser/syntax/ruby/2.2.9.rb +0 -13
  81. data/lib/regexp_parser/syntax/ruby/2.2.rb +0 -8
  82. data/lib/regexp_parser/syntax/ruby/2.3.0.rb +0 -16
  83. data/lib/regexp_parser/syntax/ruby/2.3.1.rb +0 -13
  84. data/lib/regexp_parser/syntax/ruby/2.3.2.rb +0 -13
  85. data/lib/regexp_parser/syntax/ruby/2.3.3.rb +0 -13
  86. data/lib/regexp_parser/syntax/ruby/2.3.4.rb +0 -13
  87. data/lib/regexp_parser/syntax/ruby/2.3.5.rb +0 -13
  88. data/lib/regexp_parser/syntax/ruby/2.3.6.rb +0 -13
  89. data/lib/regexp_parser/syntax/ruby/2.3.7.rb +0 -13
  90. data/lib/regexp_parser/syntax/ruby/2.3.rb +0 -8
  91. data/lib/regexp_parser/syntax/ruby/2.4.0.rb +0 -16
  92. data/lib/regexp_parser/syntax/ruby/2.4.1.rb +0 -15
  93. data/lib/regexp_parser/syntax/ruby/2.4.2.rb +0 -13
  94. data/lib/regexp_parser/syntax/ruby/2.4.3.rb +0 -13
  95. data/lib/regexp_parser/syntax/ruby/2.4.4.rb +0 -13
  96. data/lib/regexp_parser/syntax/ruby/2.4.rb +0 -8
  97. data/lib/regexp_parser/syntax/ruby/2.5.0.rb +0 -16
  98. data/lib/regexp_parser/syntax/ruby/2.5.1.rb +0 -13
  99. data/lib/regexp_parser/syntax/ruby/2.5.rb +0 -8
  100. data/lib/regexp_parser/syntax/ruby/2.6.0.rb +0 -13
  101. data/lib/regexp_parser/syntax/ruby/2.6.rb +0 -8
  102. data/test/syntax/ruby/test_2.0.0.rb +0 -32
  103. 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 { @group_depth += 1; @in_group = true }
147
- action group_closed { @group_depth -= 1; @in_group = @group_depth > 0 ? true : false }
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 @tokens.last[1] == :open
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] == @group_depth
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, @group_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] == (@group_depth + 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 @spacing_stack.length > 1 and
625
- @spacing_stack.last[:depth] == (@group_depth + 1)
626
- @spacing_stack.pop
624
+ if spacing_stack.length > 1 and
625
+ spacing_stack.last[:depth] == (group_depth + 1)
626
+ spacing_stack.pop
627
627
 
628
- @free_spacing = @spacing_stack.last[:free_spacing]
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 @free_spacing
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 @free_spacing
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
- @literal, stack = nil, []
840
+ self.literal = nil
841
+ stack = []
841
842
 
842
843
  if input_object.is_a?(Regexp)
843
- input = input_object.source
844
- @free_spacing = (input_object.options & Regexp::EXTENDED != 0)
844
+ input = input_object.source
845
+ self.free_spacing = (input_object.options & Regexp::EXTENDED != 0)
845
846
  else
846
- input = input_object
847
- @free_spacing = false
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
- @tokens = []
855
- @block = block_given? ? block : nil
855
+ self.tokens = []
856
+ self.block = block_given? ? block : nil
856
857
 
857
- @in_group, @group_depth = false, 0
858
- @spacing_stack = [{:free_spacing => @free_spacing, :depth => 0}]
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, set_depth, set_type = false, 0, :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
- "[#{@in_group}:#{@group_depth}]") if @in_group
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 @literal
880
+ emit_literal if literal
879
881
 
880
- @tokens
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 @literal
889
+ emit_literal if literal
888
890
 
889
- if @block
890
- @block.call type, token, text, ts, te
891
+ if block
892
+ block.call type, token, text, ts, te
891
893
  end
892
894
 
893
- @tokens << [type, token, text, ts, te]
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
- @literal ||= []
967
- @literal << text(data, ts, te)
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 = @literal.first[1], @literal.last[2]
974
- text = @literal.map {|t| t[0]}.join
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
- @literal = nil
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
- @free_spacing = true
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
- @free_spacing = false
999
+ self.free_spacing = false
994
1000
  end
995
1001
 
996
1002
  if group_local
997
- @spacing_stack << {:free_spacing => @free_spacing, :depth => @group_depth}
1003
+ spacing_stack << {:free_spacing => free_spacing, :depth => group_depth}
998
1004
  else
999
1005
  # switch for parent group level
1000
- @spacing_stack.last[:free_spacing] = @free_spacing
1006
+ spacing_stack.last[:free_spacing] = free_spacing
1001
1007
  end
1002
1008
  end
1003
1009
 
@@ -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
- module Regexp::Syntax
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 implementation
19
- @implements
21
+ def implementations(type)
22
+ @implements[type] ||= Set.new
20
23
  end
21
24
 
22
25
  def implements(type, tokens)
23
- if @implements[type]
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
- if tokens
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
- return true if @implements[type] and @implements[type].include?(token)
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
- CharType_V190 = [:alnum, :alpha, :ascii, :blank, :cntrl, :digit, :graph,
5
+ CharType_V1_9_0 = [:alnum, :alpha, :ascii, :blank, :cntrl, :digit, :graph,
6
6
  :lower, :print, :punct, :space, :upper, :word, :xdigit]
7
7
 
8
- CharType_V250 = [:xposixpunct]
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
- Age_V193 = [: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]
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
- Age_V200 = [:age_6_1]
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
- Age_V220 = [:age_6_2, :age_6_3, :age_7_0]
47
+ Age_V2_2_0 = [:age_6_2, :age_6_3, :age_7_0]
48
48
 
49
- Age_V230 = [:age_8_0]
49
+ Age_V2_3_0 = [:age_8_0]
50
50
 
51
- Age_V240 = [:age_9_0]
51
+ Age_V2_4_0 = [:age_9_0]
52
52
 
53
- Age_V250 = [:age_10_0]
53
+ Age_V2_5_0 = [:age_10_0]
54
54
 
55
- Age = Age_V193 + Age_V200 + Age_V220 + Age_V230 + Age_V240 + Age_V250
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
- Derived_V190 = [
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
- Derived_V250 = [
111
+ Derived_V2_5_0 = [
112
112
  :regional_indicator
113
113
  ]
114
114
 
115
- Derived = Derived_V190 + Derived_V250
115
+ Derived = Derived_V1_9_0 + Derived_V2_5_0
116
116
 
117
- Script_V190 = [
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
- Script_V193 = [:script_brahmi, :script_batak, :script_mandaic]
214
+ Script_V1_9_3 = [:script_brahmi, :script_batak, :script_mandaic]
215
215
 
216
- Script_V220 = [
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 = Script_V190 + Script_V193 + Script_V220
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
- V190 = CharType_V190 + POSIX + Category::All + Derived_V190 + Script_V190 + UnicodeBlock
361
- V193 = Age_V193 + Script_V193
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
- V200 = Age_V200
363
+ V2_0_0 = Age_V2_0_0
364
364
 
365
- V220 = Age_V220 + Script_V220
365
+ V2_2_0 = Age_V2_2_0 + Script_V2_2_0
366
366
 
367
- V230 = Age_V230
367
+ V2_3_0 = Age_V2_3_0
368
368
 
369
- V240 = Age_V240
369
+ V2_4_0 = Age_V2_4_0
370
370
 
371
- V250 = Age_V250 + CharType_V250 + Derived_V250 + Emoji
371
+ V2_5_0 = Age_V2_5_0 + CharType_V2_5_0 + Derived_V2_5_0 + Emoji
372
372
 
373
- All = V190 + V193 + V200 + V220 + V230 + V240 + V250
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