|Converter from Object-Pascal (Delphi) to C++ Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2009-11-19)|
|From:||Detlef Meyer-Eltz <Meyer-Eltz@t-online.de>|
|Date:||Thu, 19 Nov 2009 13:55:46 +0100|
|Keywords:||Pascal, C++, translator|
The program Delphi2Cpp just has been released at:
Delphi2Cpp helps to convert Delphi source code to C++. The program
saves all simple purely mechanical syntactical substitutions and
rearrangements of the code in which the largest portion of the
translation consists. A lot of more complex translation steps are
executed too. But in most cases a manual post-processing of the
produced code will be required. Details are listed here:
Delphi2Cpp is based on the parser and pretty-printer for Delphi 4/5,
which I have announced here recently. The formatting actions, which
are executed of the pretty-printer while processing a parse-tree
mostly remained unchanged. The real translation work is done at the
same time as the Delphi code is parsed, by constructing a tree which
already has the C++ form. This is possible in a recursive LL-parser
quite well, because the stack of the parser rules already is a kind of
tree, with the needed informations.
When the VCL is included, the translator becomes quite slow, because
it is made by the C++-subset of the TextTransformer interpreter only.
There is a lot of searching over unsorted tree-nodes. I haven't
decided yet, whether I will improve the TextTransformer
C++-interpreter or simply overwrite some functions of the exported
code to accelerate the program. Since the program normally will be
used once only, the speed isn't very important, however.
Though Delphi2Cpp is far from being perfect I am quite proud of it,
because it is one of the projects, which have motivated me to begin
with TextTransformer seven year ago and which has been improved and
used for testing all the time.
The still desirable improvements of the translator are a task
requiring great diligence and depend on the financing. I decided to
publish a first version of the translator now for a low price to test
whether there is a demand on the market at all. The price will be
increased with each relevant update in the future. Early buyers will
get these updates for free.
Return to the
Search the comp.compilers archives again.