static void Main(string[] args) { DragonLexer lex = new DragonLexer(); DragonParser par = new DragonParser(lex); par.Program(); }
private void button1_Click(object sender, EventArgs e) { InputAndOutput.InputText = richTextBox1.Text; InputAndOutput.OutputText.Clear(); InputAndOutput.ErrorText.Clear(); DragonLexer lex = new DragonLexer(); DragonParser par = new DragonParser(lex); par.Program(); richTextBox2.Text = InputAndOutput.OutputText.ToString(); richTextBox3.Text = InputAndOutput.ErrorText.ToString(); }
/// <summary> /// You cannot change what's in here. /// </summary> static void Main(string[] args) { var dragonFileGenerator = new DragonFileGenerator(); dragonFileGenerator.HereBeDragons(); IDragonParser parser = new DragonParser(); var dragons = parser.Parse(); IDragonHistoryWriter historyWriter = new DragonHistoryWriter(); historyWriter.ColorfulStoryOnMyScreen(dragons); Console.ReadKey(); }