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/CompactQueue/index.html

Module Fix.CompactQueueSource

This module offers a minimalist mutable FIFO queue that is tuned for performance.

In comparison with OCaml's Queue module, it uses a more compact internal representation: elements are stored contiguously in an array. This has a positive impact on performance: both time and memory consumption are reduced.

The implementation is optimized for maximum throughput. The internal array is never shrunk, so a queue that has contained many elements in the past remains large. Furthermore, array slots are not overwritten when elements are extracted; thus, an element that has appeared in the queue in the past can remain reachable. These drawbacks are usually acceptable provided that the queue is thrown away after use.

Sourcetype 'a t

The type of a queue.

Sourceval create : unit -> 'a t

create() creates an empty queue.

Sourceval is_empty : 'a t -> bool

is_empty q tests whether the queue q is empty.

Sourceval add : 'a -> 'a t -> unit

add x q adds the element x at the end of the queue q.

Sourceexception Empty

Empty is raised when take is applied to an empty queue.

Sourceval take : 'a t -> 'a

take q removes and returns the first element of the queue q. It raises Empty if the queue is empty.