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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5d67271dbe637515 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!2g2000hsn.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada Mode and GNAT Project files Date: Fri, 15 Aug 2008 03:33:29 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6427bdee-a9b9-483e-887b-cfce987be422@2g2000hsn.googlegroups.com> References: <48a544a8$0$12944$9b4e6d93@newsspool2.arcor-online.net> <7531755f-d2a5-4907-b732-94149a179ed5@w39g2000prb.googlegroups.com> NNTP-Posting-Host: 88.170.86.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1218796410 24110 127.0.0.1 (15 Aug 2008 10:33:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 15 Aug 2008 10:33:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 2g2000hsn.googlegroups.com; posting-host=88.170.86.208; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.16) Gecko/20080702 Iceape/1.1.11 (Debian-1.1.11-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1626 Date: 2008-08-15T03:33:29-07:00 List-Id: On Aug 15, 12:19 pm, deadlyhead wrote: > On Aug 15, 1:56 am, Georg Bauhaus > wrote: > > > > > I'd vote against a complete replacement and in favor > > of a simple abstraction: > > > - where to find files and > > > - where to find navigation information > > > (such as can be extracted from .ali files). Then it is still > > possible to steer the compiler with a -P switch and maybe > > a Lisp variable for the "external" project settings. > > > One reason is that GNAT project files are, well, GNAT specific. > > They are not standard, though open, but other Ada compilers > > use different project descriptions, use different options, > > and so on. > > However, all compilers need to know where to find sources, > > and many if not all produce information that can be used > > for navigation. > > Well, at the moment, Ada Mode for Emacs is GNAT specific. This makes > perfect sense, though, as both GNAT and Emacs are part of the GNU > project. There's nothing stopping proprietary compiler developers > from contributing their own generalizing patches to Ada Mode if they > like, but it's unreasonable, I think, to have a free software project > try to accommodate proprietary vendors' products without access to > their documentation in a free and open manner. > > With that out of the way, a different approach would be to add a Lisp > variable to Ada Mode which indicates whether a GNAT *.gpr (or some > other vendors project file) is to be used, and having Ada Mode simply > use that rather than the current (or recently current) .adp files. It > would take care of the general navigation information you're looking > for, but still provide the added power of whatever project facilities > are provided by the compilation system. There are two ways to provide support for GNAT project files in ada- mode: my first approach was to completely replace the .adp project file with the .gpr file, parse it and extract the source path. I never went so far as to also find and parse "with"ed project files, though. The more complete and portable approach, implemented by Stephe Leake, was to call "gnat ls -P", pass it the project file, and parse the result. The advantage is that it simplifies parsing and also supports "with"ed project files. Stephe's approach is better, of course. That's why I never merged my fork into Stephe's ada-mode. But if you are still interested in my version, I put it on Ada-France's monotone server [1,2,3]. [2] is my fork and [3] is Stephe's upstream version, probably outdated by now. [1] http://www.ada-france.org/article131.html [2] http://www.ada-france.org:8081/branch/changes/org.ludovic-brenta.ada-mode [3] http://www.ada-france.org:8081/branch/changes/org.gnu.emacs.ada-mode -- Ludovic Brenta.