decodeTree {xegaDerivationTrees}R Documentation

Returns a list of all symbols of a derivation tree in depth-first left-to-right order.

Description

decodeTree() returns a list of all symbols of a derivation tree in depth-first left-to-right order (coded as R Factor with the symbol identifiers as levels).

Usage

decodeTree(tree, ST)

Arguments

tree

Derivation tree.

ST

Symbol table.

Value

List of all symbols in depth-first left-to-right order.

See Also

Other Decoder: decodeCDT(), decodeDTsym(), decodeDT(), leavesIncompleteDT()

Examples

g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
decodeTree(a, g$ST) 


[Package xegaDerivationTrees version 1.0.0.0 Index]