int findLabel(int label) { for (int i = 0; i < ThreeAddressCode.Count(); ++i) { if (ThreeAddressCode[i].Operation.Token == TranslationToken.GotoLabel && ThreeAddressCode[i].Operation.StringNumber == label) { return(i); } } return(-1); }
public void exec() { triadResult = new string[ThreeAddressCode.Count()]; while (pointer < this.ThreeAddressCode.Count() && !outFlag) { if (ThreeAddressCode[pointer].Operation.AttributeValue == "OPERATION" || ThreeAddressCode[pointer].Operation.AttributeValue == "COMPARSION") { ProcessOperation(); } actionCase(); } Ibuf.Dispose(); }