开发者

Is this grammar left recursive?

I know of two types of left recursion, immediate and indirect, and I don't think the following grammar falls into any of them, but is that the case?

And is this grammar an LL grammar? Why or why not?

E :开发者_高级运维:= T+E | T  
T ::= F*T | F  
F ::= id | (E)


I assume you start with E. Both of E’s alternatives start with a T. Both of T’s alternatives start with F. Both of F’s alternatives start with a terminal symbol. Thus, the grammar is not left recursive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜