If there is an infinite loop in a context-free grammar, is the resulting language context-free?

1.7k Views Asked by At

Suppose I have the following context-free grammar:

$ S = A \\ A = aA $

Will the resulting language be context-free?

If it is, this would also mean a Turing machine should be able to produce it, since it's higher in the hierarchy. But how? Wouldn't it infinite loop?

If it is not, does that mean that there are certain context-free grammars that do not produce a context-free language? This seems bizarre.