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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f5dbc8f688419657 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-03 04:43:51 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swrinde!hookup!news.mathworks.com!zombie.ncsc.mil!paladin.american.edu!auvm!J64.STRATCOM.AF.MIL!BennettC Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: comp.lang.ada Encoding: 47 TEXT X-Mailer: Microsoft Mail V3.0 Message-ID: <2EDFC62B@SMTPGATE2.STRATCOM.AF.MIL> Date: Fri, 2 Dec 1994 17:17:00 PST Sender: Ada programming language From: "Bennett, Chip (KTR) ~U" Subject: Re: Ada PostScript Pretty printer? Comments: cc: "Weller, David" Date: 1994-12-02T17:17:00-08:00 List-Id: David Weller wrote > Tony Leavitt 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 -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 * *****************************************************************