img
All Q&A
2

Show that no left recursive grammar can be LL(1). Show that no LL(1) grammar can be ambiguous.

21 November, 2024
First of all FIRST and FOLLOW over the grammar must find out in which left recursion has been removed.
4

Write short notes on:

  • LEX
  • YACC
21 November, 2024
Lex is a program generator designed for lexical processing of character input streams. It accepts a high-level, problem oriented specification for character string matching, and produces a program in a general purpose language which recognizes regular expressions.
5

Write short notes on: 

  • Peephole Optimization
  • Symbol Table
  • Cross Compiler
21 November, 2024
In compiler optimization theory, the compiler optimization basically refers to the program optimization to achieve performance in the execution.
6

What is activation record? Explain clearly the components of an activation record.

21 November, 2024
A data structure containing the important state information for a particular instance of a function call (or something that resembles a function call). May exist entirely in memory, or be partially stored in registers.
7

Write short notes on:

  • Back patching
  • Thompson’s construction
  • Constant folding and copy propagation
21 November, 2024
The problem in generating three address codes in a single pass is that we may not know the labels that control must go to at the time jump statements are generated.