From 511a04253178ec44723b6a8769024e853b18d8a0 Mon Sep 17 00:00:00 2001 From: Jim Grace Date: Tue, 23 Jan 2024 10:51:14 -0500 Subject: [PATCH 1/3] feat: textContains expr. function [DHIS2-16211] --- .../org/hisp/dhis/parser/expression/antlr/Expression.g4 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/antlr4/org/hisp/dhis/parser/expression/antlr/Expression.g4 b/src/main/antlr4/org/hisp/dhis/parser/expression/antlr/Expression.g4 index 426e322..5d99cd2 100644 --- a/src/main/antlr4/org/hisp/dhis/parser/expression/antlr/Expression.g4 +++ b/src/main/antlr4/org/hisp/dhis/parser/expression/antlr/Expression.g4 @@ -6,6 +6,11 @@ grammar Expression; // Parser rules // ----------------------------------------------------------------------------- +// Note: ANTLR symbols for optional or repeating: +// ? -> 0 or 1 +// * -> 0 or more +// + -> 1 or more + expression // The expression must last until the end of the string : expr EOF ; @@ -59,6 +64,7 @@ expr | it='orgUnit.program(' WS* UID WS* (',' WS* UID WS* )* ')' | it='removeZeros(' expr ')' | it='subExpression(' expr ')' + | it='textContains(' expr (',' expr )+ ')' // Aggergation functions (alphabetical) @@ -303,6 +309,7 @@ ORGUNIT_GROUP : 'orgUnit.group('; ORGUNIT_PROGRAM : 'orgUnit.program('; REMOVE_ZEROS : 'removeZeros('; SUB_EXPRESSION : 'subExpression('; +TEXT_CONTAINS : 'textContains('; // Aggegation functions (alphabetical) From 9ea7d0bfc70e1d16ac8f3b3667ee880bb8f93d9a Mon Sep 17 00:00:00 2001 From: Jim Grace Date: Tue, 23 Jan 2024 10:54:37 -0500 Subject: [PATCH 2/3] bump version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b20bd1d..70e1d05 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ jar DHIS Antlr Expression Parser org.hisp.dhis.parser - 1.0.34-SNAPSHOT + 1.0.35-SNAPSHOT Antlr Expression Parser From 3c94a6edb956ad774c1b68684942e31a0957aa0d Mon Sep 17 00:00:00 2001 From: Jim Grace Date: Wed, 24 Jan 2024 08:59:24 -0500 Subject: [PATCH 3/3] Bump to 1.0.35 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 70e1d05..402d4d7 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ jar DHIS Antlr Expression Parser org.hisp.dhis.parser - 1.0.35-SNAPSHOT + 1.0.35 Antlr Expression Parser