private void bLex_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(tts.Textbox.Text)) { ScriptScanner scanner = new ScriptScanner(); scanner.OnReadTokenCallback += new ScriptScanner.OnReadTokenCallbackHandler(scanner_OnReadTokenCallback); scanner.Load(tts.Textbox.Text); } }
private void bParse_Click(object sender, EventArgs e) { tResult.Text = ""; ScriptScanner scanner = new ScriptScanner(); scanner.Load(tScript.Text); foreach (Lex i in scanner.Lexes) { Output(false, i.Content.ToString(), i.Type.ToString()); } //TokenCollection tokens = engine.Read(tScript.Text); //if (tokens != null) //{ // foreach (Token token in tokens) // { // Output(token.LineNumber + ":\t" + token.TokenType + " " + token.Content); // } // engine.Parse(tokens); //} }