package lrgrep

  1. Overview
  2. Docs
Detailed error messages for Menhir-generated parsers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.9.tbz
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127

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.