Stephen Mallette created TINKERPOP-2533:
-------------------------------------------

             Summary: Develop a grammar for Gremlin
                 Key: TINKERPOP-2533
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2533
             Project: TinkerPop
          Issue Type: Improvement
          Components: process
    Affects Versions: 3.5.0
            Reporter: Stephen Mallette
            Assignee: Stephen Mallette


An ANTLR grammar for Gremlin would allow us to look at Gremlin as more of a 
language and to independently consider how that language gets implemented in 
each variant. By driving the language development through the grammar rather 
than through Java (as we do now), we can avoid problems where Java-oriented 
idioms leak into other programming language implementations. 

For this initial body of work, the contribution will contain:

* a new {{gremlin-grammar}} maven module
* which will have a ANTLR4 grammar file 
* tests for the parser which will extract a corpus of Gremlin traversal from 
the gherkin tests and the documentation

This initial contribution will have some limitations initially where certain 
types of statements from the testing corpus are simply not supported by the 
grammar as it is today. Much of this will have limitation will have to do with 
examples using Groovy syntax and lambdas, but there are yet places where the 
grammar needs further development. Those limitations can be satisfied by other 
pull requests. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to