You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by kr...@apache.org on 2022/01/07 21:42:04 UTC

[tinkerpop] 02/15: Add redex predicates to the Antlr grammar

This is an automated email from the ASF dual-hosted git repository.

krlawrence pushed a commit to branch TINKERPOP-2652
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit f920fcf6d508e0929858bec2884a053e31d2e7e0
Author: Kelvin Lawrence <gf...@yahoo.com>
AuthorDate: Thu Nov 18 14:02:26 2021 -0600

    Add redex predicates to the Antlr grammar
---
 gremlin-language/src/main/antlr4/Gremlin.g4 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gremlin-language/src/main/antlr4/Gremlin.g4 b/gremlin-language/src/main/antlr4/Gremlin.g4
index e285634..941cdd1 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -905,6 +905,8 @@ traversalPredicate
     | traversalPredicate_notEndingWith
     | traversalPredicate_containing
     | traversalPredicate_notContaining
+    | traversalPredicate_regex
+    | traversalPredicate_notRegex
     | traversalPredicate DOT 'and' LPAREN traversalPredicate RPAREN
     | traversalPredicate DOT 'or' LPAREN traversalPredicate RPAREN
     | traversalPredicate DOT 'negate' LPAREN RPAREN
@@ -1019,6 +1021,14 @@ traversalPredicate_notEndingWith
     : ('TextP.notEndingWith' | 'notEndingWith') LPAREN stringLiteral RPAREN
     ;
 
+traversalPredicate_regex
+    : ('TextP.regex' | 'regex') LPAREN stringLiteral RPAREN
+    ;
+
+traversalPredicate_notRegex
+    : ('TextP.notRegex' | 'notRegex') LPAREN stringLiteral RPAREN
+    ;
+
 traversalTerminalMethod_explain
     : 'explain' LPAREN RPAREN
     ;