SYNTAX ANALYSIS
ROLE OF THE PARSER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Current activation record
|
|
Parent activation record
|
|
Child activation record
|
|
None of the other options
|
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.