diff --git a/Irony.GrammarExplorer/fmGrammarExplorer.Designer.cs b/Irony.GrammarExplorer/fmGrammarExplorer.Designer.cs index 670f187..1027c3a 100644 --- a/Irony.GrammarExplorer/fmGrammarExplorer.Designer.cs +++ b/Irony.GrammarExplorer/fmGrammarExplorer.Designer.cs @@ -49,7 +49,7 @@ private void InitializeComponent() { this.btnRun = new System.Windows.Forms.Button(); this.btnFileOpen = new System.Windows.Forms.Button(); this.btnParse = new System.Windows.Forms.Button(); - this.splitter3 = new System.Windows.Forms.Splitter(); + this.splitRight = new System.Windows.Forms.Splitter(); this.tabOutput = new System.Windows.Forms.TabControl(); this.pageSyntaxTree = new System.Windows.Forms.TabPage(); this.tvParseTree = new System.Windows.Forms.TreeView(); @@ -122,7 +122,7 @@ private void InitializeComponent() { this.chkExcludeComments = new System.Windows.Forms.CheckBox(); this.lblTraceComment = new System.Windows.Forms.Label(); this.pageOutput = new System.Windows.Forms.TabPage(); - this.txtOutput = new WinForms.ConsoleTextBox(); + this.txtOutput = new Irony.WinForms.ConsoleTextBox(); this.pnlRuntimeInfo = new System.Windows.Forms.Panel(); this.label14 = new System.Windows.Forms.Label(); this.lblGCCount = new System.Windows.Forms.Label(); @@ -250,7 +250,7 @@ private void InitializeComponent() { // this.pageTest.Controls.Add(this.txtSource); this.pageTest.Controls.Add(this.panel1); - this.pageTest.Controls.Add(this.splitter3); + this.pageTest.Controls.Add(this.splitRight); this.pageTest.Controls.Add(this.tabOutput); this.pageTest.Location = new System.Drawing.Point(4, 22); this.pageTest.Name = "pageTest"; @@ -343,14 +343,14 @@ private void InitializeComponent() { this.btnParse.UseVisualStyleBackColor = true; this.btnParse.Click += new System.EventHandler(this.btnParse_Click); // - // splitter3 + // splitRight // - this.splitter3.Dock = System.Windows.Forms.DockStyle.Right; - this.splitter3.Location = new System.Drawing.Point(655, 3); - this.splitter3.Name = "splitter3"; - this.splitter3.Size = new System.Drawing.Size(6, 349); - this.splitter3.TabIndex = 14; - this.splitter3.TabStop = false; + this.splitRight.Dock = System.Windows.Forms.DockStyle.Right; + this.splitRight.Location = new System.Drawing.Point(655, 3); + this.splitRight.Name = "splitRight"; + this.splitRight.Size = new System.Drawing.Size(6, 349); + this.splitRight.TabIndex = 14; + this.splitRight.TabStop = false; // // tabOutput // @@ -1283,7 +1283,6 @@ private void InitializeComponent() { this.pnlParserTraceTop.ResumeLayout(false); this.pnlParserTraceTop.PerformLayout(); this.pageOutput.ResumeLayout(false); - this.pageOutput.PerformLayout(); this.pnlRuntimeInfo.ResumeLayout(false); this.pnlRuntimeInfo.PerformLayout(); this.ResumeLayout(false); @@ -1301,7 +1300,7 @@ private void InitializeComponent() { private System.Windows.Forms.ComboBox cboGrammars; private System.Windows.Forms.Label label2; private System.Windows.Forms.TabPage pageTest; - private System.Windows.Forms.Splitter splitter3; + private System.Windows.Forms.Splitter splitRight; private System.Windows.Forms.TabControl tabOutput; private System.Windows.Forms.TabPage pageAst; private System.Windows.Forms.TabPage pageSyntaxTree; diff --git a/Irony.GrammarExplorer/fmGrammarExplorer.cs b/Irony.GrammarExplorer/fmGrammarExplorer.cs index 21df429..ee604b6 100644 --- a/Irony.GrammarExplorer/fmGrammarExplorer.cs +++ b/Irony.GrammarExplorer/fmGrammarExplorer.cs @@ -53,6 +53,8 @@ private void fmExploreGrammar_Load(object sender, EventArgs e) { chkDisableHili.Checked = Settings.Default.DisableHili; chkAutoRefresh.Checked = Settings.Default.AutoRefresh; cboGrammars.SelectedIndex = Settings.Default.LanguageIndex; //this will build parser and start colorizer + if (Application.RenderWithVisualStyles) + splitRight.BackColor = SystemColors.ControlLightLight; } catch { } _loaded = true; } @@ -361,6 +363,9 @@ private void RunSample() { ParseSample(); if (_parseTree.ParserMessages.Count > 0) return; + //show output console + tabBottom.SelectedTab = pageOutput; + btnRun.Enabled = false; GC.Collect(); //to avoid disruption of perf times with occasional collections oldGcCount = GC.CollectionCount(0); System.Threading.Thread.Sleep(100); @@ -374,11 +379,11 @@ private void RunSample() { var gcCount = GC.CollectionCount(0) - oldGcCount; lblGCCount.Text = gcCount.ToString(); WriteOutput(output); - tabBottom.SelectedTab = pageOutput; } catch (ScriptException ex) { ShowRuntimeError(ex); } finally { sw.Stop(); + btnRun.Enabled = true; }//finally }//method diff --git a/Languages/Refal/Runtime/RefalLibrary.cs b/Languages/Refal/Runtime/RefalLibrary.cs index 2ec9894..a37bf2c 100644 --- a/Languages/Refal/Runtime/RefalLibrary.cs +++ b/Languages/Refal/Runtime/RefalLibrary.cs @@ -10,6 +10,7 @@ using Irony.Interpreter.Ast; using Irony.Interpreter; using System.Numerics; +using System.Collections.Concurrent; namespace Refal.Runtime { @@ -43,9 +44,9 @@ public class RefalLibrary public RefalLibrary(ScriptThread thread) { ScriptThread = thread; - OpenFiles = new Dictionary(); - BuriedKeys = new Dictionary(); - BuriedValues = new Dictionary(); + OpenFiles = new ConcurrentDictionary(); + BuriedKeys = new ConcurrentDictionary(); + BuriedValues = new ConcurrentDictionary(); CommandLineArguments = null; }