Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Grammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Grammar.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Grammar.cs	(revision 10031)
@@ -0,0 +1,91 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+
+namespace HeuristicLab.Grammars {
+  using Sequence = IEnumerable<string>;
+
+  public class Grammar : IGrammar {
+    private Dictionary<string, List<Sequence>> rules = new Dictionary<string, List<Sequence>>();
+    private HashSet<string> allSymbols = new HashSet<string>();
+
+    public string StartSymbol { get; set; }
+    public IEnumerable<string> TerminalSymbols { get { return allSymbols.Except(NonTerminalSymbols); } }
+    public IEnumerable<string> NonTerminalSymbols { get { return rules.Keys; } }
+    public IEnumerable<string> Symbols { get { return allSymbols; } }
+
+    public Grammar(string startSymbol) {
+      this.StartSymbol = startSymbol;
+    }
+
+    public int NumberOfAlternatives(string ntSymbol) {
+      return rules[ntSymbol].Count;
+    }
+
+    public IEnumerable<Sequence> GetAlternatives(string ntSymbol) {
+      return rules[ntSymbol].AsReadOnly();
+    }
+
+    public Sequence GetAlternative(string ntSymbol, int index) {
+      return rules[ntSymbol][index];
+    }
+
+    public void AddProductionRule(string ntSymbol, Sequence production) {
+      List<Sequence> l;
+      if (!rules.TryGetValue(ntSymbol, out l)) {
+        l = new List<Sequence>();
+        rules.Add(ntSymbol, l);
+
+        allSymbols.Add(ntSymbol); // register new nt-symbol
+      }
+      l.Add(production);
+
+      foreach (var s in production) allSymbols.Add(s); // register all symbols in the production
+    }
+
+    private static Regex ruleExpr = new Regex(@"\s*(?<ntSymbol>\w+)\s*->\s*(?<alternative>\w+(?:\s+\w+)*)(?:\s*\|\s*(?<alternative>\w+(?:\s+\w+)*))*");
+    private static Regex empty = new Regex(@"^\s*$");
+    public static IGrammar FromString(string gStr) {
+      var lines = gStr.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
+      lines = lines.Where(l => !empty.IsMatch(l)).ToArray(); // remove empty lines
+
+      // first line is the rule for the start-symbol
+      var m = ruleExpr.Match(lines.First());
+      var startSymbol = m.Groups["ntSymbol"].Value;
+      var g = new Grammar(startSymbol);
+      foreach (var alt in m.Groups["alternative"].Captures) {
+        g.AddProductionRule(startSymbol, alt.ToString().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
+      }
+      foreach (var line in lines.Skip(1)) {
+        m = ruleExpr.Match(line);
+        var ntSymbol = m.Groups["ntSymbol"].Value;
+        foreach (var alt in m.Groups["alternative"].Captures) {
+          g.AddProductionRule(ntSymbol, alt.ToString().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
+        }
+      }
+      return g;
+    }
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/HeuristicLab.Grammars-3.3.csproj
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/HeuristicLab.Grammars-3.3.csproj	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/HeuristicLab.Grammars-3.3.csproj	(revision 10031)
@@ -0,0 +1,160 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{A5452B63-B33B-4F9F-9E81-98B75EDB5612}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Grammars</RootNamespace>
+    <AssemblyName>HeuristicLab.Grammars-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Windows.Forms.DataVisualization" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Grammar.cs" />
+    <Compile Include="Interfaces\IAttribute.cs" />
+    <Compile Include="Interfaces\IAttributedGrammar.cs" />
+    <Compile Include="Interfaces\ISymbol.cs" />
+    <Compile Include="Interfaces\IGrammar.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </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>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttribute.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttribute.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttribute.cs	(revision 10031)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Grammars {
+  public enum AttributeType { In, Out, Ref };
+  interface IAttribute {
+    AttributeType AttributeType { get; }
+    string Type { get; }
+    string Name { get; }
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttributedGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttributedGrammar.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IAttributedGrammar.cs	(revision 10031)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+
+namespace HeuristicLab.Grammars {
+  interface IAttributedGrammar : IGrammar {
+    IEnumerable<IAttribute> GetAttributes(string symbol);
+    void AddAttribute(string symbol, IAttribute attribute);
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IGrammar.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/IGrammar.cs	(revision 10031)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+
+namespace HeuristicLab.Grammars {
+  using Sequence = IEnumerable<string>;
+
+  public interface IGrammar {
+    string StartSymbol { get; set; }
+    IEnumerable<string> TerminalSymbols { get; }
+    IEnumerable<string> NonTerminalSymbols { get; }
+    IEnumerable<string> Symbols { get; }
+
+    int NumberOfAlternatives(string ntSymbol);
+    IEnumerable<Sequence> GetAlternatives(string ntSymbol);
+    Sequence GetAlternative(string ntSymbol, int index);
+
+    void AddProductionRule(string ntSymbol, Sequence production);
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/ISymbol.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/ISymbol.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Interfaces/ISymbol.cs	(revision 10031)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+/*
+namespace HeuristicLab.Grammars {
+  interface ISymbol {
+    string Name { get; }
+    bool IsTerminal { get; }
+  }
+}
+*/
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs	(revision 10031)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Grammars {
+  [Plugin("HeuristicLab.grammars","Provides classes to work with grammars for formal languages.", "3.3.0.0")]
+  [PluginFile("HeuristicLab.Grammars-3.3.dll", PluginFileType.Assembly)]
+  public class Plugin : PluginBase {
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs.frame
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs.frame	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Plugin.cs.frame	(revision 10031)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Grammars {
+  [Plugin("HeuristicLab.grammars","Provides classes to work with grammars for formal languages.", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Grammars-3.3.dll", PluginFileType.Assembly)]
+  public class Plugin : PluginBase {
+  }
+}
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs	(revision 10031)
@@ -0,0 +1,54 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+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("HeuristicLab.Grammars")]
+[assembly: AssemblyDescription("Provides classes for working with grammars for formal languages.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[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("15375877-A3FF-434E-BA5C-868336917916")]
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.0")]
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs.frame	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Grammars/3.3/Properties/AssemblyInfo.cs.frame	(revision 10031)
@@ -0,0 +1,54 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+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("HeuristicLab.Grammars")]
+[assembly: AssemblyDescription("Provides classes for working with grammars for formal languages.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[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("15375877-A3FF-434E-BA5C-868336917916")]
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlEditor.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlEditor.cs	(revision 9872)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlEditor.cs	(revision 10031)
@@ -38,6 +38,4 @@
       viewHost.ViewType = typeof(GpdlProblemInstanceConsumerView);
       viewHost.Content = this;
-      ProblemInstanceConsumerView view = (ProblemInstanceConsumerView)viewHost.ActiveView;
-      splitContainer.Panel1Collapsed = !view.ProblemInstanceProviders.Any();
     }
 
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlProblemInstanceConsumerView.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlProblemInstanceConsumerView.cs	(revision 9872)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlProblemInstanceConsumerView.cs	(revision 10031)
@@ -23,5 +23,5 @@
 
 namespace HeuristicLab.Problems.GPDL.Views {
-  public class GpdlProblemInstanceConsumerView : ProblemInstanceConsumerViewGeneric<GpdlExampleDataDescriptor> {
+  public class GpdlProblemInstanceConsumerView : ProblemInstanceProviderView<GpdlExampleDataDescriptor> {
   }
 }
Index: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.sln
===================================================================
--- branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.sln	(revision 9872)
+++ branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.sln	(revision 10031)
@@ -31,30 +31,76 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{94073310-27AB-4C93-8FDD-3D35824AE3F7}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Grammars-3.3", "HeuristicLab.Grammars\3.3\HeuristicLab.Grammars-3.3.csproj", "{A5452B63-B33B-4F9F-9E81-98B75EDB5612}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|x64.ActiveCfg = Debug|x64
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|x64.Build.0 = Debug|x64
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|x86.ActiveCfg = Debug|x86
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Debug|x86.Build.0 = Debug|x86
 		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|x64.ActiveCfg = Release|x64
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|x64.Build.0 = Release|x64
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|x86.ActiveCfg = Release|x86
+		{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}.Release|x86.Build.0 = Release|x86
 		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Release|Any CPU.Build.0 = Release|Any CPU
+		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Release|x64.ActiveCfg = Release|Any CPU
+		{729B818F-E1D0-4C9D-915A-775B2A4B1D27}.Release|x86.ActiveCfg = Release|Any CPU
 		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|x64.ActiveCfg = Debug|x64
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|x64.Build.0 = Debug|x64
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|x86.ActiveCfg = Debug|x86
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Debug|x86.Build.0 = Debug|x86
 		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|x64.ActiveCfg = Release|x64
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|x64.Build.0 = Release|x64
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|x86.ActiveCfg = Release|x86
+		{3F9E665A-3DCB-49C3-8806-0E47FC48EA52}.Release|x86.Build.0 = Release|x86
 		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Release|x64.ActiveCfg = Release|Any CPU
+		{C3A2E1C9-9677-4992-A1B7-7B38CDB82FEF}.Release|x86.ActiveCfg = Release|Any CPU
 		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Release|x64.ActiveCfg = Release|Any CPU
+		{94073310-27AB-4C93-8FDD-3D35824AE3F7}.Release|x86.ActiveCfg = Release|Any CPU
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|x64.ActiveCfg = Debug|x64
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|x64.Build.0 = Debug|x64
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|x86.ActiveCfg = Debug|x86
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Debug|x86.Build.0 = Debug|x86
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x64.ActiveCfg = Release|x64
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x64.Build.0 = Release|x64
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x86.ActiveCfg = Release|x86
+		{A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/HeuristicLab.Problems.GPDL/Test/Test.csproj
===================================================================
--- branches/HeuristicLab.Problems.GPDL/Test/Test.csproj	(revision 9872)
+++ branches/HeuristicLab.Problems.GPDL/Test/Test.csproj	(revision 10031)
@@ -118,4 +118,5 @@
   </Choose>
   <ItemGroup>
+    <Compile Include="TestGrammar.cs" />
     <Compile Include="TestGpdlExamples.cs" />
     <Compile Include="TestGpdlCompiler.cs" />
@@ -123,4 +124,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Grammars\3.3\HeuristicLab.Grammars-3.3.csproj">
+      <Project>{a5452b63-b33b-4f9f-9e81-98b75edb5612}</Project>
+      <Name>HeuristicLab.Grammars-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Problems.GPDL.Views\3.4\HeuristicLab.Problems.GPDL.Views-3.4.csproj">
       <Project>{3f9e665a-3dcb-49c3-8806-0e47fc48ea52}</Project>
Index: branches/HeuristicLab.Problems.GPDL/Test/TestGrammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GPDL/Test/TestGrammar.cs	(revision 10031)
+++ branches/HeuristicLab.Problems.GPDL/Test/TestGrammar.cs	(revision 10031)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Grammars;
+namespace Test {
+  [TestClass]
+  public class TestGrammar {
+    [TestMethod]
+    public void TestSimpleGrammar() {
+      var gStr =
+        @"S -> A
+          A->a B
+          B ->S b | S a|B b 
+          B-> a  aa   aaa
+         ";
+      var g = HeuristicLab.Grammars.Grammar.FromString(gStr);
+      Assert.AreEqual(g.StartSymbol, "S");
+      Assert.AreEqual(g.TerminalSymbols.Count(), 4);
+      Assert.AreEqual(g.NonTerminalSymbols.Count(), 3);
+      Assert.IsTrue(g.TerminalSymbols.Contains("aaa"));
+      Assert.IsTrue(g.TerminalSymbols.Contains("aa"));
+      Assert.IsTrue(g.NonTerminalSymbols.Contains("S"));
+      Assert.IsTrue(g.NonTerminalSymbols.Contains("B"));
+      Assert.IsTrue(g.NonTerminalSymbols.Contains("A"));
+    }
+  }
+}
