[cfe-dev] Clarification for term "AST"

Matthieu Monrocq 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
> situation
> 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
> improve
> the software design at various places.
>
> Regards,
> Markus
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

Hi Markus,

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.

-- Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130222/6057d37a/attachment.html>


More information about the cfe-dev mailing list