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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ee34e610c168cb3f X-Google-Attributes: gid103376,public From: spear@cs.nps.navy.mil (Jon Spear) Subject: Re: Tool to expand generics? Date: 1995/04/19 Message-ID: #1/1 X-Deja-AN: 101107942 sender: news@taurus.cs.nps.navy.mil references: <3mu3bs$ptf@sequoia.jrs.com> <3n0t9c$24k@sequoia.jrs.com> <3n113i$fg6@pulsar.sky.net> <3n1jtk$a0v@Starbase.NeoSoft.COM> organization: Naval Postgraduate School, Department of Computer Science newsgroups: comp.lang.ada Date: 1995-04-19T00:00:00+00:00 List-Id: In article <3n1jtk$a0v@Starbase.NeoSoft.COM>, David Weller wrote: >The odd problem is you're looking for a "macro expansion" tool, which >is quite common with C++ compilers (well, it used to be, to >circumvent problems with templates. I'm not too up to date on C++ >compilers anymore, I've been "++" free for over nine months now :-), >but the Ada community never really had such a critter. There are versions of Knuth's WEB system that support Ada. Among other things, this allows the construction of complex (or simple) macros that will be expanded into Ada code before compilation. For more info, consult the newsgroup comp.programming.literate or the FAQ: ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/literate-programming-faq However, it won't expand standard Ada generic instantiations. Most C/C++ compilers allow you to save the preprocessor output, after macro expansion. It seems reasonable that if there were still Ada compilers around that implemented generics as macros (as some early compilers did), they might have an option to save the expanded code. -Jon -- |Jon Spear (spear@cs.nps.navy.mil)|Ada95: The World's First International- | |Comp Sci Dept, Code CS/Sj, x2830 |Standard OOPL. http://lglwww.epfl.ch/Ada/|