Complete Instruction Set?
Hello there! I'm working on a gremlin to SQL implementation and was wondering if there is a specification of the "instruction set" language? E.g. wikipedia states that
is compiled to something which can be uniquely stringified into
and I was wondering if the later one is specified somewhere? Thanks in advance!
3 Replies
There is an ANTLR grammar for Gremlin defined here: https://github.com/apache/tinkerpop/tree/master/gremlin-language/src/main/antlr4
The "compiled" format is called Bytecode - there are Translators that allow you to go from Bytecode back into Gremlin format in many of the supported client languages: https://tinkerpop.apache.org/docs/current/reference/#translators
Maybe of help, but there is a utility called sql2gremlin which goes the opposite direction that you're doing. Maybe you can glean from that how to translate in reverse. http://sql2gremlin.com/
GitHub
tinkerpop/gremlin-language/src/main/antlr4 at master · apache/tinke...
Apache TinkerPop - a graph computing framework. Contribute to apache/tinkerpop development by creating an account on GitHub.
Thanks a lot! This is fruitful material to explore.
an ANTLR grammar for Gremlin defined here:we've been asked this question many times and it's sort of neat to offer the ANTLR grammar as a mechanism for defining Gremlin. we still lack extensive developer step documentation. we started this, but it is slow going: https://tinkerpop.apache.org/docs/current/dev/provider/#_steps