changeset 569:077158ea026c

tweak
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sat, 23 Nov 2019 19:39:11 +0900
parents 840597c5d242
children 1233236c244d
files src/parallel_execution/tmp_tool/parse_cerate_each_context.pl
diffstat 1 files changed, 3 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/tmp_tool/parse_cerate_each_context.pl	Sat Nov 23 19:36:57 2019 +0900
+++ b/src/parallel_execution/tmp_tool/parse_cerate_each_context.pl	Sat Nov 23 19:39:11 2019 +0900
@@ -5,7 +5,7 @@
 
 my $context = shift // "context.h";
 
-open my $fh, '<', $context; 
+open my $fh, '<', $context;
 while (my $line = <$fh>) {
   if ($line =~ /^union Data \{/) {
     last;
@@ -22,29 +22,9 @@
     my $struct = $1;
     $line = shift @context_cg_str;
     while ($line !~  /\}\s*$struct/) {
-      if ($line =~ /\s*([\w ]+)\s*\{/) {
-        my $tmps = $1;
-        my @tmpl = ();
-        $line = shift @context_cg_str;
-        while ($line !~ /}/) {
-          $line =~ s/\s+([\*\w ]+);/$1/g;
-          push (@tmpl,$line);
-          $line = shift @context_cg_str;
-        }
-        push (@{$res->{$struct}},{ $tmps => \@tmpl});
-        $line = shift @context_cg_str;
-        while ($line =~ /}/) {
-          $line = shift @context_cg_str;
-        }
-        unshift(@context_cg_str,$line);
-        last;
-      }
-      if ($line =~ /\s+([\*\w ]+);/) {
-        push (@{$res->{$struct}},$1);
-      }
-      if (@context_cg_str) {
+        $line =~ s/\s+([\*\w ]+);/$1/;
+        push (@{$res->{$struct}},$line);
         $line = shift @context_cg_str ;
-      }
     }
   }
 }