class Rley::Base::DottedItem

A dotted item is a parse state for a given production/grammar rule It partitions the rhs of the rule in two parts. The left part consists of the symbols in the rules that are matched by the input tokens. The right part consists of symbols that are predicted to match the input tokens. The terminology stems from the traditional way to visualize the partition by using a fat dot character as a separator between the left and right parts An item with the dot at the beginning (i.e. before any rhs symbol)

is called a predicted item.

An item with the dot at the end (i.e. after all rhs symbols)

is called a reduce item.

An item with a dot in front of a terminal is called a shift item.