int if then else while do and not true id ( ) { } ; : < = + * $ ################################## O P D A S K C B R W U L N E T F M H [ ################################## O->P P->D D->D;D D->A:id D->id()D;S A->int S->id=K E C->if B then R->C S else S->R S S->C S W->while U->W B do S->U S S->{L} L->L;NS L->S K->[ N->[ E->E+T E->T E->T*F T->F F->(E) F->id B->B and M B B->not H B B->id<id B->true M->[ H->[ ##################################
First collection of "int" is :int First collection of "if" is :if First collection of "then" is :then First collection of "else" is :else First collection of "while" is :while First collection of "do" is :do First collection of "and" is :and First collection of "not" is :not First collection of "true" is :true First collection of "id" is :id First collection of "(" is :( First collection of ")" is :) First collection of "{" is :{ First collection of "}" is :} First collection of ";" is :; First collection of ":" is :: First collection of "<" is :< First collection of "=" is := First collection of "+" is :+ First collection of "*" is :* First collection of "$" is :$ First collection of "O" is :id int First collection of "P" is :id int First collection of "D" is :id int First collection of "A" is :int First collection of "S" is :id { if while First collection of "K" is :[ First collection of "C" is :if First collection of "B" is :not id true First collection of "R" is :if First collection of "W" is :while First collection of "U" is :while First collection of "L" is :id { if while First collection of "N" is :[ First collection of "E" is :( id First collection of "T" is :( id First collection of "F" is :( id First collection of "M" is :[ First collection of "H" is :[ First collection of "[" is : Follow collection of "O" is :$ Follow collection of "P" is :$ Follow collection of "D" is :$ ; Follow collection of "A" is :: Follow collection of "S" is :$ ; else } Follow collection of "K" is :( id Follow collection of "C" is :id { if while Follow collection of "B" is :then do and Follow collection of "R" is :id { if while Follow collection of "W" is :not id true Follow collection of "U" is :id { if while Follow collection of "L" is :} ; Follow collection of "N" is :id { if while Follow collection of "E" is :$ ; + ) else } Follow collection of "T" is :$ ; + * ) else } Follow collection of "F" is :$ ; + * ) else } Follow collection of "M" is :not id true Follow collection of "H" is :not id true Follow collection of "[" is :
输入的文法intifthenelsewhiledoandnottrueid(){};:=+*$##################################OPDASKCBRWULNETFMH[##################################O->PP->DD->D;DD->A:idD->id()D;SA->intS->id=K EC->if B thenR->C S e