gslot

package
v0.0.0-...-d977049 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package gslot implements grammar slots

Index

Constants

View Source
const (
	// Slot mode for unknown parse status
	Unknown = 'R'
	// Slot mode for parse failure
	Fail = 'F'
	// Slot mode for matching parse
	Match = 'M'
)

Variables

This section is empty.

Functions

func LabelFor

func LabelFor(head string, alt, pos int, mode rune) string

Types

type GSlot

type GSlot struct {
	// contains filtered or unexported fields
}

func New

func New(g *ast.GoGLL, ff *frstflw.FF) *GSlot

func (*GSlot) Len

func (gs *GSlot) Len() int

func (*GSlot) Slots

func (gs *GSlot) Slots() Slots

type Label

type Label struct {
	Head      string
	Alternate int
	Pos       int
	Mode      rune
	// contains filtered or unexported fields
}

func NewLabel

func NewLabel(head string, alt, pos int, mode rune, gs *GSlot, ff *frstflw.FF) *Label

func (Label) IsEoR

func (s Label) IsEoR() bool

func (Label) IsFiR

func (s Label) IsFiR() bool

func (Label) Label

func (s Label) Label() string

func (Label) String

func (s Label) String() string

func (Label) Symbols

func (s Label) Symbols() symbols.Symbols

type Slots

type Slots []Label

func (Slots) Labels

func (ss Slots) Labels() (labels []string)

func (Slots) Len

func (ss Slots) Len() int

func (Slots) Less

func (ss Slots) Less(i, j int) bool

func (Slots) Swap

func (ss Slots) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL