I think the below is actually LL(1) but I am not 100% sure. are we able to prove that this iss LL(1) grammar and then also, is the first and follow sets given correct? I dont really understand for sure how to actually get the follow sets.
Grammar
expr ::= term {addop term}
term ::= factor {mulop factor}
factor ::= variable| unsigned-number| ( expr)
variable ::= identifier
addop ::= + | -
mulop ::= * | /
First Sets
First(expr) = identifier, unsigned number, (
First(Term) = identifier, unsigned number, (
First(Factor) = identifier, unsigned number, (
First(Variable) = Identifier
First(addop) = +, -
First(mulop) = *, /
Follow Sets
Follow(Expr) = First(term)
Follow(Term) = First(Factor)
Do not understand how to do the Follow sets of the below sets
Follow(Factor) = First( ")" ) = )
Follow(Variable) Follow(addop) Follow(mulop)