COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In three-address code, arrays are
A
Not supported
B
One dimensional
C
More than one dimensional
D
Supported via pointers
Explanation: 

Detailed explanation-1: -The construction of a three address code for arrays involves recalculation of index of the array. Arrays of all dimensions have to be reduced to one dimension. So, we begin with one dimensional arrays.

Detailed explanation-2: -Three address code is a sort of intermediate code that is simple to create and convert to machine code. It can only define an expression with three addresses and one operator. Basically, the three address codes help in determining the sequence in which operations are actioned by the compiler.

Detailed explanation-3: -Three address code is a linearized representation of a syntax tree, where the names of the temporaries correspond to the nodes. The use of names for intermediate values allows three-address code to be easily rearranged which is convenient for optimization. Postfix notation does not have this feature.

Detailed explanation-4: -The three address code can be represented in two forms: quadruples and triples.

There is 1 question to complete.