已知文法G[S]: S→aBcD|cD B→bB’ B’ → B|ε D→dD’ D’ → dD’ |ε。 FOLLOW(B)是 ( )。
A: {b}
B: {#}
C: {d}
D: {c}
A: {b}
B: {#}
C: {d}
D: {c}
举一反三
- 下列文法中,生成的语言是[img=219x36]18035825c53a6ba.png[/img]的是 A: G(S): S → ABCD A → aA | a B → bB | b C → cC | c D → dD | d B: G(S): S → AC A → aAb | ab C → cCd | cd C: G(S): S → aSd | A A → bAc | bc D: G(S): S → aSb | A A → cAd | cd
- 下列文法中,生成的语言是[img=219x36]1803958e27bf0a1.png[/img]的是 A: G(S): S → ABCD A → aA | a B → bB | b C → cC | c D → dD | d B: G(S): S → AC A → aAb | ab C → cCd | cd C: G(S): S → aSd | A A → bAc | bc D: G(S): S → aSb | A A → cAd | cd
- 下列文法中,生成的语言是[img=219x36]18036d67930bcbe.png[/img]的是 A: G(S): S → ABCD A → aA | a B → bB | b C → cC | c D → dD | d B: G(S): S → AC A → aAb | ab C → cCd | cd C: G(S): S → aSd | A A → bAc | bc D: G(S): S → aSb | A A → cAd | cd
- 已知文法G[S]为: S→dAB A→aA|a B→Bb|ε ①G[S]产生的语言是什么? ②G[S]能否改写为等价的正规文法?
- 设有文法G[S]=({S,B},{b},{S->b|bB,B->bS},S),该文法所描述的语言是() A: L(G[S]={b i|i>=0}) B: L(G[S]={b2 i|i>=0}) C: L(G[S]={b 2i+1|i>=0}) D: L(G[S]={b2 i|i>=1})