MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
After eliminating left recursion, the given grammar T
A
T
B
T
C
T
D
T
Explanation: 

Detailed explanation-1: -A Grammar G (V, T, P, S) is left recursive if it has a production in the form. A → A |. Left Recursion can be eliminated by introducing new non-terminal A such that. This type of recursion is also called Immediate Left Recursion.

Detailed explanation-2: -Left recursion is eliminated by converting the grammar into a right recursive grammar.

Detailed explanation-3: -A grammar in the form G = (V, T, S, P) is said to be in left recursive form if it has the production rules of the form A → A |. In the production rule above, the variable in the left side occurs at the first position on the right side production, due to which the left recursion occurs.

Detailed explanation-4: -Solutions for Which one of the following grammars is free from left recursion? a)B→cb)c)d)Correct answer is option ‘B’.

There is 1 question to complete.