An Extension of LL($textsc{k}$) Covering Grammers

LL($textsc{k}$) 커버링 문법의 확장

  • Lee, Gyeong-Ok (Dept. of Computer Science, Korea Advanced Institute of Science and Technology) ;
  • Choe, Gwang-Mu (Dept. of Computer Science, Korea Advanced Institute of Science and Technology)
  • 이경옥 (한국과학기술원 전산학과) ;
  • 최광무 (한국과학기술원 전산학과)
  • Published : 1999.08.01

Abstract

본 논문에선 LR 문법의 부분 클래스를 동치인 LL 문법으로 변환하는 방법을 제시한다. 이 변환이 적용 가능한 문법을 확장된k`-transformable 문법이라 정의한다. 변환된 문법은 left-to-right 커버의 성질을 만족한다. 기존 연구에서 제시한 변환 방법은 LR 문법의 부분 클래스인 {{{{k`-transformable 클래스와 PLR 클래스를 LL 문법으로 바꾼다. 이 논문에서 제시하는 새로운 변환 방법의 적용 가능한 문법의 범위는 k`-transformable 클래스와 PLR 클래스를 포함한다. 기존의 커버링 성질을 만족하는 LL로의 문법 변환은 보편적인 LR 파서의 행동을 시뮬레이션하여 얻어진다. 이 과정에서 쉬프트, 리듀스 행동 이외에 무한의 가능성을 가진 스택 스트링의 유한 표현을 위해 리덕션 심볼에 대한 예상 행동이 추가된다. 본 논문에서는 파싱 문맥을 나타내는 LR 아이템들을 기존의 스택 스트링 표현 형태에 추가하여 스택 스트링 표현법을 정제하고, 리덕션 심볼에 대한 예상 방법을 확장하는 정형식을 제시한다. 이에 근거하여 LL 커버링 문법이 존재하는 클래스를 확장된 {{{{k`-transformable 문법으로 확장시킨다.Abstract A new transformation of a subclass of LR(k`) grammars into equivalent LL(k`) grammars is studied. The subclass of LR(k`) grammars is called extended k`-transformable. The transformed LL(k`) grammars left-to-right cover the original LR(k`) grammars. Previous transformations transform k`-transformable and PLR(k`) into LL(k`). The new transformation is more powerful in that it handles the extended k`-transformable subclass of LR(k`), which strictly includes k`-transformable and PLR(k`) classes. The previous covering transformations into LL grammars are obtained by simulating the actions of the conventional LR parser. Specially, a predict action of reduction goals is added to the action set in order to finitely represent stack string. In this paper, the stack string representation is refined by adding LR items to represent a parsing context, and the prediction of reduction goal is extended by generalizing the prediction formalism. Based on them, the previous grammar classes with LL({{{{k`) covering grammars are extended to extended k`-transformable grammars.

Keywords

References

  1. Acta Informatica v.12 A Method for Transforming Grammars LL(k) Form Soisalon-Soininen, E.;Ukkonen, E.
  2. Project MAC Technical Report TR-119 A New Grammatical Transformation into deterministic top down form Hammer, M.
  3. Technical Report CS-TR-98-133 An Extension of LL(k) Covering Grammars Lee, Gyung Ok;Choe, Kwang Moo
  4. The Theory of Parsing, Translation and Compiling v.1/2 Aho, A. V.;Ullman, J. D.
  5. Parsing Theory v.1/2 Sippu, S.;Soisalon Soininen, E.