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 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)
DotFile writes a graph representation of the SPPF in dot notation to file
func (*SymbolNode) Label ¶
func (n *SymbolNode) Label() string
func (*SymbolNode) String ¶
func (n *SymbolNode) String() string
Click to show internal directories.
Click to hide internal directories.