Related articles |
---|
[12 earlier articles] |
Re: A lesson for compiler warning writers igor!voltaire!davidm@uunet.UU.NET (1992-06-19) |
Re: A lesson for compiler warning writers dww@inf.fu-berlin.de (1992-06-20) |
Re: A lesson for compiler warning writers preston@dawn.cs.rice.edu (1992-06-21) |
Re: A lesson for compiler warning writers mjr@decuac.DEC.COM (1992-06-22) |
Re: A lesson for compiler warning writers prener@watson.ibm.com (1992-06-22) |
Re: A lesson for compiler warning writers derek@knosof.uucp (1992-06-22) |
Re: A lesson for compiler warning writers kendall@centerline.com (1992-06-23) |
Re: A lesson for compiler warning writers rjbodkin@theory.lcs.mit.edu (Ronald Bodkin) (1992-06-23) |
Re: A lesson for compiler warning writers mjr@decuac.DEC.COM (1992-06-23) |
Newsgroups: | comp.compilers |
From: | kendall@centerline.com (Sam Kendall) |
Keywords: | C, interpreter, lint |
Organization: | CenterLine Software, Inc. |
References: | <19920609091040SEB1525@MVS.draper.com> 92-06-104 |
Date: | Tue, 23 Jun 1992 01:17:39 GMT |
prener@watson.ibm.com (Dan Prener) writes:
>mjr@decuac.DEC.COM (Marcus J. "will do TCP/IP for food" Ranum) writes:
>> I want an interpreter that does dynamic linking and loading and
>>is reasonably quick; it should reload stuff and relink stuff
>>blindingly fast, since I program at the tty.
>> Then my compiler should or can take its own good time, and
>>should generate blindingly fast code, once I have written it and
>>tested it and debugged it under an interactive environment.
>I agree that that would be desirable.
>But, practically speaking, you can't have it.
Sure you can, for C anyway. That's what CodeCenter, my company's C
programming environment, is.
>[Y]our interpreter and compiler would have to be the same in order
>guarantee that they handled the same language and had the same
>semantics. Even if they started off the same, they would drift apart
>over time if they were not produced from largely the same source.
So do exactly that -- produce them from largely the same source. This is
how both Unix lint and ObjectCenter (our C++ programming environment) are
built. Or if the language has good conformance test suites, as ANSI C and
presumably Ada do, it is practical to use different sources for your
interpreter and compiler; this is how CodeCenter is built.
Of course there are small language differences no matter what you do, but
either of these approaches has proven practical many times.
Even without commercial test suites and a published standard it is
possible to make one language processor accept a language almost exactly
the same as another's, though Herculean effort is required; for example,
Sam Harbison and Guy Steele wrote _C: A Reference Manual_ (Prentice-Hall,
1984) for pre-ANSI C, presumably as a spinoff of writing the Tartan C
compiler.
----
Sam Kendall
CenterLine Software, Inc. (formerly Saber Software)
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.