retagged by
499 views
0 votes
0 votes

Do the following productions mean the same

Bb->bb and B->b

My doubt is that will the first production be used only when we have b in the follow of B or it can be used in any case.

If it can be used in any case then will the first production be equal to second production.

retagged by

1 Answer

Best answer
1 votes
1 votes
Bb - > bb is context sensitive grammer and it can only be used when b is in follow of B i.e Bb
B -> b is context free grammer and it can be used anywhere you see B
selected by

Related questions

0 votes
0 votes
2 answers
1
moe12leb asked Jan 21, 2023
252 views
what is the langauge generated by this grammar ?S >aS | aSbS | ε what is the language
1 votes
1 votes
1 answer
3
Mk Utkarsh asked Mar 22, 2018
1,320 views
Please post few examples of Linear Ambiguous Context Free Grammar.It would be helpful if you post grammars for famous languages.
1 votes
1 votes
1 answer
4
gabbar asked Mar 25, 2017
682 views
Construct context-free grammars to accept the following languages.$$\begin{align*} \large L = \left \{ 0^i1^j2^k \;\; | \;\; i \neq j \;\; or \;\; j \neq k \right \} \end...