Experimental eleven --LL (1) grammar is determined, recursive descent parser

1. grammar  G (S):

1)S -> AB

2)A ->Da|ε

3)B -> cC

4)C -> aADC |ε

5)D -> b|ε

Verify grammar  G (S) is not  LL (1) grammar?

 

 

2. (last job) after the elimination of left recursion whether the expression grammar is LL (1) grammar?

 

 

 

 

3. The connection 2, if it is LL (1) grammar, write its recursive descent parser code.

 

Guess you like

Origin www.cnblogs.com/pangminhua/p/11904666.html