[antlr-interest] Re: thoughts on source-to-source workshop at oopsla 2004

atripp54321 atripp at comcast.net
Sun Oct 31 08:16:13 PST 2004



--- In antlr-interest at yahoogroups.com, Anakreon <anakreonmejdi at y...>
wrote:
> > Visit http://storm.cs.unipi.gr for info on the project.
> Incomplete URL.
> see : http://storm.cs.unipi.gr/~anakreon/aspa.html.
> 
> I have one more question Andy.
> If you would implement a translator from C++->Java, do you think
> the TokesStream+snipset approach will suffice?
> How would you gather info about user defined classes, and translate
method
> calls from C++ objects?
> 
> Anakreon

I do think the TokenStream+snippet approach would suffice for C++
as well as C. If you look at all the stuff I'm doing for C to Java:
http://jazillian.com/how.html
...I don't think C++ would be an insurmountable next step.

Having said that, I do feel obligated to point out that
my approach really "doesn't suffice" even for C to Java.
There's no way that I can translate any arbitrary pointer
usage, for example. The best I can do is look for the common
patterns of usage of pointers, and translate to the Java
equivalent. But if someone uses memset() to set memory
location 12345 to value 12345, there is no Java equivalent.
(Or even the standard swap(&a, &b) method, for example).

Andy





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list