From: Paul Brannan Date: 2007-05-03T23:22:35+09:00 Subject: Re: C DSL anyone? I wrote a tool a while back I called rubypp (pp as in preprocessor), which lets you do something like this: #include #ruby < #define FOO BAR #define BAR BAZ extern "C" { int foo(int a) { std::cout << "1" << std::endl; } int foo(double a) { std::cout << "2" << std::endl; } main() { foo(1); foo(1.0); std::cout << "1." << std::endl; } The syntax is a little odd, but it's surprisingly powerful. I use it to generate code for nodewrap. You can find it at: http://rubystuff.org/rubypp/rubypp.rb Paul