in Compiler Design retagged by
1,642 views
1 vote
1 vote
Construct the LALR(1) sets of items for the grammar:

Sā€™ -> S
S -> *SS | a

Then, identify, in the list below, one of the LALR(1) sets of items for

(A) [S -> a., $\$$]

(B) [S -> a., +a]

(C) [S -> *SS., $\$$ + a]

(D) [S -> *SS., $\$$]
in Compiler Design retagged by
by
1.6k views

2 Comments

A and D both
0
0
Correct A
0
0

1 Answer

0 votes
0 votes

The possible answer is A, D.

In option C instead of + if it is * It is also possible..

2 Comments

why didnt you combine [s->a. $] and [s->a. a/*]
0
0
Yes we can combine them in LALR(1). I just solved with according to options.
0
0

Related questions

0 votes
0 votes
1 answer
1
Deepesh Pai asked in Compiler Design Nov 28, 2018
366 views
Deepesh Pai asked in Compiler Design Nov 28, 2018
366 views
0 votes
0 votes
2 answers
2
0 votes
0 votes
1 answer
3
1 vote
1 vote
1 answer
4