private void pbGo_Click(object sender, EventArgs e) { tbErrors.Text = ""; Analizator a = new Analizator(); tbAsm.Text = a.parse(tbSource.Text); foreach (string s in a.errorMessages()) { tbErrors.Text += s+"\n"; } }
static void Main(string[] args) { Analizator analizator = new Analizator(); Console.WriteLine("Введите строку :"); string s=Console.ReadLine(); Console.WriteLine("Код на языке ассемблера:"); Console.Write(analizator.parse(s) + "\n"); List<string> errors = analizator.errorMessages(); foreach (string error in errors) { Console.Write(error); Console.Write("\n"); } }