Ejemplo n.º 1
0
        void DoFill(TAlternativeParserGrpCrossItem AItem)
        {
            int m_who;
            TAlternativeParserGrpItemTFS      mTfs;
            TAlternativeParserGrpItemBase     mBase;
            TAlternativeParserGrpCrossItemOut mOut;
            TAlternativeParserEnlargerItem    Item = GetNew(AItem);

            Item.Basis = true;
            for (int i = 0; i <= AItem.CountBasis - 1; i++)
            {
                Item.AddTfsItem((TAlternativeParserGrpItemTFS)(AItem.GetItemsBasis(i)));
            }

            for (int i = 0; i <= AItem.CountOut - 1; i++)
            {
                mOut        = AItem.GetItemsOut(i);
                Item        = GetNew(AItem);
                Item.Parent = mOut;
                for (int j = 0; j <= mOut.Count - 1; j++)
                {
                    mBase = mOut.GetItems(j);
                    m_who = mBase.Who();
                    if (m_who == 0)
                    {
                        mTfs = (TAlternativeParserGrpItemTFS)(mBase);
                        Item.AddTfsItem(mTfs);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        void CrossToBigs(TAlternativeParserGrpCrossItem ACrossItem, TAlternativeParserItemBig ABig)
        {
            TAlternativeParserGrpItemBase     Base;
            TAlternativeParserGrpCrossItemOut Cross;
            TAlternativeParserItemBig         mHeadBig = new TAlternativeParserItemBig();

            mHeadBig.OwnerBig = ABig;
            ABig.MainList.Append(mHeadBig);

            TAlternativeParserItemBig mBig = new TAlternativeParserItemBig();

            for (int i = 0; i <= ACrossItem.CountBasis - 1; i++)
            {
                FillItemGrp(ACrossItem.GetItemsBasis(i), ref mBig);
            }
            mBig.Check    = true;
            mBig.OwnerBig = mHeadBig;
            mBig.NumAlt   = 0;
            mBig.Cross    = true;
            mHeadBig.AddBig(mBig);
            for (int i = 0; i <= ACrossItem.CountOut - 1; i++)
            {
                mBig       = new TAlternativeParserItemBig();
                Cross      = ACrossItem.GetItemsOut(i);
                mBig.Check = true;
                mBig.Cross = true;
                for (int j = 0; j <= Cross.Count - 1; j++)
                {
                    FillItemGrp(Cross.GetItems(j), ref mBig);
                }
                mBig.NumAlt   = i + 1;
                mBig.OwnerBig = mHeadBig;
                mHeadBig.AddBig(mBig);
            }
        }