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/kernel/Kernel/Info/Reduction/index.html

Module Info.ReductionSource

Reduction information. A reduction represents a (state, production, lookahead set) triple, meaning that in the given state, when the lookahead terminal is in the set, the parser should reduce by the given production.

include INDEXED with type 'g n = 'g reduction
Sourcetype 'g n = 'g reduction
Sourceval cardinal : 'g grammar -> 'g n Fix.Indexing.cardinal
Sourceval of_int : 'g grammar -> int -> 'g n Fix.Indexing.index

state r returns the LR(1) state where reduction r applies

production r returns the production that reduction r reduces by

lookaheads r returns the set of lookahead terminals for reduction r. When the next input terminal is in this set, the reduction is triggered.

from_lr1 g s returns the set of all reductions applicable in LR(1) state s