Index: trunk/MagicSoft/Mars/mdata/MDataChain.cc
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataChain.cc	(revision 3666)
+++ trunk/MagicSoft/Mars/mdata/MDataChain.cc	(revision 3788)
@@ -45,5 +45,5 @@
 //   "MCameraLV.fPowerSupplyA.fVoltagePos5V"
 //
-// You can also use brackets:
+// You can also use parantheses:
 //   "HillasDource.fDist / (MHillas.fLength + MHillas.fWidth)"
 //
@@ -57,5 +57,5 @@
 // While a^b returns a to the power of b
 //
-// Warning: There is no priority rule build in. So better use brackets
+// Warning: There is no priority rule build in. So better use parantheses
 //   to get correct results. The rule is parsed/evaluated from the left
 //   to the right, which means:
@@ -158,5 +158,5 @@
 //  - The possibility to use other objects inheriting from MData
 //    is missing.
-//  - By automatic pre-adding brackets to the rule it would be possible
+//  - By automatic pre-adding parantheses to the rule it would be possible
 //    to implement priorities for operators.
 //
@@ -365,4 +365,16 @@
 }
 
+void MDataChain::SimplifyString(TString &txt) const
+{
+    while (txt.First("--")>=0 || txt.First("++")>=0 ||
+           txt.First("+-")>=0 || txt.First("-+")>=0)
+    {
+        txt.ReplaceAll("--", "+");
+        txt.ReplaceAll("++", "+");
+        txt.ReplaceAll("-+", "-");
+        txt.ReplaceAll("+-", "-");
+    }
+}
+
 // --------------------------------------------------------------------------
 //
@@ -371,4 +383,7 @@
 MData *MDataChain::ParseString(TString txt, Int_t level)
 {
+    if (level==0)
+        SimplifyString(txt);
+
     MData *member0=NULL;
 
@@ -387,8 +402,7 @@
             {
                 //
-                // Search for the corresponding bracket
-                //
-                Int_t first=GetBracket(txt, '(', ')');
-
+                // Search for the corresponding parantheses
+                //
+                const Int_t first=GetBracket(txt, '(', ')');
                 if (first==txt.Length())
                 {
@@ -400,5 +414,5 @@
 
                 //
-                // Make a copy of the 'interieur' and delete the substringä
+                // Make a copy of the 'interieur' and delete the substring
                 // including the brackets
                 //
@@ -462,6 +476,6 @@
             if (txt[0]!='-' && txt[0]!='+')
             {
-                *fLog << err << dbginf << "Syntax Error: First argument of symbol '";
-                *fLog << txt[0] << "' missing." << endl;
+                *fLog << err << dbginf << "Syntax Error: First argument of '";
+                *fLog << txt[0] << "' opartor missing." << endl;
                 if (member0)
                     delete member0;
Index: trunk/MagicSoft/Mars/mdata/MDataChain.h
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataChain.h	(revision 3666)
+++ trunk/MagicSoft/Mars/mdata/MDataChain.h	(revision 3788)
@@ -44,4 +44,5 @@
     Int_t GetBracket(TString txt, char open, char close);
 
+    void   SimplifyString(TString &txt) const;
     MData *ParseString(TString txt, Int_t level);
     MData *ParseDataMember(TString txt);
