ambiguity
GATE CSE & IT · Context-Free Languages · 1987-2026
Study anchor
Hopcroft-Ullman / Dragon Book
Automata, languages, parsing, syntax-directed translation
Practice action
Start latest PYQPYQs in this concept
All concepts →Which of the following grammars is/are ambiguous?
Consider the following grammar where $S$ is the start symbol, and $a$ and $b$ are terminal symbols. $$ S \rightarrow a S b S|b S| \in $$ Which of the following statements is/are tr...
Consider two grammars G₁ and G₂ with the production rules given below: G₁: S → if E then S | if E then S else S | a E → b G₂: S → if E then S | M M → if E then M else S | c E → b w...
Consider two grammars $G_1$ and $G_2$ with the production rules given below: $G_1: S \rightarrow$ if $E$ then $S \mid$ if $E$ then $S$ else $S \mid a$ $$\mathrm{E} \rightarrow \mat...
Consider the following sentences : (i) Everybody in the class is prepared for the exam. (ii) Babu invited Danish to his home because he enjoys playing chess, Which of the following...
Which one of the following problems is un-decidable?
Consider the CFG with { S, A, B } as the non-terminal alphabet, { a, b } as the terminal alphabet, S as the start symbol and the following set of production rules: $$\eqalign{ & S...
Consider the grammar with non-terminals N = { S, C, S 1 }, terminals T = { a, b, i, t, e }, with S as the start symbol, and the following set of rules: $$\eqalign{ & S \to iCtS{S_1...
Consider the following statements about the context-free grammar $$G = \left\{ {S \to SS,\,S \to ab,\,S \to ba,\,S \to \varepsilon } \right\}$$ $$1.$$ $$G$$ is ambiguous $$2.$$ $$G...
Which of the following statements is false?
A context-free grammar is ambiguous if: