The Gremlin traversal language has a bit of a learning curve. IDE auto-complete isn’t always useful because the traversals are not strongly typed thus all steps pop-up. The key is knowing which steps apply to previous steps or what is in the current traversal path. This is an experiment to use EBNF to describe applicable steps or i.e. what comes next.

These examples were generated using Railroad Diagram generator.

addE modelled with all steps: addE

Alternate addE modelled with from/to and other general edge steps: addE2