예제 #1
0
	/**
	 * Grammar production:
	 * f0 -> Label()
	 * f1 -> "["
	 * f2 -> IntegerLiteral()
	 * f3 -> "]"
	 * f4 -> StmtExp()
	 */
	public void visit(Procedure n, ARGU argu)
	{
		Proc currProc = ProcTable.SearchProc(n.f0.f0.toString());
        FuncBegin(n.f0.f0.toString(),(ARGU)currProc,currProc.GetParaNum(), currProc.GetMaxStack(), currProc.GetMaxPara());
		n.f4.accept(this, (ARGU)currProc);
		FuncEnd((ARGU)currProc, currProc.GetParaNum());
	}
예제 #2
0
	public void visit(Goal n,ARGU argu)
	{
		Proc currProc = ProcTable.SearchProc("MAIN");
		FuncBegin("MAIN",(ARGU)currProc, 0, currProc.GetMaxStack(), currProc.GetMaxPara());
        n.f1.accept(this,(ARGU)currProc);
        FuncEnd((ARGU)currProc, 0);
		n.f3.accept(this,(ARGU)currProc);
	}