[
https://issues.apache.org/jira/browse/TINKERPOP-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15944978#comment-15944978
]
Florian Hockmann commented on TINKERPOP-786:
--------------------------------------------
Since all GLVs will probably use some form of code generator which will most
likely be based on gremlin-java, I think the best option here would be to make
those generators flexible enough so that they can be used with a DSL defined by
users.
When we define a common interface for the GLV generators, then users can simply
call the generators on their own DSL and get the DSL in all GLVs.
Maybe the interfaces could look something like this:
# {{GraphTraversalGenerator}}: Takes a {{GraphTraversal}} class or a class
derived from that as its input
# {{GraphTraversalSourceGenerator}}: Takes a {{GraphTraversalSource}} class or
a class derived from that as its input
# {{EnumGenerator}}: Takes an enum class as its input (like {{T}})
# {{PredicateGenerator}}: Takes a predicate class as its input (like {{P}})
This would probably require some modifications to the existing GLV generators
so that they implement those interfaces and also to make them flexible enough
to work with a DSL (e.g. the generator should not only expect a
{{GraphTraversal}} as the return type for steps but also a type that derives
from that).
> Patterns for DSL Development
> ----------------------------
>
> Key: TINKERPOP-786
> URL: https://issues.apache.org/jira/browse/TINKERPOP-786
> Project: TinkerPop
> Issue Type: Improvement
> Components: documentation
> Affects Versions: 3.0.2-incubating
> Reporter: stephen mallette
> Assignee: stephen mallette
> Fix For: 3.2.5
>
>
> Develop and document the patterns for custom DSLs. The method previously
> described and under consideration at 3.0.0 seems a bit cumbersome to deal
> with.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)