The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
48 views

in Compiler Design by Active (4.9k points) | 48 views

1 Answer

0 votes
Shift-Reduce Parser also called as Bottom Up Parser

Input string : xxxxyz

So Draw the Annotated Parse tree for the input string.

S -> xxW                   [S -> xxW] pf{1}

   -> xxSz                   [W -> Sz] pf{3}

   -> xxxxWz              [S-> xxW] pf{1}

   -> xxxxSzz             [W ->Sz] pf {3}

   -> xxxxyzz             [S->y reduced ] pf{2}

So Bottom to top order : 23131, Option 3
by Active (1.7k points)

Related questions

0 votes
1 answer
1
asked Jan 25, 2017 in Compiler Design by reena_kandari Loyal (7.8k points) | 209 views
0 votes
1 answer
2
asked Oct 24, 2018 in Compiler Design by Balaji Jegan Active (4.9k points) | 35 views
0 votes
1 answer
3
asked Oct 24, 2018 in Compiler Design by Balaji Jegan Active (4.9k points) | 29 views
0 votes
0 answers
4
asked Oct 24, 2018 in Compiler Design by Balaji Jegan Active (4.9k points) | 18 views
0 votes
1 answer
5
asked Oct 24, 2018 in Compiler Design by Balaji Jegan Active (4.9k points) | 24 views
0 votes
1 answer
6
asked Oct 24, 2018 in Compiler Design by Balaji Jegan Active (4.9k points) | 27 views
0 votes
0 answers
7
asked Oct 24, 2018 in CO and Architecture by Balaji Jegan Active (4.9k points) | 13 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,362 questions
55,786 answers
192,411 comments
90,919 users