Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    stackoverflow.com/questions/2064116/write-c-as-s-expressions Commented Jun 29, 2013 at 7:59
  • You might also want to have a look at Nu language. Yes, it isn't for C but it is really cool! programming.nu Commented Jun 29, 2013 at 8:00
  • 4
    Take a look at this C-on-top-of-Lisp compiler with macros: bit.ly/cux2i5 (sorry it's a zip file, apparently there is no project page or even a github repository). It parses C into S-expressions-based AST which is then type-checked and translated into an LLVM AST. There are two types of macros, first type is executed at the parsing stage and second type is what you're looking for, S-expressions based, executed during typing pass. See the examples in tests/ directory. P.S., it's a literate program, so here's a PDF: bit.ly/12wSMks Commented Jun 29, 2013 at 9:42