view test/code-gen.pl @ 275:8f09f8bbc494

MIPS switch statement. basic.c passed.
author kono
date Fri, 21 May 2004 14:00:02 +0900
parents 8a72b0afccfc
children 9ff5cd7afe2f
line wrap: on
line source

#!/usr/bin/perl

print "#include \"code-gen.c\"\n";
print "int main() {\n";

while(<>)
{
    if (/^\w+\(/) {
	print "\t$&",");\n";
    } elsif (/^#/) {
	print;
    }
}
print "return 0; }\n";