This seems like a simple question, but I could not find a good explanation of this anywhere. How do you handle nested grammars [cfgs] (aka. grammars referencing other grammars.) For example,
S => Eb
E => cA
Separate Grammar:
A => d
Is this possible? If not, how does one approach dealing with this. For grammars, like variable declaration, is it necessary to simply rewrite the expression grammars associated with the main grammar or can they be referenced from it? If so, how does one integrate this feature into an LL(1) parser properly.
Thanks.