• closed by
1,236 views
0 0 votes
closed as a duplicate of: GATE CSE 1990 | Question: 16a

$$\begin{align*} \text {stmt} &\rightarrow \text{if expr then stmt else stmt} \\ & \;\; \;\; | \text{ if expr then stmt} \\ & \;\; \;\; | \text{ other} \end{align*}$$

Which of the following statement/s is/are true ??

  • A. The grammar is ambiguous and the ambiguity cannot be resolved.
  • B. The grammar is unambiguous
  • C. The grammar is ambiguous and the ambiguity can be resolved
  • D. None of these
Position:
Show:

Related questions

3 3 votes
1 answers 1 answer
1.7k
1.7k views
3 3 votes
2 answers 2 answers
5.0k
5.0k views
vivekpinto07 asked Jun 24, 2016
4,952 views
An ambiguous grammar is one that producesmore than one left most derivation for the same sentence.more than one right most derivation for the same sentence.more than one ...
0 0 votes
0 0 answers
1.1k
1.1k views
admin asked Aug 20, 2019
1,144 views
The following is an ambiguous grammar for expressions with $n$ binary, infix operators, at $n$ different levels of precedence: $E\rightarrow E\theta_{1}E\mid E\theta_{2}E...
2 2 votes
0 0 answers
1.1k
1.1k views
admin asked Aug 17, 2019
1,067 views
Repeat Question $4.2.1$ for each of the following grammars and strings: $S\rightarrow 0S1\mid 01$ with string $000111$.$S\rightarrow +SS\mid \ast SS\mid a$ with string $+...