Index: trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/testutils/TaskTreeChecker.java
===================================================================
--- trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/testutils/TaskTreeChecker.java	(revision 725)
+++ trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/testutils/TaskTreeChecker.java	(revision 735)
@@ -10,4 +10,5 @@
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -33,4 +34,11 @@
     
     /** */
+    private static Pattern taskPattern = Pattern.compile("([^{}]+)\\{|\\}");
+    
+    /** */
+    private static Pattern taskDetailsPattern =
+        Pattern.compile("\\s*(\\w*)\\s*(\\w*)\\s*((\\w*)|(\".*\"))?");
+    
+    /** */
     private boolean doTrace;
 
@@ -72,23 +80,14 @@
         TaskSpec task = null;
 
-        Matcher matcher = Pattern.compile
-            ("(\\s*(\\w+)\\s+(\\w+)\\s+((\\w*\\s)*)(\\{))|((\\}))").matcher(taskTreeSpec);
-
-        do {
-            if (!matcher.find()) {
-                if (!matcher.hitEnd()) {
-                    throw new IllegalArgumentException("could not parse task specification");
-                }
-                else {
-                    break;
-                }
-            }
-
-            task = parseTask(matcher);
+        Matcher taskMatcher = taskPattern.matcher(taskTreeSpec);
+
+        while (taskMatcher.find()) {
+
+            task = parseTask(taskMatcher);
+            
             if (task != null) {
                 assertTaskAndChildrenInMapAndRemove(task, taskMapCopy);
             }
         }
-        while (task != null);
 
         assertTrue("more tasks in map, than expected", taskMapCopy.isEmpty());
@@ -111,35 +110,35 @@
      */
     private void dumpNodeAsCheckString(ITaskTreeNode node, int[] typeCounters, String indent) {
-        System.err.print("       \"");
-        System.err.print(indent);
+        System.out.print("       \"");
+        System.out.print(indent);
 
         if (node instanceof ISequence) {
-            System.err.print("Sequence sequence");
-            System.err.print(typeCounters[0]++);
-            System.err.println(" {\" +");
+            System.out.print("Sequence sequence");
+            System.out.print(typeCounters[0]++);
+            System.out.println(" {\" +");
         }
         else if (node instanceof IIteration) {
-            System.err.print("Iteration iteration");
-            System.err.print(typeCounters[1]++);
-            System.err.println(" {\" +");
+            System.out.print("Iteration iteration");
+            System.out.print(typeCounters[1]++);
+            System.out.println(" {\" +");
         }
         else if (node instanceof ISelection) {
-            System.err.print("Selection selection");
-            System.err.print(typeCounters[2]++);
-            System.err.println(" {\" +");
+            System.out.print("Selection selection");
+            System.out.print(typeCounters[2]++);
+            System.out.println(" {\" +");
         }
         else if (node instanceof IEventTask) {
             if (((IEventTask) node).getEventType() instanceof TextInput) {
-                System.err.print("TextInputEvent textInput");
-                System.err.print(typeCounters[3]++);
-                System.err.print(" \"");
-                System.err.print(((TextInput) ((IEventTask) node).getEventType()).getEnteredText());
-                System.err.print("\"");
+                System.out.print("TextInputEvent textInput");
+                System.out.print(typeCounters[3]++);
+                System.out.print(" \"");
+                System.out.print(((TextInput) ((IEventTask) node).getEventType()).getEnteredText());
+                System.out.print("\"");
             }
             else {
-                System.err.print("Event ");
-                System.err.print(((IEventTask) node).getEventType().getName());
-            }
-            System.err.print(" {}\" +");
+                System.out.print("Event ");
+                System.out.print(((IEventTask) node).getEventType().getName());
+            }
+            System.out.print(" {}\" +");
         }
         else {
@@ -152,10 +151,10 @@
 
         if (!(node instanceof IEventTask)) {
-            System.err.print("       \"");
-            System.err.print(indent);
-            System.err.print("}\" +");
-        }
-
-        System.err.println();
+            System.out.print("       \"");
+            System.out.print(indent);
+            System.out.print("}\" +");
+        }
+
+        System.out.println();
     }
 
@@ -228,15 +227,28 @@
      * 
      */
-    private TaskSpec parseTask(Matcher tokenMatcher) {
-        String firstToken = tokenMatcher.group();
-
-        if ("}".equals(firstToken)) {
-            throw new IllegalArgumentException("found a closing bracket at an unexpected place");
+    private TaskSpec parseTask(Matcher taskMatcher) {
+        if ("}".equals(taskMatcher.group(1))) {
+            throw new IllegalArgumentException("invalid task specification");
+        }
+        
+        String taskDetails = taskMatcher.group(1);
+        
+        Matcher matcher = taskDetailsPattern.matcher(taskDetails);
+        
+        if (!matcher.find()) {
+            throw new IllegalArgumentException("could not parse task details");
         }
 
         TaskSpec task = new TaskSpec();
-        task.type = tokenMatcher.group(2);
-        task.name = tokenMatcher.group(3);
-        task.additionalInfo = tokenMatcher.group(4).trim();
+        task.type = matcher.group(1);
+        
+        task.name = matcher.group(2);
+        if ((matcher.group(4) != null) && (!"".equals(matcher.group(4).trim()))) {
+            task.name += " " + matcher.group(4).trim();
+        }
+        
+        if ((matcher.group(5) != null) && (!"".equals(matcher.group(5).trim()))) {
+            task.additionalInfo = matcher.group(5).trim();
+        }
 
         if ("".equals(task.name)) {
@@ -244,35 +256,10 @@
         }
 
-        if (!tokenMatcher.find()) {
-            throw new IllegalArgumentException("could not parse task specification");
-        }
-
-        firstToken = tokenMatcher.group();
-
-        if (!"}".equals(firstToken)) {
-            ArrayList<TaskSpec> children = new ArrayList<TaskSpec>();
-
-            TaskSpec child = null;
-
-            do {
-                child = parseTask(tokenMatcher);
-
-                if (child != null) {
-                    children.add(child);
-
-                    if (!tokenMatcher.find()) {
-                        throw new IllegalArgumentException("could not parse task specification");
-                    }
-
-                    firstToken = tokenMatcher.group();
-
-                    if ("}".equals(firstToken)) {
-                        break;
-                    }
-                }
-
-            }
-            while (child != null);
-
+        List<TaskSpec> children = new ArrayList<TaskSpec>();
+        while (taskMatcher.find() && !"}".equals(taskMatcher.group(0))) {
+            children.add(parseTask(taskMatcher));
+        }
+
+        if (children.size() > 0) {
             task.children = children.toArray(new TaskSpec[children.size()]);
         }
@@ -322,6 +309,6 @@
         if (("Event".equals(taskSpec.type) && (!(task instanceof IEventTask))) ||
             ("TextInputEvent".equals(taskSpec.type) &&
-             (!(task instanceof IEventTask)) &&
-             (!(((IEventTask) task).getEventType() instanceof TextInput))) ||
+             ((!(task instanceof IEventTask)) ||
+              (!(((IEventTask) task).getEventType() instanceof TextInput)))) ||
             ("Sequence".equals(taskSpec.type) && (!(task instanceof ISequence))) ||
             ("Selection".equals(taskSpec.type) && (!(task instanceof ISelection))) ||
@@ -345,5 +332,6 @@
         if ("TextInputEvent".equals(taskSpec.type)) {
             TextInput eventType = (TextInput) ((IEventTask) task).getEventType();
-            if (!"".equals(taskSpec.additionalInfo) &&
+            if ((taskSpec.additionalInfo != null) &&
+                !"".equals(taskSpec.additionalInfo) &&
                 !(taskSpec.additionalInfo.equals(eventType.getEnteredText())))
             {
@@ -424,6 +412,6 @@
 
     /**
-   *
-   */
+     *
+     */
     private void dumpTask(ITaskTreeNode task, int count, String indent) {
         System.err.print(indent);
@@ -447,5 +435,5 @@
         }
     }
-
+    
     /**
      * TODO comment
