README.md in regexp_parser-2.1.1 vs README.md in regexp_parser-2.2.0
- old
+ new
@@ -1,8 +1,11 @@
# Regexp::Parser
-[![Gem Version](https://badge.fury.io/rb/regexp_parser.svg)](http://badge.fury.io/rb/regexp_parser) [![Build Status](https://github.com/ammar/regexp_parser/workflows/tests/badge.svg)](https://github.com/ammar/regexp_parser/actions) [![Build Status](https://github.com/ammar/regexp_parser/workflows/gouteur/badge.svg)](https://github.com/ammar/regexp_parser/actions) [![Code Climate](https://codeclimate.com/github/ammar/regexp_parser.svg)](https://codeclimate.com/github/ammar/regexp_parser/badges)
+[![Gem Version](https://badge.fury.io/rb/regexp_parser.svg)](http://badge.fury.io/rb/regexp_parser)
+[![Build Status](https://github.com/ammar/regexp_parser/workflows/tests/badge.svg)](https://github.com/ammar/regexp_parser/actions)
+[![Build Status](https://github.com/ammar/regexp_parser/workflows/gouteur/badge.svg)](https://github.com/ammar/regexp_parser/actions)
+[![Code Climate](https://codeclimate.com/github/ammar/regexp_parser.svg)](https://codeclimate.com/github/ammar/regexp_parser/badges)
A Ruby gem for tokenizing, parsing, and transforming regular expressions.
* Multilayered
* A scanner/tokenizer based on [Ragel](http://www.colm.net/open-source/ragel/)
@@ -355,24 +358,28 @@
| **Quantifiers** | | ⋱ |
|   _**Greedy**_ | `?`, `*`, `+`, `{m,M}` | ✓ |
|   _**Reluctant** (Lazy)_ | `??`, `*?`, `+?`, `{m,M}?` | ✓ |
|   _**Possessive**_ | `?+`, `*+`, `++`, `{m,M}+` | ✓ |
| **String Escapes** | | ⋱ |
-|   _**Control**_ | `\C-C`, `\cD` | ✓ |
+|   _**Control** \[1\]_ | `\C-C`, `\cD` | ✓ |
|   _**Hex**_ | `\x20`, `\x{701230}` | ✓ |
-|   _**Meta**_ | `\M-c`, `\M-\C-C`, `\M-\cC`, `\C-\M-C`, `\c\M-C` | ✓ |
+|   _**Meta** \[1\]_ | `\M-c`, `\M-\C-C`, `\M-\cC`, `\C-\M-C`, `\c\M-C` | ✓ |
|   _**Octal**_ | `\0`, `\01`, `\012` | ✓ |
|   _**Unicode**_ | `\uHHHH`, `\u{H+ H+}` | ✓ |
-| **Unicode Properties** | _<sub>([Unicode 11.0.0](http://www.unicode.org/versions/Unicode11.0.0/))</sub>_ | ⋱ |
+| **Unicode Properties** | _<sub>([Unicode 13.0.0](https://www.unicode.org/versions/Unicode13.0.0/))</sub>_ | ⋱ |
|   _**Age**_ | `\p{Age=5.2}`, `\P{age=7.0}`, `\p{^age=8.0}` | ✓ |
|   _**Blocks**_ | `\p{InArmenian}`, `\P{InKhmer}`, `\p{^InThai}` | ✓ |
|   _**Classes**_ | `\p{Alpha}`, `\P{Space}`, `\p{^Alnum}` | ✓ |
|   _**Derived**_ | `\p{Math}`, `\P{Lowercase}`, `\p{^Cased}` | ✓ |
|   _**General Categories**_ | `\p{Lu}`, `\P{Cs}`, `\p{^sc}` | ✓ |
|   _**Scripts**_ | `\p{Arabic}`, `\P{Hiragana}`, `\p{^Greek}` | ✓ |
|   _**Simple**_ | `\p{Dash}`, `\p{Extender}`, `\p{^Hyphen}` | ✓ |
+**\[1\]**: As of Ruby 3.1, meta and control sequences are [pre-processed to hex escapes when used in Regexp literals](
+ https://github.com/ruby/ruby/commit/11ae581a4a7f5d5f5ec6378872eab8f25381b1b9 ), so they will only reach the
+scanner and will only be emitted if a String or a Regexp that has been built with the `::new` constructor is scanned.
+
##### Inapplicable Features
Some modifiers, like `o` and `s`, apply to the **Regexp** object itself and do not
appear in its source. Other such modifiers include the encoding modifiers `e` and `n`
[See](http://www.ruby-doc.org/core-2.5.0/Regexp.html#class-Regexp-label-Encoding).
@@ -382,37 +389,24 @@
expressions library (Onigmo). They are not supported by the scanner.
- **Quotes**: `\Q...\E` _[[See]](https://github.com/k-takata/Onigmo/blob/7911409/doc/RE#L499)_
- **Capture History**: `(?@...)`, `(?@<name>...)` _[[See]](https://github.com/k-takata/Onigmo/blob/7911409/doc/RE#L550)_
-
See something missing? Please submit an [issue](https://github.com/ammar/regexp_parser/issues)
_**Note**: Attempting to process expressions with unsupported syntax features can raise an error,
or incorrectly return tokens/objects as literals._
## Testing
-To run the tests simply run rake from the root directory, as 'test' is the default task.
+To run the tests simply run rake from the root directory.
-It generates the scanner's code from the Ragel source files and runs all the tests, thus it requires Ragel to be installed.
+The default task generates the scanner's code from the Ragel source files and runs all the specs, thus it requires Ragel to be installed.
-The tests use RSpec. They can also be run with the test runner that whitelists some warnings:
+Note that changes to Ragel files will not be reflected when running `rspec` on its own, so to run individual tests you might want to run:
```
-bin/test
-```
-
-You can run a specific test like so:
-
-```
-bin/test spec/scanner/properties_spec.rb
-```
-
-Note that changes to Ragel files will not be reflected when running `rspec` or `bin/test`, so you might want to run:
-
-```
-rake ragel:rb && bin/test spec/scanner/properties_spec.rb
+rake ragel:rb && rspec spec/scanner/properties_spec.rb
```
## Building
Building the scanner and the gem requires [Ragel](http://www.colm.net/open-source/ragel/) to be
installed. The build tasks will automatically invoke the 'ragel:rb' task to generate the