I want to parse a tree
the tree is like (((1,2)3,4)5,6)
see the attached parse tree
the program would produce an array from root to each leaf
[IMG]http://aycu25.webshots.com/image/35944/2002642992068581724_th.jpg[/IMG]
So I would like to have 4 arrays
a[]={5,3,1}
b[]={5,3,2}
c[]={5,4}
d[]={6}
I would like to have a general format that would produce such arrays for any given parse tree.