Bottom Up Parsing in compiler design

This set of MCQs helps students to learn about bottom up parsing in compiler design, which constructs the parse tree for an input string beginning from the bottom (the leaves) and moves to work towards the top (the root). Bottom-up parsing is a parser that reduces the string to the start symbol of the grammar.

Start Quiz

Which of the following actions an operator precedence parser may take to recover from an error?

Insert symbols onto the stack Delete symbols from the stack Inserting or deleting symbols from the input All of the mentioned

Which of the following is used for grouping of characters into tokens?

Parser Code optimization Code generator Lexical analyser

What is the output of lexical analyzer?

A set of regular expression Syntax tress Set of Token String of Characters

What is garbage?

Unallocated storage Allocated storage whose access paths are destroyed? Allocated storage Uninitialized storage

An optimizing compiler __________.

Is optimized to occupy less space

Is optimized to take less time for execution

Optimized the code

None of the mentioned

An intermediate code form is __________.

Postfix notation

Syntax Trees

Three Address code

All of the mentioned

Inherited attribute is a natural choice in __________.

Tracking declaration of a variable

Correct use of L and R values

All of the mentioned

None of the mentioned

DAG representation of a basic block allows __________.

Automatic detection of local common sub expressions

Detection of induction variables

Automatic detection of loop variant

None of the mentioned

Shift reduce parsers are __________.

Top down parser

Bottom up parser

Maybe both

None of the mentioned

A bottom up parser generates __________.

Right most derivation

Right most derivation in reverse

Left most derivation

Left most derivation in reverse

What is terminal table?

Contains all constants in the program Is a permanent table of decision rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure Consist of a full or partial list of the token is as they appear in the program created by lexical analysis and used for syntax analysis and interpretation Is a permanent table which lists all keywords and special symbols of the language in symbolic form

Which of the following is a phase of a compilation process?

Lexical Analysis Code Generation Lexical Analysis & Code Generation None of the mentioned

A system program that setup an executable program in main memory ready for execution is?

Assembler Linker Loader Load and go

A loader is a program that _________.

Program that places functions into memory and prepares them for execution

Program that automates the translation of assembly language into machine language

Program accepting another program written in a high level language and produces as object program

None of the mentioned

System program such as compiler are designed so that they are _________.

Re-enterable

Non reusable

Serially usable

None of the mentioned

Quiz/Test Summary
Title: Bottom Up Parsing in compiler design
Questions: 15
Contributed by:
Steve