void CheckParsing(string s) { ProgramParse ps = new ProgramParse(); ps.Parse(s); string str1 = ps.statements.ToString(); ProgramParse ps2 = new ProgramParse(); ps2.Parse(str1); string str2 = ps2.statements.ToString(); ProgramParse ps3 = new ProgramParse(); ps3.Parse(str2); string str3 = ps2.statements.ToString(); if (str2 != str3) { Console.WriteLine(str2); Console.WriteLine(str3); throw new Exception(); } ps3.Run(); Console.WriteLine(); //Console.WriteLine(ps.output); }
private void button2_Click(object sender, EventArgs e) { ProgramParse ps = new ProgramParse(); ps.Parse(textBox2.Text); ps.Run(); textBox3.Text = ps.output; }
void T(string s) { ProgramParse ps = new ProgramParse(); ps.Parse(s); string str1 = ps.statements.ToString(); ps.Run(); //Console.WriteLine(str1); Console.WriteLine(ps.output); }