I am trying to write a grammar for propositional logic for the purpose of creating a LL parser (lexical analysis).
I tried the following grammar:
F = F and F
F = F or F
F = F => F
F = F <=> F
F = not F
F = (F)
D = a
but I discovered that it is ambiguous. I tried the following to remove the ambiguity:
F = F and A
F = A
A = F or B
A = B
B = F => C
B = C
C = F <=> C
C=D
D = not F
D = (F)
D = a
Is this grammar correct? Was I successful in removing the ambiguity?