PPX syntax for tyre regular expressions and routes

This PPX compiles

[%tyre {|re|}]

into 'a Tyre.t and

| {|re1|} as x1 -> e1
| {|reN|} as x2 -> eN

into '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 what re extracts.
  • re+, re*, re{n,m} extracts a list of what re extracts.
  • (?@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 of as ....
  • One or more (?<v>re) in a sequence extracts an object where each method v is bound to what re extracts.
  • An alternative with one (?<v>re) per branch extracts a polymorphic variant where each constructor `v receives what re extracts as its argument.
  • (?&v:qname) is a shortcut for (?<v>(?&qname)).
AuthorsGabriel Radanne <drupyog@zoho.com> and Petter A. Urkedal <paurkedal@gmail.com>
LicenseLGPL-3.0-only WITH OCaml-LGPL-linking-exception
Issue Trackerhttps://github.com/paurkedal/ppx_regexp/issues
MaintainerPetter A. Urkedal <paurkedal@gmail.com>
Source [http] https://github.com/paurkedal/ppx_regexp/releases/download/v0.4.1/ppx_regexp-0.4.1.tbz
No package is dependent