|Abstract Syntax Trees - binary tree or other, which is best? firstname.lastname@example.org (Ed Davis) (2000-10-01)|
|Re: Abstract Syntax Trees - binary tree or other, which is best? Joachim.Pimiskern@de.bosch.com (Joachim Pimiskern) (2000-10-08)|
|Re: Abstract Syntax Trees - binary tree or other, which is best? email@example.com (Tom Payne) (2000-10-08)|
|From:||Tom Payne <firstname.lastname@example.org>|
|Date:||8 Oct 2000 22:28:38 -0400|
|Organization:||University of California, Riverside|
Ed Davis <email@example.com> wrote:
> I have read a couple of texts where the author recommends using a
> binary tree for the abstract syntax tree. In many other texts, non-
> binary trees are used, with the tree being tailored to what is being
> stored at the time.
> Are there major advantages to using a binary tree? The second
> approach seems easier to me (as in Terry, Louden, and Watt), but I'm a
> neophyte in this area, so what do I know.
Abstract syntax trees are inherently non-binary, but one of the
standard data-structures tricks is to represent a general tree via a
binary tree wherein each node takes his oldest son (relative to the
general tree) as his left descendant and his next younger brother
(relative to the general tree) as his right descendant.
Return to the
Search the comp.compilers archives again.