[antlr-interest] Re: (in)sanity check

idontwantanidwith2000init idontwantanidwith2000init at yahoo.com
Mon Apr 19 13:46:28 PDT 2004


I think you'll end up wasting time then saving time.
How would you make a (in)sanity check to the code produced?

I think c++ is platform depended so even if you think that these are 
the same functions the odds are against you.

For example:
What would the following result on c++ and Java working on pentium 4?
int x = 4000;
x >> 33

I guess that in java you got a zero, right?
What did you get in c++? 

--- In antlr-interest at yahoogroups.com, "ljw10001" <ljw1001 at h...> 
wrote:
> I'm about to begin a project to port 400K LOC of C++ code to 
Java.  
> To the greatest extent possible, we want to do a line by line port 
> and, if possible I would like to automate some part of that effort.
> 
> What I have in mind is to use ANTLR/Sorcerer to do a rough 
> translation.  
> 
> If I'm reading the various documents, articles, etc. correctly, 
there 
> is a C++ grammar available that ANTLR can use to create a parse 
tree 
> and also a Sorcerer description for Java that can read a 
(different) 
> parse tree and generate java code. Presumably the first tree could 
be 
> mapped to the second, or we could modify the Sorcerer description 
by 
> hand to use the tree generated from the C++ source.
> 
> I'm not expecting the result to compile. In fact I would be happy 
to 
> output C++ with some of the code selectively replaced by Java 
> equivalents.  Anything that would reduce the amount of manual  
> translation noticably would be useful.  
> 
> So, am I completely insane to attempt this with ANTLR?  
Suggestions 
> for better ways to approach the problem would be greatly 
appreciated.



 
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