Documentation ¶
Index ¶
- type ActionType
- type Event
- type Item
- func (item Item) Action() ActionType
- func (item Item) BackwardRhs() iter.Seq[string]
- func (item Item) ExpectLookahead() bool
- func (item Item) HasLookahead(la string) bool
- func (item Item) IndicesOf(symbol string) []int
- func (item Item) Lhs() string
- func (item Item) NextRhs() (string, bool)
- func (item Item) Pos() int
- func (item Item) RhsAt(idx int) (string, bool)
- func (item *Item) SetLookaheads(lookaheads []string) error
- func (item Item) String() string
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶ added in v0.1.9
type ActionType int
const ( ActAccept ActionType = iota // (ACCEPT) ActReduce // (REDUCE) ActShift // (SHIFT) )
func (ActionType) String ¶ added in v0.1.9
func (i ActionType) String() string
type Event ¶ added in v0.1.11
type Event struct {
// contains filtered or unexported fields
}
func (Event) Action ¶ added in v0.1.11
func (e Event) Action() ActionType
func (Event) ExpectedNext ¶ added in v0.1.11
type Item ¶ added in v0.1.9
type Item struct {
// contains filtered or unexported fields
}
func (Item) Action ¶ added in v0.1.11
func (item Item) Action() ActionType
func (Item) ExpectLookahead ¶ added in v0.1.11
func (Item) HasLookahead ¶ added in v0.1.11
func (Item) NextRhs ¶ added in v0.1.11
NextRhs returns the symbol after the current position in the RHS.
Returns:
- string: The symbol after the current position in the RHS.
- bool: True if the retrieval was successful, false otherwise.
func (*Item) SetLookaheads ¶ added in v0.1.9
Click to show internal directories.
Click to hide internal directories.