regexp_parser 2.9.0 → 2.9.3

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: 8cc1826647cde51d6d1b5a5a58fb005efd2a38a85fa0e817616591ee2fad7862
4
- data.tar.gz: 572a6203741b9970bcedc1ace243ea0b9c300ca60b71ac263036eb0f4222dd50
3
+ metadata.gz: e429c2cc03b2c9c31e3bf5c3dc71ffc15c5032a35f52c3abae9134d02c45496f
4
+ data.tar.gz: 6a89f8618748c8ab479c4d81ff44c9fabfb461337993fcc641da23d6c349a1ec
5
5
  SHA512:
6
- metadata.gz: 3521fe6dab4be0c0db3c37f3f8d196fc754ff72937336a73ef5547a15ae4f2d366aa28e73d6e5756920d610b943ee51cb2db8e51e53ccb19c1c235a8c45da708
7
- data.tar.gz: d05b7babb79c118bdc36ae168d8199ee3500b0cff33cb00ed46d51a4a88725130e931c588146a3f989dd87778b1f39684b2c8a5541c9ac8f91427fc31b1ec97a
6
+ metadata.gz: 8f9cb8133b24db6f8bb2199356101c234960839ae1251a77da6fe4faeaafc2ab1d6f679f5a6e081860d4a9137a91aeb7793dbc617f04c9747b9110d64134d45f
7
+ data.tar.gz: bdfe1c9a13fef4f891c28787588c92be37c1c8a61e0d473d05482a67207675be090ec5a74d12b46cf93c8d2565388c6680acd89ad65bc63454514ee720181c82
@@ -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,37 +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/negative'
32
- require 'regexp_parser/expression/methods/options'
33
- require 'regexp_parser/expression/methods/parts'
34
- require 'regexp_parser/expression/methods/printing'
35
- require 'regexp_parser/expression/methods/strfregexp'
36
- require 'regexp_parser/expression/methods/tests'
37
- 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
@@ -575,18 +575,18 @@ class Regexp::Parser
575
575
  options_stack.last
576
576
  end
577
577
 
578
- # Assigns referenced expressions to refering expressions, e.g. if there is
578
+ # Assigns referenced expressions to referring expressions, e.g. if there is
579
579
  # an instance of Backreference::Number, its #referenced_expression is set to
580
580
  # the instance of Group::Capture that it refers to via its number.
581
581
  def assign_referenced_expressions
582
- # find all referencable and refering expressions
582
+ # find all referenceable and referring expressions
583
583
  targets = { 0 => root }
584
584
  referrers = []
585
585
  root.each_expression do |exp|
586
586
  exp.is_a?(Group::Capture) && targets[exp.identifier] = exp
587
587
  referrers << exp if exp.referential?
588
588
  end
589
- # assign reference expression to refering expressions
589
+ # assign reference expression to referring expressions
590
590
  # (in a second iteration because there might be forward references)
591
591
  referrers.each do |exp|
592
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)
@@ -78,8 +78,8 @@
78
78
  # try to treat every other group head as options group, like Ruby
79
79
  group_options = '?' . ( [^!#'():<=>~]+ . ':'? ) ?;
80
80
 
81
- group_name_id_ab = ([^!0-9\->] | utf8_multibyte) . ([^>] | utf8_multibyte)*;
82
- group_name_id_sq = ([^0-9\-'] | utf8_multibyte) . ([^'] | utf8_multibyte)*;
81
+ group_name_id_ab = ([^!=0-9\->] | utf8_multibyte) . ([^>] | utf8_multibyte)*;
82
+ group_name_id_sq = ([^0-9\-'] | utf8_multibyte) . ([^'] | utf8_multibyte)*;
83
83
  group_number = '-'? . [0-9]+;
84
84
  group_level = [+\-] . [0-9]+;
85
85
 
@@ -640,9 +640,9 @@
640
640
  *|;
641
641
  }%%
642
642
 
643
- require 'regexp_parser/scanner/errors/scanner_error'
644
- require 'regexp_parser/scanner/errors/premature_end_error'
645
- 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'
646
646
 
647
647
  class Regexp::Scanner
648
648
  # Scans the given regular expression text, or Regexp object and collects the