| dc.description.abstract | A compiler consists of two phases: source program analysis and object program generation. The problem of compilation has been extensively studied and many tools and techniques for building the analysis phase are available. This phase breaks up the source program into constituent pieces and creates an intermediate representation. In addition, the compiler reports to its user the presence of errors in the source program.
Lex is the most commonly used tool for performing the first job (i.e., breaking up the source program), and yacc is used for the second job. Yacc?generated parsers perform bottom?up parsing of the source program. Lex and yacc specifications are written as part of the compiler development process. These specifications, when given as input to lex and yacc tools, generate the lexical, syntactic, and semantic analyzers for the source language. Semantic analyzers also generate the intermediate representation of the source program according to the actions associated with the specifications.
Writing these specifications is a very complicated task, and a lot of time is generally spent on it. Rapid prototyping of a compiler is an approach to build a compiler quickly.
This thesis describes a novel and useful GUI?based tool called the compiler prototyping system, which assists the compiler writer in quickly generating lex and yacc specifications for a new language compiler using the specifications of existing language compilers.
This thesis also presents, in great detail, the object?oriented analysis, design, and implementation of the compiler prototyping system. Visual C++ (version 4.1) has been used to implement the system. | |