Computation of Reusable Points in Incremental LL(1) Parsing

점진적 LL(1) 구문분석에서의 재사용 시점의 계산

  • Received : 2010.06.23
  • Accepted : 2010.09.06
  • Published : 2010.11.15

Abstract

Incremental parsing has been developed to reuse the parse result of the original string during the parsing of a new string. The previous incremental LL(1) parsing methods precomputed the reusable point information before parsing and used it during parsing. This paper proposes an efficient reusable point computation by factoring the common part of the computation. The common symbol storing method and the distance storing method were previously suggested to find the reusable point, and by combining the methods, this paper gives the storing method of the distance to common symbols. Based on it, an efficient incremental LL(1) parser is constructed.

점진적 구문분석은 기존 입력 문자열에 대한 구문분석 정보를 새로운 문자열의 구문분석 시에 재사용하고자 하는 취지로 연구 개발되었다. 기존 점진적 LL(1) 구문분석에서는 미리 재사용 시점을 계산하여 이를 구문분석 시에 이용하였다 본 논문에서는 기존의 재사용 시점 계산을 인수분해하여 불필요한 중복 계산 없이 효율적으로 수행하는 방법을 제안한다. 또한 기존의 재사용 시점 파악을 위해서 사용되었던 공통심볼 저장방법과 거리저장방법을 결합하여 공통심볼까지의 거리저장방법을 제안한다. 이에 기반한 효율적인 점진적 LL(1) 구문분석기를 생성한다.

Keywords

References

  1. M.D. Schwartz, N.M. Delisle, and V.S. Begwani, "Incremental compilation in Magpie," Proc. SIGPLAN 84 Symp. On Compiler Construction, Montreal, Canada, 1984, ACM SIGPLAN Notices, vol.19, pp.122-131, 1984.
  2. J.F. Beetem and A.F. Beetem, "Incremental scanning and parsing with Galaxy," IEEE Trans. Software Engineering, vol.17, pp.641-651, 1991. https://doi.org/10.1109/32.83901
  3. W. Yang, "An incremental LL(1) parsing algorithm," Information Processing Letters, vol.48, pp.67-72, 1993. https://doi.org/10.1016/0020-0190(93)90179-D
  4. W. Li, "A simple and efficient incremental LL(1) parsing," Proceedings of the 22nd Seminar on Current Trends in Theory and Practice of Informatics (SOFSEM '95). Lecture Notes in Computer Science, vol.1012, Springer, New York, pp.399-404, 1995.
  5. W. Li, "Building efficient incremental LL parsers by augmenting LL tables and threading parse trees," Comput. Lang., vol.22, no.4, pp.225-235, 1996. https://doi.org/10.1016/S0096-0551(96)00015-X
  6. G.O. Lee, "An improved incremental LL(1) parsing method," Journal of KIISE : Software and Applications, vol.37, no.6, pp.486-490, 2010.(in Korean)
  7. A.V. Aho and J.D. Ullman, The Theory of Parsing, Translation and Compiling, vols. 1 & 2, Prentice-Hall, Englewood Cliffs, NJ, 1972, 1973.
  8. S. Sippu and E. Soisalon-Soininen. Parsing Theory, vols. I & II, Springer, Berlin, 1990.