closed by
1,648 views
2 votes
2 votes
Which of the following is the most general phase-structured grammar?
(a) regular (b) context-free
(c) context-sensitive (d) none of the above
closed by

4 Answers

0 votes
0 votes

A natural language equivalence might help.

The following grammar 

Sentence --> Sentence , Sentence | ϵ
Sentence -->  She is a <adjective> girl
Sentence -->  I am a <adjective>  boy
Adjective --> good | bad


Can generate the sentence " She is a good girl, I am a bad boy"


A sentence is made up of phrases. Those phrases can be broken up into words. 



That means , Non Terminal can derive into strings of Terminals and Non terminals.
The non terminals on the RHS are called phrases. 


So,
E-->E+E,
E--> E-E 
E--> a|b 

is a phase structured grammar. 



 

Related questions

4 votes
4 votes
2 answers
1
vkm07 asked Jul 28, 2016
5,620 views
Which of the following grammars are not phase-structured?(a) regular (b) context-free(c) context-sensitive (d) none of the above
2 votes
2 votes
1 answer
2
vkm07 asked Jul 23, 2016
3,685 views
If a is a terminal and S, A, B are three non-terminals, then which of the following are regular grammars?(a) S → ε, A → aS|b(b) A → aB|a, B → bA|b(c) A → Ba|Ba...
0 votes
0 votes
1 answer
3
prasitamukherjee asked Jul 17, 2015
1,844 views
Consider the following statement:if (expression) statement else statement Which of the following describe the above statement?A). Regular grammarB). Context free grammarC...
3 votes
3 votes
2 answers
4