home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 820 of 2,753   
   =?iso-8859-1?q?Torben_=C6gidius_Mog to moop   
   Re: Translating OO program to procedural   
   11 Oct 06 23:19:31   
   
   From: torbenm@app-6.diku.dk   
      
   "moop"  writes:   
      
   > I am working on a project translates OO programs to procedural   
   > programs, such as translating C++ to C and the like.   
   >   
   > My approach is just to rename the methods with the instance name so   
   > that they can be placed in a single source file and then be compiled   
   > later by the procedural lang compiler.   
      
   This will, at best, give you static method calls, but to handle   
   dynamic method calls, you need something more.  I suggest you look in   
   a compiler textbook to see how OO languages are compiled and use the   
   methods presented there.  Not all compiler textbooks describe OO, so   
   look before you buy.  Andrew Appel's "Modern Compiler Implementation   
   in {C | Java | ML}" has a section on OO that should be sufficient for   
   your needs.   
      
   	Torben   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca