# HG changeset patch # User anatofuz # Date 1574505551 -32400 # Node ID 077158ea026c65790c837abf9dbaf98b920efad8 # Parent 840597c5d242e71c4e6eea53a200951c5e03f796 tweak diff -r 840597c5d242 -r 077158ea026c src/parallel_execution/tmp_tool/parse_cerate_each_context.pl --- 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 ; - } } } }