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/support/Lrgrep_support/Code_emitter/index.html

Module Lrgrep_support.Code_emitterSource

Emit and link bytecode program

Sourcetype t

A code emitter.

Sourceval make : unit -> t

Create a new emitter

Sourceval position : t -> RT.program_counter

The pc of the next emitted instruction. Starts at 0.

Sourceval emit : t -> RT.program_instruction -> unit

Emit a new instruction

Sourceval emit_yield_reloc : t -> RT.program_counter Stdlib.ref -> unit

Emit a yield instruction to a target that (may) not yet be known. The reference will be read during linking.

Sourceval emit_match_reloc : t -> Lrgrep_support_packer.promise -> unit

Emit a match instruction to a vector that (may) not yet be known. The promise will be resolved during linking.

Produce a final program, with all emitted instructions at the correct positions and reading all pending relocations references.