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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,745ecf6266b2fdbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-14 12:37:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: [ANN] an EBNF parser and coding pattern tool (LGPL) Date: 14 Feb 2003 15:34:19 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <1045074177.729142@master.nyc.kbcfp.com> <1045084569.415137@master.nyc.kbcfp.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1045255640 14196 128.183.235.92 (14 Feb 2003 20:47:20 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 14 Feb 2003 20:47:20 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:34106 Date: 2003-02-14T20:47:20+00:00 List-Id: Hyman Rosen writes: > Stephen Leake wrote: > > That makes sense, assuming "Introspect" and "FieldTypes" are new C++ > > keywords. Are there any C++ compilers that actually do this? I don't > > think it's in the current ISO C++ standard. > > No, there aren't, which was the OP's point. I was describing an > outline of how it could potentially be added to C++. If it was, > Introspect (or something similar) could be made to look like a > class template in namespace std, so no new keywords would be > involved. Ok, that makes sense. > > Is there anything preventing the same techniques in Ada? > > Ada doesn't have partial specialization of generics (that is, > allowing completely different generic contents based on subsets > of the parameters), so it can't do the recursive template stuff, > at least as far as I know, given how poorly I know Ada. Right, that makes sense as well. > > How does this compare with an ASIS tool for Ada? > > Seems to me ASIS is a more straight-forward, > > and more flexible, approach. > > I don't know enough about ASIS to say. Can an Ada program > use ASIS in order to inspect itself? Not at run time; ASIS is a compile time tool. > Can it apply ASIS within a generic to examine its generic > parameters? Yes, at compile time. ASIS allows you to inspect a program that has been compiled. In this case, you would use it to generate code to do the object tree walking. In general, I suspect an ASIS approach would yeild a smaller run-time, since you don't need run-time support for introspection. -- -- Stephe