All Projects → Drup → Tyre

Drup / Tyre

Licence: isc
Typed Regular Expressions

Programming Languages

ocaml
1615 projects
types
53 projects

Labels

Projects that are alternatives of or similar to Tyre

Regex Snippets
Organized list of useful RegEx snippets
Stars: ✭ 109 (-24.83%)
Mutual labels:  regex
Ffind
A sane replacement for find
Stars: ✭ 124 (-14.48%)
Mutual labels:  regex
Guide To Swift Strings Sample Code
Xcode Playground Sample Code for the Flight School Guide to Swift Strings
Stars: ✭ 136 (-6.21%)
Mutual labels:  regex
Homebridge Http Switch
Powerful http switch for Homebridge: https://github.com/homebridge/homebridge
Stars: ✭ 111 (-23.45%)
Mutual labels:  regex
Grepbugs
A regex based source code scanner.
Stars: ✭ 118 (-18.62%)
Mutual labels:  regex
Bee.js
javaScript常用工具类
Stars: ✭ 130 (-10.34%)
Mutual labels:  regex
Orchestra
One language to be RegExp's Successor. Visually readable and rich, technically safe and extended, naturally scalable, advanced, and optimized
Stars: ✭ 103 (-28.97%)
Mutual labels:  regex
Bilibili Ban List
居家旅行常备的B站弹幕屏蔽列表
Stars: ✭ 143 (-1.38%)
Mutual labels:  regex
Js Regular Expression Awesome
📄我收藏的正则表达式大全,欢迎补充
Stars: ✭ 120 (-17.24%)
Mutual labels:  regex
Recap
deserialize typed structures from regex captures
Stars: ✭ 135 (-6.9%)
Mutual labels:  regex
Proposal Regexp Unicode Property Escapes
Proposal to add Unicode property escapes `\p{…}` and `\P{…}` to regular expressions in ECMAScript.
Stars: ✭ 112 (-22.76%)
Mutual labels:  regex
Lens Regex Pcre
Text lenses using PCRE regexes
Stars: ✭ 116 (-20%)
Mutual labels:  regex
Sammler
A tool to extract useful data from documents
Stars: ✭ 131 (-9.66%)
Mutual labels:  regex
Blog
我的日记
Stars: ✭ 110 (-24.14%)
Mutual labels:  regex
Nim Regex
Pure Nim regex engine. Guarantees linear time matching
Stars: ✭ 136 (-6.21%)
Mutual labels:  regex
Command Line Text Processing
⚡ From finding text to search and replace, from sorting to beautifying text and more 🎨
Stars: ✭ 9,771 (+6638.62%)
Mutual labels:  regex
Kaggle Quora Dup
Solution to Kaggle's Quora Duplicate Question Detection Competition
Stars: ✭ 129 (-11.03%)
Mutual labels:  regex
Regex Dos
👮 👊 RegEx Denial of Service (ReDos) Scanner
Stars: ✭ 143 (-1.38%)
Mutual labels:  regex
Micromatch
Contributing Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Stars: ✭ 1,979 (+1264.83%)
Mutual labels:  regex
Readable Pylint Messages
List of pylint human readable message ids and dev readable codes
Stars: ✭ 134 (-7.59%)
Mutual labels:  regex

Tyre Build Status docs

Tyre is a set of combinators to build type-safe regular expressions, allowing automatic extraction and modification of matched groups.

Tyre is bi-directional: a typed regular expressions can be used for parsing and unparsing. It also allows routing, by providing a list of regexs/routes and their handlers.

Tyre is pure OCaml and uses re. To install it:

opam install tyre

Documentation is available here. See also the examples/ directory. A primitive HTTP parser can be found in the benchmark/ directory.

# let dim = Tyre.( str"dim:" *> int <&> str"x" *> int ) ;;
val dim : (int * int) Tyre.t

# let dim_re = Tyre.compile dim ;;
val dim_re : (int * int) Tyre.re

# Tyre.exec dim_re "dim:3x4" ;;
- : (int * int, (int * int) Tyre.error) result = Result.Ok (3, 4)

# Tyre.eval dim (2, 5) ;;
- : string = "dim:2x5"

Benchmark

Some benchmarks are available under the benchmark/ directory. The benchmark compares the parsing of HTTP requests using angstrom and various tyre methods. You can run them with:

./benchmark/data/replicate benchmark/data/http-requests.txt 100
jbuilder exec benchmark/benchmark_angstrom.exe -- -a
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].