regexp_parser 2.10.0 → 2.11.2

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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/LICENSE +1 -1
  4. data/Rakefile +5 -3
  5. data/lib/regexp_parser/error.rb +2 -0
  6. data/lib/regexp_parser/expression/base.rb +2 -0
  7. data/lib/regexp_parser/expression/classes/alternation.rb +2 -0
  8. data/lib/regexp_parser/expression/classes/anchor.rb +2 -0
  9. data/lib/regexp_parser/expression/classes/backreference.rb +2 -0
  10. data/lib/regexp_parser/expression/classes/character_set/intersection.rb +2 -0
  11. data/lib/regexp_parser/expression/classes/character_set/range.rb +2 -0
  12. data/lib/regexp_parser/expression/classes/character_set.rb +2 -0
  13. data/lib/regexp_parser/expression/classes/character_type.rb +2 -0
  14. data/lib/regexp_parser/expression/classes/conditional.rb +2 -0
  15. data/lib/regexp_parser/expression/classes/escape_sequence.rb +3 -0
  16. data/lib/regexp_parser/expression/classes/free_space.rb +2 -0
  17. data/lib/regexp_parser/expression/classes/group.rb +2 -0
  18. data/lib/regexp_parser/expression/classes/keep.rb +2 -0
  19. data/lib/regexp_parser/expression/classes/literal.rb +2 -0
  20. data/lib/regexp_parser/expression/classes/posix_class.rb +2 -0
  21. data/lib/regexp_parser/expression/classes/root.rb +2 -0
  22. data/lib/regexp_parser/expression/classes/unicode_property.rb +2 -0
  23. data/lib/regexp_parser/expression/methods/construct.rb +2 -0
  24. data/lib/regexp_parser/expression/methods/escape_sequence_char.rb +2 -0
  25. data/lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb +8 -0
  26. data/lib/regexp_parser/expression/methods/human_name.rb +2 -0
  27. data/lib/regexp_parser/expression/methods/match.rb +2 -0
  28. data/lib/regexp_parser/expression/methods/match_length.rb +2 -0
  29. data/lib/regexp_parser/expression/methods/negative.rb +2 -0
  30. data/lib/regexp_parser/expression/methods/options.rb +2 -0
  31. data/lib/regexp_parser/expression/methods/parts.rb +2 -0
  32. data/lib/regexp_parser/expression/methods/printing.rb +2 -0
  33. data/lib/regexp_parser/expression/methods/referenced_expressions.rb +2 -0
  34. data/lib/regexp_parser/expression/methods/strfregexp.rb +2 -0
  35. data/lib/regexp_parser/expression/methods/tests.rb +2 -0
  36. data/lib/regexp_parser/expression/methods/traverse.rb +2 -0
  37. data/lib/regexp_parser/expression/quantifier.rb +3 -1
  38. data/lib/regexp_parser/expression/sequence.rb +2 -0
  39. data/lib/regexp_parser/expression/sequence_operation.rb +2 -0
  40. data/lib/regexp_parser/expression/shared.rb +6 -3
  41. data/lib/regexp_parser/expression/subexpression.rb +2 -0
  42. data/lib/regexp_parser/expression.rb +2 -0
  43. data/lib/regexp_parser/lexer.rb +2 -0
  44. data/lib/regexp_parser/parser.rb +3 -0
  45. data/lib/regexp_parser/scanner/errors/premature_end_error.rb +2 -0
  46. data/lib/regexp_parser/scanner/errors/scanner_error.rb +2 -0
  47. data/lib/regexp_parser/scanner/errors/validation_error.rb +2 -0
  48. data/lib/regexp_parser/scanner/properties/long.csv +19 -0
  49. data/lib/regexp_parser/scanner/properties/short.csv +8 -0
  50. data/lib/regexp_parser/scanner/scanner.rl +43 -7
  51. data/lib/regexp_parser/scanner.rb +509 -471
  52. data/lib/regexp_parser/syntax/any.rb +2 -0
  53. data/lib/regexp_parser/syntax/base.rb +2 -0
  54. data/lib/regexp_parser/syntax/token/anchor.rb +5 -3
  55. data/lib/regexp_parser/syntax/token/assertion.rb +4 -2
  56. data/lib/regexp_parser/syntax/token/backreference.rb +8 -6
  57. data/lib/regexp_parser/syntax/token/character_set.rb +3 -1
  58. data/lib/regexp_parser/syntax/token/character_type.rb +6 -4
  59. data/lib/regexp_parser/syntax/token/conditional.rb +5 -3
  60. data/lib/regexp_parser/syntax/token/escape.rb +9 -7
  61. data/lib/regexp_parser/syntax/token/group.rb +8 -6
  62. data/lib/regexp_parser/syntax/token/keep.rb +3 -1
  63. data/lib/regexp_parser/syntax/token/meta.rb +4 -2
  64. data/lib/regexp_parser/syntax/token/posix_class.rb +4 -2
  65. data/lib/regexp_parser/syntax/token/quantifier.rb +8 -6
  66. data/lib/regexp_parser/syntax/token/unicode_property.rb +62 -47
  67. data/lib/regexp_parser/syntax/token/virtual.rb +5 -3
  68. data/lib/regexp_parser/syntax/token.rb +5 -3
  69. data/lib/regexp_parser/syntax/version_lookup.rb +4 -2
  70. data/lib/regexp_parser/syntax/versions/1.8.6.rb +2 -0
  71. data/lib/regexp_parser/syntax/versions/1.9.1.rb +2 -0
  72. data/lib/regexp_parser/syntax/versions/1.9.3.rb +2 -0
  73. data/lib/regexp_parser/syntax/versions/2.0.0.rb +2 -0
  74. data/lib/regexp_parser/syntax/versions/2.2.0.rb +2 -0
  75. data/lib/regexp_parser/syntax/versions/2.3.0.rb +2 -0
  76. data/lib/regexp_parser/syntax/versions/2.4.0.rb +2 -0
  77. data/lib/regexp_parser/syntax/versions/2.4.1.rb +2 -0
  78. data/lib/regexp_parser/syntax/versions/2.5.0.rb +2 -0
  79. data/lib/regexp_parser/syntax/versions/2.6.0.rb +2 -0
  80. data/lib/regexp_parser/syntax/versions/2.6.2.rb +2 -0
  81. data/lib/regexp_parser/syntax/versions/2.6.3.rb +2 -0
  82. data/lib/regexp_parser/syntax/versions/3.1.0.rb +2 -0
  83. data/lib/regexp_parser/syntax/versions/3.2.0.rb +2 -0
  84. data/lib/regexp_parser/syntax/versions/3.5.0.rb +4 -0
  85. data/lib/regexp_parser/syntax/versions.rb +2 -0
  86. data/lib/regexp_parser/syntax.rb +2 -0
  87. data/lib/regexp_parser/token.rb +2 -0
  88. data/lib/regexp_parser/version.rb +3 -1
  89. data/lib/regexp_parser.rb +2 -0
  90. data/regexp_parser.gemspec +2 -0
  91. metadata +4 -6
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_3_0 < Regexp::Syntax::V2_2_0
2
4
  implements :property, UnicodeProperty::V2_3_0
3
5
  implements :nonproperty, UnicodeProperty::V2_3_0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_4_0 < Regexp::Syntax::V2_3_0
2
4
  implements :property, UnicodeProperty::V2_4_0
3
5
  implements :nonproperty, UnicodeProperty::V2_4_0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_4_1 < Regexp::Syntax::V2_4_0
2
4
  implements :group, Group::V2_4_1
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_5_0 < Regexp::Syntax::V2_4_1
2
4
  implements :property, UnicodeProperty::V2_5_0
3
5
  implements :nonproperty, UnicodeProperty::V2_5_0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_6_0 < Regexp::Syntax::V2_5_0
2
4
  implements :property, UnicodeProperty::V2_6_0
3
5
  implements :nonproperty, UnicodeProperty::V2_6_0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_6_2 < Regexp::Syntax::V2_6_0
2
4
  implements :property, UnicodeProperty::V2_6_2
3
5
  implements :nonproperty, UnicodeProperty::V2_6_2
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V2_6_3 < Regexp::Syntax::V2_6_2
2
4
  implements :property, UnicodeProperty::V2_6_3
3
5
  implements :nonproperty, UnicodeProperty::V2_6_3
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V3_1_0 < Regexp::Syntax::V2_6_3
2
4
  implements :property, UnicodeProperty::V3_1_0
3
5
  implements :nonproperty, UnicodeProperty::V3_1_0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp::Syntax::V3_2_0 < Regexp::Syntax::V3_1_0
2
4
  implements :property, UnicodeProperty::V3_2_0
3
5
  implements :nonproperty, UnicodeProperty::V3_2_0
@@ -0,0 +1,4 @@
1
+ class Regexp::Syntax::V3_5_0 < Regexp::Syntax::V3_2_0
2
+ implements :property, UnicodeProperty::V3_5_0
3
+ implements :nonproperty, UnicodeProperty::V3_5_0
4
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Ruby 1.x is no longer a supported runtime,
2
4
  # but its regex features are still recognized.
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'error'
2
4
 
3
5
  module Regexp::Syntax
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp
2
4
  TOKEN_KEYS = %i[
3
5
  type
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Regexp
2
4
  class Parser
3
- VERSION = '2.10.0'
5
+ VERSION = '2.11.2'
4
6
  end
5
7
  end
data/lib/regexp_parser.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'regexp_parser/version'
2
4
  require_relative 'regexp_parser/token'
3
5
  require_relative 'regexp_parser/scanner'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  $:.unshift File.join(File.dirname(__FILE__), 'lib')
2
4
 
3
5
  require 'regexp_parser/version'
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regexp_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ammar Ali
8
8
  - Janosch Müller
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-12-25 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
15
14
  email:
@@ -106,6 +105,7 @@ files:
106
105
  - lib/regexp_parser/syntax/versions/2.6.3.rb
107
106
  - lib/regexp_parser/syntax/versions/3.1.0.rb
108
107
  - lib/regexp_parser/syntax/versions/3.2.0.rb
108
+ - lib/regexp_parser/syntax/versions/3.5.0.rb
109
109
  - lib/regexp_parser/token.rb
110
110
  - lib/regexp_parser/version.rb
111
111
  - regexp_parser.gemspec
@@ -119,7 +119,6 @@ metadata:
119
119
  source_code_uri: https://github.com/ammar/regexp_parser
120
120
  wiki_uri: https://github.com/ammar/regexp_parser/wiki
121
121
  rubygems_mfa_required: 'true'
122
- post_install_message:
123
122
  rdoc_options: []
124
123
  require_paths:
125
124
  - lib
@@ -134,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
133
  - !ruby/object:Gem::Version
135
134
  version: '0'
136
135
  requirements: []
137
- rubygems_version: 3.4.13
138
- signing_key:
136
+ rubygems_version: 3.6.7
139
137
  specification_version: 4
140
138
  summary: Scanner, lexer, parser for ruby's regular expressions
141
139
  test_files: []