You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/04/15 13:45:57 UTC

[tinkerpop] branch master updated: Added SeedStrategy to the antlr grammar CTR

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

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new e13096c  Added SeedStrategy to the antlr grammar CTR
e13096c is described below

commit e13096c72faf7407adc4a4abb396c2a4e2932be0
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Apr 15 09:45:24 2021 -0400

    Added SeedStrategy to the antlr grammar CTR
---
 docs/src/upgrade/release-3.5.x.asciidoc                                 | 2 +-
 gremlin-language/src/main/antlr4/Gremlin.g4                             | 2 ++
 .../apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/src/upgrade/release-3.5.x.asciidoc b/docs/src/upgrade/release-3.5.x.asciidoc
index 0db9098..0cb3f78 100644
--- a/docs/src/upgrade/release-3.5.x.asciidoc
+++ b/docs/src/upgrade/release-3.5.x.asciidoc
@@ -730,7 +730,7 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-2273[TINKERPOP-2273],
 link:https://issues.apache.org/jira/browse/TINKERPOP-2455[TINKERPOP-2455],
 link:https://tinkerpop.apache.org/docs/3.5.0/upgrade/#_ssl_security[3.2.10 Upgrade Documentation for SSL]
 
-=== Upgrading for Provider
+=== Upgrading for Providers
 
 ==== Graph System Providers
 
diff --git a/gremlin-language/src/main/antlr4/Gremlin.g4 b/gremlin-language/src/main/antlr4/Gremlin.g4
index 0c1569e..2ea796f 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -754,12 +754,14 @@ traversalStrategy
     : 'new' 'PartitionStrategy' LPAREN traversalStrategyArgs_PartitionStrategy? (COMMA traversalStrategyArgs_PartitionStrategy)* RPAREN
 //  | 'RequirementStrategy' - not supported as it's internally relevant only
 //  | 'SackStrategy' - not supported directly as it's internal to withSack()
+    | 'new' 'SeedStrategy' LPAREN integerLiteral RPAREN
 //  | 'SideEffectStrategy' - not supported directly as it's internal to withSideEffect()
     | 'new' 'SubgraphStrategy' LPAREN traversalStrategyArgs_SubgraphStrategy? (COMMA traversalStrategyArgs_SubgraphStrategy)* RPAREN
 //  | 'MatchAlgorithmStrategy' - not supported directly as it's internal to match()
 //  | 'ProfileStrategy' - not supported directly as it's internal to profile()
 //  | 'ReferenceElementStrategy' - not supported directly as users really can't/shouldn't change this in our context of a remote Gremlin provider
 //  | 'AdjacentToIncidentStrategy' - not supported as it is a default strategy and we don't allow removal at this time
+//  | 'ByModulatorOptimizationStrategy' - not supported as it is a default strategy and we don't allow removal at this time
 //  | 'CountStrategy' - not supported as it is a default strategy and we don't allow removal at this time
 //  | 'EarlyLimitStrategy' - not supported as it is a default strategy and we don't allow removal at this time
 //  | 'FilterRankingStrategy' - not supported as it is a default strategy and we don't allow removal at this time
diff --git a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java
index 33eef6d..93bbccd 100644
--- a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java
+++ b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java
@@ -113,7 +113,7 @@ public class DocumentationReader {
                 replace("System.out.&println", "{it}").
                 replace("persons", "\"persons\"").
                 replace("marko.value('age')", "11").
-                replace("seedStrategy", "ReadOnlyStrategy").
+                replace("seedStrategy", "new SeedStrategy(99999)").
                 replace(".getClass()", "").
                 replace("result.toArray()", "4").
                 replace("vA.value('amount')", "0.0").