BinaryFileSchemaGUI.BFSGUI.ParseGrammar C# (CSharp) 메소드

ParseGrammar() 개인적인 메소드

private ParseGrammar ( ) : void
리턴 void
        private void ParseGrammar( )
        {
            richTextBox.AllowPaint = false;
            treeBFSstructure.BeginUpdate();
            listViewErrorBox.BeginUpdate();

            IBfsErrorHandler errorHandler = new ListViewErrorHandler(listViewErrorBox);
            string source = richTextBox.Text;

            listViewErrorBox.Items.Clear();
            treeBFSstructure.Nodes.Clear();

            Stopwatch timer = new Stopwatch();
            timer.Start();
            BinaryFileSchema schema = BfsCompiler.ParseBfs(source, errorHandler);
            timer.Stop();

            if (schema != null)
            {
                errorHandler.HandleMessage("Parsed and processed in " + timer.ElapsedMilliseconds + " milliseconds (" + timer.ElapsedTicks + " ticks)");
                IterateSchema(schema);
                SchemaColorizer.ColorizeSchema(schema, richTextBox);
                toolGenerateCode.Enabled = true;
                lastSchema = schema;
            }
            else
                toolGenerateCode.Enabled = false;

            richTextBox.AllowPaint = true;
            treeBFSstructure.EndUpdate();
            listViewErrorBox.EndUpdate();
        }