COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For Boolean variable B, B.truelist contains
A
List of locations at which B is true
B
List of locations to jump to if B is true
C
List of locations at which B is true and the locations to branch to
D
None of the other options
Explanation: 

Detailed explanation-1: -Backpatching can be used to generate a program for boolean expressions and the flow of control statements in one pass. In this, synthesized attributes truelist and falselist of non-terminal B are used to handle labels in jumping code for Boolean expressions.

Detailed explanation-2: -Boolean variables can either be True or False and are stored as 16-bit (2-byte) values. Boolean variables are displayed as either True or False. Like C, when other numeric data types are converted to Boolean values then a 0 becomes False and any other values become True.

Detailed explanation-3: -A boolean variable can only have two different values: true and false. There are different ways of comparing values. We can test if a number is greater or smaller than another number, if they are equal, if they are different. In each case a value of true or false is returned.

There is 1 question to complete.