编译原理课后答案(陈火旺)
then begin advance;T;
if sym=')' then advance; else error; end else error end;
procedure T; begin S;T end;
procedure T ; begin
if sym=',' then begin advance; S;T end end; 其中:
sym:是输入串指针IP所指的符号 advance:是把IP调至下一个输入符号 error:是出错诊察程序 (2)
FIRST(S)={a,^,(} FIRST(T)={a,^,(} FIRST(T )={,, } FOLLOW(S)={),,,#} FOLLOW(T)={)} FOLLOW(T )={)} 预测分析表
是LL(1)文法
P81–2
文法: