removed deprecated shrink() and submatch() for operation:focus. NB: submatch() still in use for span-foci
diff --git a/src/main/antlr/poliqarpplus/PoliqarpPlusLexer.g4 b/src/main/antlr/poliqarpplus/PoliqarpPlusLexer.g4
index 378d45f..f8b5d91 100644
--- a/src/main/antlr/poliqarpplus/PoliqarpPlusLexer.g4
+++ b/src/main/antlr/poliqarpplus/PoliqarpPlusLexer.g4
@@ -33,7 +33,7 @@
POSITION_OP : ('contains' | 'startswith' | 'startsWith' | 'endswith' | 'endsWith' | 'matches' | 'overlaps') ;
RELATION_OP : ('dominates' | 'dependency' | 'relatesTo');
-MATCH_OP : ('focus' | 'shrink' | 'split'); // submatch and shrink are deprecated!
+MATCH_OP : ('focus' | 'split');
SUBMATCH_OP : 'submatch';
WITHIN : 'within';
META : 'meta';
diff --git a/src/main/antlr/poliqarpplus/PoliqarpPlusParser.g4 b/src/main/antlr/poliqarpplus/PoliqarpPlusParser.g4
index 7005b88..4137f02 100644
--- a/src/main/antlr/poliqarpplus/PoliqarpPlusParser.g4
+++ b/src/main/antlr/poliqarpplus/PoliqarpPlusParser.g4
@@ -146,7 +146,7 @@
;
matching
-: (SUBMATCH_OP|MATCH_OP) LRPAREN spanclass_id? (segment|sequence)? RRPAREN
+: MATCH_OP LRPAREN spanclass_id? (segment|sequence)? RRPAREN
;
alignment
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
index 600e4af..23958fa 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
@@ -517,14 +517,6 @@
// Default is focus(), if deviating catch here
if (type.equals("split"))
referenceGroup.put("operation", "operation:split");
- if (type.equals("submatch") || type.equals("shrink")) {
- String warning = "Deprecated 2014-07-24: "
- + type
- + "() as a match reducer "
- + "to a specific class is deprecated in favor of focus() and will "
- + "only be supported for 3 months after deprecation date.";
- addMessage(StatusCodes.DEPRECATED_QUERY_ELEMENT, warning);
- }
if (classRefOp != null) {
referenceGroup.put("classRefOp", "classRefOp:" + classRefOp);
}
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
index 6f832e8..8344d2c 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
@@ -1089,7 +1089,7 @@
@Test
public void testSubmatch() throws JsonProcessingException, IOException {
- query = "submatch(1,:<s>)";
+ query = "submatch(1:<s>)";
qs.setQuery(query, "poliqarpplus");
res = mapper.readTree(qs.toJSON());
assertEquals("korap:reference", res.at("/query/@type").asText());