package menhirLib

  1. Overview
  2. Docs

Module Printers.MakeSource

This module offers printers for several of the data structures involved in the incremental API. It is considered unstable and may be modified or removed in the future.

Parameters

module User : sig ... end

Signature

Sourceval print_symbols : I.xsymbol list -> unit

Printing a list of symbols.

Sourceval print_element_as_symbol : I.element -> unit

Printing an element as a symbol. This prints just the symbol that this element represents; nothing more.

Sourceval print_stack : 'a I.env -> unit

Printing a stack as a list of elements. This function needs an element printer. It uses print_element if provided by the user; otherwise it uses print_element_as_symbol. (Ending with a newline.)

Sourceval print_item : I.item -> unit

Printing an item. (Ending with a newline.)

Sourceval print_production : I.production -> unit

Printing a production. (Ending with a newline.)

Sourceval print_current_state : 'a I.env -> unit

Printing the current LR(1) state. The current state is first displayed as a number; then the list of its LR(0) items is printed. (Ending with a newline.)

Sourceval print_env : 'a I.env -> unit

Printing a summary of the stack and current state. This function just calls print_stack and print_current_state in succession.