Preprocessor-based code generator