frstflw

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Empty = "ϵ"

Variables

This section is empty.

Functions

This section is empty.

Types

type FF

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

func New

func New(g *ast.GoGLL) *FF

func (*FF) FirstOfString

func (ff *FF) FirstOfString(str []string) *stringset.StringSet

func (*FF) FirstOfSymbol

func (ff *FF) FirstOfSymbol(s string) *stringset.StringSet

Gets the FIRST set for a given symbol from an initialized struct

func (*FF) Follow

func (ff *FF) Follow(nt string) *stringset.StringSet

Gets the FOLLOW set for a given nonterminal (provided receiver has been initialized)

func (*FF) IsNullable

func (ff *FF) IsNullable(s string) bool

Checks whether a given symbol is nullable (contains ϵ in its FIRST set)

func (*FF) LeftRec

func (ff *FF) LeftRec(nt string) *stringset.StringSet

Gets the set of nonterminals that may be called left-recursively from a given nonterminal (provided receiver has been initialized)

Jump to

Keyboard shortcuts

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