decodeDT: Decodes a derivation tree into a program.

View source: R/derivationTrees.R

decodeDTR Documentation

Decodes a derivation tree into a program.

Description

The program may contain non-terminal symbols and its evaluation may fail.

Usage

decodeDT(tree, ST)

Arguments

tree

Derivation tree.

ST

Symbol table.

Value

A program

See Also

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

Examples

g<-compileBNF(booleanGrammar())
t1<-generateDerivationTree(sym=g$Start,sample(100, 10, replace=TRUE), G=g)
decodeDT(t1$tree, g$ST) 


xegaDerivationTrees documentation built on April 16, 2025, 5:11 p.m.