From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99180ce3a9e2c757 X-Google-Attributes: gid103376,public From: Gautier Subject: Re: Improving P2Ada Date: 1999/08/19 Message-ID: <37BC64A5.1449AA5F@maths.unine.ch>#1/1 X-Deja-AN: 514821675 Content-Transfer-Encoding: 7bit References: <37BC2499.9D2E6E77@Maths.UniNe.CH> Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-19T00:00:00+00:00 List-Id: Thanks for replies... The P2Ada way doesn't seem the only one. Though, here is what I would/will add to current P2Ada (2.2) to let it translate happily Borland-style sources: * no forced order in CONST, TYPE, VAR, PROCEDURE/FUNCTION clauses (like Ada 95) - most TP programs aren't "Pascal orthodox" on this point (fortunately), so P2Ada fails there... * CASE statements can have an ELSE part ( when others=> in Ada ) * there are ASM..END blocks like BEGIN..END (just comment out the assembler opcodes...) * there are SHL & SHR binary operators ( shift_left(.,.) in Ada ) * strings can have explicit ASCII characters: 'Blabla'#13#10're-blabla' that would become "Blabla" & character'val(13) & ... A later but more "banana-skinny" step is the OO part; to begin with... TYPE xyz = OBJECT -> type xyz is tagged record TYPE xyz = OBJECT(abc) -> type xyz is new abc with record PROCEDURE xyz.toto; -> procedure toto(prefixed_obj: xyz) is G.