commit | fb02c86db55a2b3ed24662201b6fb40aad39334b | [log] [tgz] |
---|---|---|
author | Franck Bodmer <bodmer@ids-mannheim.de> | Fri Dec 01 14:24:52 2023 +0100 |
committer | Franck Bodmer <bodmer@ids-mannheim.de> | Fri Dec 01 14:24:52 2023 +0100 |
tree | c926cbbbebabab956edddc1bbcd5d0e9477c3815 | |
parent | 2f9de07e661092674815aa5cd99c63bb580fff67 [diff] |
opPROX: grammar should accept any order of prox. options: WIP. Change-Id: I5641d33b85c9ed6d66ff6c59f1cdf02dfad281f8
diff --git a/src/main/antlr/cosmas/c2ps_opPROX.g b/src/main/antlr/cosmas/c2ps_opPROX.g index 5d1ba5a..bb1fb18 100644 --- a/src/main/antlr/cosmas/c2ps_opPROX.g +++ b/src/main/antlr/cosmas/c2ps_opPROX.g
@@ -75,7 +75,7 @@ -> ^(RANGE VAL0 $m1); proxMeasure - : (m='w'|m='s'|m='p'|m='t') -> ^(MEAS $m); + : (meas='w'|meas='s'|meas='p'|meas='t') -> {c2ps_opPROX.checkMeasure($meas)} ; // {c2ps_opPROX.checkMeasure($meas)} ? ^(MEAS $meas); proxDistMin : DISTVALUE;
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 66daf0d..6458dd3 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
@@ -88,7 +88,13 @@ return tree; } - + public static boolean checkMeasure( Object measure) + { + System.err.printf("Debug: checkMeasure: measure = %s.\n", + measure == null ? "null" : "not null"); + return true; + } + /* * main testprogram: */