COMPILER DESIGN

SYNTAX ANALYSIS

CONTEXT FREE GRAMMARS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following does not have left recursions?
A
Chomsky Normal Form
B
Greibach Normal Form
C
Backus Naur Form
D
All of the mentioned
Explanation: 

Detailed explanation-1: -2. Which of the following does not have left recursions? Explanation: The normal form is of the format: A->aB where the right hand side production tends to begin with a terminal symbo, thus having no left recursions.

Detailed explanation-2: -Chomsky Normal Form: Productions are of the form A → BC or A → a, where A, B, C are variables and a is a terminal symbol. Greibach Normal Form Productions are of the form A → a, where ∈ V ∗ and A ∈ V .

Detailed explanation-3: -Step 1 − Convert the grammar into CNF. If the given grammar is not in CNF, convert it into CNF. Step 2 − If the grammar consists of left recursion, eliminate it. Step 3 − In the grammar, convert the given production rule into GNF form. 15-Jun-2021

There is 1 question to complete.