Using of parse tree externally

Robert Dewar dewar@gnat.com
Fri Oct 20 17:12:00 GMT 2000


<<Well, I'm confused and I can't see why one would want to use the low
level API, which produces platform-dependant files with a binary
format changing from one GNAT version to another (am I right?),
instead of using the standard, stable and portable ASIS API to get
access to semantic information without being tied to the whole
compiler and having to deal with its associated licensing issues
(which is as far as I understand the subject of this discussion).
>>

ASIS does NOT give access to all the information in the AST (that's not
surprising, ASIS is the lowest common denominator of what can be required
from all compilers -- just one little example, you cannot do full evaluation
of static expressions easily in ASIS, even though GNAT trivially has this
information -- a second example, ASIS can only operate on the unexpanded
tree, and is therefore quite inappropriate as the base for tools that are
close to the generated code (including compilers -- indeed ASIS is quite
unsuitable as the base for a compiler). So if one *DID* want to make an
alternative backend for GNAT, one would most certainly want to go from
the AST, though of course you would be more subject to changes in the
tree.

There are absolutely no licensing differences between using ASIS or using
the low level tree that underlies it.


More information about the Gcc mailing list