I'd like to know if there is a way to determine if a context-free grammar can be converted to
- a LL(1) grammar
- a LL(k) grammar, whatever the value of k (so the algorithm should give the value of k)
By "can be converted to", I mean that the new (LL) grammar must generate the same language as the old grammar.
If it can't be done, I'd appreciate some references. I'm also interested in ways to achieve the same result under more restrictive conditions (for instance only for non-ambiguous context-free grammars).
I'd also like to know if there a way to check if a grammar is LL(k), irrespective of the k, so I wouldn't have to iterate on the value of k.