comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Ada Mode and GNAT Project files
Date: Fri, 15 Aug 2008 03:33:29 -0700 (PDT)
Date: 2008-08-15T03:33:29-07:00	[thread overview]
Message-ID: <6427bdee-a9b9-483e-887b-cfce987be422@2g2000hsn.googlegroups.com> (raw)
In-Reply-To: 7531755f-d2a5-4907-b732-94149a179ed5@w39g2000prb.googlegroups.com

On Aug 15, 12:19 pm, deadlyhead <deadlyh...@gmail.com> wrote:
> On Aug 15, 1:56 am, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
> 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.



  reply	other threads:[~2008-08-15 10:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15  4:50 Ada Mode and GNAT Project files deadlyhead
2008-08-15  8:56 ` Georg Bauhaus
2008-08-15 10:19   ` deadlyhead
2008-08-15 10:33     ` Ludovic Brenta [this message]
2008-08-16 13:04       ` Stephen Leake
2008-08-15 10:57     ` Georg Bauhaus
2008-08-16 13:07       ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox