Monday, October 27, 2008

Ada library listing

The Ada library contains a lot of interesting libraries, but it is very hard to comprehend names like "" and "" (those two files correspond to Ada.Strings.Wide_Wide_Fixed.Wide_Wide_Hash and Ada.Wide_Wide_Text_IO.Integer_IO).

The following script will make any directory with .ads files much easier to understand. The output is HTML with one column of file names next to a column of the corresponding package name. Redirect it with "> GNAT_Library.html" for output as a file, or you can even redirect it to a browser. I imagine it would be possible to leverage AdaBrowse in this, but that is a project for a later date. Save this to a file, make it executable, and try it out.

Thanks to caracal of #ada @ freenode for completing the HTML and finishing off the parts for generic packages.

I've left the line for Debian's GNAT because that is what I use. This will work on any directory with .ads files in it.

No comments: