* Re: Tool to expand generics?
[not found] ` <3n1jtk$a0v@Starbase.NeoSoft.COM>
1995-04-18 0:00 ` Tool to expand generics? Robert Dewar
@ 1995-04-19 0:00 ` Jon Spear
1 sibling, 0 replies; 2+ messages in thread
From: Jon Spear @ 1995-04-19 0:00 UTC (permalink / raw)
In article <3n1jtk$a0v@Starbase.NeoSoft.COM>,
David Weller <dweller@Starbase.NeoSoft.COM> 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/|
^ permalink raw reply [flat|nested] 2+ messages in thread