source-to-source compiling of a DSL with Spoon
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
@andrewbwogi is interested in having a DSL extending Java which would be compiled source-to-source before compilation to bytecode with javac.
The source-to-source automated compilation is a solved problem, this would be done with https://github.com/SpoonLabs/spoon-maven-plugin
Now about the DSL, there are 3 options:
1. An annotation-based DSL with compile-time processing, this is easy, see chapter 3.4 of [Spoon: A Library for Implementing Analyses and Transformations of Java Source Code](https://hal.inria.fr/hal-01078532/file/article.pdf)
1. An embedded DSL with source-to-source compilation. This seems perfectly doable with Spoon but I don't have a concrete pointer on the top of my head
1. A syntactic Java extension. This requires some parsing that is out of the scope of Spoon. Note that [JastAdd](https://bitbucket.org/jastadd/jastadd2) is an option for this but not integrated with the Spoon analysis and transformation engine.
Any pointer on this @combemale, @jurgenvinju, @gorelhedin?
Contributor guide
Assessment
This issue has not been assessed yet.