powered by
A depth-first left-to-right tree traversal without recursion.
printDerivations(tree, G, verbose = FALSE)
A list of derivations.
Derivation tree.
The context-free grammar.
If TRUE, the list of derivations is printed. Default: FALSE.
Works with complete and incomplete derivation trees.
g<-compileBNF(booleanGrammar()) a<-randomDerivationTree(g$Start, g) l<-printDerivations(a, g, verbose=TRUE)
Run the code above in your browser using DataLab