Merge branch 'opPROX' of ssh://korap.ids-mannheim.de:29418/KorAP/Koral into opPROX
Change-Id: If67765481972fb81db29c496bf39e01cfcc78fef
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 b6f5251..b7c73fa 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
@@ -37,6 +37,24 @@
if( multiple == true )
{
+ CommonTree
+ errorTree = new CommonTree(new CommonToken(typeDIST, "DIST")),
+ errorNode = new CommonTree(new CommonToken(1, "ERROR")),
+ errorPos = new CommonTree(new CommonToken(1, "15")),
+ errorArg = new CommonTree(new CommonToken(1, text));
+
+ errorTree.addChild(errorNode);
+ errorNode.addChild(errorPos);
+ errorNode.addChild(errorArg);
+
+ System.err.printf("Debug: encodeDIST: parse error found, returning error tree: %s.\n",
+ errorTree.toStringTree());
+
+ return errorTree;
+
+ /* throwing an Exception is only part of the solution,
+ * but how to stop parsing and return the error code properly - 07.12.23/DB
+ *
String mess = String.format("line 0:%d %s expecting only 1 of 'wsp'!\n",
2345, text);
//de.ids_mannheim.korap.query.serialize.Antlr3AbstractQueryProcessor.reportError(mess);
@@ -48,6 +66,7 @@
re.line = 0;
throw re;
+ */
}