A practical method for syntactic error diagnosis and recovery

Author:

Burke Michael1,Fisher Gerald A.1

Affiliation:

1. Courant Institute, New York University, 251 Mercer Street, New York, New York

Abstract

Our goal is to develop a practical syntactic error recovery method applicable within the general framework of viable prefix parsing. Our method represents an attempt to accurately diagnose and report all syntax errors without reporting errors that are not actually present. Successful recovery depends upon accurate diagnosis of errors together with sensible “correction” or alteration of the text to put the parse back on track. The issuing of accurate and helpful diagnostics is achieved by indicating the nature of the recovery made for each error encountered. The error recovery is prior to and independent of any semantic analysis of the program. However, the method does not exclude the invocation of semantic actions while parsing or preclude the use of semantic information for error recovery. The method assumes a framework in which an LR or LL parser, driven by the tables produced by a parser generator, maintains an input symbol buffer, state or prediction stack, and parse stack. The input symbol buffer contains part or all of the sequence of remaining input tokens, including the current token. The LR state stack is analogous to the LL prediction stack; except when restricting our attention to the LL case, prediction stack shall serve as a generic term indicating the LR state or LL prediction stack. The parse stack contains the symbols of the right hand sides that have not yet been reduced.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference7 articles.

1. Feyock S. Lazurus P. "Syntax-directed Correction of Syntax Errors" Software Practice and Experience Vol. 6 1976. Feyock S. Lazurus P. "Syntax-directed Correction of Syntax Errors" Software Practice and Experience Vol. 6 1976.

2. Graham S.L. Haley C.B. Joy W.N. "Practical LR Error Recovery" SIGPLAN Notices August 1979. 10.1145/872732.806967 Graham S.L. Haley C.B. Joy W.N. "Practical LR Error Recovery" SIGPLAN Notices August 1979. 10.1145/872732.806967

3. Graham S.L. Rhodes S.P. "Practical Syntactic Error Recovery" CACM November 1975. 10.1145/361219.361223 Graham S.L. Rhodes S.P. "Practical Syntactic Error Recovery" CACM November 1975. 10.1145/361219.361223

4. Johnson S.C. YACC - Yet Another Compiler Compiler. Bell Laboratories Murray Hill 1977. Johnson S.C. YACC - Yet Another Compiler Compiler. Bell Laboratories Murray Hill 1977.

5. Poonen G. "Error Recovery For LR(k) Parsers" Information Processing August 1977. Poonen G. "Error Recovery For LR(k) Parsers" Information Processing August 1977.

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Compilation of Legacy Languages in the 21st Century;Lecture Notes in Computer Science;2013

2. A practical minimum distance method for syntax error handling;Computer Languages;1994-11

3. Incremental re-execution of programs;ACM SIGPLAN Notices;1987-07

4. A survey on syntactic error recovery and repair;Computer Languages;1984-01

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3