From: "Bennett, Chip (KTR) ~U" <BennettC@J64.STRATCOM.AF.MIL>
Subject: Re: Ada PostScript Pretty printer?
Date: Fri, 2 Dec 1994 17:17:00 PST
Date: 1994-12-02T17:17:00-08:00 [thread overview]
Message-ID: <2EDFC62B@SMTPGATE2.STRATCOM.AF.MIL> (raw)
David Weller <dweller@STARBASE.NEOSOFT.COM> wrote
> Tony Leavitt <tony@deepthought.Sgi.COM> wrote:
> >Does anybody know of a publicly available piece of software that will
> >generate
> >a PostScript file of pretty Ada code. What I mean pretty Ada code is
that
> >resevred words are in bold and comments are in italics. I do NOT want a
> >reformatter and autoindenter or anything like that.
>
>
> Why not just jam the source through vgrind, then pipe it through
> psprint (or some other wild script, like mine here):
>
> vgrind -d <vgrind_defs_file> -lada -o1- -t -w $* | thack | lpr
>
> Oh, here's the vgrind_defs_file I use:
> # Originally submitted from Fraser Wilson
> # Ada!
> ada|Ada:\
> :cb=--:ce=$:bb=if|case|begin|loop:be=end:lb=':le=':oc:\
> :pb=(^\d?(procedure|function|package|package body))\d\p:\
> :sb=":se=":id=_.:\
> :kw=abort abs abstract accept access aliased all and array at\
> begin body case constant declare delay delta digits do else\
> elsif end entry exception exit for function generic goto if in is\
> limited loop mod new not null of or others out package pragma\
> private procedure protected raise range record rem renames requeue\
> return reverse select separate subtype tagged task terminate then\
> type until use when while with xor:
I found that the above has a problem with attributes, because the "lb" and
"le" terms makes two attributes 20 lines apart look like one string
constant. Anybody no a way to get around this (short of allowing reserved
word emphasis in strings constants :-) ?
Also, is there a way to get vgrind to generate monospaced output? (or is
this a function of our Sun's "lpr -t" translation into Postscript.)
*****************************************************************
* Chip Bennett, GDE Systems Inc | BennettC@j64.stratcom.af.mil *
* USSTRATCOM/J64213 | Voice (402)294-7360 *
* 901 SAC Blvd, Suite 2B24 | FAX (402)294-7912 *
* Offutt AFB, NE 68113-6600 | Proud member of Team Ada *
* Opinions expressed here are my own _so_, TTFWTW *
*****************************************************************
next reply other threads:[~1994-12-03 1:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-03 1:17 Bennett, Chip (KTR) ~U [this message]
1994-12-07 15:54 ` Ada PostScript Pretty printer? Richard G. Hash
-- strict thread matches above, loose matches on Subject: below --
1994-12-01 19:47 Tony Leavitt
1994-12-02 0:09 ` David Weller
1994-12-02 10:05 ` Rolf Ebert
1994-12-03 4:27 ` David Weller
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox