Abstract
A previous article presented a technique to compute the least-cost error repair by incrementally generating configurations that result from inserting and deleting tokens a syntactically incorrect input. An additional mechanism to improve the run-time efficiency of this algorithm by pruning some of the configurations was discussed as well. In this communication we show that the pruning mechanism may lead to suboptimal repairs or may block all repairs. Certain grammatical errors in a common construct of the Java programming language also lead to the above kind of failure.
- AHO, A., SETHI, R., AND ULLMAN, J. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass. Google ScholarDigital Library
- EARLEY, J. 1970. An efficient context-free parsing algorithm. Commun. ACM 13, 2 (Feb.), 94-102. Google ScholarDigital Library
- GOSLING, J., JOY, B., AND STEELE, G. 1996. The Java Language Specification. Addison-Wesley, Reading, Mass. Google ScholarDigital Library
- MCKENZIE, B., YEATMAN, C., AND DE VERE, L. 1995. Error repair in shift-reduce parsers. ACM Trans. Program. Lang. Syst. 17, 4 (July), 672-689. Google ScholarDigital Library
Index Terms
- On failure of the pruning technique in “Error repair in shift-reduce parsers”
Recommendations
Error repair in shift-reduce parsers
Local error repair of strings during CFG parsing requires the insertion and deletion of symbols in the region of a syntax error to produce a string that is error free. Rather than precalculating tables at parser generation time to assist in finding such ...
Repairing syntax errors in LR-based parsers
When a compiler encounters a syntax error, it usually attempts to restart parsing to check the remainder of the input for any further errors. One common method of recovering from syntax errors is to repair the incorrect input string, allowing parsing to ...
Error-repair parsing schemata
Robustness, the ability to analyze any input regardless of its grammaticality, is a desirable property for any system dealing with unrestricted natural language text. Error-repair parsing approaches achieve robustness by considering ungrammatical ...
Comments