In this thesis, we describe an error recovery for syntactic errors in LR parsers. For the first level recovery, the pattern mapping approach described in [2] was slightly modified and applied to incorporate the cost function concept. A detailed description on the pattern generation process is presented.
A new restricted set of pattern RP(c,k,l) is defined. It is simple but the efficiency and quality of recovery using RP(c,k,l) were as good as those using MCL(k) defined in [2]. Some heuristics to improve the efficiency and correcting power are introduced.
Suggestions for further augmentations are contained also in this thesis. The second level recovery for the case of failure from the pattern mapping recovery is described for the sake of self-containment.
We have applied our error recovery scheme to some simple grammars which have almost all the important constructs of common programming languages.
본 논문은 프로그램 언어의 문법적 정확성에 관한 것이다. 고급언어의 번역과정에서 문법에 맞지않는 부분이 발견될 경우에는 이를 처리하여 그 이유를 밝혀주고 다시 번역과정을 계속 할 수 있게 하여야 한다.
이러한 과정을 Error Recovery라 한다.
이 과정은 문법에 맞지 않는 부분의 결정과 그 부분의 수정의 두가지 과정으로 구성된다. 본 논문에서는 이 수정과정을 지시하는 기능을 가진 Pattern 개념을 사용하였다. 즉 이 과정의 질을 높이기 위한 제한된 Pattern class를 정의하고 이 Pattern class 를 구하는 방법과 이를 이용한 Error Recovery 과정이 연구되었다.
또한 이 과정에서 발견되는 시간, 공간상의 문제점을 해결하기 위한 방법을 제시하였다.
이 Recovery 방법은 대부분의 프로그램언어의 특징을 소유한 소규모 언어에서 실험되어 비교적 좋은 결과를 얻을 수 있었다.