From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Pretty-printer? (Alternatives to "gnatpp")
Date: Mon, 14 Mar 2016 18:47:50 -0500
Date: 2016-03-14T18:47:50-05:00 [thread overview]
Message-ID: <nc7ij6$ert$1@loke.gir.dk> (raw)
In-Reply-To: 87a8m2jlp7.fsf@adaheads.consafe1.org
"Jacob Sparre Andersen" <sparre@nbi.dk> wrote in message
news:87a8m2jlp7.fsf@adaheads.consafe1.org...
> What pretty-printers are available for Ada (83-2012)?
>
> I'm already aware of "gnatpp", but it has two disadvantages:
>
> 1) You have to have set up the environment to compile the source file,
> before you can pretty-print it.
>
> 2) You can't get it to select the casing of identifiers on a
> word-by-word basis (which means that I have to repeat every acronym
> we use in the project once for every identifier it occurs in).
>
> What alternatives are there?
The Janus/Ada syntax checker (comes with the Professional Version of
Janus/Ada) includes a pretty printer mode.
The only setup it requires is that of the entire Janus/Ada system (and
really, it just needs to be on the path). It's a separate tool from the days
when compilations took 5 minutes - waiting that long meant that one tended
to start a build and then go to lunch or a coffee break - and it was really
annoying to get back and find out that I'd left out a semicolon in the third
file.
These days, I use it to check syntax on new ACATS tests ('cause it does the
entire Ada 2012 grammar, Janus/Ada itself does so little more than that it
isn't worth setting up a compile). It's alway good to get more than one
opinion (GNAT is not perfect!).
The casing of identifiers has a number of options, one of which is to leave
them alone program-wide. (/AS - "Same case"). We never thought of the GNAT
idea of making everything match the declaration (and of course that would be
a lot harder to do that as opposed to just using Title capitalization or all
UPPER case).
I'd be a bit concerned about what it will do on newer syntax; I've tested a
few things but we don't really have any customers who've reported problems
in it recently so it gets a lower priority than most things.
> How do they fare compared to "gnatpp"?
Dunno, never used gnatpp (and rarely use "syntax" as a pretty printer,
either).
Randy.
next prev parent reply other threads:[~2016-03-14 23:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 18:07 Pretty-printer? (Alternatives to "gnatpp") Jacob Sparre Andersen
2016-03-13 18:49 ` J-P. Rosen
2016-03-13 19:26 ` Jacob Sparre Andersen
2016-03-13 18:49 ` J-P. Rosen
2016-03-13 19:33 ` Britt
2016-03-13 20:32 ` Jacob Sparre Andersen
2016-03-13 21:37 ` Georg Bauhaus
2016-03-13 21:42 ` Georg Bauhaus
2016-03-14 6:43 ` Bob Butler
2016-03-14 12:01 ` G.B.
2016-03-14 13:13 ` Simon Wright
2016-03-14 0:58 ` Shark8
2016-03-14 23:47 ` Randy Brukardt [this message]
2016-03-15 0:15 ` Britt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox