powered by
treeSize() returns the number of symbols in a derivation tree.
treeSize()
treeSize(tree)
Integer. Number of symbols in a derivation tree.
Derivation tree.
Other Measures of Tree Attributes: treeLeaves(), treeListDepth(), treeNodes(), treeProbability()
treeLeaves()
treeListDepth()
treeNodes()
treeProbability()
g<-compileBNF(booleanGrammar()) a<-randomDerivationTree(g$Start, g) treeSize(a)
Run the code above in your browser using DataLab