[cfe-dev] Clarification for term "AST"
matthieu.monrocq at gmail.com
Fri Feb 22 11:05:28 PST 2013
On Fri, Feb 22, 2013 at 7:29 PM, Markus Elfring <Markus.Elfring at web.de>wrote:
> > Sorry, but I think this one is "not to be fixed".
> I thank you very much for your detailed response.
> I find that you mention a couple of issues where interfaces from different
> abstraction levels are affected in unclear ways. I guess that this
> results into some challenges for a better understanding of involved
> implementation details and increases the potential for unpleasant mistakes.
> I hope that further constructive discussions will help to clarify and
> the software design at various places.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
The problem as I see it is that building a "pure" AST of C++ (and C) is
just impossible because to know whether you have a variable declaration or
a functional call you require basic semantic analysis already. This is a
defect of the specification of the grammar itself, and it will not be
solved now (it would require completely reworking the grammar which is
obviously impractical given the number of programs written).
Therefore, you'll always have "kind-of" a semantic tree, without a
dedicated Abstract Syntax Tree level.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev