Mercurial > hg > GearsTemplate
changeset 566:dada17cba91d
interface to struct...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 23 Nov 2019 16:27:58 +0900 |
parents | a37ee31c76f0 |
children | 9adcf0da19b3 |
files | src/parallel_execution/auto_generate_context.pl src/parallel_execution/lib/Gears.pm |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/auto_generate_context.pl Sat Nov 23 16:11:19 2019 +0900 +++ b/src/parallel_execution/auto_generate_context.pl Sat Nov 23 16:27:58 2019 +0900 @@ -7,7 +7,8 @@ my @cbc_files = <DATA>; chomp @cbc_files; my $gears = Gears->new(compile_sources => \@cbc_files); -$gears->parse_all(); +$gears->extraction_dg_compile_sources(); + p $gears; __DATA__
--- a/src/parallel_execution/lib/Gears.pm Sat Nov 23 16:11:19 2019 +0900 +++ b/src/parallel_execution/lib/Gears.pm Sat Nov 23 16:27:58 2019 +0900 @@ -22,19 +22,20 @@ return bless $self, $class; } -sub parse_all { +sub extraction_dg_compile_sources { my $self = shift; for my $cbc (@{$self->{compile_sources}}) { - $self->grep_data_gears($cbc); + $self->extraction_data_gears($cbc); } } -sub grep_data_gears { +sub extraction_data_gears { my ($self, $cbc_file) = @_; open my $fh , '<', $cbc_file; while (my $line = <$fh>) { - if ($line =~ /#interface\s*"(.*\.h)"/) { - push(@{$self->{interfaces}}, $1); + if ($line =~ /#interface\s*"(.*)\.h"/) { + $self->{data_gears_with_count}->{$1}++; + push(@{$self->{interfaces}}, "$1.h"); next; }