From: Gautier Write-only <gautier@somewhere.nil>
Subject: Re: using charles library
Date: Sat, 31 May 2003 13:50:04 +0200
Date: 2003-05-31T13:50:04+02:00 [thread overview]
Message-ID: <3ED896EC.CF303D93@somewhere.nil> (raw)
In-Reply-To: vdfbn1c53bf7b3@corp.supernews.com
> 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!
next prev parent reply other threads:[~2003-05-31 11:50 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 13:27 using charles library Roman V. Isaev
2003-05-26 13:40 ` Preben Randhol
2003-05-26 16:44 ` Roman V. Isaev
2003-05-26 17:05 ` Preben Randhol
2003-05-26 17:10 ` Preben Randhol
2003-05-26 22:05 ` Roman V. Isaev
2003-05-26 17:16 ` Jeffrey Carter
2003-05-27 15:05 ` Matthew Heaney
2003-05-27 18:28 ` Stephen Leake
2003-05-26 17:20 ` Preben Randhol
2003-05-26 22:46 ` Roman V. Isaev
2003-05-27 4:35 ` Gautier Write-only
2003-05-29 17:29 ` Roman V. Isaev
2003-05-29 18:56 ` Gautier Write-only
2003-05-29 23:19 ` Gautier Write-only
2003-05-30 7:56 ` Roman V. Isaev
2003-05-30 13:49 ` Gautier
2003-05-30 14:36 ` Robert C. Leif
2003-05-30 17:32 ` Preben Randhol
2003-05-30 19:21 ` Randy Brukardt
2003-05-31 11:50 ` Gautier Write-only [this message]
2003-05-31 14:24 ` Bill Findlay
2003-06-01 3:42 ` Randy Brukardt
2003-06-02 11:02 ` Georg Bauhaus
2003-06-02 20:25 ` Gautier Write-only
2003-05-30 8:48 ` Preben Randhol
2003-05-27 10:31 ` Preben Randhol
2003-05-29 20:30 ` Roman V. Isaev
2003-05-30 9:01 ` Preben Randhol
2003-05-30 22:02 ` Roman V. Isaev
2003-05-31 13:34 ` Preben Randhol
2003-05-27 18:27 ` Stephen Leake
2003-05-27 20:24 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox