I cannot quite understand how to determine whether grammar is LL(1) or not. I have been given the following grammar:
S → Y | 1X
X → 1X | 0
Y → Y0|1X1|2X2
I stated that this grammar is not LL(1) because it Y0 is left recursive.
So I came up with the following solution:
S → Y | 1X
X → 1X | 0
Y → 1X1F | 2X2F
F → ε | 0F
But still I am not sure if that is correct. I still think that I must have missed some rule like factoring of some sort. Would I have to take 1X and 2X into different variable?
Thanks for help in advance. I would also like to know if there are easier ways to determine whether the grammar is LL(1) I have came across a lot of "first" and "follow" tables, but haven't actually managed to build one myself.