Лабораторная работа: Виведення ланцюжків у формальній граматиці
indexBegin = indexBegin + 3;
indexEnd = strFile.IndexOf(" | ", indexBegin);
while (indexEnd != -1)
{
strValue.Add(strFile.Substring(indexBegin, indexEnd + 1 - indexBegin));
indexBegin = indexEnd + 2;
indexEnd = strFile.IndexOf(" | ", indexBegin);
}
strValue.Add(strFile.Substring(indexBegin));
list.Add(strKey, strValue.ToArray());
}
}
}
private void button1_Click(object sender, EventArgs e)
{
string result = " S ";
int i = 0;
int j = 25;
int terminal = 1;
int random;
string[] strCutted;
list.Clear();
textBox2.Clear();
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "C:\\kpz2";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
using (StreamReader files = new StreamReader(openFileDialog1.FileName))
{