zorex
safe-regex-rs
zorex | safe-regex-rs | |
---|---|---|
3 | 4 | |
65 | - | |
- | - | |
0.0 | - | |
over 2 years ago | - | |
Zig | ||
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zorex
- Types of Parser Combinators
-
Let's Build a Regex Engine
It's still really early stages, but I am actively working on a regexp engine[0] in Zig which aims to blur the line between regex engines and advanced parsing algorithms used to parse programming languages.
I am quite optimistic that due to Zig's portability and cross compilation, it shouldn't be too hard to expose it as a nice C library and use it from other languages soon.
[0] https://github.com/hexops/zorex
-
Making live repls behave (DRAFT)
My code is public here, albeit a bit complex: https://github.com/hexops/zorex/blob/main/src/combn/engine/parser.zig#L445-L449
safe-regex-rs
-
Contention on multi-threaded regex matching
I added the article's benchmark to the safe-regex benchmarks. I reduced the number of strings checked from 100M to 1M so the benchmark runs in a few seconds. Here are the results running on my 2018 MBP 4-core i5-8259U. You can see that regex is faster on large strings and safe-regex is faster on small strings and in heavy multi-threaded use.
-
Let's Build a Regex Engine
The matcher for "(abc)d" [2] is a more thorough example.
[0] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[1] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[2] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
What are some alternatives?
reng - Simple toy regex engine implemented using backtracking algorithm and continuations.
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
re2 - modern regular expression syntax everywhere with a painless upgrade path [Moved to: https://github.com/SonOfLilit/kleenexp]
packrattle - parser-combinator library (using GLL) for javascript
Scala.js - Scala.js, the Scala to JavaScript compiler
caniuse - Raw browser/feature support data from caniuse.com
rust - Empowering everyone to build reliable and efficient software.