I bet C++ can do it with some clear use of template metatprogramming, compile time evaluation and processor macros.
Nim has meta-programming capabilities, including reading files.
Not sure about Template Haskell, though.
An identical technique could be used for yacc or protobufs.
[1]: https://github.com/docopt/docopt.rs