edited by
2,364 views
1 votes
1 votes

A grammar is defined as

  • $A \rightarrow BC$
  • $B \rightarrow  x \mid Bx$
  • $C \rightarrow B \mid D$
  • $D \rightarrow y \mid Ey$
  • $E \rightarrow z$

The non terminal alphabet of the grammar is

  1. $\{A,B,C,D,E\}$
  2. $\{B,C,D,E\}$
  3. $\{A,B,C,D,E,x,y,z\}$
  4. $\{x,y,z\}$
edited by

3 Answers

6 votes
6 votes

Set of all non terminal symbols are those from which all the strings in the language can be derived by applying production rules. 

Here all non terminals present on left hand side of production. 

Option A) is correct

0 votes
0 votes
$\underline{\textbf{Answer:}\Rightarrow}\;\mathbf{a.}$

$\underline{\textbf{Explanation:}\Rightarrow}$

All the capital letters will be the non-terminals.
0 votes
0 votes
option A) is correct {A,B,C,D,E} are non-terminals and {x,y,z} are terminals.
Answer:

Related questions

3.9k
views
3 answers
3 votes
Satbir asked Jan 13, 2020
3,902 views
Given the grammar$s \rightarrow T ^{\ast} S\ \mid T$T \rightarrow U+T\ \mid U$U \rightarrow a \mid b$Which of the following statements is wrong?Grammar ... $^{\ast}$ and $+$ happensNone of these
9.1k
views
4 answers
3 votes
Satbir asked Jan 13, 2020
9,109 views
A given grammar is called ambiguous iftwo or more productions have the same non-terminal on the left hand sidea derivation tree has more than one ... than one derivation tree corresponding to itbrackets are not present in the grammar
4.1k
views
4 answers
5 votes
Satbir asked Jan 13, 2020
4,076 views
In a two-pass assembler, resolution of subroutine calls and inclusion of labels in the symbol table is done duringsecond passfirst pass and second pass respectivelysecond pass and first pass respectivelyfirst pass
5.4k
views
3 answers
3 votes
Satbir asked Jan 13, 2020
5,380 views
The number of tokens in the following C code segment isswitch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; }$27$29$26$24$