opam-version: "2.0"
maintainer: "paurkedal@gmail.com"
authors: ["Petter A. Urkedal <paurkedal@gmail.com>"]
homepage: "https://github.com/paurkedal/ppx_regexp"
bug-reports: "https://github.com/paurkedal/ppx_regexp/issues"
dev-repo: "git+https://github.com/paurkedal/ppx_regexp.git"
license: "LGPL-3.0-only with OCaml-LGPL-linking-exception"
build: ["jbuilder" "build" "--root" "." "-j" jobs "@install"]
depends: [
  "ocaml" {>= "4.02.3"}
  "jbuilder"
  "ocaml-migrate-parsetree" {< "2.0.0"}
  "re" {>= "1.7.2"}
  "ppx_tools_versioned"
]
synopsis: "Matching Regular Expressions with OCaml Patterns"
description: """
This syntax extension turns

    match%pcre x with
    | {|re1|} -> e1
    ...
    | {|reN|} -> eN
    | _ -> e0

into suitable invocations to the ocaml-re library.  The patterns are plain
strings of the form accepted by `Re_pcre`, except groups can be bound to
variables using the syntax `(?<var>...)`.  The type of `var` will be
`string` if a match is of the groups is guaranteed given a match of the
whole pattern, and `string option` if the variable is bound to or nested
below an optionally matched group."""
url {
  src:
    "https://github.com/paurkedal/ppx_regexp/releases/download/v0.3.2/ppx_regexp-0.3.2.tbz"
  checksum: "md5=e98e79d9e72803f69c81282cceabdaaa"
}
