package lrgrep

  1. Overview
  2. Docs
Analyse the stack of a Menhir-generated LR parser using regular expressions

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.3.tbz
sha256=84a1874d0c063da371e19c84243aac7c40bfcb9aaf204251e0eb0d1f077f2cde
sha512=5a16ff42a196fd741bc64a1bdd45b4dca0098633e73aa665829a44625ec15382891c3643fa210dbe3704336eab095d4024e093e37ae5313810f6754de6119d55

doc/fix/Fix/Indexing/Sum/index.html

Module Indexing.SumSource

Sum(L)(R) creates a new type-level set, which is the disjoint sums of the sets L and R. The functor application Sum(L)(R) involves a call to cardinal L.n, thereby fixing the cardinal of the set L, if it was an open-ended set. The cardinal of the set R is not fixed: if R is an open-ended set, then the new set is open-ended as well, and it is still permitted to add new elements to R by calling R.fresh(). Fixing the cardinal of the new set fixes the cardinal of R.

Sourcetype (_, _) n
Sourceval cardinal : 'l cardinal -> 'r cardinal -> ('l, 'r) n cardinal
Sourceval inj_l : 'l index -> ('l, 'r) n index
Sourceval inj_r : 'l cardinal -> 'r index -> ('l, 'r) n index
Sourceval prj : 'l cardinal -> ('l, 'r) n index -> ('l index, 'r index) either
Sourcemodule type S = sig ... end

The signature SUM extends CARDINAL with an explicit isomorphism between the set n and the disjoint sum l + r. The functions inj_l and inj_r convert an index into l or an index into r into an index into n. Conversely, the function prj converts an index into r into either an index into l or an index into r.

Sourcemodule Make (L : CARDINAL) (R : CARDINAL) : S with type l := L.n and type r := R.n
Sourceval make : 'l cardinal -> 'r cardinal -> (module S with type l = 'l and type r = 'r)

The function sum is a value-level analogue of the functor Sum.