diff --git a/src/main/antlr/cosmas/c2ps.g b/src/main/antlr/cosmas/c2ps.g
index f0eba80..dd750f3 100644
--- a/src/main/antlr/cosmas/c2ps.g
+++ b/src/main/antlr/cosmas/c2ps.g
@@ -275,7 +275,7 @@
 op2	:	(opPROX | opIN | opOV | opAND | opOR | opNOT) ;
 		
 // AST with Options for opPROX is returned by c2ps_opPROX.check():
-opPROX	:	OP_PROX -> ^(OPPROX {c2ps_opPROX.check($OP_PROX.text, $OP_PROX.index)} );
+opPROX	:	OP_PROX -> ^(OPPROX {c2ps_opPROX.check($OP_PROX.text, $OP_PROX.pos)} );
 
 opIN	: 	OP_IN -> {c2ps_opIN.check($OP_IN.text, $OP_IN.index)};
 
diff --git a/src/main/antlr/cosmas/c2ps_opPROX.g b/src/main/antlr/cosmas/c2ps_opPROX.g
index 9b6c5cb..ab0f4cb 100644
--- a/src/main/antlr/cosmas/c2ps_opPROX.g
+++ b/src/main/antlr/cosmas/c2ps_opPROX.g
@@ -73,7 +73,7 @@
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 
-opPROX	:	proxTyp proxDist (',' proxDist)* (',' proxGroup)? 
+opPROX[int pos]	:	proxTyp proxDist[$pos] (',' proxDist[$pos])* (',' proxGroup)? 
 		
 		-> ^(PROX_OPTS {$proxTyp.tree} ^(DIST_LIST proxDist+) {$proxGroup.tree});
 	
@@ -93,12 +93,12 @@
 // count each option type and find out if any one  is missing or occures multiple times.
 // 28.11.23/FB
 
-proxDist
+proxDist[int pos]
 @init{ int countM=0; int countD=0; int countV=0;}
 	:
 		((m=proxMeasure {countM++;})|(d=proxDirection {countD++;})|(v=proxDistValue {countV++;}) )+
 		 
-	->  {c2ps_opPROX.encodeDIST(DIST, DIR, $d.tree, $m.tree, $v.tree, $proxDist.text, countD, countM, countV)};
+	->  {c2ps_opPROX.encodeDIST(DIST, DIR, $d.tree, $m.tree, $v.tree, $proxDist.text, countD, countM, countV, $pos)};
 	
 
 // new rule accepts only '+' and '-'; default tree for direction is 
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
index 2f81b5c..82bc9b9 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
@@ -2,6 +2,8 @@
 
 import org.antlr.runtime.*;
 import org.antlr.runtime.tree.*;
+
+import de.ids_mannheim.korap.query.serialize.Antlr3AbstractQueryProcessor;
 import de.ids_mannheim.korap.query.serialize.util.Antlr3DescriptiveErrorListener;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
 import de.ids_mannheim.korap.util.*;
@@ -10,7 +12,7 @@
  * parses Opts of PROX: /w3:4,s0,min or %w3:4,s0,min.
  */
 
-public class c2ps_opPROX
+public class c2ps_opPROX 
 
 {
 	final static int typeERROR = 1; // type of an Error CommonToken.
@@ -20,7 +22,7 @@
 	final static int ERR_VAL_TOOGREAT = 303;
 	final static int ERR_DIR_TOOGREAT = 304;
 	
-	private static CommonTree buildErrorTree_Prox(String text, int errCode, int typeDIST)
+	private static CommonTree buildErrorTree(String text, int errCode, int typeDIST, int pos)
 	
 	{
 	CommonTree
@@ -70,6 +72,9 @@
 	errorNode.addChild(errorArg);
 	errorNode.addChild(errorMes);
 
+	// test - 09.01.24/FB
+	//addError("ab");
+	
 	return errorTree;
 	}
 
@@ -91,24 +96,24 @@
 	 */
 	
 	public static Object encodeDIST(int typeDIST, int typeDIR, Object ctDir, Object ctMeas, Object ctVal, String text,
-									int countD, int countM, int countV)  
+									int countD, int countM, int countV, int pos)  
 			
 	{
 		CommonTree tree1 = (CommonTree)ctDir;
 		CommonTree tree2 = (CommonTree)ctMeas;
 		CommonTree tree3 = (CommonTree)ctVal;
 		
-		//System.err.printf("Debug: encodeDIST: scanned input='%s' countM=%d countD=%d countV=%d.\n", 
-		//			text, countM, countD, countV);
+		System.err.printf("Debug: encodeDIST: scanned input='%s' countM=%d countD=%d countV=%d pos=%d.\n", 
+					text, countM, countD, countV, pos);
 
 		if( countM == 0 )
-			return buildErrorTree_Prox(text, ERR_MEAS_NULL, typeDIST);
+			return buildErrorTree(text, ERR_MEAS_NULL, typeDIST, pos);
 		if( countM > 1 )
-			return buildErrorTree_Prox(text, ERR_MEAS_TOOGREAT, typeDIST);
+			return buildErrorTree(text, ERR_MEAS_TOOGREAT, typeDIST, pos);
 		if( countV == 0 )
-			return buildErrorTree_Prox(text, ERR_VAL_NULL, typeDIST);
+			return buildErrorTree(text, ERR_VAL_NULL, typeDIST, pos);
 		if( countV > 1 )
-			return buildErrorTree_Prox(text, ERR_VAL_TOOGREAT, typeDIST);
+			return buildErrorTree(text, ERR_VAL_TOOGREAT, typeDIST, pos);
 		
 		if( countD == 0 )
 			{
@@ -122,7 +127,7 @@
 			tree1 = treeDIR;
 			}
 		else if( countD > 1 )
-			return buildErrorTree_Prox(text, ERR_DIR_TOOGREAT, typeDIST);
+			return buildErrorTree(text, ERR_DIR_TOOGREAT, typeDIST, pos);
 		
 		// create DIST tree:
 		CommonTree 
@@ -143,21 +148,22 @@
 		return true;
 	}
 	
-	public static Tree check (String input, int index) {
+	public static Tree check (String input, int pos) 
+	{
         ANTLRStringStream ss = new ANTLRStringStream(input);
         c2ps_opPROXLexer lex = new c2ps_opPROXLexer(ss);
         CommonTokenStream tokens = new CommonTokenStream(lex);
         c2ps_opPROXParser g = new c2ps_opPROXParser(tokens);
         c2ps_opPROXParser.opPROX_return c2PQReturn = null;
 
-        /*
-        System.out.println("check opPROX:" + index + ": " + input);
+        /**/
+        System.out.printf("check opPROX: pos=%d input='%s'.\n", pos, input);
         System.out.flush();
-         */
+        /**/
 
         try {
-            c2PQReturn = g.opPROX();
-        }
+            c2PQReturn = g.opPROX(pos);
+        	}
         catch (RecognitionException e) {
             e.printStackTrace();
         }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
index 381c35e..47eb907 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
@@ -1851,19 +1851,29 @@
         }
 
         String treestring = tree.toStringTree();
-
+        System.err.printf("Debug: parseCosmasQuery: tree = '%s'.\n",  treestring);
+        
         boolean erroneous = false;
         if (parser.failed() || parser.getNumberOfSyntaxErrors() > 0) {
             erroneous = true;
             tree = null;
         }
 
+        System.err.printf("Debug: parseCosmasQuery: failed=%b no. of synt. err = %d.\n",
+        			parser.failed(), parser.getNumberOfSyntaxErrors());
+        
         if (erroneous || treestring.contains("<mismatched token")
                 || treestring.contains("<error")
-                || treestring.contains("<unexpected")) {
-            log.error(errorListener.generateFullErrorMsg().toString());
+                || treestring.contains("<unexpected")) 
+        {
+        	System.err.printf("Debug: parseCosmasQuery: tree: '%s'.\n", treestring);
+        	System.err.printf("Debug: parseCosmasQuery: FullErrorMsg:  '%s'.\n", errorListener.generateFullErrorMsg().toString());
+        	log.error(errorListener.generateFullErrorMsg().toString());
             addError(errorListener.generateFullErrorMsg());
         }
+        
+        addError(1234, "Test-Message");
+        
         return tree;
     }
 }
