- 论坛徽章:
- 7
|
则:~- my @inf = "program main()\n";
- push @inf, "\n";
- push @inf, "input aor, \n";
- push @inf, "input test bor, \n";
- push @inf, "input test cor, \n";
- my $inf = join '', @inf[ 2 .. 4 ];
- if ( $inf =~ /input\s+test\s+(bor),/ ) {
- my ( $uppercase, $lowercase ) = ( uc $1, lc $1 );
- push @inf, "\n";
- push @inf, "output aor_t; \n";
- push @inf, "\n";
- push @inf, "\n";
- push @inf,
- "AAA_level aaa_testnode_($uppercase) ( mux_i( test_src ),"
- . " mux_o( test_$lowercase ), div( $lowercase ) ) \n";
- push @inf, "\n";
- }
- else {
- push @inf, "\n";
- push @inf, "Fail found!\n";
- push @inf, "\n";
- }
- push @inf, "\n";
- push @inf, "endprogram\n";
- open my $INF, ">", "wrd_wist.c";
- print $INF @inf;
复制代码 |
|