[gps-users] ALI File Format Description

Emmanuel Briot briot at adacore.com
Tue Dec 20 09:35:42 CET 2005



Robert Love wrote:
> I've got it in my head that I could parse the ".ali" file and feed it 
> to graphviz and make some nice pictures my employers want me to do by 
> hand.  I can figure out only a little of the format of the library 
> file.  Is the format documented anywhere?  I've tried reading lib-
> writ.adb but that is not really descriptive.

The file you want to read is lib-xref.ads, not lib-write.ads which deals
with the other parts of the ALI format.
However, you should probably not rewrite a parser yourself. There are
already several parsers around:
  - one in Perl in gnathtml.pl
  - a simple one in gnatxref sources
  - of course GNAT itself has its own parser, which is what GPS is
    using. In fact, you should probably use GPS's python interface to do
    higher level queries, otherwise you'll end up reinventing the wheel.

In case you decide to go the python route, I am sure some over persons
on the list might appreciate to see your python file to get to know this
interface...

regards
Emmanuel


More information about the gps-users mailing list