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 2022/08/17 12:29:43 UTC

[tinkerpop] branch master updated (d80b0058f4 -> b6442d2c2f)

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

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


    from d80b0058f4 Merge branch '3.6-dev'
     new 7b02a28d10 Fixed bug in grammar for handling empty queries.
     new dd5b8005f1 A few additional thoughts for 3.7.x CTR
     new b6442d2c2f Merge branch '3.6-dev'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc                                          |  2 +-
 docs/src/dev/future/index.asciidoc                          |  5 ++++-
 .../gremlin/language/grammar/GremlinQueryParserTest.java    | 13 +++++++------
 gremlin-language/src/main/antlr4/Gremlin.g4                 | 13 +++++--------
 4 files changed, 17 insertions(+), 16 deletions(-)
 copy gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/BasicGrammarTest.java => gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinQueryParserTest.java (79%)


[tinkerpop] 02/03: A few additional thoughts for 3.7.x CTR

Posted by sp...@apache.org.
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

commit dd5b8005f1eb5119bbb6f70c6cdda82cec61a0b6
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Aug 17 08:28:23 2022 -0400

    A few additional thoughts for 3.7.x CTR
---
 docs/src/dev/future/index.asciidoc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/src/dev/future/index.asciidoc b/docs/src/dev/future/index.asciidoc
index 3194f6477e..76a4c5d208 100644
--- a/docs/src/dev/future/index.asciidoc
+++ b/docs/src/dev/future/index.asciidoc
@@ -47,7 +47,7 @@ completely when it is no longer maintained.
 Development has not yet started on the 3.7.x release line with a targeted release date for the initial release of the
 line of 22H2.
 
-* Add support for traversals as parameters for `V()`, `is()`, and `has()`
+* Add support for traversals as parameters for `V()`, `is()`, and `has()` (includes `Traversal` arguments to `P`)
 * Geospatial support for TinkerPop (link:++https://lists.apache.org/list?dev@tinkerpop.apache.org:2021-7:DISCUSS%20geo-spatial++[DISCUSS Thread])
 * Add mid-traversal `E()` support
 * Allow properties on elements (as opposed to just references) for remote traversals
@@ -58,6 +58,9 @@ line of 22H2.
 * Date/Time manipulation functions (`dateAdd()`, `dateDiff()`, etc.)
 * Add string manipulation functions (`split()`, `substring()` etc.) (link:https://issues.apache.org/jira/browse/TINKERPOP-2672[TINKERPOP-2672])
 * Case-insensitive search (link:https://issues.apache.org/jira/browse/TINKERPOP-2673[TINKERPOP-2673])
+* Type conversion with `cast()` step
+* Mutation steps for `clone()` of an `Element` and for `moveE()` for edges.
+* Add a language element to merge `Map` objects more easily.
 
 = Proposals
 


[tinkerpop] 01/03: Fixed bug in grammar for handling empty queries.

Posted by sp...@apache.org.
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

commit 7b02a28d10ce8568b3d5a5dae05e6679b612ae63
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Aug 17 08:23:21 2022 -0400

    Fixed bug in grammar for handling empty queries.
    
    This worked in 3.5.x, but broke after some refactoring for 3.6.0 CTR
---
 CHANGELOG.asciidoc                                 |  2 +-
 .../language/grammar/GremlinQueryParserTest.java   | 32 ++++++++++++++++++++++
 gremlin-language/src/main/antlr4/Gremlin.g4        | 13 ++++-----
 3 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 5cc05c61c0..88565a0925 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,7 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 This release also includes changes from <<release-3-5-5, 3.5.5>>.
 
-
+* Fixed bug in the Gremlin grammar for parsing of empty queries.
 
 [[release-3-6-1]]
 === TinkerPop 3.6.1 (Release Date: July 18, 2022)
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinQueryParserTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinQueryParserTest.java
new file mode 100644
index 0000000000..b9d600dda8
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinQueryParserTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.language.grammar;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class GremlinQueryParserTest {
+
+    @Test
+    public void shouldParseEmpty() {
+        assertEquals("", GremlinQueryParser.parse("\"\""));
+        assertEquals("", GremlinQueryParser.parse("''"));
+    }
+}
diff --git a/gremlin-language/src/main/antlr4/Gremlin.g4 b/gremlin-language/src/main/antlr4/Gremlin.g4
index 495e318e53..33a94d4248 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -1348,7 +1348,7 @@ genericLiteralExpr
 
 genericLiteralRange
     : integerLiteral DOT DOT integerLiteral
-    | StringLiteral DOT DOT StringLiteral
+    | stringLiteral DOT DOT stringLiteral
     ;
 
 genericLiteralCollection
@@ -1400,7 +1400,8 @@ mapEntry
     ;
 
 stringLiteral
-    : StringLiteral
+    : EmptyStringLiteral
+    | NonEmptyStringLiteral
     ;
 
 integerLiteral
@@ -1421,7 +1422,8 @@ booleanLiteral
     ;
 
 stringBasedLiteral
-    : StringLiteral
+    : EmptyStringLiteral
+    | NonEmptyStringLiteral
     | NullLiteral
     | gremlinStringConstants
     ;
@@ -1641,11 +1643,6 @@ InfLiteral
 
 // String Literals
 
-StringLiteral
-    : NonEmptyStringLiteral
-    | EmptyStringLiteral
-    ;
-
 // String literal is customized since Java only allows double quoted strings where Groovy supports single quoted
 // literals also. A side effect of this is ANTLR will not be able to parse single character string literals with
 // single quoted so we instead remove char literal altogether and only have string literal in lexer tokens.


[tinkerpop] 03/03: Merge branch '3.6-dev'

Posted by sp...@apache.org.
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

commit b6442d2c2f628b26af940f7eac0d7c9a300f6673
Merge: d80b0058f4 dd5b8005f1
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Aug 17 08:28:43 2022 -0400

    Merge branch '3.6-dev'

 CHANGELOG.asciidoc                                 |  2 +-
 docs/src/dev/future/index.asciidoc                 |  5 +++-
 .../language/grammar/GremlinQueryParserTest.java   | 32 ++++++++++++++++++++++
 gremlin-language/src/main/antlr4/Gremlin.g4        | 13 ++++-----
 4 files changed, 42 insertions(+), 10 deletions(-)