示例#1
0
 public void ElementUpStr(Grammatics element)
 {
     elemUStr.m_name = element.m_name;
     elemUStr.number = element.number;
     arrStr[ind]     = elemUStr;
     ind             = (element.m_name == eps.m_name) ? ind : ind += 1;
 }
示例#2
0
        public Grammatics[] delFirstDown(Grammatics[] down)
        {
            Grammatics[] newd    = new Grammatics[down.Length - 1];
            Grammatics   elemDel = new Grammatics();

            for (int i = 1; i < down.Length; i++)
            {
                elemDel.number = down[i].number;
                elemDel.m_name = down[i].m_name;
                newd[i - 1]    = elemDel;
            }
            return(newd);
        }
示例#3
0
        public void ScanningProbels()
        {
            Grammatics probel = new Grammatics();

            // Для eps правил можно задать свой символ
            for (int k = 0; k < arrPr.Count; k++)
            {
                if (arrPr[k].m_name == "  ")
                {
                    probel.m_name = arrPr[k].m_name;
                    probel.number = arrPr[k].number;
                    probels.Add(probel);
                }
            }
        }