Re: Semantic error recovery

wjw@eb.ele.tue.nl (Willem Jan Withagen)
Thu, 11 Nov 1993 11:41:31 GMT

          From comp.compilers

Related articles
Semantic error recovery whatis@gni.ai.mit.edu (1993-11-02)
Re: Semantic error recovery isckbk@leonis.nus.sg (1993-11-10)
Re: Semantic error recovery mauney@adm.csc.ncsu.edu (1993-11-10)
Re: Semantic error recovery wjw@eb.ele.tue.nl (1993-11-11)
Re: Semantic error recovery sasghm@unx.sas.com (1993-11-11)
Re: Semantic error recovery strohm@mksol.dseg.ti.com (1993-11-12)
Re: Semantic error recovery olsen@verdix.com (1993-11-12)
Re: Semantic error recovery enedervo@adobe.com (1993-11-12)
Re: Semantic error recovery kanze@us-es.sel.de (James Kanze) (1993-11-15)
Re: Semantic error recovery kanze@us-es.sel.de (James Kanze) (1993-11-15)
[8 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: wjw@eb.ele.tue.nl (Willem Jan Withagen)
Keywords: errors, Pascal
Organization: Digital Information Systems Group, Eindhoven U. of Technology
References: 93-11-023 93-11-061
Date: Thu, 11 Nov 1993 11:41:31 GMT

Steve Boswell (whatis@gni.ai.mit.edu) wrote:
: Are there compilers that recover from semantic errors without a cascade of
: meaningless error messages? How do they do it?


isckbk@leonis.nus.sg (Kiong Beng Kee) writes:
>A Model Implementation of Standard Pascal (Welsh) describes a scheme of
>using dummy values in place of undeclared identifiers ..etc so that
>such errors are merely reported once.


This fixes the repeated 'undeclared identifier' error, but what about an
undeclared function/procedure. You'll get tons fo mismatched parameter
errors. (At least my current PASCAL frontend would really give you a few
pages :-))


I tried fixing that by substituting an omni-compatible parameter-list in
place of the missing list. Parameter type checking is aware of the
problem, and refrains from giving useless error messages.


Problem is that this method works like the 'error' construct in YACC. You
have to 'invent' all kinds of problems, and then fix them ad-hoc. And I'm
not all that inventive that all redundant info is skipped.


Another strategy I've been considering is to prioritize the errors into
several classes. Now an 'undeclared identifier' whould be considered a
rather hefty bug in the source, and as such all errors of lower priority
are not shown to the user. (either on file, routine or statement scope)
This gives the possibility for the user (if he wishes) to crank up the
alarm level, and still get all messages.


Willem Jan.


--
Digital Information Systems Group, Tel: +31-40-473401, Fax: +31-40-448375
Room EH 10.35 Eindhoven University of Technology
P.O. 513, 5600 MB Eindhoven, The Netherlands
Internet:wjw@eb.ele.tue.nl,
X400:C=nl;A=400net;P=surf;O=tue;OU=ele;OU=eb;S=WJW;
--


Post a followup to this message

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