regexp_parser 2.8.2 → 2.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5309aa54a7dc49b910246ad7efd9bf1e2f6b19917c41f2c4dd389568c7a1d0c5
4
- data.tar.gz: 0174ec36fcec3ca3696f7e5fbe2eeaa5e9d75b09d4e0891bd841da997101f123
3
+ metadata.gz: c88d5bc178e9bf95a8a008d9d5e9d8cf1b4a8bb0d65310901a995daa448a28f4
4
+ data.tar.gz: 47c1ed4782981f5cc2a0bb7bd8f402e360cd60ebeba33615df0c94dd3842b48c
5
5
  SHA512:
6
- metadata.gz: b52cfb89d0cb55c63844fe5f808c8472c2987746e33d71fe2ede2b9759d3f572611679050a0ae407a391c0f2ba88e9049beb579c2ead9c037b711c9a0c62b18b
7
- data.tar.gz: 708e81a6463887e849ed1c560eb36abae556dc7b87c1f3fac30f74b1822a778b7d711c2fbba52ad9114db1ee5ba3a47f3898d17023de97b56799aed891e34c7f
6
+ metadata.gz: 5dc1bf229c259b762ea38f459f70a9a04e5ee08207fbae04bdf9045f9f2b1c0f0b6a716a3e08fda55ca0b769ef55f480f7f0e19f3412175fdc7a475362889ab3
7
+ data.tar.gz: 5de692c1cce8f2436936752d0cf6c5ea51d84bb9c63110dcc49621a476b47800300911952f4d4a687c81f151886bc5570b14af559d74b5196b63e13c684ab7c5
data/Gemfile CHANGED
@@ -3,13 +3,13 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'leto', '~> 2.0'
7
- gem 'rake', '~> 13.0'
8
- gem 'regexp_property_values', '~> 1.4'
6
+ gem 'leto', '~> 2.1'
7
+ gem 'rake', '~> 13.1'
8
+ gem 'regexp_property_values', '~> 1.5'
9
9
  gem 'rspec', '~> 3.10'
10
10
  if RUBY_VERSION.to_f >= 2.7
11
11
  gem 'benchmark-ips', '~> 2.1'
12
12
  gem 'gouteur', '~> 1.1'
13
- gem 'rubocop', '~> 1.7'
13
+ gem 'rubocop', '~> 1.59'
14
14
  end
15
15
  end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010, 2012-2023, Ammar Ali
1
+ Copyright (c) 2010, 2012-2024, Ammar Ali
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
@@ -1,10 +1,7 @@
1
1
  module Regexp::Expression
2
2
  class CharacterSet < Regexp::Expression::Subexpression
3
3
  attr_accessor :closed, :negative
4
-
5
- alias :negative? :negative
6
- alias :negated? :negative
7
- alias :closed? :closed
4
+ alias :closed? :closed
8
5
 
9
6
  def initialize(token, options = {})
10
7
  self.negative = false
@@ -1,6 +1,6 @@
1
1
  module Regexp::Expression
2
2
  module Keep
3
- # TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression
3
+ # TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression
4
4
  # that contains all expressions to its left.
5
5
  class Mark < Regexp::Expression::Base; end
6
6
  end
@@ -1,9 +1,5 @@
1
1
  module Regexp::Expression
2
2
  class PosixClass < Regexp::Expression::Base
3
- def negative?
4
- type == :nonposixclass
5
- end
6
-
7
3
  def name
8
4
  text[/\w+/]
9
5
  end
@@ -1,10 +1,6 @@
1
1
  module Regexp::Expression
2
2
  module UnicodeProperty
3
3
  class Base < Regexp::Expression::Base
4
- def negative?
5
- type == :nonproperty
6
- end
7
-
8
4
  def name
9
5
  text[/\A\\[pP]\{([^}]+)\}\z/, 1]
10
6
  end
@@ -109,11 +105,12 @@ module Regexp::Expression
109
105
  class Unassigned < Codepoint::Base; end
110
106
  end
111
107
 
112
- class Age < UnicodeProperty::Base; end
113
- class Derived < UnicodeProperty::Base; end
114
- class Emoji < UnicodeProperty::Base; end
115
- class Script < UnicodeProperty::Base; end
116
- class Block < UnicodeProperty::Base; end
108
+ class Age < UnicodeProperty::Base; end
109
+ class Block < UnicodeProperty::Base; end
110
+ class Derived < UnicodeProperty::Base; end
111
+ class Emoji < UnicodeProperty::Base; end
112
+ class Enumerated < UnicodeProperty::Base; end
113
+ class Script < UnicodeProperty::Base; end
117
114
  end
118
115
 
119
116
  # alias for symmetry between token symbol and Expression class name
@@ -0,0 +1,20 @@
1
+ module Regexp::Expression
2
+ module Shared
3
+ def negative?
4
+ false
5
+ end
6
+
7
+ # not an alias so as to respect overrides of #negative?
8
+ def negated?
9
+ negative?
10
+ end
11
+ end
12
+
13
+ Anchor::NonWordBoundary.class_eval { def negative?; true end }
14
+ Assertion::NegativeLookahead.class_eval { def negative?; true end }
15
+ Assertion::NegativeLookbehind.class_eval { def negative?; true end }
16
+ CharacterSet.class_eval { def negative?; negative end }
17
+ CharacterType::Base.class_eval { def negative?; token.to_s.start_with?('non') end }
18
+ PosixClass.class_eval { def negative?; type == :nonposixclass end }
19
+ UnicodeProperty::Base.class_eval { def negative?; type == :nonproperty end }
20
+ end
@@ -1,36 +1,37 @@
1
- require 'regexp_parser/error'
1
+ require_relative 'error'
2
2
 
3
- require 'regexp_parser/expression/shared'
4
- require 'regexp_parser/expression/base'
5
- require 'regexp_parser/expression/quantifier'
6
- require 'regexp_parser/expression/subexpression'
7
- require 'regexp_parser/expression/sequence'
8
- require 'regexp_parser/expression/sequence_operation'
3
+ require_relative 'expression/shared'
4
+ require_relative 'expression/base'
5
+ require_relative 'expression/quantifier'
6
+ require_relative 'expression/subexpression'
7
+ require_relative 'expression/sequence'
8
+ require_relative 'expression/sequence_operation'
9
9
 
10
- require 'regexp_parser/expression/classes/alternation'
11
- require 'regexp_parser/expression/classes/anchor'
12
- require 'regexp_parser/expression/classes/backreference'
13
- require 'regexp_parser/expression/classes/character_set'
14
- require 'regexp_parser/expression/classes/character_set/intersection'
15
- require 'regexp_parser/expression/classes/character_set/range'
16
- require 'regexp_parser/expression/classes/character_type'
17
- require 'regexp_parser/expression/classes/conditional'
18
- require 'regexp_parser/expression/classes/escape_sequence'
19
- require 'regexp_parser/expression/classes/free_space'
20
- require 'regexp_parser/expression/classes/group'
21
- require 'regexp_parser/expression/classes/keep'
22
- require 'regexp_parser/expression/classes/literal'
23
- require 'regexp_parser/expression/classes/posix_class'
24
- require 'regexp_parser/expression/classes/root'
25
- require 'regexp_parser/expression/classes/unicode_property'
10
+ require_relative 'expression/classes/alternation'
11
+ require_relative 'expression/classes/anchor'
12
+ require_relative 'expression/classes/backreference'
13
+ require_relative 'expression/classes/character_set'
14
+ require_relative 'expression/classes/character_set/intersection'
15
+ require_relative 'expression/classes/character_set/range'
16
+ require_relative 'expression/classes/character_type'
17
+ require_relative 'expression/classes/conditional'
18
+ require_relative 'expression/classes/escape_sequence'
19
+ require_relative 'expression/classes/free_space'
20
+ require_relative 'expression/classes/group'
21
+ require_relative 'expression/classes/keep'
22
+ require_relative 'expression/classes/literal'
23
+ require_relative 'expression/classes/posix_class'
24
+ require_relative 'expression/classes/root'
25
+ require_relative 'expression/classes/unicode_property'
26
26
 
27
- require 'regexp_parser/expression/methods/construct'
28
- require 'regexp_parser/expression/methods/human_name'
29
- require 'regexp_parser/expression/methods/match'
30
- require 'regexp_parser/expression/methods/match_length'
31
- require 'regexp_parser/expression/methods/options'
32
- require 'regexp_parser/expression/methods/parts'
33
- require 'regexp_parser/expression/methods/printing'
34
- require 'regexp_parser/expression/methods/strfregexp'
35
- require 'regexp_parser/expression/methods/tests'
36
- require 'regexp_parser/expression/methods/traverse'
27
+ require_relative 'expression/methods/construct'
28
+ require_relative 'expression/methods/human_name'
29
+ require_relative 'expression/methods/match'
30
+ require_relative 'expression/methods/match_length'
31
+ require_relative 'expression/methods/negative'
32
+ require_relative 'expression/methods/options'
33
+ require_relative 'expression/methods/parts'
34
+ require_relative 'expression/methods/printing'
35
+ require_relative 'expression/methods/strfregexp'
36
+ require_relative 'expression/methods/tests'
37
+ require_relative 'expression/methods/traverse'
@@ -1,5 +1,5 @@
1
- require 'regexp_parser/error'
2
- require 'regexp_parser/expression'
1
+ require_relative 'error'
2
+ require_relative 'expression'
3
3
 
4
4
  class Regexp::Parser
5
5
  include Regexp::Expression
@@ -467,6 +467,7 @@ class Regexp::Parser
467
467
  when *UPTokens::Age; node << UP::Age.new(token, active_opts)
468
468
  when *UPTokens::Derived; node << UP::Derived.new(token, active_opts)
469
469
  when *UPTokens::Emoji; node << UP::Emoji.new(token, active_opts)
470
+ when *UPTokens::Enumerated; node << UP::Enumerated.new(token, active_opts)
470
471
  when *UPTokens::Script; node << UP::Script.new(token, active_opts)
471
472
  when *UPTokens::UnicodeBlock; node << UP::Block.new(token, active_opts)
472
473
 
@@ -574,18 +575,18 @@ class Regexp::Parser
574
575
  options_stack.last
575
576
  end
576
577
 
577
- # Assigns referenced expressions to refering expressions, e.g. if there is
578
+ # Assigns referenced expressions to referring expressions, e.g. if there is
578
579
  # an instance of Backreference::Number, its #referenced_expression is set to
579
580
  # the instance of Group::Capture that it refers to via its number.
580
581
  def assign_referenced_expressions
581
- # find all referencable and refering expressions
582
+ # find all referenceable and referring expressions
582
583
  targets = { 0 => root }
583
584
  referrers = []
584
585
  root.each_expression do |exp|
585
586
  exp.is_a?(Group::Capture) && targets[exp.identifier] = exp
586
587
  referrers << exp if exp.referential?
587
588
  end
588
- # assign reference expression to refering expressions
589
+ # assign reference expression to referring expressions
589
590
  # (in a second iteration because there might be forward references)
590
591
  referrers.each do |exp|
591
592
  exp.referenced_expression = targets[exp.reference] ||
@@ -1,4 +1,4 @@
1
- require 'regexp_parser/error'
1
+ require_relative '../../../regexp_parser/error'
2
2
 
3
3
  class Regexp::Scanner
4
4
  # General scanner error (catch all)
@@ -8,6 +8,7 @@ age=12.1,age=12.1
8
8
  age=13.0,age=13.0
9
9
  age=14.0,age=14.0
10
10
  age=15.0,age=15.0
11
+ age=15.1,age=15.1
11
12
  age=2.0,age=2.0
12
13
  age=2.1,age=2.1
13
14
  age=3.0,age=3.0
@@ -108,6 +109,19 @@ gothic,gothic
108
109
  grantha,grantha
109
110
  graph,graph
110
111
  graphemebase,grapheme_base
112
+ graphemeclusterbreak=control,grapheme_cluster_break=control
113
+ graphemeclusterbreak=cr,grapheme_cluster_break=cr
114
+ graphemeclusterbreak=extend,grapheme_cluster_break=extend
115
+ graphemeclusterbreak=l,grapheme_cluster_break=l
116
+ graphemeclusterbreak=lf,grapheme_cluster_break=lf
117
+ graphemeclusterbreak=lv,grapheme_cluster_break=lv
118
+ graphemeclusterbreak=lvt,grapheme_cluster_break=lvt
119
+ graphemeclusterbreak=prepend,grapheme_cluster_break=prepend
120
+ graphemeclusterbreak=regionalindicator,grapheme_cluster_break=regional_indicator
121
+ graphemeclusterbreak=spacingmark,grapheme_cluster_break=spacingmark
122
+ graphemeclusterbreak=t,grapheme_cluster_break=t
123
+ graphemeclusterbreak=v,grapheme_cluster_break=v
124
+ graphemeclusterbreak=zwj,grapheme_cluster_break=zwj
111
125
  graphemeextend,grapheme_extend
112
126
  graphemelink,grapheme_link
113
127
  greek,greek
@@ -123,11 +137,14 @@ hebrew,hebrew
123
137
  hexdigit,hex_digit
124
138
  hiragana,hiragana
125
139
  hyphen,hyphen
140
+ idcompatmathcontinue,id_compat_math_continue
141
+ idcompatmathstart,id_compat_math_start
126
142
  idcontinue,id_continue
127
143
  ideographic,ideographic
128
144
  idsbinaryoperator,ids_binary_operator
129
145
  idstart,id_start
130
146
  idstrinaryoperator,ids_trinary_operator
147
+ idsunaryoperator,ids_unary_operator
131
148
  imperialaramaic,imperial_aramaic
132
149
  inadlam,in_adlam
133
150
  inaegeannumbers,in_aegean_numbers
@@ -190,6 +207,7 @@ incjkunifiedideographsextensione,in_cjk_unified_ideographs_extension_e
190
207
  incjkunifiedideographsextensionf,in_cjk_unified_ideographs_extension_f
191
208
  incjkunifiedideographsextensiong,in_cjk_unified_ideographs_extension_g
192
209
  incjkunifiedideographsextensionh,in_cjk_unified_ideographs_extension_h
210
+ incjkunifiedideographsextensioni,in_cjk_unified_ideographs_extension_i
193
211
  incombiningdiacriticalmarks,in_combining_diacritical_marks
194
212
  incombiningdiacriticalmarksextended,in_combining_diacritical_marks_extended
195
213
  incombiningdiacriticalmarksforsymbols,in_combining_diacritical_marks_for_symbols
@@ -86,6 +86,7 @@ ideo,ideographic
86
86
  ids,id_start
87
87
  idsb,ids_binary_operator
88
88
  idst,ids_trinary_operator
89
+ idsu,ids_unary_operator
89
90
  ital,old_italic
90
91
  java,javanese
91
92
  joinc,join_control
@@ -364,6 +364,7 @@
364
364
  conditional_expression := |*
365
365
  group_lookup . ')' {
366
366
  text = copy(data, ts, te-1)
367
+ text =~ /[^0]/ or raise ValidationError.for(:backref, 'condition', 'invalid ref ID')
367
368
  emit(:conditional, :condition, text)
368
369
  emit(:conditional, :condition_close, ')')
369
370
  };
@@ -541,13 +542,13 @@
541
542
  case text = copy(data, ts, te)
542
543
  when /^\\k(.)[^0-9\-][^+\-]*['>]$/
543
544
  emit(:backref, $1 == '<' ? :name_ref_ab : :name_ref_sq, text)
544
- when /^\\k(.)[1-9]\d*['>]$/
545
+ when /^\\k(.)0*[1-9]\d*['>]$/
545
546
  emit(:backref, $1 == '<' ? :number_ref_ab : :number_ref_sq, text)
546
- when /^\\k(.)-[1-9]\d*['>]$/
547
+ when /^\\k(.)-0*[1-9]\d*['>]$/
547
548
  emit(:backref, $1 == '<' ? :number_rel_ref_ab : :number_rel_ref_sq, text)
548
549
  when /^\\k(.)[^0-9\-].*[+\-]\d+['>]$/
549
550
  emit(:backref, $1 == '<' ? :name_recursion_ref_ab : :name_recursion_ref_sq, text)
550
- when /^\\k(.)-?[1-9]\d*[+\-]\d+['>]$/
551
+ when /^\\k(.)-?0*[1-9]\d*[+\-]\d+['>]$/
551
552
  emit(:backref, $1 == '<' ? :number_recursion_ref_ab : :number_recursion_ref_sq, text)
552
553
  else
553
554
  raise ValidationError.for(:backref, 'backreference', 'invalid ref ID')
@@ -560,9 +561,9 @@
560
561
  case text = copy(data, ts, te)
561
562
  when /^\\g(.)[^0-9+\-].*['>]$/
562
563
  emit(:backref, $1 == '<' ? :name_call_ab : :name_call_sq, text)
563
- when /^\\g(.)\d+['>]$/
564
+ when /^\\g(.)(?:0|0*[1-9]\d*)['>]$/
564
565
  emit(:backref, $1 == '<' ? :number_call_ab : :number_call_sq, text)
565
- when /^\\g(.)[+-]\d+/
566
+ when /^\\g(.)[+-]0*[1-9]\d*/
566
567
  emit(:backref, $1 == '<' ? :number_rel_call_ab : :number_rel_call_sq, text)
567
568
  else
568
569
  raise ValidationError.for(:backref, 'subexpression call', 'invalid ref ID')
@@ -639,9 +640,9 @@
639
640
  *|;
640
641
  }%%
641
642
 
642
- require 'regexp_parser/scanner/errors/scanner_error'
643
- require 'regexp_parser/scanner/errors/premature_end_error'
644
- require 'regexp_parser/scanner/errors/validation_error'
643
+ require_relative 'scanner/errors/scanner_error'
644
+ require_relative 'scanner/errors/premature_end_error'
645
+ require_relative 'scanner/errors/validation_error'
645
646
 
646
647
  class Regexp::Scanner
647
648
  # Scans the given regular expression text, or Regexp object and collects the
@@ -6,9 +6,9 @@
6
6
  # by running `bundle exec rake ragel:rb`
7
7
 
8
8
 
9
- require 'regexp_parser/scanner/errors/scanner_error'
10
- require 'regexp_parser/scanner/errors/premature_end_error'
11
- require 'regexp_parser/scanner/errors/validation_error'
9
+ require_relative 'scanner/errors/scanner_error'
10
+ require_relative 'scanner/errors/premature_end_error'
11
+ require_relative 'scanner/errors/validation_error'
12
12
 
13
13
  class Regexp::Scanner
14
14
  # Scans the given regular expression text, or Regexp object and collects the
@@ -1570,6 +1570,7 @@ end
1570
1570
  te = p+1
1571
1571
  begin
1572
1572
  text = copy(data, ts, te-1)
1573
+ text =~ /[^0]/ or raise ValidationError.for(:backref, 'condition', 'invalid ref ID')
1573
1574
  emit(:conditional, :condition, text)
1574
1575
  emit(:conditional, :condition_close, ')')
1575
1576
  end
@@ -1750,13 +1751,13 @@ te = p+1
1750
1751
  case text = copy(data, ts, te)
1751
1752
  when /^\\k(.)[^0-9\-][^+\-]*['>]$/
1752
1753
  emit(:backref, $1 == '<' ? :name_ref_ab : :name_ref_sq, text)
1753
- when /^\\k(.)[1-9]\d*['>]$/
1754
+ when /^\\k(.)0*[1-9]\d*['>]$/
1754
1755
  emit(:backref, $1 == '<' ? :number_ref_ab : :number_ref_sq, text)
1755
- when /^\\k(.)-[1-9]\d*['>]$/
1756
+ when /^\\k(.)-0*[1-9]\d*['>]$/
1756
1757
  emit(:backref, $1 == '<' ? :number_rel_ref_ab : :number_rel_ref_sq, text)
1757
1758
  when /^\\k(.)[^0-9\-].*[+\-]\d+['>]$/
1758
1759
  emit(:backref, $1 == '<' ? :name_recursion_ref_ab : :name_recursion_ref_sq, text)
1759
- when /^\\k(.)-?[1-9]\d*[+\-]\d+['>]$/
1760
+ when /^\\k(.)-?0*[1-9]\d*[+\-]\d+['>]$/
1760
1761
  emit(:backref, $1 == '<' ? :number_recursion_ref_ab : :number_recursion_ref_sq, text)
1761
1762
  else
1762
1763
  raise ValidationError.for(:backref, 'backreference', 'invalid ref ID')
@@ -1770,9 +1771,9 @@ te = p+1
1770
1771
  case text = copy(data, ts, te)
1771
1772
  when /^\\g(.)[^0-9+\-].*['>]$/
1772
1773
  emit(:backref, $1 == '<' ? :name_call_ab : :name_call_sq, text)
1773
- when /^\\g(.)\d+['>]$/
1774
+ when /^\\g(.)(?:0|0*[1-9]\d*)['>]$/
1774
1775
  emit(:backref, $1 == '<' ? :number_call_ab : :number_call_sq, text)
1775
- when /^\\g(.)[+-]\d+/
1776
+ when /^\\g(.)[+-]0*[1-9]\d*/
1776
1777
  emit(:backref, $1 == '<' ? :number_rel_call_ab : :number_rel_call_sq, text)
1777
1778
  else
1778
1779
  raise ValidationError.for(:backref, 'subexpression call', 'invalid ref ID')
@@ -703,6 +703,24 @@ module Regexp::Syntax
703
703
  extended_pictographic
704
704
  ]
705
705
 
706
+ Enumerated_V2_4_0 = %i[
707
+ grapheme_cluster_break=control
708
+ grapheme_cluster_break=cr
709
+ grapheme_cluster_break=extend
710
+ grapheme_cluster_break=l
711
+ grapheme_cluster_break=lf
712
+ grapheme_cluster_break=lv
713
+ grapheme_cluster_break=lvt
714
+ grapheme_cluster_break=prepend
715
+ grapheme_cluster_break=regional_indicator
716
+ grapheme_cluster_break=spacingmark
717
+ grapheme_cluster_break=t
718
+ grapheme_cluster_break=v
719
+ grapheme_cluster_break=zwj
720
+ ]
721
+
722
+ Enumerated = all[:Enumerated_V]
723
+
706
724
  Emoji = all[:Emoji_V]
707
725
 
708
726
  V1_9_0 = Category::All + POSIX + all[:V1_9_0]
@@ -20,19 +20,19 @@ end
20
20
 
21
21
 
22
22
  # Load all the token files, they will populate the Map constant.
23
- require 'regexp_parser/syntax/token/anchor'
24
- require 'regexp_parser/syntax/token/assertion'
25
- require 'regexp_parser/syntax/token/backreference'
26
- require 'regexp_parser/syntax/token/posix_class'
27
- require 'regexp_parser/syntax/token/character_set'
28
- require 'regexp_parser/syntax/token/character_type'
29
- require 'regexp_parser/syntax/token/conditional'
30
- require 'regexp_parser/syntax/token/escape'
31
- require 'regexp_parser/syntax/token/group'
32
- require 'regexp_parser/syntax/token/keep'
33
- require 'regexp_parser/syntax/token/meta'
34
- require 'regexp_parser/syntax/token/quantifier'
35
- require 'regexp_parser/syntax/token/unicode_property'
23
+ require_relative 'token/anchor'
24
+ require_relative 'token/assertion'
25
+ require_relative 'token/backreference'
26
+ require_relative 'token/posix_class'
27
+ require_relative 'token/character_set'
28
+ require_relative 'token/character_type'
29
+ require_relative 'token/conditional'
30
+ require_relative 'token/escape'
31
+ require_relative 'token/group'
32
+ require_relative 'token/keep'
33
+ require_relative 'token/meta'
34
+ require_relative 'token/quantifier'
35
+ require_relative 'token/unicode_property'
36
36
 
37
37
 
38
38
  # After loading all the tokens the map is full. Extract all tokens and types
@@ -3,6 +3,6 @@
3
3
  #
4
4
  # Aliases for the latest patch version are provided as 'ruby/n.n',
5
5
  # e.g. 'ruby/1.9' refers to Ruby v1.9.3.
6
- Dir[File.expand_path('../versions/*.rb', __FILE__)].sort.each { |f| require f }
6
+ Dir[File.expand_path('../versions/*.rb', __FILE__)].sort.each { |f| require_relative f }
7
7
 
8
8
  Regexp::Syntax::CURRENT = Regexp::Syntax.for("ruby/#{RUBY_VERSION}")
@@ -1,4 +1,4 @@
1
- require 'regexp_parser/error'
1
+ require_relative 'error'
2
2
 
3
3
  module Regexp::Syntax
4
4
  class SyntaxError < Regexp::Parser::Error; end
@@ -1,5 +1,5 @@
1
1
  class Regexp
2
2
  class Parser
3
- VERSION = '2.8.2'
3
+ VERSION = '2.9.2'
4
4
  end
5
5
  end
data/lib/regexp_parser.rb CHANGED
@@ -1,6 +1,6 @@
1
- require 'regexp_parser/version'
2
- require 'regexp_parser/token'
3
- require 'regexp_parser/scanner'
4
- require 'regexp_parser/syntax'
5
- require 'regexp_parser/lexer'
6
- require 'regexp_parser/parser'
1
+ require_relative 'regexp_parser/version'
2
+ require_relative 'regexp_parser/token'
3
+ require_relative 'regexp_parser/scanner'
4
+ require_relative 'regexp_parser/syntax'
5
+ require_relative 'regexp_parser/lexer'
6
+ require_relative 'regexp_parser/parser'
@@ -16,6 +16,8 @@ Gem::Specification.new do |spec|
16
16
  spec.metadata['source_code_uri'] = spec.homepage
17
17
  spec.metadata['wiki_uri'] = "#{spec.homepage}/wiki"
18
18
 
19
+ spec.metadata['rubygems_mfa_required'] = 'true'
20
+
19
21
  spec.authors = ['Ammar Ali', 'Janosch Müller']
20
22
  spec.email = ['ammarabuali@gmail.com', 'janosch84@gmail.com']
21
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regexp_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ammar Ali
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-10 00:00:00.000000000 Z
12
+ date: 2024-05-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
15
15
  email:
@@ -46,6 +46,7 @@ files:
46
46
  - lib/regexp_parser/expression/methods/human_name.rb
47
47
  - lib/regexp_parser/expression/methods/match.rb
48
48
  - lib/regexp_parser/expression/methods/match_length.rb
49
+ - lib/regexp_parser/expression/methods/negative.rb
49
50
  - lib/regexp_parser/expression/methods/options.rb
50
51
  - lib/regexp_parser/expression/methods/parts.rb
51
52
  - lib/regexp_parser/expression/methods/printing.rb
@@ -114,6 +115,7 @@ metadata:
114
115
  homepage_uri: https://github.com/ammar/regexp_parser
115
116
  source_code_uri: https://github.com/ammar/regexp_parser
116
117
  wiki_uri: https://github.com/ammar/regexp_parser/wiki
118
+ rubygems_mfa_required: 'true'
117
119
  post_install_message:
118
120
  rdoc_options: []
119
121
  require_paths:
@@ -129,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
131
  - !ruby/object:Gem::Version
130
132
  version: '0'
131
133
  requirements: []
132
- rubygems_version: 3.5.0.dev
134
+ rubygems_version: 3.5.3
133
135
  signing_key:
134
136
  specification_version: 4
135
137
  summary: Scanner, lexer, parser for ruby's regular expressions