Search code examples
parsinggrammarleft-recursion

Eliminate left recursion with only e terminal


If there is a grammar:

A -> AA | e

where e is epsilon (the empty string) is there any way to eliminate left recursion from this grammar?


Solution

  • if this is all of the grammar then of course you can:

    A -> e
    

    if not please provide more of your homework ;)