Index: /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg
===================================================================
--- /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg	(revision 9726)
+++ /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg	(revision 9727)
@@ -6,7 +6,5 @@
 
 COMPILER GPDef
-  static StringBuilder srcText;
   public static HeuristicLab.Optimization.IProblem problem;
-  static string lastSrc;
   
 CHARACTERS
@@ -32,5 +30,4 @@
 
   GPDef =                                                                         (.
-                                                                                    string identStr = "";
                                                                                     RuleNode ruleNode = null;
                                                                                     GPDefNode gpDef = new GPDefNode();
@@ -81,5 +78,5 @@
   NonterminalDecl<out NonTerminalNode ntNode> =                                   (. string identStr = ""; ntNode = null; string src = ""; .)
     ident                                                                         (. identStr = t.val; .)
-    SourceCode<out src>                                                           (.
+    [ SourceCode<out src> ]                                                       (.
                                                                                     var myNtNode = new NonTerminalNode();
                                                                                     ntNode = myNtNode;
@@ -99,5 +96,5 @@
                                                                                   .)
   ident                                                                           (. identStr = t.val; .) 
-  SourceCode<out src>                                                             (.
+  [ SourceCode<out src> ]                                                         (.
                                                                                          myTNode = new TerminalNode();
                                                                                          tNode = myTNode;
@@ -125,5 +122,4 @@
   /******************************************************/
   ConstraintRule<out ConstraintNode constraint> =                                 (.
-                                                                                    string identStr = null;
                                                                                     constraint = null;
                                                                                   .)
@@ -153,5 +149,5 @@
                                                                                   .)
   ident                                                                           (. identStr = t.val; .) 
-  SourceCode<out src> '='                                                         (.
+  [ SourceCode<out src> ] '='                                                     (.
                                                                                       myRule = new RuleNode();
                                                                                       rule = myRule;
@@ -199,6 +195,6 @@
                                                                                    string src = "";
                                                                                  .)
-    (ident                                                                        (. identStr = t.val; .)
-     SourceCode<out src>                                                          (.
+    (ident                                                                       (. identStr = t.val; .)
+     [ SourceCode<out src> ]                                                     (.
                                                                                     var callNode = new CallSymbolNode{Ident = identStr};
                                                                                     callNode.ActualParameter = src;
Index: /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Parser.cs
===================================================================
--- /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Parser.cs	(revision 9726)
+++ /branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Parser.cs	(revision 9727)
@@ -27,7 +27,5 @@
 	int errDist = minErrDist;
 
-static StringBuilder srcText;
-  public static HeuristicLab.Optimization.IProblem problem;
-  static string lastSrc;
+public static HeuristicLab.Optimization.IProblem problem;
   
 
@@ -103,5 +101,4 @@
 
 	void GPDef() {
-		string identStr = "";
 		RuleNode ruleNode = null;
 		GPDefNode gpDef = new GPDefNode();
@@ -164,5 +161,7 @@
 		Expect(1);
 		identStr = t.val; 
-		SourceCode(out src);
+		if (la.kind == 2) {
+			SourceCode(out src);
+		}
 		var myNtNode = new NonTerminalNode();
 		ntNode = myNtNode;
@@ -182,5 +181,7 @@
 		Expect(1);
 		identStr = t.val; 
-		SourceCode(out src);
+		if (la.kind == 2) {
+			SourceCode(out src);
+		}
 		myTNode = new TerminalNode();
 		tNode = myTNode;
@@ -206,5 +207,7 @@
 		Expect(1);
 		identStr = t.val; 
-		SourceCode(out src);
+		if (la.kind == 2) {
+			SourceCode(out src);
+		}
 		Expect(20);
 		myRule = new RuleNode();
@@ -247,5 +250,4 @@
 
 	void ConstraintRule(out ConstraintNode constraint) {
-		string identStr = null;
 		constraint = null;
 		
@@ -310,5 +312,7 @@
 			Get();
 			identStr = t.val; 
-			SourceCode(out src);
+			if (la.kind == 2) {
+				SourceCode(out src);
+			}
 			var callNode = new CallSymbolNode{Ident = identStr};
 			callNode.ActualParameter = src;
Index: /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg
===================================================================
--- /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg	(revision 9726)
+++ /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg	(revision 9727)
@@ -33,8 +33,8 @@
   .
 
-  NonterminalDecl = ident "<<" {ANY} ">>"  '.'
+  NonterminalDecl = ident [ "<<" {ANY} ">>" ] '.'
   .
 
-  TerminalDecl = ident "<<" {ANY} ">>" 
+  TerminalDecl = ident [ "<<" {ANY} ">>" ]
     [ "CONSTRAINTS" ConstraintDef ]
     '.'
@@ -48,5 +48,5 @@
   .
 
-  RuleDef = ident "<<" {ANY} ">>"  '=' [SemDecl] SynExpr '.'
+  RuleDef = ident [ "<<" {ANY} ">>" ] '=' [SemDecl] SynExpr '.'
   .
 
@@ -58,5 +58,5 @@
 
   SynFact = 
-    ident "<<" {ANY} ">>" 
+    ident [ "<<" {ANY} ">>" ]
     | "EPS"
     | '(' SynExpr ')'
Index: /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Parser.cs
===================================================================
--- /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Parser.cs	(revision 9726)
+++ /branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Parser.cs	(revision 9727)
@@ -129,9 +129,11 @@
 	void NonterminalDecl() {
 		Expect(1);
-		Expect(4);
-		while (StartOf(1)) {
-			Get();
-		}
-		Expect(5);
+		if (la.kind == 4) {
+			Get();
+			while (StartOf(1)) {
+				Get();
+			}
+			Expect(5);
+		}
 		Expect(13);
 	}
@@ -139,9 +141,11 @@
 	void TerminalDecl() {
 		Expect(1);
-		Expect(4);
-		while (StartOf(1)) {
-			Get();
-		}
-		Expect(5);
+		if (la.kind == 4) {
+			Get();
+			while (StartOf(1)) {
+				Get();
+			}
+			Expect(5);
+		}
 		if (la.kind == 16) {
 			Get();
@@ -153,9 +157,11 @@
 	void RuleDef() {
 		Expect(1);
-		Expect(4);
-		while (StartOf(1)) {
-			Get();
-		}
-		Expect(5);
+		if (la.kind == 4) {
+			Get();
+			while (StartOf(1)) {
+				Get();
+			}
+			Expect(5);
+		}
 		Expect(21);
 		if (la.kind == 14) {
@@ -239,9 +245,11 @@
 		case 1: {
 			Get();
-			Expect(4);
-			while (StartOf(1)) {
-				Get();
-			}
-			Expect(5);
+			if (la.kind == 4) {
+				Get();
+				while (StartOf(1)) {
+					Get();
+				}
+				Expect(5);
+			}
 			break;
 		}
