Skip to content

Category Archives: Compiler Design

Parsing is classified into two categories, i.e. Top-Down Parsing, and Bottom-Up Parsing. Top-Down Parsing is based on Left Most Derivation whereas Bottom-Up Parsing is dependent… Read More
Prerequisite – Parsing | Set 2 (Bottom Up or Shift Reduce Parsers) Shift Reduce parser attempts for the construction of parse in a similar manner… Read More
Given some numbers, task is to identify the positive and negative numbers and print the count of negative and positive numbers. Prerequisite: Flex (Fast lexical… Read More
Before proceeding, it is highly recommended to be familiar with the basics in Syntax Analysis, LL(1) parsing, and the rules of calculating First and Follow… Read More
A grammar that is used to define mathematical operators is called an operator grammar or operator precedence grammar. Such grammars have the restriction that no… Read More
The tasks of the Error Handling process are to detect each error, report it to the user, and then make some recovery strategy and implement… Read More
Prerequisite – Phases of a Compiler  Definition The symbol table is defined as the set of Name and Value pairs. Symbol Table is an important… Read More
In this phase of compilation, all possible errors made by the user are detected and reported to the user in form of error messages. This… Read More
Prerequisite – Introduction to Syntax Analysis, Syntax Directed Translation Syntax Directed Definition (SDD) is a kind of abstract specification. It is generalization of context free grammar… Read More
FLEX (fast lexical analyzer generator) is a tool/computer program for generating lexical analyzers (scanners or lexers) written by Vern Paxson in C around 1987. It… Read More
Prerequisite – Introduction of Compiler design  We basically have two phases of compilers, namely the Analysis phase and Synthesis phase. The analysis phase creates an… Read More
The compiler is software that converts a program written in a high-level language (Source Language) to a low-level language (Object/Target/Machine Language/0, 1’s).  A translator or… Read More
There are five generations of Programming languages. They are: First-Generation Languages : These are low-level languages like machine language. Second-Generation Languages : These are low-level assembly languages used in… Read More
The scope of a variable x in the region of the program in which the use of x refers to its declaration. One of the… Read More
Let assume that, you have a c program, then you give the C program to compiler and compiler will produce the output in assembly code.… Read More