diff options
| author | fukachan <fukachan> | 2003-01-11 16:10:03 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-01-11 16:10:03 +0000 |
| commit | f094c69009ee928eb5b9285fd583d829ef0d7524 (patch) | |
| tree | 3fec161fd0273c76df705569e6e9b757b777cdda | |
| parent | 8b767419408349daf574c8a5311697b56462fa7f (diff) | |
| download | fml8-f094c69009ee928eb5b9285fd583d829ef0d7524.tar.gz fml8-f094c69009ee928eb5b9285fd583d829ef0d7524.tar.bz2 fml8-f094c69009ee928eb5b9285fd583d829ef0d7524.zip | |
pick up XXX-TODO lines in source file
| -rwxr-xr-x | regress/simulation/.gen_todo.pl | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/regress/simulation/.gen_todo.pl b/regress/simulation/.gen_todo.pl new file mode 100755 index 00000000..30d31ba6 --- /dev/null +++ b/regress/simulation/.gen_todo.pl @@ -0,0 +1,46 @@ +#!/usr/bin/env perl +# +# $FML$ +# + +use strict; +use Carp; + +my $function; +my $todo = {}; +my $KEY = "__FILE_GLOBAL__"; + +while (<>) { + if (/^sub (\S+)/o) { + $function = $1; + } + + if (/^sub .*\}/o || /^\}/o) { + $function = $KEY; + } + + if (/(XXX-TODO:|XXX-TODO)\s*(.*)\s*$/o) { + my ($xtodo) = $2; + $todo->{ $ARGV }->{ $function } .= "\t". $xtodo . "\n"; + } +} + + +for my $file (sort keys %$todo) { + my $hash = $todo->{ $file }; + + $file =~ s@lib//@@g; + printf "\n%s\n", $file; + for my $k (keys %$hash) { + if ($k eq $KEY) { + my $buf = $hash->{ $k }; + $buf =~ s/\t/ /g; + print $buf; + } + else { + printf " sub %s\n%s\n", $k, $hash->{ $k }; + } + } +} + +exit 0; |
