edited by
2,253 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 votes
3 votes
3 answers
1
Satbir asked Jan 13, 2020
3,724 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 is not ambiguou...
3 votes
3 votes
4 answers
2
Satbir asked Jan 13, 2020
8,877 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 associated sentencethere...
5 votes
5 votes
4 answers
3
Satbir asked Jan 13, 2020
3,714 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...
3 votes
3 votes
3 answers
4
Satbir asked Jan 13, 2020
5,014 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$