From: collins@cs.wm.edu (Bob Collins)
Subject: Re: Gnat pretty printing
Date: 1998/12/11
Date: 1998-12-11T00:00:00+00:00 [thread overview]
Message-ID: <collins-1112980934420001@cx832447-a.nwptn1.va.home.com> (raw)
In-Reply-To: 74r7ip$t1@top.mitre.org
In article <74r7ip$t1@top.mitre.org>, mfb@mbunix.mitre.org (Michael F
Brenner) wrote:
> [Material snipped.]
> Here are the requirements for a pretty printer:
> [Material snipped.]
> (o) It goes without saying that
> (A) THEN goes on the same line as the IF when it fits;
> (B) IS goes on the same line as CASE when it fits;
> (C) IF, ELSIF, ELSE, and END IF are in the same column;
> (D) CASE, WHEN, and END CASE are in the same column;
My LRM says that "the syntax rules describing structured constructs
are presented in a form that corresponds to the recommended
paragraphing." [1.1.4 (19)] The grammar for a case statement
indicates WHEN should be indented. That seems to indicate that
"It goes without saying" is a bit too extreme.
> (E) There is NEVER a space before a colon, semicolon, comma, or period;
The Ada Style Guide recommends a space before a colon.
> (F) There is an optional space before and after assignment operators;
> (G) the capitalization for IDs and keywords should default to NOT;
This seems contrary to two fairly common practices
reserved words are uppercased (GMU group)
each subunit of identifiers is capitalized (NYU group)
> [Material snipped.]
Indeed, the Ada95 Style Guide
<http://wuarchive.wustl.edu/languages/ada/ajpo/docs/style-guide/95style>
has many automation hints, and would be a good source for deciding
how to pretty-print.
--
Bob Collins <mailto:collins@cs.wm.edu> <http://ratbert.cs.wm.edu>
next prev parent reply other threads:[~1998-12-11 0:00 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-09 0:00 Gnat pretty printing Matt Tyler
1998-12-09 0:00 ` Tom Moran
1998-12-09 0:00 ` dennison
1998-12-09 0:00 ` Tom Moran
1998-12-09 0:00 ` David C. Hoos
1998-12-09 0:00 ` Steve O'Neill
1998-12-10 0:00 ` okellogg
1998-12-11 0:00 ` dewarr
1998-12-09 0:00 ` Marin David Condic
1998-12-09 0:00 ` David C. Hoos
1998-12-10 0:00 ` Martin C. Carlisle
1998-12-11 0:00 ` Michael F Brenner
1998-12-11 0:00 ` Bob Collins [this message]
1998-12-11 0:00 ` dewarr
1998-12-11 0:00 ` Stephane Barbey
1998-12-11 0:00 ` Bryce Bardin
1998-12-11 0:00 ` Marin David Condic
1998-12-12 0:00 ` Robert A Duff
1998-12-13 0:00 ` Ehud Lamm
1998-12-15 0:00 ` Marin David Condic
1998-12-12 0:00 ` Simon Wright
1998-12-14 0:00 ` dennison
1998-12-15 0:00 ` Marin David Condic
1998-12-15 0:00 ` dennison
1998-12-15 0:00 ` Marin David Condic
1998-12-16 0:00 ` Matthew Heaney
1998-12-16 0:00 ` dennison
1998-12-16 0:00 ` Matthew Heaney
1998-12-16 0:00 ` Chris Morgan
1998-12-18 0:00 ` dewar
1998-12-17 0:00 ` Dale Stanbrough
1998-12-15 0:00 ` Matthew Heaney
1998-12-15 0:00 ` Marin David Condic
1998-12-19 0:00 ` Lieven Marchand
1998-12-14 0:00 ` Robert I. Eachus
1998-12-21 0:00 ` BARDIN Marc
1998-12-09 0:00 ` dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox