DOI QR코드

DOI QR Code

LL과 LR에서의 효율적인 수식 타입 체킹에 대한 연구

A Research on the Efficient Type-Checking for an Expression Using LL and LR

  • 투고 : 2011.01.03
  • 심사 : 2011.02.11
  • 발행 : 2011.02.28

초록

수식의 자료형 확인을 위하여 많이 사용하는 방법의 하나가 속성문법이다, 그런데 이 속성문법은 구성하기가 어려운 단점이 있다. 파싱 과정을 잘 이해하고 속성문법의 두 개의 속성들을 사용하여야 하기 때문이다. 그래서 본 논문에서는 이 수식 속성문법의 구성을 보다 쉽게 하기 위한 방법을 제시한다. 문법 구성을 통하여 하나의 속성만으로 수식의 자료형 확인이 가능함을 보여준다.

One of the methodologies for the type-checking of an expression is the attribute grammar. But this attribute grammar is difficult to write because two attributes should be used with the full understanding of parsing steps. So this paper proposes a methodology to construct an expression attribute grammar easily. It shows the possibility to check the type of an expression with only one attribute through a grammar construction method.

키워드

참고문헌

  1. Knuth, D. E., "Semantics of Context-Free Languages", Mathematical Systems Theory, Vol. 2, pp. 127-146, 1968 https://doi.org/10.1007/BF01692511
  2. Lewis, P. M., D. J. Rosenkrantz and R. E. Stearns, "Compiler Design Theory" Addison- Wesley 1976
  3. Alfred V. Aho, etc., Compilers, Principles, Techniques and Tools, Addison-wesley, 1986
  4. Meyer, B. Introduction to the Theory of programming Languages, Prentice-Hall, Englewood Cliffs, NJ, 1990
  5. Farrow, R. "Linguist 86: Yet Another Translator Writing System Based on Attribute Grammar", ACM SIGPLAN Notices, Vol. 17, No.6, pp.160-171, 1982
  6. N. Correa, R. C. Berwick etc. "Empty Categories, Chain Binding and Parsing", pp.83-121, Kluwer Academic Publisher, New York, 1992
  7. Robert W. Sebesta, Concepts of Programming Languages, 7th ed., Pesrson Education, 2006