<%@ page language="java" contentType="text/html" %> <%-- Include common initialisation code --%> <%@ include file="/arch/common.jsp" %> <%-- The current tab --%> <% String currentTab = "Research"; %> <%-- Content of navigation pane --%> <%@ include file="nav.jsp" %> <% showCurrentLink=true; %> <%-- Current navigation location --%> <% String currentNav = "Reports and Theses"; %> <%-- Include the code for the document header --%> <%@ include file="/arch/header.jsp" %>

Research Report CS-RR-188

<%-- Include the code for the lines and navigation --%> <%@ include file="/arch/middle.jsp" %>

J.A. Dain, Syntax Error Handling in Language Translation Systems (June 1, 1991).

Abstract

Compilers, interpreters, editors are examples of language translation systems which are an essential component of computing. Such systems need to be able to handle most kinds of input, including input that is syntactically incorrect, according to the context-free grammar rules for the system. The paper surveys syntax error handling in theory and in practice. Two theoretical models for syntax errors are minimum distance errors, based on the number of operations needed to transform an incorrect string into a correct one, and parser defined errors, based on correct prefixes. Constraintson languages that can be handled are given and different parsing methods are compared. Error reporting is important because it is the user interface for error handling. Good error messages are precise, informative and constructive. Concepts and techniques for error recovery schemes are explained. Goals for good error recovery are set and practical, implemented schemes are evaluated and their performance compared. A minimum standard of acceptable performance on three-quarters of a data set of Pascal programs is set. Future directions for research are indicated, with particular refernce to the problems posed by error handling for interactive programming environments.

<%@ include file="hardcopy.html" %> <%-- Include the code for the document footer --%> <%@ include file="/arch/footer.jsp" %>