Left Factoring & Removing Left Recursion JavaCC
I have a grammar which I have to use JJTree and JavaCC to create a symbol table and an AST. While I fully understand the sections of my assignment to create the table and tree, the grammar I was given is ambiguous, contains left recursion and indirect left recusion. It also needs to be left factored. I have trawled all over the internet to try find methods that would work for me. For example: A ::= Aα | β can be changed to: A ::= βA' A' ::= αA' | ε But I don't know how to apply this to my grammar. Here is a section of the production rules I wrote from the grammar that contains the problems