diff test/code-gen.pl @ 526:9ff5cd7afe2f

*** empty log message ***
author kono
date Wed, 28 Dec 2005 15:45:39 +0900
parents 8a72b0afccfc
children df60b120675d
line wrap: on
line diff
--- a/test/code-gen.pl	Wed Dec 28 11:32:22 2005 +0900
+++ b/test/code-gen.pl	Wed Dec 28 15:45:39 2005 +0900
@@ -1,14 +1,29 @@
 #!/usr/bin/perl
 
+my $call;
+
+open(INLINE,">test/code-gen-inline.c");
+
 print "#include \"code-gen.c\"\n";
-print "int main() {\n";
+
+$call .=  "int main() {\n";
 
 while(<>)
 {
-    if (/^\w+\(/) {
-	print "\t$&",");\n";
+    if (/^(\w+)(\(.*)/) {
+	$call .= "\t$1(".");\n";
+	print INLINE "inline $1$2";
     } elsif (/^#/) {
-	print;
+	$call .= $_;
+	print INLINE;
+    } else {
+	print INLINE;
     }
 }
-print "return 0; }\n";
+$call .=  "return 0; }\n";
+
+print $call;
+
+print INLINE $call;
+
+# end