Category Archives: Compiler Design

Compiler Design | Runtime Environments

A translation needs to relate the static source text of a program to the dynamic actions that must occur at runtime to implement the program. The program consists of names for procedures, identifiers etc., that require mapping with the actual memory location at runtime. Runtime environment is a state of the target machine, which may… Read More »



See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.

Compiler Design | Syntax Directed Translation

Background : Parser uses a CFG(Context-free-Grammer) to validate the input string and produce output for next phase of the compiler. Output could be either a parse tree or abstract syntax tree. Now to interleave semantic analysis with syntax analysis phase of the compiler, we use Syntax Directed Translation. Definition Syntax Directed Translation are augmented rules… Read More »



See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.

Compiler Design | Ambiguous Grammar

  You can also read our previously discussed article on Classification of Context Free Grammars.   Context Free Grammars(CFGs) are classified based on: Number of Derivation trees Number of strings   Depending on Number of Derivation trees, CFGs are sub-divided into 2 types: Ambiguous grammars Unambiguous grammars   Ambiguous grammar:   A CFG is said… Read More »



See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.

Classification of Context Free Grammars

Context Free Grammars (CFG) can be classified on the basis of following two properties: 1) Based on number of strings it generates. If CFG is generating finite number of strings, then CFG is Non-Recursive (or the grammar is said to be recursive grammar) If CFG can generate infinite number of strings then the grammar is… Read More »



See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.

Compiler Design | FOLLOW Set in Syntax Analysis

We have discussed following topics on Syntax Analysis. Introduction to Syntax Analysis Why FIRST and FOLLOW? FIRST Set in Syntax Analysis In this post, FOLLOW Set is discussed. Follow(X) to be the set of terminals that can appear immediately to the right of Non-Terminal X in some sentential form. Example: S ->Aa | Ac A… Read More »



See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.