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 2021/11/18 20:02:36 UTC

[tinkerpop] branch TINKERPOP-2652 updated: 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


The following commit(s) were added to refs/heads/TINKERPOP-2652 by this push:
     new a1ec4ad  Add redex predicates to the Antlr grammar
a1ec4ad is described below

commit a1ec4ad122c77178365f518b5eb37d7b902fcc01
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 0844d67..bbe1db0 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -884,6 +884,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
@@ -998,6 +1000,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
     ;