Here's a completely different request... How about Lua sending the text through some preprocessor first? #define #include #ifdef #end (or however that goes) and all the other fun pre-processor directives.