McqMate

Q. |
## Context free grammar is used for- |

A. | Lexical analyzer |

B. | Document type definition (DTD) |

C. | Text pattern searching |

D. | Both a & c |

Answer» B. Document type definition (DTD) |

1.9k

0

Do you find this helpful?

16

View all MCQs in

Theory of ComputationNo comments yet

- Which of the following are decidable? 1) Whether the intersection of two regular language is infinite. 2) Whether a given context free language is regular. 3) Whether two push down automata accept the same language. 4) Whether a given grammar is context free.
- If L1 and L2 are context free language and R a regular set, then which one of the languages below is not necessarily a context free language?
- Context free grammar is not closed under
- Consider the following statements about the context free grammar G = {S - >SS,S - >ab,S ->ba, S - ε} I. G is ambiguous II. G produces all strings with equal number of a’s and b’s III. G can be accepted by a deterministic PDA. Which combination below expresses all the true statements about G?
- Let P be a regular language and Q be context-free language such that Q ∈ P. (For example, let P be the language represented by the regular expression p*q* and Q be {pnqn n∈ N}). Then which of the following is ALWAYS regular?
- The following grammar G = (N, T, P, S) N = {S, A, B} T = {a, b, c} P : S → aSa S → aAa A → bB B → bB B → c is
- The following grammar G = (N, T, P, S) N = {S, A, B, C, D, E} T = {a, b, c} P : S → aAB AB → CD CD → CE C → aC C → b bE → bc is
- The following grammar G = (N, T, P, S) N = {S, A, B, C} T = {a, b, c} P : S → aS A → bB B → cC C → a is
- Type-1 Grammar is known as_____________
- Which of the following strings is not generated by the following grammar? S → SaSbS ε