Info.ItemSourceExplicit 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"