decodeCDT {xegaDerivationTrees}R Documentation

Converts a complete derivation tree into a program.

Description

decodeCDT() returns a program (a text string with the terminal symbol string). If the derivation tree still has non-terminal leaves, the non-terminal leaves are omitted. The program produces a syntax error. The program can not be repaired.

Usage

decodeCDT(tree, ST)

Arguments

tree

Derivation tree.

ST

Symbol table.

Value

Program.

See Also

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

Examples

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


[Package xegaDerivationTrees version 1.0.0.0 Index]