ppx_tyreversion Documentation on ocaml.org
PPX syntax for tyre regular expressions and routes
This PPX compiles
[%tyre {|re|}]into 'a Tyre.t and
function%tyre
| {|re1|} as x1 -> e1
...
| {|reN|} as x2 -> eNinto 'a Type.route, where re, re1, ... are regular expressions
expressed in a slightly extended subset of PCRE. The interpretations are:
re?extracts an option of whatreextracts.re+,re*,re{n,m}extracts a list of whatreextracts.(?@qname)refers to any identifier bound to a typed regular expression of type'a Tyre.t.- One or more
(?<v>re)at the top level can be used to bind variables instead ofas .... - One or more
(?<v>re)in a sequence extracts an object where each methodvis bound to whatreextracts. - An alternative with one
(?<v>re)per branch extracts a polymorphic variant where each constructor`vreceives whatreextracts as its argument. (?&v:qname)is a shortcut for(?<v>(?&qname)).
| Authors | Gabriel Radanne <drupyog@zoho.com> and Petter A. Urkedal <paurkedal@gmail.com> |
|---|---|
| License | LGPL-3.0-only WITH OCaml-LGPL-linking-exception |
| Published | |
| Homepage | https://github.com/paurkedal/ppx_regexp |
| Issue Tracker | https://github.com/paurkedal/ppx_regexp/issues |
| Maintainer | Petter A. Urkedal <paurkedal@gmail.com> |
| Dependencies |
|
| Source [http] | https://github.com/paurkedal/ppx_regexp/releases/download/v0.4.0/ppx_regexp-0.4.0.tbz sha256=b2cf63433078114cf9cf3cef1ffedbd7e2adb0a85bcafa563c3bd994b9299c2b md5=44691d6e1c6c02300329a4eb769922ab |
| Edit | https://github.com/ocaml/opam-repository/tree/master/packages/ppx_tyre/ppx_tyre.0.4.0/opam |
No package is dependent


