From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91d0d8cd28bbb477,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!y80g2000hsf.googlegroups.com!not-for-mail From: Lucretia Newsgroups: comp.lang.ada Subject: Implementing an Ada compiler and libraries. Date: 9 May 2007 07:37:31 -0700 Organization: http://groups.google.com Message-ID: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> NNTP-Posting-Host: 62.56.81.180 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1178721451 8065 127.0.0.1 (9 May 2007 14:37:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 May 2007 14:37:31 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.10 (X11; Linux i686; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y80g2000hsf.googlegroups.com; posting-host=62.56.81.180; posting-account=G-J9fgwAAADgpzBiEyy5tO4f8MX5fbpw Xref: g2news1.google.com comp.lang.ada:15674 Date: 2007-05-09T07:37:31-07:00 List-Id: Hi, I started to implement the Ada/CS from the Crafting a compiler in C book. I was doing this from scratch, but I decided that I'd rather implement a real subset using the real rules from the standard. So, now I'm looking into implementing an Ada 2005 subset. I don't want to get into a flamewar over reasons why/not to do this, I'd just like to do it ;D and not have this thread go massively off topic ;) Ok, here are my aims, in no particular order: * Similar Ada/CS subset, but based on the Ada 2005 standard. * Use ANTLR for the front-end. * Restrict the input to ASCII. * Use LLVM for the back-end. * Also look into writing a back end from scratch (not a priority and only for experience). * Allow the use of multiple compilation units in 1 operating system file. * Also allow GNAT *.ad[sb] files. * Experiment with libraries. I've read some older threads from 1994-1995 which cover how older compilers implemented a repository based Ada standard library in which compilations units were added to. But I'm interested in seeing how I can get the compiler to not have to reparse other source files (when with'd) in order to compile a unit. Also, I'd like to see how static/shared libraries can be implemented/ used to extend the Ada standard library. I don't want to have to have tons of source files lying around for a static/shared library, I honestly don't see the need. Surely, it's possible to build a compiler that can get the information it needs from the library itself (or at least a companion library rather than a ton of different ALI files)? Now, I'd really like to hear from people who have implemented an Ada compiler and people who have used other compilers (I've only used GNAT). Basically, I'm interested in how other implementations handle the library. Note that there are 2 ideas of library here: 1) The standard Ada library. 2) Link/shared libraries found on operating systems. Thanks, Luke.