----boundary-LibPST-iamunique-832433964_-_-
Content-type: text/plain
> From: blackbox{([at]})nowhere.xy> Behalf Of collection
> Sent: Saturday, 22 October 2005 4:50 PM
Hi Helmut,
Thank you for your feedback.
> it is a typical Benchmark problem that some relevant topics
> are not compared.
True - it only claims to highlight what P2O does which Tp2cp doesn't -
not vice versa. Since then I have extended it to convert more WITH
statements. The WITH variable can now be any simple global variable, or
local variable (including parameters). Also, nested WITHs of the form
'WITH v1, v2, ... DO' are handled correctly. What it doesn't do is
handle with statements involving elements of structured variables, e.g.
WITH xyz[99].abc DO
>
> The most important topic is comments inside programs. Tp2cp
> passes all comments from the source to the translated result.
> What does P20 do with comments?
P2O passes all comments. Note that Jensen & Wirth Pascal / IS0 7185
Standard Pascal does not allow nested comments. I have also implemented
the code to handle nested comments but this is commented out for now.
> The second important topic is the name translations and
> adding subsystem names. Suppose you have to translate a
> bigger project with a lot of Units (MODULEs) and you would
> like to have the result into the same subsystem.
This is not within the scope of P2O because Jensen & Wirth Pascal / IS0
7185 Standard Pascal does not include units / modules.
Modular compilation did not appear in Standard Pascal (ISO 10206) until
1990, about a decade after it was implemented in UCSD Pascal and five
years after Turbo Pascal. Consequently, each Pascal dialect has their
own different way of doing things. Standard Pascal uses keywords like
MODULE, IMPORT and EXPORT which are closer to Modula-2 than many
extended Pascals.
P2O was not intended to be a Turbo Pascal translator - I would recommend
Tp2cp to anybody who has Turbo Pascal code that they want to convert.
I first mentioned P2O as I was considering extending it to support
Delphi (the language formerly known as Object Pascal), but the more I
think about it, the less I like the idea. Although Delphi would have to
be the most widely used dialect of Pascal in existence today, most
Delphi programs would have considerable dependence on the VCL (i.e.
Delphi's equivalent of the BlackBox framework). Porting code then
becomes more an issue of matching / redesigning API / Framework calls
than a straightforward translation effort.
> An other topic is the character translations. Old Turbo
> Pascal uses the IBM-PC extended ASCII character set. I can
> translate this character set with module 4 to Unicode but the
> result is not working. See my last email via Black Box
> Mailing list. Have P20 a character translations?
No. I may be wrong, but I don't believe it is relevant when translating
existing Jensen & Wirth / Standard Pascal source code.
In summary, P2O's key features are:
1. Translates Jensen & Wirth / ISO 7185 Standard Pascal source code.
2. It is self-contained i.e. does not require any support programs to
perform its task.
2. BlackBox and Gardens Point Component Pascal versions have been
implemented.
3. GPCP enables it to potentially to be run on Linux and the Mac as well
as Windows.
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-832433964_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gRnJvbTogYmxhY2tib3hAb2Jlcm9uLmNoIFtt
YWlsdG86YmxhY2tib3hAb2Jlcm9uLmNoXSBPbiBccGFyDQo+IEJlaGFsZiBPZiBjb2xsZWN0aW9u
XHBhcg0KPiBTZW50OiBTYXR1cmRheSwgMjIgT2N0b2JlciAyMDA1IDQ6NTAgUE1ccGFyDQpccGFy
DQpIaSBIZWxtdXQsXHBhcg0KXHBhcg0KVGhhbmsgeW91IGZvciB5b3VyIGZlZWRiYWNrLlxwYXIN
ClxwYXINCj4gaXQgaXMgYSB0eXBpY2FsIEJlbmNobWFyayBwcm9ibGVtIHRoYXQgc29tZSByZWxl
dmFudCB0b3BpY3MgXHBhcg0KPiBhcmUgbm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