Learn R Programming

xegaDerivationTrees (version 1.0.0.6)

decodeTree: 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)

Value

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

Arguments

tree

Derivation tree.

ST

Symbol table.

See Also

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

Examples

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

Run the code above in your browser using DataLab