treeNodes {xegaDerivationTrees} | R Documentation |
Measures the number of inner nodes in a derivation tree.
Description
treeNodes()
returns
the number of non-terminal symbols in a
derivation tree.
Usage
treeNodes(tree, ST)
Arguments
tree |
Derivation tree. |
ST |
Symbol table. |
Value
Integer. Number of non-terminal symbols in a derivation tree.
See Also
Other Measures of Tree Attributes:
treeLeaves()
,
treeListDepth()
,
treeSize()
Examples
g<-compileBNF(booleanGrammar())
a<-randomDerivationTree(g$Start, g)
treeNodes(a, g$ST)
[Package xegaDerivationTrees version 1.0.0.0 Index]