Syntax Directed Definition and Translations

This set of MCQs helps students to learn about syntax directed definition which refers to a method of compiler implementation where the source language translation is completely driven by the parser and in syntax directed translation, along with the grammar we associate some informal notations and these notations are called as semantic rules.

Start Quiz

The method which merges the bodies of two loops is?

Loop rolling Loop jamming Constant folding None of the mentioned

If E be a shifting operation applied to a function f, such that E(f) = f (x +β ), then?

E (αf+β g) = α E(f) +β E (g) E (αf +β g ) =. ( α+ β ) + E (f + g) E (αf +β g ) = α E (f+gβ) E (αf +β g ) = αβ E (f + g)

Which of the following functions is performed by loader?

Allocate memory for the programs and resolve symbolic references between objects decks Address dependent locations, such as address constants, to correspond to the allocated space Physically place the machine instructions and data into memory All of the mentioned

Which table is a permanent database that has an entry for each terminal symbol?

Terminal Table Literal Table Identifier Table None of the mentioned

The segment base is specified using the register named is?

ORG instructions TITLE instruction ASSUME instruction SEGMENT instruction

Dividing a project into segments and smaller units in order to simplify design and programming efforts is called?

Modular approach Top down approach Bottom up approach Left right approach

In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun?

Non usable module Serially usable Re-enter-able None of the mentioned

Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes?

O(1) O(long) O(n) O(long)

Which of the following is true for machine language?

Continuous execution of program segments Depicting flow of data in a system A sequence of instructions which solves a problem The language which interacts with the computer using only the binary digits 1 and 0

In a single pass assembler, most of the forward references can be avoided by putting the restriction ___________.

On the number of strings/life reacts

Code segment to be defined after data segment

On unconditional rump

None of the mentioned

The process manager has to keep track of ___________.

Status of each program

Information to a programmer using the system

Status of each program & Information to a programmer using the system

None of the mentioned

Assembly code data base is associated with ___________.

Code is converted into assembly

Table of rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure

All of the mentioned

None of the mentioned

What is the function of the syntax phase?

Recognize the language and to call the appropriate action routines that will generate the intermediate form or matrix for these constructs

Build a literal table and an identifier table

Build a uniform symbol table

Parse the source program into the basic elements or tokens of the language

Pass I ______________.

Assign address to all statements

Save the values assigned to all labels for use in pass 2

Perform some processing

All of the mentioned

The root directory of a disk should be placed ___________.

At a fixed address in main memory

At a fixed location on the disk

Anywhere on the disk

None of the mentioned

Quiz/Test Summary
Title: Syntax Directed Definition and Translations
Questions: 15
Contributed by:
Steve