package lrgrep
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127
doc/kernel/Kernel/Info/Item/index.html
Module Info.ItemSource
Explicit representation of LR(0) items. An item is a production with a dot position: A -> α . β. Items are indexed globally across all productions for efficient set operations. The dot position ranges from 0 (before all RHS symbols) to length (after all).
make g prod pos creates an item for production prod with the dot at position pos. Raises Invalid_argument if pos is out of bounds.
last g prod creates an item with the dot at the end of production prod, i.e., the item where the production is fully recognized.
prev g item returns the previous item in the same production (dot moved one position left), or None if the dot is already at position 0.
desc g item returns the (production, position) pair for the item
position g item returns the dot position within the item's production
production g item returns the production that this item belongs to
is_reducible g item returns true if the dot is at the end of the production, meaning the item is ready to be reduced.
Converts an item to a human-readable string in standard notation, e.g., "A:B . c d"