The Gateway to Computer Science Excellence
0 votes
548 views
ARE NUMBER OF SHIFT ENTRIES / ACTIONS IN PARSING TABLE OF SLR(1) AND LALR(1) SAME ALWAYS??
in Compiler Design by Boss (17.7k points) | 548 views
+1
Shift entries are always equal but Action Part is not same due to reduce moves
0
0
Yes , for LALR(1) shift entries are same but in case of CLR(1) , shift entries may not be equal to SLR(1) parser.

2 Answers

0 votes
the only change comes i reduce in lr(0) we directly put at all terminals

in slr only at follow positions

in clr and lalr only at look ahead symbols
by Active (1.8k points)
0 votes
the shift moves in all LR(K)  parsing table is same but the bit difference comes only at reduce part for LR(0)  entire row is places vit that particular R notation and SLR(1) is by follow of LHS of that production and for LALR(1) and CLR(1) places under lookahead only but not the entire row..
by Junior (795 points)
0
What about the action part?
0

@suryaprakash

sir, does the shift entries same in SLR1 and CLR1

0

@suryaprakash

sir, does the shift entries same in SLR1 and CLR1

0
Someone please answer this
0
In made easy test series they have given answer is same
but these don't even have same number of states therefore shift entries should differ.
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,737 questions
57,356 answers
198,482 comments
105,252 users