C++컴파일러 및 프로그래밍 환경 개발

Debelppment of C++ Compiler and Programming Environment

  • 발행 : 1997.03.01

초록

본 논문에서는 가장 널리 사용되고 있는 객체지향 언어인 C++를 지한 컴푸일러 및 대화식 프로그래밍 환경을 제안하고 개발하였다. C++ 언어를 위한 컴파일러를 개발하기 위해 컴파러를 Front-End 와 Back-End로 나누고 가상기계인 EM을 사용하여 연결하는 모델을 사용하였다. Front-End 개발시에는 C++ 문법을 문법석 도구, 어휘 및 구문분석기 생성도구를 이용하여 구문분석 방법과 문맥에 연동된 문법 처리기술과 AST클래스 라이브러리를 개발하였다. Back-End에서는 목적기계 표현기술과 토리코드 최적화 방법, 트리 패턴 매칭에 의한 재목적 코드 생성 기법을 제안하고 이를 이용한 재목적이 용이한 SPARC 기계 Back-End를 개발하였다. C++를 위한 대화식 프로그래밍 환경은 언어의 다양한 특성을 효과적으로 표현하기 위해 AST을 이용하고, 점진적 분석 기술과 시각 기호 를 제안하였다. 대화식 환경의 일반화에 의한 자동생성 방법과 프로그램의 정형화된 표현 방법을 위한 Unparsing 체계를 제안하였다. 개발된C++ 컴팰러와 대화식 프로그램 환경은 통합된 C++ 프로그래밍 환경을 구성하게 된다. 본 연구를 통해 얻어진 기술 들은 새로운 고급언어 및 기계에 대한 컴파일러의 개발은 물론 병렷 및 분산 환경을 위한 컴파일러 개발에 활옹될 수 있을 것이다.

In this paper,we proposed and developed a compiler and interactive programming enviroments for C++ wich is mostly worth of nitice among the object -oriented languages.To develope the compiler for C++ we took front=end/back-end model using EM virtual machine.In develpoing Front-End,we formailized C++ gram-mar with the context semsitive tokens which must be manipulated by dexical scanner and designed a AST class li-brary which is the hierarchy of AST node class and well defined interface among them,In develpoing Bacik-End,we proposed model for three major components :code oprtimizer,code generator and run-time enviroments.We emphasized the retargatable back-end which can be systrmatically reconfigured to genrate code for a variety of distinct target computers.We also developed terr pattern matching algorithm and implemented target code gen-erator which produce SPARC code.We also proposed the theroy and model for construction interative pro-gramming enviroments. To represent language features we adopt AST as internal reprsentation and propose uncremental analysis algorithm and viseal digrams.We also studied unparsing scheme, visual diagram,graphical user interface to generate interactive environments automatically Results of our resarch will be very useful for developing a complier and programming environments, and also can be used in compilers for parallel and distributed enviroments.

키워드