2 votes 2 votes first and follow of S->ABC A->0A1 / epsilon B->1B / epsilon C->1C0 / epsilon Compiler Design compiler-design parsing first-and-follow + – A_i_$_h asked Oct 20, 2017 edited Jun 18, 2022 by Lakshman Bhaiya A_i_$_h 1.9k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes my answer Hira Thakur answered Oct 20, 2017 selected Oct 20, 2017 by A_i_$_h Hira Thakur comment Share Follow See all 3 Comments See all 3 3 Comments reply A_i_$_h commented Oct 20, 2017 reply Follow Share @hira when a grammar is given and asked if it is LR(1) we must draw states with lookahead and find for conflicts or without lookahead 0 votes 0 votes Hira Thakur commented Oct 20, 2017 reply Follow Share you must draw the state with lookahead symbol.then check the conflict if any. 0 votes 0 votes A_i_$_h commented Oct 20, 2017 reply Follow Share @hira if a grammar is not SLR(1) then it will not be LALR(1) also right? if my statement is wrng can u gve me an example to prove that 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes FIRST Sets: Fi(A) = {0, eps} Fi(B) = {1, eps} Fi(C) = {1, eps} Fi(S) = {0, 1, eps} FOLLOW Sets: Fo(S) = {$} Fo(A) = {1, $} Fo(B) = {1, $} Fo(C) = {0, $} Manu Thakur answered Oct 20, 2017 Manu Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.