MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For the given grammar G:S
A
6
B
7
C
5
D
8
Explanation: 

Detailed explanation-1: -Explanation: A, B, C, D are the useless symbols in the given grammar as they never tend to lead to a terminal. The productions S-> A, A->aA, B->C, C->D are also termed as useless production as they will never produce a string to the grammar.

Detailed explanation-2: -A symbol can be useless if it does not appear on the right-hand side of the production rule and does not take part in the derivation of any string. That symbol is known as a useless symbol.

Detailed explanation-3: -The production of form non-terminal-> is called: Sigma Production.

Detailed explanation-4: -Explanation: Any variable A for which there is a production A-> x with x * is called live.

There is 1 question to complete.