README.md in regexp_parser-0.5.0 vs README.md in regexp_parser-1.0.0

- old
+ new

@@ -10,11 +10,11 @@ * A parser that produces a "tree" of Expression objects (OO API) * Runs on ruby 1.9, 2.x, and jruby (1.9 mode) runtimes. * Recognizes ruby 1.8, 1.9, and 2.x regular expressions [See Supported Syntax](#supported-syntax) -_For an example of regexp_parser in use, see the [meta_re project](https://github.com/ammar/meta_re)_ +_For examples of regexp_parser in use, see [Example Projects](#example-projects)._ --- ## Requirements @@ -367,19 +367,19 @@ | &emsp;&nbsp;_**Simple**_ | `\p{Dash}`, `\p{Extender}` | &#x2713; | ##### Inapplicable Features Some modifiers, like `o` and `s`, apply to the **Regexp** object itself and do not -appear in its source. Others such modifiers include the encoding modifiers `e` and `n` -[See](http://www.ruby-doc.org/core-2.1.3/Regexp.html#class-Regexp-label-Encoding). +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). These are not seen by the scanner. The following features are not currently enabled for Ruby by its regular expressions library (Onigmo). They are not supported by the scanner. - - **Quotes**: `\Q...\E` _<a href="https://github.com/k-takata/Onigmo/blob/master/doc/RE#L452/" title="Links to master branch, may change">[See]</a>_ - - **Capture History**: `(?@...)`, `(?@<name>...)` _<a href="https://github.com/k-takata/Onigmo/blob/master/doc/RE#L499" title="Links to master branch, may change">[See]</a>_ + - **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, @@ -387,23 +387,12 @@ ## Testing To run the tests simply run rake from the root directory, as 'test' is the default task. -In addition to the main test task, which runs all tests, there are also component specific test -tasks, which only run the tests for one component at a time. These are: +It generates the scanner's code from the ragel source files and runs all the tests, thus it requires ragel to be installed. -* test:scanner -* test:lexer -* test:parser -* test:expression -* test:syntax - -_A special task 'test:full' generates the scanner's code from the ragel source files and -runs all the tests. This task requires ragel to be installed._ - - The tests use ruby's test/unit. They can also be run with: ``` bin/test ``` @@ -418,11 +407,16 @@ ``` bin/test test/expression/test_base.rb -n test_expression_to_re ``` +Note that changes to ragel files will not be reflected when using `bin/test`, so you might want to run: +``` +rake ragel:rb && bin/test test/scanner/test_properties.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 ruby scanner code. @@ -437,9 +431,19 @@ To install the gem from the cloned project, run: ``` rake install ``` + + +## Example Projects +Projects using regexp_parser. + +- [meta_re](https://github.com/ammar/meta_re) is a regular expression preprocessor with alias support. + +- [mutant](https://github.com/mbj/mutant) manipulates your regular expressions (amongst others) to see if your tests cover their behavior. + +- [js_regex](https://github.com/janosch-x/js_regex) converts Ruby regular expressions to JavaScript-compatible regular expressions. ## References Documentation and books used while working on this project.