I am generating C code from a domain-specific language using javacc and I would like a FOSS code reformatter library (jar) that I can invoke on the produced source code to make it readable. Anyone know such a beast?
Brownie points for maven dependency entry in answer 🙂
Given that you are producing C code, try a C beautifier. If that is suitable, then
Best C++ Code Formatter/Beautifier
is a question that answers which one.
Good luck on the DSL. I’ve done a bunch of them, but using javacup, yacc and spirit rather than JavaCC if you need help, feel free to contact directly