package lrgrep

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Regexp.ExprSource

Sourcetype uid = private int

Integers that serves has unique id to identify sub-terms. Thanks to properties of Antimirov's derivatives, no new term is introduced during derivation. All terms are produced during initial parsing.

Sourcetype 'g t = private {
  1. uid : uid;
  2. desc : 'g desc;
  3. position : Syntax.position;
}
Sourceand 'g desc =
  1. | Set of 'g Info.lr1 Utils.Misc.indexset * Capture.set
    (*

    Recognise a set of states, and optionally bind the matching state to a variable.

    *)
  2. | Alt of 'g t list
    (*

    Alt ts is the disjunction of sub-terms ts (length >= 2). Alt [] represents the empty language.

    *)
  3. | Seq of 'g t list
    (*

    Seq ts is the concatenation of sub-terms ts (length >= 2). Seq [] represents the ε.

    *)
  4. | Star of 'g t * Syntax.quantifier_kind
    (*

    Star t is represents the Kleene star of t

    *)
  5. | Filter of 'g Info.lr1 Utils.Misc.indexset
  6. | Reduce of Capture.set * 'g Reductions.t
    (*

    The reduction operator

    *)
  7. | Usage of Utils.Usage.set

The different constructors of regular expressions

Sourceval empty : _ t

A regular expression term with its unique ID, its description and its position.

Sourceval make : Syntax.position -> 'g desc -> 'g t

Introduce a new term, allocating a unique ID

Sourceval compare : 'g t -> 'g t -> int

Compare two terms

Sourceval cmon : ?lr1:('g Info.lr1 Fix.Indexing.index -> Cmon.t) -> 'g t -> Cmon.t

Print a term to a Cmon document. var arguments allow to customize printing of variables.