208 views
0 votes
0 votes

https://gateoverflow.in/86869/gate1990-16a

the given grammar is this 

G1:S→ if S then S else S

        S→ if S then S

and in solution we used a terminal expr 

stmt→ if expr  then stmt 
                           ∣ ifexpr then stmt else stmt 
                           ∣other

 

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
gateexplore asked Nov 17, 2023
88 views
0 votes
0 votes
1 answer
3
Sajal Mallick asked Oct 13, 2023
176 views
Does Follow and First operation always apply on non left recursive grammar?
0 votes
0 votes
1 answer
4