GATE CS 2016 Set-1,Q46: Consider the following Syntax Directed Translation Scheme (SDTS), with

Опубликовано: 29 Сентябрь 2024
на канале: Monalisa CS
1,053
19

GATE CS 2016 Set-1,Q46: Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}.
S → aA { print 1 }
S → a { print 2 }
A → Sb { print 3 }
Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
(A) 1 3 2
(B) 2 2 3
(C) 2 3 1
(D) syntax error
Ans : (C) 2 3 1
----------------------------------------------
Subscribe my channel for more updates    / monalisacs  
----------------------------------------------------------
Join Telegram GATE CS study group: https://t.me/MonalisaCS
----------------------------------------------------------------
Compiler Design Lectures :   • Ch 1.1:Language Processing System |CD...  
----------------------------------------------------------------
Compiler Design PYQ :   • Ch 1.1:Language Processing System |CD...  
----------------------------------------------------------------------
Theory Of Computation Lectures    • Video  
-------------------------------------------------------------------
TOC GATE PYQ:    • GATE CS 2010,Q39:Let L={w ∈ (0 + 1)* ...  
-------------------------------------------------------------------
Data Structure Lecture:    • Data Structure Syllabus for GATE  
---------------------------------------------------------------------
Data Structure PYQ:    • Data Structure Syllabus for GATE  
-----------------------------------------------------------------------
#GATE_2016#GATE_CSE#Compiler_Design_PYQ