COMPILER DESIGN

SYNTAX ANALYSIS

CONTEXT FREE GRAMMARS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Let G be a grammar. When the production in G satisfy certain restrictions, then G is said to be in ____
A
restricted form
B
parsed form
C
normal form
D
all of the mentioned
Explanation: 

Detailed explanation-1: -In formal language theory, a context-free grammar, G, is said to be in Chomsky normal form (first described by Noam Chomsky) if all of its production rules are of the form: A → BC, or. A → a, or.

Detailed explanation-2: -More precisely, a context-free grammar is in Greibach normal form, if all production rules are of the form: is the start symbol. Observe that the grammar does not have left recursions. Every context-free grammar can be transformed into an equivalent grammar in Greibach normal form.

Detailed explanation-3: -Definition: A CFG is in Chomsky normal form if and only if all production rules are of the form A → BC or A → x with variables A, B, C∈V and x∈T.

There is 1 question to complete.