It's not LL(1). Here's why:
The first rule of an LL(1) grammar is:
A grammar G is LL(1) if and only if whenever A --> C | D
are two distinct productions of G, the following conditions hold:
- For no terminal
a
, do both C and D derive strings beginning witha
.
This rule is, so that there are no conflicts while parsing this code. When the parser encounters a (
, it won't know which production to use.
Your grammar violates this first rule. All your non-terminals on the right hand of the same production , that is, all your Cs and Ds, eventually reduce to G and H, so all of them derive at least one string beginning with (
.