Compiler Design - Syntax directed translation


 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)


Option: A

Explanation :


 Pass I

A. assign address to all statements in the program
B. save the values assigned to all labels for use in pass 2
C. perform some processing of assembler directives
D. all of these

Option: D

Explanation :


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

A. Terminal table
B. Literal table
C. Identiier table
D. None of these

Option: A

Explanation :


 Which of the following functions is performed by loader ?

A. Allocate space in memory for the programs and resolve symbolic references between objects decks
B. Adjust all address dependent locations, such as address constants, to correspond to the allocated space.
C. Physicaly place the machine instructions and data into memory
D. All of these.

Option: D

Explanation :


The root directory of a disk should be placed

A. at a fixed address in main memory
B. at a fixed location on the disk
C. anywhere on the disk
D. None of these

Option: B

Explanation :

Suggest an improvement