0 votes 0 votes Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion: $ S → S S+/ S S* /a$ Compiler Design compiler-design left-recursion first-and-follow + – jayanth asked Jun 16, 2022 • edited Nov 7, 2023 by Hira Thakur jayanth 3.6k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes (after removing left recursion) S->S’ S’->S+S’/S*S’/a/∈ FIRST(S)={a,∈} FIRST(S’)={a,∈} FOLLOW(S)={ +,*} FOLLOW(S’)={ +,* } cheNavya answered Jun 22, 2022 cheNavya comment Share Follow See 1 comment See all 1 1 comment reply Jerusha86 commented Mar 3 reply Follow Share Doesn't it considered as Left factoring ? 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Given grammar : $S\rightarrow SS+/ SS*/ a$ after removing left recursion : $S \rightarrow aS$’ $S’\rightarrow S+S’/S*S/\epsilon$ First() follow() $S$ (a) $(\$,+,*)$ $S’$ $(a,\epsilon)$ $(\$,+,*)$ HesterMoffet answered Jul 24, 2022 • edited Nov 7, 2023 by Hira Thakur HesterMoffet comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes answer is as follows ritik456 answered Dec 30, 2022 ritik456 comment Share Follow See all 0 reply Please log in or register to add a comment.