http://www.perlmonks.org?node_id=534688


in reply to Re: Trees and Language::AttributeGrammar
in thread Trees and Language::AttributeGrammar

I am not entirely sure I understand what you are talking about. The values associated with the nodes are completely optional and arbitrary -- they could very well be strings or other objects or even left undef. The code just tries to count how many nodes the tree has, independently of the values associated with these nodes.