package comby-kernel

  1. Overview
  2. Docs
On This Page
  1. Specification
Legend:
Library
Module
Module type
Parameter
Class
Class type

Specification

Defines an internal type that represents an atomic operation for matching, rule application and rewriting.

type t = {
  1. match_template : string;
  2. rule : Rule.t option;
  3. rewrite_template : string option;
}
val create : ?rewrite_template:string -> ?rule:rule -> match_template:string -> unit -> t

create rewrite_template rule match_template creates a new specification. If rule is supplied, it will be applied to matches of match_template. If rewrite_template is supplied, running a specification will return replacements rather than just matches (see process_single_source below).

val to_regex : t -> string

regex [t] returns a generalized regular expression corresponding to the specification

OCaml

Innovation. Community. Security.