Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 1996 | Question 68

  • Last Updated : 06 Nov, 2017

Consider the syntax-directed translation schema (SDTS) shown below:

E → E + E         {print “+”}
E → E ∗ E         {print “.”}
E → id            {print id.name}
E → ( E )

An LR-parser executes the actions associated with the productions immediately after a reduction by the corresponding production. Draw the parse tree and write the translation for the sentence
(a+b)(c+d), using the SDTS given above.


Answer:

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :