Computer Science, asked by AnkushRana4460, 1 year ago

Give an example of left recursive rule in cfg. What is the significance of left recursive rule?

Answers

Answered by Ninu2018
2

he production is left-recursive if the leftmost symbol on the right side is the same as the non terminal on the left side. For example, ... If one were to code this production in a recursive-descent parser, the parser would go in an infinite loop.

Answered by aqibkincsem
1

"The significance of left recursive rule in the context of free grammar is that, a non-terminal is a left-recursive, if the left symbol is actually one of the productions or can be easily made by itself by having a series of substitutions.

In left recursive rule, the production is left-recursive only when the left most symbol towards the right side is same as the non terminal that is on the left side.

The best example for left recursive rule is

Expr expr+term

"

Similar questions