public void Init(ref TPredicateItemBig AHead, ref TPredicateTree APredicateTree) { string SC; bool pass; TPredicateItemBase Base, NC; f_PrStruct = ""; f_PrRab = ""; f_PrControlRab = ""; f_PrControlFunc = ""; f_PrCheckCondition = ""; TDynamicArray m_Stack = new TDynamicArray(); m_Stack.InsertToFirst(AHead); Base = (TPredicateItemBase)(m_Stack.Pop()); while (Base != null) { NC = DoParseItem(ref Base, ref m_Stack); if (NC != null) { f_BTree.insert(NC); } Base = (TPredicateItemBase)(m_Stack.Pop()); } m_Stack = null; SharedConst.lcList.clear(); f_BTree.inorder(acp); SharedConst.lcList.first(); for (int i = 0; i <= SharedConst.lcList.length() - 1; i++) { // TGlsListNode tmpNode = (TGlsListNode)SharedConst.lcList.val(); // TPredicateItemTFS tmpPredicateItem = (TPredicateItemTFS)(tmpNode.Val); // TPredicateItemPWork Base = (TPredicateItemBase)(SharedConst.lcList.val()); f_Item.Make(Base, Base.EnvelopeBIG); SC = f_Item.OutString; if (SC.Length > 0) { f_PrStruct = f_PrStruct + SC + "\r\n"; MakeElement(Base); if (APredicateTree != null) { AddElementToTree(APredicateTree); } } // MakeElement(Base); // f_Tran.AddGTItem(f_Item); SharedConst.lcList.next(); } bool acp(object A) { SharedConst.lcList.append(A); return(true); } // f_TextRecalc = f_Tran.Make(); }
void DoSetID() { TPredicateItemBig Big; f_NGen.InitNum(); TDynamicArray m_Stack = new TDynamicArray(); m_Stack.InsertToFirst(f_PredicateStart); Big = (TPredicateItemBig)(m_Stack.Pop()); while (Big != null) { DoSetIDItem(Big, m_Stack); Big = (TPredicateItemBig)(m_Stack.Pop()); } m_Stack = null; }
void DoProcess() { TPredicateItemBig Big; f_TryPath = true; TDynamicArray m_Stack = new TDynamicArray(); m_Stack.InsertToFirst(f_PredicateStart); Big = (TPredicateItemBig)(m_Stack.Pop()); while (Big != null) { DoProcessItem(Big, m_Stack); if (!f_TryPath) { break; } Big = (TPredicateItemBig)(m_Stack.Pop()); } m_Stack = null; }
/* void DoMakeAlternative();*/ void DoParse(ref TMainTreeList AMainTree) { TAlternativeParserItemBig mBig, mTemp; TAlternativeParserItemBase mBase; CreateHead(); f_Head.MainTreeList = AMainTree; f_Head.FillBasisAlternateTreeList(f_Head.MainTreeList.MainAlternative); TDynamicArray m_Stack = new TDynamicArray(); m_Stack.InsertToFirst(f_Head); mBig = (TAlternativeParserItemBig)(m_Stack.Pop()); while (mBig != null) { if (CheckEnlarge(mBig)) { MakeBig(ref mBig, f_Head == mBig); } mBig.Check = true; mBig.GetAllFirstBigsNoCheck(m_Stack); mBig = (TAlternativeParserItemBig)(m_Stack.Pop()); } m_Stack = null; }
public void CopyTree(TAlternativeParserItemBig AHead) { TPredicateItemBig Big; FreeHead(); f_PredicateStart = NewBig(AHead); TDynamicArray m_Stack = new TDynamicArray(); Big = f_PredicateStart; while (Big != null) { DoCopyTree(ref Big, ref m_Stack); Big = (TPredicateItemBig)(m_Stack.Pop()); } m_Stack = null; }