Abstract
This article presents a local LR error repair method that repairs syntax errors quickly by adoption of the A* algorithm that helps remove unproductive configurations. The new method also enhances the repair quality by adoption of a flexible edit strategy to support shifting symbols unrestrictedly, as well as inserting and deleting symbols, in order to repair invalid input strings. Experimental results show that the new method excels existing works in repair quality and efficiency.
Similar content being viewed by others
References
Aho A.V., Sethi R., Ullman J.D.: Compilers, Principles, Techniques, and Tools. Addison Wesley, Reading (1986)
Bertsch E.: An observation on suffix redundancy in LL(1) error repair. Acta Inf. 33(7), 631–639 (1996)
Bertsch E., Nederhof M.J.: On failure of the pruning technique in error repair in shift-reduce parsers. ACM Trans. Program. Lang. Syst. 21(1), 1–10 (1999)
Cerecke, C.: Repairing syntax errors in LR-based parsers. In: The Twenty-Fifth Australasian Computer Science Conference, ACSC’02, 4, pp. 17–22. ACM, Melbourne, Australia (2002)
Corchuelo R., Perez J.A., Ruiz A., Toro M.: Repairing syntax errors in LR parsers. ACM Trans. Program. Lang. Syst. 24(6), 698–710 (2002)
Dain J.A.: A practical minimum distance method for syntax error handling. Comp. Lang. 20(4), 239–252 (1994)
Dion B.A.: Locally Least-Cost Error Correctors for Context-Free and Context-Sensitive Parsers, vol. 1. UMI Research Press, Ann Arbor (1982)
Fischer, C., Dion, B.A., Mauney, J.: A locally least-cost LR-error corrector. Tech. Rep. 363, Computer Science Dept., Univ. of Wisconsin (1979)
Fischer C.N., Mauney J.: A simple, fast, and effective LL(1) error repair algorithm. Acta Inf. 29(2), 109–120 (1992)
Fischer C., Milton D., Quiring S.: Efficient LL(1) error correction and recovery using only insertions. Acta Inf. 13(3), 141–154 (1980)
Hart P.E., Nilsson N.J., Raphael B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. SSC-4(2), 100–1007 (1968)
Hart P.E., Nilsson N.J., Raphael B.: Correction to “A formal basis for the heuristic determination of minimum cost paths”. SIGART Bull. 37, 28–29 (1972)
Kernighan B.W., Ritchie D.M.: The C Programming Language, vol. 1, 2nd edn. Prentice Hall Inc., Englewood Cliffs (1988)
Kim I.S., Choe K.M.: Error repair with validation in LR-based parsing. ACM Trans. Program. Lang. Syst. 23(4), 451–471 (2001)
Mauney J., Fischer C.N.: A forward move algorithm for LL and LR parsers. SIGPLAN Notice 17(6), 77–89 (1982)
McKenzie B.J., YeatMan C., Vere L.D.: Error repair in shift-reduce parsers. ACM Trans. Program. Lang. Syst. 17(4), 672–689 (1995)
Nilsson N.J.: Principles of Artificial Intelligence. Morgan Kaufmann Publishers, Massachusetts (1993)
Pennello, T.J., De Remer, F.: A forward move algorithm for LR error recovery. In: Conference Record of the 5th Annual ACM symposium of Principles of Programming Languages. ACM, Tucson, Arizona, pp. 241–254 (1978)
Russell, S.J., Norvig, P.: Artificial intelligence: a modern approach. Pearson Educ. (2003). http://portal.acm.org/citation.cfm?id=773294
Sippu S., Soisalon-Soinnen E.: Parsing Theory: LR(k) and LL(k) Parsing, vol. 2. Springer, Berlin (1990)
Wagner R.A., Fischer M.J.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974)
Winston P.H.: Artificial Intelligence, 3rd edn. Addison Wesley, Reading (1992)
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was partially supported by the Engineering Research Center of Excellence of Korea Ministry of Education, Science and Technology(MEST)/National Research Foundation of Korea(NRF) Grant 2009-0063246.
Rights and permissions
About this article
Cite this article
Kim, IS., Yi, K. LR error repair using the A* algorithm. Acta Informatica 47, 179–207 (2010). https://doi.org/10.1007/s00236-010-0115-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-010-0115-6