Re: [QUERY] A "ignorant newbie" question about compiler-writing.

Norman Ramsey <nr@adder.cs.virginia.edu>
20 Feb 1997 00:14:20 -0500

          From comp.compilers

Related articles
[8 earlier articles]
Re: [QUERY] A "ignorant newbie" question about compiler-writing. darius@phidani.be (Darius Blasband) (1997-01-30)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. kanze@gabi-soft.fr (J. Kanze) (1997-01-30)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. iainf@bristol.st.com (1997-02-07)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. mff@research.att.com (Mary Fernandez) (1997-02-11)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. dennis@netcom.com (1997-02-16)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. kanze@gabi-soft.fr (1997-02-16)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. nr@adder.cs.virginia.edu (Norman Ramsey) (1997-02-20)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. cfc@world.std.com (1997-02-22)
Re: recovery from syntax errors, was "ignorant newbie" question leichter@smarts.com (Jerry Leichter) (1997-02-22)
Re: recovery from syntax errors, was "ignorant newbie" question bear@sonic.net (Ray Dillinger) (1997-02-22)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. fjh@mundook.cs.mu.OZ.AU (1997-02-23)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. cartegw@humsci.auburn.edu (1997-02-27)
Re: [QUERY] A "ignorant newbie" question about compiler-writing. kanze@gabi-soft.fr (1997-03-14)
| List of all articles for this month |
From: Norman Ramsey <nr@adder.cs.virginia.edu>
Newsgroups: comp.compilers
Date: 20 Feb 1997 00:14:20 -0500
Organization: University of Virginia
References: 97-01-258 97-02-081 97-02-090
Keywords: errors

Dennis Yelle <dennis@netcom.com> wrote:
>It seems obvious that you cannot produce a compiler that will always
>give a correct second error message, because the compiler cannot know
>what I actually intended in place of the first error.


Um, it may seem obvious, but it's not. The algorithm I described
``taints'' everything that could possibly depend on the first
erroneous construct, and it refuses to issue error messages about
tainted things. That way it can produce reliable error messages about
other parts of your program, which don't depend on the first error.


Now, I've only implemented this technique in a compiler for an oddball
machine-description language, so you might argue that this technique
isn't useful, (e.g., if the whole program quickly becomes tainted),
but don't argue that it's not correct. Your ``halt after one error
message'' strategy is a degenerate case in which a single error taints
the entire program.


Norman


--
Norman Ramsey
http://www.cs.virginia.edu/~nr
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.