COMPILER – A TRANSLATOR
1.0 INTRODUCTION: The compiler is a special type of computer program that translates a human readable text file into a form that the computer can more easily understand.
At its most basic level, a computer can only understand two things, a 1 and a 0. At this level, a human being will operate slowly and find the information contained in a long string of 1s and 0s incomprehensible.
A Compiler bridges this gap by translating or transforming the source code written in computer language into target language.
This target language often have a binary form known as object code. The name compiler is primarily used for programs that translate source code from High Level language to lower level language (eg Assembly language or machine language code).
Every high-level programming language (except strictly interpretive languages) comes with a compiler. In effect, the compiler is the language, because it defines which instructions are acceptable.
Because compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language. For example, there is a FORTRAN compiler for PCs and another for Apple Macintosh computers. In addition, the compiler industry is quite competitive, so there are actually many compilers for each language on each type of computer. More than a dozen companies develop and sell C compilers for the PC.
1.1 BACKGROUND OF STUDY:
Software for early computers was primarily written in assembly language. Higher Level languages were not invented until the benefits of being able to reuse software on different kinds of CPUs started to become significantly greater than the cost of writing a compiler.
The very limited memory capacity of early computers also created many technical problems when implementing a compiler.
The methods and techniques of Compiler provide an enabling technology for generating software from specification. They are
References: Aho, Alfred & Sethi, Ravi & Ullman, Jeffrey.(2001) “Compilers: Principles, Techniques, and Tools” The Classic Dragon book. Allen, Frances E., (1981)"A History of Language Processor Technology in IBM", IBM Journal of Research and Development, v.25, no.5, Allen, Randy; and Kennedy, Ken, (2001) “Optimizing Compilers for Modern Architectures”, Morgan Kaufmann Publishers, Appel, Andrew (1987) “Modern Compiler Implementation in C/Java/ML” Appel, Andrew Wilson Bornat, Richard, (1979) “Understanding and Writing Compilers: A Do It Yourself Guide”, Macmillan Publishing. Brown, P.J.(2004) “Writing Interactive Compilers and Interpreters” Cambridge University Press, Cooper, Keith D., and Torczon, Linda, (2004) “Engineering a Compiler”, Morgan Kaufmann, Leverett; Cattel; Hobbs; Newcomer; Reiner; Schatz; Wulf,(1980) “An Overview of the Production Quality Compiler-Compiler Project, in Computer” ICT journal vol3(8):38-49 McKeeman, William Marshall; Horning, James J.; Wortman, David B Muchnick, Steven, (1997) “Advanced Compiler Design and Implementation”, Morgan Kaufmann Publishers, Scott, Michael Lee,( 2005) “Programming Language Pragmatics”, Terry, Patrick D., (1997) “Compilers and Compiler Generators: An Introduction with C++”, International Thomson Computer Press, Wirth, Niklaus, (1996) “Compiler Construction”, Addison- Wesley, , 176 pages