2
$\begingroup$

Is complement of LL(k) grammar context free?

$\endgroup$
2
4
$\begingroup$

In general, the complement of a context-free language is not context-free. However, LL(k) languages are a strict subset of the deterministic CFLs.

The complement of a DCFL is also a DCFL, because it can be recognized by the same deterministic push-down automaton, just with the "accept" and "reject" states swapped.

So the answer to your question appears to be "yes, in fact it is deterministic context-free."

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.