Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: COMPILERS
Description: You can study about compilers.

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


INTRODUCTION TO COMPILERS
COMPILER:A compiler translates the code written in high level language to machine level language without
changing the meaning of the program
...

Compiler design principles provide an in-depth view of translation and optimization process
...
It includes
lexical, syntax, and semantic analysis as front end, and code generation and optimization as
back-end
...
So we write programs
in high-level language, which is easier for us to understand and remember
...
This is known as Language Processing System
...

Source-to-source Compiler
A compiler that takes the source code of one programming language and translates it into the
source code of another programming language is called a source-to-source compiler
...
Each phase takes input from its
previous stage, has its own representation of source program, and feeds its output to the next
phase of the compiler
...


Fig
...
This phase scans the source code as a stream
of characters and converts it into meaningful lexemes
...
It takes the token produced by lexical
analysis as input and generates a parse tree (or syntax tree)
...
e
...

Semantic Analysis
Semantic analysis checks whether the parse tree constructed follows the rules of language
...
Also, the semantic analyzer keeps track of identifiers, their types and expressions;
whether identifiers are declared before use or not etc
...

Intermediate Code Generation
After semantic analysis the compiler generates an intermediate code of the source code for the
target machine
...
It is in between the highlevel language and the machine language
...

Code Optimization
The next phase does code optimization of the intermediate code
...

Code Generation
In this phase, the code generator takes the optimized representation of the intermediate code and
maps it to the target machine language
...
Sequence of instructions of machine code
performs the task as the intermediate code would do
...
All the identifier's
names along with their types are stored here
...
The symbol table is also used for scope
management
Title: COMPILERS
Description: You can study about compilers.