示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            SyntaxAnalyzer syntax = new SyntaxAnalyzer(arr);
            bool           result = syntax.WithID();

            if (result)
            {
                richTextBox3.Text = "Successfully Parsed";
            }
            else
            {
                richTextBox3.Text = "Error at line number " + syntax.i + " :" + arr[syntax.i - 1].clss;
            }
            //richTextBox1.SelectionFont = new Font("times", ++fontSize, FontStyle.Bold);
        }
示例#2
0
        private void button2_Click(object sender, EventArgs e)
        {
            syntax = new SyntaxAnalyzer(arr, richTextBox5, dataGridView1, dataGridView3);
            bool ret    = syntax.Namespace_ST();
            bool result = arr[syntax.i].clss == "END" ? true : false;

            if (ret && result)
            {
                richTextBox3.Text = "Successfully Parsed::" + arr[syntax.i] + ":" + arr[syntax.i].clss;
            }
            else
            {
                richTextBox3.Text = "Error  " + arr[syntax.i] + " :" + arr[syntax.i].clss;
            }
            //richTextBox1.SelectionFont = new Font("times", ++fontSize, FontStyle.Bold);
        }