Пример #1
0
 protected RuleStart GoToFirstStartRule(RuleStart rs)
 {
     if (rs != null)
     {
         while (rs.GetAlternateBack() != null)
         {
             rs = rs.GetAlternateBack();
         }
     }
     return(rs);
 }
Пример #2
0
        private void DeleteStartRule(RuleStart rs)
        {
            BNFRule   bnfRl   = rs.GetRuleConnect();
            RuleStart AltNext = rs.GetAlternate();
            RuleStart AltBack = rs.GetAlternateBack();

            if (AltBack != null)
            {
                AltBack.SetAlternate(AltNext);
            }
            if (AltNext != null)
            {
                AltNext.SetAlternateBack(AltBack);
            }
            int index = bnfRl.Index;

            m_Rules.RemoveAt(index);
        }