I have a pretty similar approach to this. I built a sexp DSL for spec and I have a "compiler" which does static analysis checks and linting.