Re: RM and abstract syntax trees
Date: Sat, 03 Nov 2007 17:06:23 -0000
On Nov 1, 11:24 am, Tegiri Nenashi <TegiriNena..._at_gmail.com> wrote:
> On Nov 1, 8:04 am, paul c <toledobythe..._at_ooyah.ac> wrote:
> > Surely the application here is the manipulation
> > of the parse tree, not the AST.
> Parse tree indeed is the king, not AST. Given the parse tree one can
> easily derive AST by selecting only "interesting" nodes. The aguments
> for AST -- that it is more human readable and more compact -- are both
> meningless from the theory perspective.
Various compiler people I know would disagree with this. The parse tree has lots of irrelevant info in it. Also the two may not have the same structure. For example a set of child nodes may appear as a left (or right) heavy tree, as a result of the structure of the productions. Whereas the semantic view might be a list or even a set.
Marshall Received on Sat Nov 03 2007 - 18:06:23 CET