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