COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Control link points to the
A
Current activation record
B
Parent activation record
C
Child activation record
D
None of the other options
Explanation: 

Detailed explanation-1: -The static link of an activation record of a procedure p contains the address of the last activation record on the stack of the procedure where p is declared. In this way, we can always find the address of a non-local variable x: we just follow the chain of the static links until we “find” a declaration for x.

Detailed explanation-2: -Activation Record This includes buckets for the parameters of the function, for the return value of the function, for the local variables of the function, and for which line in the function is currently being executed.

Detailed explanation-3: -1) A control link from record A points to the previous record on the stack. 2) Points to activation record of calling procedure. 3) The chain of control links traces the dynamic execution of the program.

There is 1 question to complete.