-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a DSL to describe a consumer chain #2
Comments
Commit b77596a adds a CliConsumer. The CliConsumer should have an option to read a DSL file to describe the consumer chain. |
Alternatively, we can use JSR 233: Scripting for the Java Platform, with any of the supported languages (there are many) to parse some dynamic scripting language. I'm thinking either Javascript or Ruby (or both). http://www.drdobbs.com/jvm/jsr-223-scripting-for-the-java-platform/215801163 |
Looks like Javascript support is distributed with Java:
|
So adding support for any scripting language is as easy as making the JRuby docs: https://github.com/jruby/jruby/wiki/Embedding-with-JSR-223 |
This article (http://zeroturnaround.com/rebellabs/why-you-should-tap-into-the-power-of-ruby-from-the-comfort-of-the-jvm/) recommends using JRuby Embed (originally called RedBridge) instead of JSR 223, however, we should probably stick to JSR 223 to make adding other languages easy. RedBridge explained: https://github.com/jruby/jruby/wiki/RedBridge |
Adding this to
Yields:
Very nice. |
Currently, to create a consumer chain that operates on an SVN Dump stream you must write Java code, compile it into your JAR and then run it on your SVN dump file. It is a tedious process.
To make this easier, we can create a DSL that describes a consumer chain. The file that describes the consumer chain can be read at runtime and the consumer chain be generated dynamically, requiring no recompilation.
This will make running the program from the CLI much easier.
The DSL should be implemented in JavaCC.
The text was updated successfully, but these errors were encountered: