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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74d953d10520ed5e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-31 05:08:08 PST Message-ID: <3ED896EC.CF303D93@somewhere.nil> Date: Sat, 31 May 2003 13:50:04 +0200 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: using charles library References: <3ED2EB15.7B74D21E@somewhere.nil> <3ED6957F.9405D316@somewhere.nil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.218.95.41 X-Trace: news.swissonline.ch 1054381817 80.218.95.41 (31 May 2003 13:50:17 +0200) X-Complaints-To: abuse@swissonline.ch Path: archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!news-zh.switch.ch!news.swissonline.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:38198 Date: 2003-05-31T13:50:04+02:00 List-Id: > Roman V. Isaev: > >p2ada also breaks on things like this: bih:=1.e-5; Randy Brukardt wrote: > So does Pastran. That's not surprising, that is not legal Pascal > according to the Pascal standard. P2Ada breaks (see test explained in the reply) only because the lexer is unable to see "1..2" as "1" (constant), ".." (double_dot), "2" but sees "1." and ".2"... If a translator from Pascal was expected to only recognize standard Pascal, it would be completely useless. No chance of going beyond a few lines of "usual" Pascal. > Of course, a particular compiler might allow it anyway. That's one > difference between Ada and nearly every other programming language: Ada > compilers are tested for conformance. An Ada compiler that tried to > allow 1.e-5 would fail to pass the conformity tests and would be fixed. > Other languages aren't tested, and code that doesn't work on another > compiler is the result. ... and Pascal is a remarkable example (if not the worst) of fragmentation into incompatible dialects - we can forgive it since the language was designed for teaching programmation. And this is exaclty why a Pascal->Ada translator is useful ;-)! And, of course, a translator must understand the most possible dialects. It should translate "bih:=1.e-5;" into "bih:=1.0e-5;" and go on, instead of stopping. ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!