• 제목/요약/키워드: 커버링 성질

검색결과 2건 처리시간 0.016초

LL 문법으로의 커버링 변환의 단순화 (Simplification of Covering Transformation into LL Grammars)

  • 이경옥
    • 한국정보과학회논문지:시스템및이론
    • /
    • 제37권6호
    • /
    • pp.319-322
    • /
    • 2010
  • 확장된 PLR 문법은 LR 문법의 부분 클래스로서 LL 문법에 대한 커버링 성질을 만족하는 변환이 존재하는 현재까지의 가장 큰 문법 클래스이다. 본 논문에서는 확장된 PLR 문법에 대한 기존 커버링 문법 변환을 단순화시키는 커버링 문법 변환을 제시한다. 본 논문에서 제시하는 커버링 문법 변환은 기존의 4개의 규칙 유형을 3개의 규칙 유형으로 축소시킨다.

LL($textsc{k}$) 커버링 문법의 확장 (An Extension of LL($textsc{k}$) Covering Grammers)

  • 이경옥;최광무
    • 한국정보과학회논문지:소프트웨어및응용
    • /
    • 제26권8호
    • /
    • pp.1028-1038
    • /
    • 1999
  • 본 논문에선 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.