S→a|∧|(T)
T→ST '
T' →,ST'|ε
(2) calculating the first episode and post-sequel of each non-terminator;
The first (S)={a, ∧, (}
FIRST(T)={ a,∧,(}
The first (T')={, ε}
Concern = {,#}
FOLLOW(T)={ )}
Follow (T')={ )}
The forecast analysis table is as follows:
A ∧ (), #
SS→aS→∧s →( T)
TT→ Saint → Saint → Saint → Saint
T ' T ' →εT '→,ST '
There are not many entries in the constructed prediction analysis table, so the modified grammar is LL( 1) grammar.