View source: R/printDerivations.R
printDerivations | R Documentation |
A depth-first left-to-right tree traversal without recursion.
printDerivations(tree, G, verbose = FALSE)
tree |
Derivation tree. |
G |
The context-free grammar. |
verbose |
If TRUE, the list of derivations is printed. Default: FALSE. |
Works with complete and incomplete derivation trees.
A list of derivations.
g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
l<-printDerivations(a, g, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.