/* 一个简单的翻译模式 P→ DS. D→B; D D→ε B→int L | real L L→id | L,id S→ V := E H H→;S | ε E→E+T | T T→( E ) T→id V→id start-> DS. D->B; D D->ε B->int L { L.type := int }|real L { L.type := real } L->id { A.Type := L.type enter(v.entry,L.type)} A A-> ,idA { A1.Type := A.type enter(v.entry,A.type)} A->ε S→ V := E { gen( ":=", E.place,0,V.place) } H H→;S | ε E->T { R.i:=T.place} R {E.place:=R.s} R->+T { R1.i:= newtemp; gen( "*", R.i, T.place , R1.i) } R {R.s:= R1.s; } R-> ε {Rs=R.i} T->( E ) { T.place := E.place} T->id {T.place:=found (id)} V->id {V.place:=found(id)} */