RTUComputer ScienceYr 2023 · Sem 52023

Q6Compiler Design

Question

2 marks

What is Left Recursion?

Answer

Left recursion occurs when a grammar rule allows a non-terminal to derive itself as its leftmost symbol.

Left Recursion is a highly dangerous grammatical phenomenon where a non-terminal mathematically derives a sequence of symbols that strictly begins with itself, usually expressed as the production rule . This creates a catastrophic infinite loop in Top-Down parsers, completely crashing the compiler because the parser will endlessly call itself without consuming any input.

Back to Paper