From: Stefan S. <se...@sy...> - 2006-07-25 14:15:20
|
Gilles J. Seguin wrote: > On Mon, 2006-07-24 at 14:53 -0400, Stefan Seefeld wrote: >> skaller wrote: >>> On Mon, 2006-07-24 at 14:14 -0400, Stefan Seefeld wrote: >>>> skaller wrote: > [...] >>> In other words it generates an actual parse tree, rather than >>> an abstract syntax tree? > > the "rather" may mislead, the parse tree is an augmented AST. Well, considering how both representations are actually built, I would phrase it differently. You don't generate a parse tree from an AST by adding to it, but rather, you create an AST by removing ('abstracting away') things from the parse tree. The way I read the question concerns more the API useful to developers who want to hook up to the representation(s) coming out of the parser. So, tools that only return an AST aren't suitable for tasks where you need access to a low level representation, as some relevant information may already be destroyed. Ideally, the tool can generate multiple representations, and let users control the processing pipeline, and only build the representation required for a particular task. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... |