Index: /branches/Benchmark Generator/Benchmark Generator.sln
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator.sln	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator.sln	(revision 9693)
@@ -0,0 +1,20 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark Generator", "Benchmark Generator\Benchmark Generator.csproj", "{9A7A63F2-6990-4257-8CE0-4C240F497500}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{9A7A63F2-6990-4257-8CE0-4C240F497500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9A7A63F2-6990-4257-8CE0-4C240F497500}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9A7A63F2-6990-4257-8CE0-4C240F497500}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9A7A63F2-6990-4257-8CE0-4C240F497500}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /branches/Benchmark Generator/Benchmark Generator/App.config
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/App.config	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/App.config	(revision 9693)
@@ -0,0 +1,6 @@
+﻿<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+    </startup>
+</configuration>
Index: /branches/Benchmark Generator/Benchmark Generator/Benchmark Generator.csproj
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Benchmark Generator.csproj	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Benchmark Generator.csproj	(revision 9693)
@@ -0,0 +1,99 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{9A7A63F2-6990-4257-8CE0-4C240F497500}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Benchmark_Generator</RootNamespace>
+    <AssemblyName>Benchmark Generator</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4">
+      <HintPath>..\..\..\Trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="Irony">
+      <HintPath>bin\Release\Irony.dll</HintPath>
+    </Reference>
+    <Reference Include="Irony.Interpreter">
+      <HintPath>bin\Release\Irony.Interpreter.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BenchmarkGeneratorView.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="BenchmarkGeneratorView.Designer.cs">
+      <DependentUpon>BenchmarkGeneratorView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ExpressionEvaluator.cs" />
+    <Compile Include="ExpressionGrammar.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="BenchmarkGeneratorView.resx">
+      <DependentUpon>BenchmarkGeneratorView.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.Designer.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.Designer.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.Designer.cs	(revision 9693)
@@ -0,0 +1,196 @@
+﻿namespace Benchmark_Generator {
+  partial class BenchmarkGeneratorView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+      System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+      System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+      this.button1 = new System.Windows.Forms.Button();
+      this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+      this.dataGridView1 = new System.Windows.Forms.DataGridView();
+      this.Var = new System.Windows.Forms.DataGridViewTextBoxColumn();
+      this.Train = new System.Windows.Forms.DataGridViewTextBoxColumn();
+      this.Test = new System.Windows.Forms.DataGridViewTextBoxColumn();
+      this.label1 = new System.Windows.Forms.Label();
+      this.label2 = new System.Windows.Forms.Label();
+      this.richTextBox2 = new System.Windows.Forms.RichTextBox();
+      this.label3 = new System.Windows.Forms.Label();
+      this.button2 = new System.Windows.Forms.Button();
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // button1
+      // 
+      this.button1.Location = new System.Drawing.Point(12, 11);
+      this.button1.Name = "button1";
+      this.button1.Size = new System.Drawing.Size(75, 23);
+      this.button1.TabIndex = 1;
+      this.button1.Text = "Export CSV";
+      this.button1.UseVisualStyleBackColor = true;
+      // 
+      // richTextBox1
+      // 
+      this.richTextBox1.Location = new System.Drawing.Point(12, 69);
+      this.richTextBox1.Name = "richTextBox1";
+      this.richTextBox1.Size = new System.Drawing.Size(408, 53);
+      this.richTextBox1.TabIndex = 6;
+      this.richTextBox1.Text = "";
+      // 
+      // dataGridView1
+      // 
+      dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+      dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+      dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+      dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+      dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+      dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+      this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+      this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+      this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Var,
+            this.Train,
+            this.Test});
+      dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+      dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+      dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+      dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+      dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+      dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+      this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
+      this.dataGridView1.Location = new System.Drawing.Point(478, 69);
+      this.dataGridView1.Name = "dataGridView1";
+      dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+      dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+      dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+      dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+      dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+      dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+      this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
+      this.dataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.None;
+      this.dataGridView1.Size = new System.Drawing.Size(343, 222);
+      this.dataGridView1.TabIndex = 8;
+      // 
+      // Var
+      // 
+      this.Var.HeaderText = "Variable";
+      this.Var.Name = "Var";
+      // 
+      // Train
+      // 
+      this.Train.HeaderText = "Train distribution";
+      this.Train.Name = "Train";
+      // 
+      // Test
+      // 
+      this.Test.HeaderText = "Test distribution";
+      this.Test.Name = "Test";
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(13, 50);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(61, 13);
+      this.label1.TabIndex = 9;
+      this.label1.Text = "Expression:";
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(475, 50);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(193, 13);
+      this.label2.TabIndex = 10;
+      this.label2.Text = "Variables configuration (including noise)";
+      // 
+      // richTextBox2
+      // 
+      this.richTextBox2.Location = new System.Drawing.Point(12, 182);
+      this.richTextBox2.Name = "richTextBox2";
+      this.richTextBox2.ReadOnly = true;
+      this.richTextBox2.Size = new System.Drawing.Size(408, 109);
+      this.richTextBox2.TabIndex = 11;
+      this.richTextBox2.Text = "";
+      // 
+      // label3
+      // 
+      this.label3.AutoSize = true;
+      this.label3.Location = new System.Drawing.Point(12, 163);
+      this.label3.Name = "label3";
+      this.label3.Size = new System.Drawing.Size(200, 13);
+      this.label3.TabIndex = 12;
+      this.label3.Text = "Information box (for messages and errors)";
+      // 
+      // button2
+      // 
+      this.button2.Location = new System.Drawing.Point(12, 128);
+      this.button2.Name = "button2";
+      this.button2.Size = new System.Drawing.Size(75, 23);
+      this.button2.TabIndex = 13;
+      this.button2.Text = "Evaluate";
+      this.button2.UseVisualStyleBackColor = true;
+      this.button2.Click += new System.EventHandler(this.button2_Click);
+      // 
+      // BenchmarkGeneratorView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(846, 306);
+      this.Controls.Add(this.button2);
+      this.Controls.Add(this.label3);
+      this.Controls.Add(this.richTextBox2);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.dataGridView1);
+      this.Controls.Add(this.richTextBox1);
+      this.Controls.Add(this.button1);
+      this.Name = "BenchmarkGeneratorView";
+      this.Text = "Form1";
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button button1;
+    private System.Windows.Forms.RichTextBox richTextBox1;
+    private System.Windows.Forms.DataGridView dataGridView1;
+    private System.Windows.Forms.DataGridViewTextBoxColumn Var;
+    private System.Windows.Forms.DataGridViewTextBoxColumn Train;
+    private System.Windows.Forms.DataGridViewTextBoxColumn Test;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.RichTextBox richTextBox2;
+    private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.Button button2;
+
+
+  }
+}
+
Index: /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.cs	(revision 9693)
@@ -0,0 +1,37 @@
+﻿using System;
+using System.Linq;
+using System.Windows.Forms;
+using Irony.Parsing;
+
+namespace Benchmark_Generator {
+  public partial class BenchmarkGeneratorView : Form {
+    private readonly ExpressionGrammar grammar;
+
+    public BenchmarkGeneratorView() {
+      InitializeComponent();
+      grammar = new ExpressionGrammar();
+    }
+
+    private void button2_Click(object sender, EventArgs e) {
+      var language = new LanguageData(grammar);
+      var parser = new Parser(language);
+      try {
+        var sample = richTextBox1.Text;
+        string output = string.Empty;
+        parser.Parse(sample);
+        var tree = parser.Context.CurrentParseTree;
+        if (tree.Status == ParseTreeStatus.Error) {
+          // if there's a parse error then the root of the tree will be null
+          output = tree.ParserMessages.Aggregate(output, (current, m) => current + m.Message);
+        } else {
+          //          output = grammar.RunSample(new RunSampleArgs(language, sample, tree));
+          output = "Parsing successful.";
+        }
+        richTextBox2.Text = output;
+      }
+      catch (Exception ex) {
+        richTextBox2.Text = ex.Message;
+      }
+    }
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.resx
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.resx	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/BenchmarkGeneratorView.resx	(revision 9693)
@@ -0,0 +1,129 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="Var.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Train.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Test.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
Index: /branches/Benchmark Generator/Benchmark Generator/ExpressionEvaluator.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/ExpressionEvaluator.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/ExpressionEvaluator.cs	(revision 9693)
@@ -0,0 +1,42 @@
+﻿
+using System.Collections.Generic;
+using Irony.Interpreter;
+using Irony.Parsing;
+
+namespace Benchmark_Generator {
+  class ExpressionEvaluator {
+    public ExpressionGrammar Grammar { get; private set; }
+    public Parser Parser { get; private set; }
+    public LanguageData Language { get; private set; }
+    public LanguageRuntime Runtime { get; private set; }
+    public ScriptApp App { get; private set; }
+    public IDictionary<string, object> Globals { get { return App.Globals; } }
+
+    public ExpressionEvaluator() : this(new ExpressionGrammar()) { }
+
+    public ExpressionEvaluator(ExpressionGrammar grammar) {
+      Grammar = grammar;
+      Language = new LanguageData(Grammar);
+      Parser = new Parser(Language);
+      Runtime = Grammar.CreateRuntime(Language);
+      App = new ScriptApp(Runtime);
+    }
+
+    public object Evaluate(ParseTree parsedScript) {
+      var result = App.Evaluate(parsedScript);
+      return result;
+    }
+
+    public object Evaluate() {
+      return App.Evaluate();
+    }
+
+    public void ClearOutput() {
+      App.ClearOutputBuffer();
+    }
+
+    public string GetOutput() {
+      return App.GetOutput();
+    }
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/ExpressionGrammar.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/ExpressionGrammar.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/ExpressionGrammar.cs	(revision 9693)
@@ -0,0 +1,80 @@
+﻿
+using System;
+using Irony.Interpreter;
+using Irony.Interpreter.Ast;
+using Irony.Interpreter.Evaluator;
+using Irony.Parsing;
+
+namespace Benchmark_Generator {
+  public class ExpressionGrammar : InterpretedLanguageGrammar {
+    public ExpressionGrammar() : this(caseSensitive: false) { }
+
+    public ExpressionGrammar(bool caseSensitive)
+      : base(caseSensitive) {
+      // Define terminals
+      var number = new NumberLiteral("Number") {
+        DefaultIntTypes = new[] { TypeCode.Int32, TypeCode.Int64 },
+        DefaultFloatType = TypeCode.Double
+      };
+      var variable = new IdentifierTerminal("Variable");
+      var stringLit = new StringLiteral("String");
+
+      // Define non-terminals
+      var term = new NonTerminal("Term");
+      var binExpr = new NonTerminal("BinExpr", typeof(BinaryOperatorMethod));
+      var binOp = new NonTerminal("BinOp", "operator");
+      var unExpr = new NonTerminal("UnExpr", typeof(UnaryOperatorMethod));
+      var unOp = new NonTerminal("UnOp", "operator");
+      var expr = new NonTerminal("Expr");
+      var parExpr = new NonTerminal("ParExpr");
+      var statement = new NonTerminal("Statement");
+      var program = new NonTerminal("Program", typeof(StatementListNode));
+
+      // BNF rules
+      expr.Rule = term | unExpr | binExpr;
+      term.Rule = number | parExpr | stringLit | variable;
+      parExpr.Rule = "(" + expr + ")";
+      unExpr.Rule = unOp + term;
+      unOp.Rule = ToTerm("+") | "-";
+      binExpr.Rule = expr + binOp + expr;
+      binOp.Rule = ToTerm("+") | "-" | "*" | "/" | "^"; // add, sub, mul, div, pow
+      statement.Rule = expr | Empty;
+      program.Rule = MakePlusRule(program, NewLine, statement);
+      this.Root = program;
+
+      // Operators precedence
+      RegisterOperators(1, "+", "-");
+      RegisterOperators(2, "*", "/");
+      RegisterOperators(3, Associativity.Right, "^");
+
+      // Punctuation and braces
+      MarkPunctuation("(", ")", "[", "]");
+      RegisterBracePair("(", ")");
+      RegisterBracePair("[", "]");
+      MarkTransient(term, expr, binOp, unOp, parExpr);
+      // Language flags                         
+      //      LanguageFlags = LanguageFlags.NewLineBeforeEOF | LanguageFlags.CreateAst;
+      LanguageFlags = LanguageFlags.NewLineBeforeEOF;
+    }
+
+    public override LanguageRuntime CreateRuntime(LanguageData language) {
+      return new ExpressionEvaluatorRuntime(language);
+    }
+
+    #region Running in Grammar Explorer
+    private static ExpressionEvaluator evaluator;
+    public override string RunSample(RunSampleArgs args) {
+      if (evaluator == null) {
+        evaluator = new ExpressionEvaluator(this);
+        evaluator.Globals.Add("null", evaluator.Runtime.NoneValue);
+        evaluator.Globals.Add("true", true);
+        evaluator.Globals.Add("false", false);
+
+      }
+      evaluator.ClearOutput();
+      evaluator.Evaluate(args.ParsedSample);
+      return evaluator.GetOutput();
+    }
+    #endregion
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/Program.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Program.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Program.cs	(revision 9693)
@@ -0,0 +1,16 @@
+﻿using System;
+using System.Windows.Forms;
+
+namespace Benchmark_Generator {
+  static class Program {
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    [STAThread]
+    static void Main() {
+      Application.EnableVisualStyles();
+      Application.SetCompatibleTextRenderingDefault(false);
+      Application.Run(new BenchmarkGeneratorView());
+    }
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/Properties/AssemblyInfo.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Properties/AssemblyInfo.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Properties/AssemblyInfo.cs	(revision 9693)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Benchmark Generator")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Benchmark Generator")]
+[assembly: AssemblyCopyright("Copyright ©  2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("438f5e69-a173-499f-b77c-f77f9bc16b23")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.Designer.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.Designer.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.Designer.cs	(revision 9693)
@@ -0,0 +1,62 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18047
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Benchmark_Generator.Properties {
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources() {
+    }
+
+    /// <summary>
+    ///   Returns the cached ResourceManager instance used by this class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if ((resourceMan == null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Benchmark_Generator.Properties.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
+        }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.resx
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.resx	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Properties/Resources.resx	(revision 9693)
@@ -0,0 +1,117 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.Designer.cs
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.Designer.cs	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.Designer.cs	(revision 9693)
@@ -0,0 +1,26 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18047
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Benchmark_Generator.Properties {
+
+
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+  internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+    private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+    public static Settings Default {
+      get {
+        return defaultInstance;
+      }
+    }
+  }
+}
Index: /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.settings
===================================================================
--- /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.settings	(revision 9693)
+++ /branches/Benchmark Generator/Benchmark Generator/Properties/Settings.settings	(revision 9693)
@@ -0,0 +1,7 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
