Mercurial > hg > Members > menikon > CbC_xv6
changeset 163:d116d737fed0
tweak trans_impl.pl
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 15 Jan 2020 16:34:37 +0900 |
parents | efff86f375ed |
children | 9c501dca25e3 |
files | src/gearsTools/trans_impl.pl |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gearsTools/trans_impl.pl Wed Jan 15 16:26:44 2020 +0900 +++ b/src/gearsTools/trans_impl.pl Wed Jan 15 16:34:37 2020 +0900 @@ -75,6 +75,11 @@ EOF for my $datum (@impl_data) { + $datum =~ s|//[\s\w]+||; + if ($datum =~ /^\s+#/) { + next; + } + if ($datum =~ /\w+\s\w+\*\s(\w+)/) { print $out " ${instance_impl}->$1 = NULL;\n"; next; @@ -95,6 +100,12 @@ } for my $datum (@inter_data) { + # remove macro, comment block + $datum =~ s|//[\s\w]+||; + if ($datum =~ /^\s+#/) { + next; + } + if ($datum =~ /\w+\s\w+\*\s(\w+)/) { print $out " ${instance_inter}->$1 = NULL;\n"; next;