Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2533

Develop a grammar for Gremlin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.5.0
    • 3.5.0
    • process
    • None

    Description

      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-language 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.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: