[cfe-dev] Clarification for term "AST"

Markus Elfring Markus.Elfring at web.de
Fri Feb 22 12:09:17 PST 2013

> The problem as I see it is that building a "pure" AST of C++ (and C) is just impossible

I have got a different opinion. - Corresponding solutions will need more efforts
for further separation of concerns, won't they?

> because to know whether you have a variable declaration or a functional call
> you require basic semantic analysis already.

I guess that you refer to ambiguities in the programming language(s) like they
were also described by software researchers "Edward D. Willink" and "Adrian D.

> 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).

I assume that there happened some discussions on this already.

> Therefore, you'll always have "kind-of" a semantic tree,

I would like to suggest a different approach.

> without a dedicated Abstract Syntax Tree level.

I guess that it is another software design challenge to ensure clear interfaces
between the involved abstraction levels.


More information about the cfe-dev mailing list