0 votes 0 votes Let G be any grammar with the following productions: X → X+Y | Y Y→ Y*Z | Z Z → (X) Z → id If LR(1) parser is used to parse the above grammar, then total how many look-a-heads are present for the item “X→.Y” and “Z →.id” in the initial state? Compiler Design compiler-design made-easy-test-series parsing made-easy-booklet lr-parser + – Souvik33 asked Jan 1, 2023 Souvik33 903 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer: Here (i) is X→ .Y and (ii) is Z→ .id Souvik33 answered Jan 1, 2023 • edited Jan 1, 2023 by Souvik33 Souvik33 comment Share Follow See all 13 Comments See all 13 13 Comments reply Show 10 previous comments Sunnidhya Roy commented Jan 1, 2023 reply Follow Share @raja11sep you might have overlooked and not included X--> .Y {+} for the later productions just check once. 2 votes 2 votes raja11sep commented Jan 1, 2023 reply Follow Share Yes got my mistake. Thannks @Sunnidhya Roy @Abhrajyoti00 @Souvik33 . 1 votes 1 votes Souvik33 commented Jan 1, 2023 reply Follow Share @Abhrajyoti00 Thanks 😊 1 votes 1 votes Please log in or register to add a comment.