GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2022

GATE 2022 · CS · NAT · 2 marks · Compiler Design › Semantic Analysis

GATE 2022 Computer Science and Information Technology question: Consider the following grammar along with translation rules. aligned S & S 1 \ T & \…

Consider the following grammar along with translation rules.

Here # and % are operators and is a token that represents an integer and represents the corresponding integer value. The set of non-terminals is and a subscripted non-terminal indicates an instance of the non-terminal.

Using this translation scheme, the computed value of for root of the parse tree for the expression is __________.

Show answer

Official answer: 80

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion