0% found this document useful (0 votes)
8 views

Compiler

A compiler translates programs written in a high-level language into a low-level language that can be executed by a computer. Compiler construction is a complex field that involves understanding principles for designing compilers and developing tools to aid in their creation. Modern compilers focus on improving code efficiency and utilize new technologies while still addressing traditional topics like implementing high-level language features.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Compiler

A compiler translates programs written in a high-level language into a low-level language that can be executed by a computer. Compiler construction is a complex field that involves understanding principles for designing compilers and developing tools to aid in their creation. Modern compilers focus on improving code efficiency and utilize new technologies while still addressing traditional topics like implementing high-level language features.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

A compiler is a translator that translates programs written in one language to another language, that

is, translates a high-level language program into a functionally equivalent low-level language program
that can be understood and later executed by a computer. Designing an effective compiler for a computer
system is also one of the most complex areas of system development.
Compiler construction is a broad field. The demand for compilers will always remain as long as there
are programming languages. In early compilers, little was understood about the underlying principles and
techniques and all tasks were done by hand. Hence, compilers were messy and complex systems. As
programming languages started evolving rapidly, more compilers were in demand; so people realized the
importance of compilers and started understanding the principles and introduced new tools for designing
a compiler.
In early days, much of the effort in compilation was focused on how to implement high-level
language constructs. Then, for a long time, the main emphasis was on improving the efficiency of
generated codes. These topics remain important even today, but many new technologies have caused
them to become more specialized. Compiler writing techniques can be used to construct translators for a
wide variety of languages. The importance of a compiler in a typical language-processing system and the
challenges in designing a compiler are discussed in detail. The design phases of a compiler along with the
modern compiler tools are explained.
Translators
A program written in high-level language is called as source code. To convert the source code into
machine code, translators are needed.
A translator takes a program written in source language as input and converts it into a program in target
language as output.
It also detects and reports the error during translation.
Roles of translator are:
• Translating the high-level language program input into an equivalent machine language program.
• Providing diagnostic messages wherever the programmer violates specification of the high-level
language program.

You might also like