sppf

package
v3.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sppf implements a Shared Packed Parse Forest as defined in:

Elizabeth Scott, Adrian Johnstone
GLL parse-tree generation
Science of Computer Programming (2012), doi:10.1016/j.scico.2012.03.005

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntermediateNode

type IntermediateNode struct {
	NT         symbols.NT
	Body       symbols.Symbols
	Pos        int
	Lext, Rext int
	Children   []*PackedNode
}

func (*IntermediateNode) Label

func (n *IntermediateNode) Label() string

func (*IntermediateNode) String

func (n *IntermediateNode) String() string

type Node

type Node interface {
	Label() string
	String() string
	// contains filtered or unexported methods
}

type PackedNode

type PackedNode struct {
	NT                symbols.NT
	Body              symbols.Symbols
	Pos               int
	Lext, Pivot, Rext int

	LeftChild  Node // Either an intermediate or Symbol node
	RightChild *SymbolNode
}

func (*PackedNode) Label

func (n *PackedNode) Label() string

func (*PackedNode) String

func (n *PackedNode) String() string

type SymbolNode

type SymbolNode struct {
	Symbol     string
	Lext, Rext int
	Children   []*PackedNode
}

func (*SymbolNode) DotFile

func (root *SymbolNode) DotFile(file string)

func (*SymbolNode) Label

func (n *SymbolNode) Label() string

func (*SymbolNode) String

func (n *SymbolNode) String() string

Jump to

Keyboard shortcuts

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