2 votes 2 votes which of the following statements is true? A) right recursion is needed for termination in predictive parser B) left recursion is required more stack space than right recursion C) left recursion works fine in BUP 1)A & B 2) A & C 3) B & C 4) All Compiler Design parsing + – Hira Thakur asked Aug 15, 2017 Hira Thakur 1.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes A and C are correct. 1)In predictive parser we use right recursive and deterministic grammer and do top down parsing. So by using RR chance of infinite recursion is avoided. So its true. 2) Actually its the other way around. right recursive grammars, the stack may grow indefinitely until a reduction occurs, thus limiting rather dramatically the parsing possibilities. However, left recursive ones will let the compiler generate reductions earlier (in fact, as soon as possible). So its false. 3) Yes, Its the advantage of BUP actually. http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/11/ll.html smelly indian answered Sep 6, 2017 smelly indian comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes i think B and C are true .but , B is absolutly fine its correct there is no doubt in that . option A is FALSE because in order to stop an PARSER we need EPSILON but not an RIGHT /LEFT RECURSIVE GRAMMAR suryaprakash answered Jun 14, 2018 suryaprakash comment Share Follow See all 0 reply Please log in or register to add a comment.