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 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o5g2000hsb.googlegroups.com!not-for-mail From: Lucretia Newsgroups: comp.lang.ada Subject: Re: Implementing an Ada compiler and libraries. Date: 11 May 2007 11:49:58 -0700 Organization: http://groups.google.com Message-ID: <1178909398.745971.215770@o5g2000hsb.googlegroups.com> References: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> <6819scxft9y4$.1vlh83ppnnyrh$.dlg@40tude.net> <1178731280.075981.23040@u30g2000hsc.googlegroups.com> <8cu67r7wcdn7$.18rtn6g7506w2$.dlg@40tude.net> <1178818792.829214.95870@q75g2000hsh.googlegroups.com> <1178820387.916393.238070@y80g2000hsf.googlegroups.com> <4644179d$1_5@news.bluewin.ch> <1178905186.012787.167150@y80g2000hsf.googlegroups.com> <1178905389.489947.61760@o5g2000hsb.googlegroups.com> NNTP-Posting-Host: 62.56.75.195 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1178909403 28613 127.0.0.1 (11 May 2007 18:50:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 11 May 2007 18:50:03 +0000 (UTC) In-Reply-To: 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: o5g2000hsb.googlegroups.com; posting-host=62.56.75.195; posting-account=G-J9fgwAAADgpzBiEyy5tO4f8MX5fbpw Xref: g2news1.google.com comp.lang.ada:15767 Date: 2007-05-11T11:49:58-07:00 List-Id: On May 11, 7:20 pm, Robert A Duff wrote: > > Also, further to the above, how do other compilers handle this? Janus? > > SofCheck? > > Aonix uses the SofCheck front end. Ah yes. > Anyway, an implementation is allowed to impose some requirements on the > order of units within a file, but is not required to do so. It's the Yep. > with_clauses that determine visibility of library units -- not their > order in the source file. True, but how would a compiler that didn't impose limits (are there any?) manage to find compilation units with'd? At least with GNAT it uses package name => filename, so that's easy to implement, but with multiple compilation units per file, it's much more tricky. I've basically thought the only way to partially do it is to compile the source into a parse tree, then traverse it to generate the AST, symbol tables, dependencies, etc. You then have the problem of finding a unit within a file? i.e. how do you know in which file to look? Thanks, Luke.