- AW: - Pascal to Component Pascal translator & Name Translation & Character Translation to Unicode

From: Zinn, Helmut <"Zinn,>
Date: Wed, 26 Oct 2005 10:54:10 +0200

----boundary-LibPST-iamunique-943538704_-_-
Content-type: text/plain

Hi Chris,

I see, P20 is for a different application area (scope).

Standard Pascal hasn't Units. It doesn't need any name translation.
Standard Pascal uses ASCII character set only. It doesn't need character
translation.

I looked from the view of my very old Turbo Pascal programs. There are both
topics very important.

Currently my biggest drawback in Component Pascal is: I can't use Unicode in
string constant (ARRAY OF CHAR) and I can't use Unicode characters inside
forms!!! I wrote a email about this topic to the mailing list ("A Cookbook
question: How to use Unicode inside BlackBox programs?"). There is no
response. Nobody is interested in such question. Am I the only one who have
trouble with Unicode?

I look forward to see P20 on CPC.

Regards

Helmut

-----Ursprüngliche Nachricht-----
Von: blackbox{([at]})nowhere.xy
Software
Gesendet: Dienstag, 25. Oktober 2005 03:27
An: blackbox{([at]})nowhere.xy
Betreff: [BlackBox] - Pascal to Component Pascal translator & Name
Translation & Character Translation to Unicode


> 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

---------------

Diese E-Mail wurde auf Viren ueberprueft.

IG Metall

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-943538704_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJp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cg0KMi4g
SXQgaXMgc2VsZi1jb250YWluZWQgaS5lLiBkb2VzIG5vdCByZXF1aXJlIGFueSBzdXBwb3J0IHBy
b2dyYW1zIHRvXHBhcg0KcGVyZm9ybSBpdHMgdGFzay5ccGFyDQoyLiBCbGFja0JveCBhbmQgR2Fy
ZGVucyBQb2ludCBDb21wb25lbnQgUGFzY2FsIHZlcnNpb25zIGhhdmUgYmVlblxwYXINCmltcGxl
bWVudGVkLiBccGFyDQozLiBHUENQIGVuYWJsZXMgaXQgdG8gcG90ZW50aWFsbHkgdG8gYmUgcnVu
IG9uIExpbnV4IGFuZCB0aGUgTWFjIGFzIHdlbGxccGFyDQphcyBXaW5kb3dzLlxwYXINClxwYXIN
CkNocmlzIEJ1cnJvd3NccGFyDQpDRkIgU29mdHdhcmVccGFyDQpodHRwOi8vd3d3LmNmYnNvZnR3
YXJlLmNvbS9ncGNwXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNlbmQgc3ViamVj
dCBIRUxQIG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaFxwYXINClxwYXINCi0t
LS0tLS0tLS0tLS0tLVxwYXINClxwYXINCkRpZXNlIEUtTWFpbCB3dXJkZSBhdWYgVmlyZW4gdWVi
ZXJwcnVlZnQuXHBhcg0KXHBhcg0KSUcgTWV0YWxsXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBh
cg0KLS0tIHNlbmQgc3ViamVjdCBIRUxQIG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJv
bi5jaFxwYXINClxwYXINCn0

----boundary-LibPST-iamunique-943538704_-_---
Received on Wed Oct 26 2005 - 10:54:10 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:07 UTC