All Exams Test series for 1 year @ ₹349 only
Question

Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II:

List - I

List - II

A. A part of a compiler that is responsible for recognizing

1. Optimizer syntax

B. A part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories.

2. Semantic Analysis

C. A part of a compiler that understands the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions.

3. Parser

D. An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate Representation).

4. Scanner

The correct answer is

A - 3, B - 4, C - 2, D - 1

The parser recognizes syntax (A–3); the scanner converts characters into categorized tokens (B–4); semantic analysis checks names, types, and consistent usage (C–2); and the optimizer improves intermediate representation while preserving program behavior (D–1).

Was this answer helpful?

Important Questions from Syntax Analyzer

  1. Which of the following not correct according to input to output, the compiler phase that is processes by it?

    Phases of CompilerInputOutput
    ALexical AnalyzerCharacter streamToken stream
    BSyntax AnalyzerToken streamSyntax tree
    CSemantic AnalyzerSyntax treeSyntax tree
    DIntermediate Code GeneratorSyntax treeTarget-machine code
  2. Shift-Reduce parsers perform the following :

  3. Which phase of compiler generates stream of atoms ?

  4. Match List I with List II

    List IList II
    A. Initial Configuration of stack and input in LL Parsing process.I. \(\$\) w\(\$\)
    B. Final Configuration of stack and input in LL Parsing processII. \(\$\) \(\$\)
    C. Initial Configuration of stack and input in LR Parsing processIII. \(\$\)S w\(\$\)
    D. Final Configuration of stack and input in LR Parsing processIV. \(\$\)S \(\$\)

    Choose the correct answer from the options given below:

  5. While processing a string by an LR parser, the reading of the given string by the parser is--------------.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App