delphi2cpp Publisher's description
from Ivan Vecerina
A syntax-based utility for translating Pascal/Delphi code into C++
This program was initially developed in a week or so, in C++, using the GNU flex tool to generate a low-level parser (available for Windows here). flex is a bit archaic, but still a robust and efficient solution for text parsing; alternative solutions include the ANTLR code generator, or the spririt C++ template library.
Since its first publication, this translator has also been updated based on requests and contributions of a number of users who downloaded it (Thank you!).
The purpose of this translator is to automate a lot of the grunt work required translate Delphi/Pascal files to C++. It reads a .pas file and outputs a .h header and a .cpp implementation file. The program is written in about 1000 lines of C++ code.
The translator usually does a good job translating algorithms and various utilities. It also seeks to preserve the original formatting of the code in the generated files. However, the generated code will often not compile as is, and further editing and refactoring is usually needed.
This syntax-based translator is not a compiler; it does not understand the type of the variables being used, and has therefore limited capabilities. But it does a decent job saving time during a translation process. Some features of Delphi that are known to be incorrectly or partially translated; in the generated code, they are highlighted with a special comment ( /*?*/ )
What's New in This Release:Delphi method pointers which make the event treatment by delegation possible are reproduced also for other compilers than the C++ Builder now. There is the language expansion for it in the C++ Builder with the "__closure" keyword.
There is a SmallString class for Visual C++ and other compilers now.
The Delphi directives $HPPEMIT, $EXTERNALVAR, $NODEFINE and $NOINCLUDE are supported now completely. This make the translation of the VCL possible.
The unification of the case-notations of identifiers is expanded on the contents of comments now. So, the symbols are assigned correctly in the directives mentioned above. This expansion can have effects on pretranslated C++ code. The identifiers used there have to be be included in the substitution list from now on.
Constants aren't treated any more as variables to be declared externally.
The bug was fixed, that the identifiers of namespaces were missing for the first parameters in nested functions and for base classes of objects.
System Requirements:No special requirements.
Program Release Status: Major Update
Program Install Support: Install and Uninstall