changeset 289:7e4e7f864970

fix_util_regex
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 04 Feb 2020 11:35:37 +0900
parents 9471a8635489
children 63a65e3a5340
files src/gearsTools/lib/Gears/Util.pm
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gearsTools/lib/Gears/Util.pm	Tue Feb 04 09:22:07 2020 +0900
+++ b/src/gearsTools/lib/Gears/Util.pm	Tue Feb 04 11:35:37 2020 +0900
@@ -58,14 +58,14 @@
       push(@tmp_args,"enum Code $1;\n");
       my $args = $';
       #$args eq  (Impl* vm, pde_t* pgdir, char* init, uint sz, __code next(...));
-      while ($args =~ /((?:struct|union|const)\s+)?([\w*\[\]_]+)\s*(\w+),?/g) {
+      while ($args =~ /(struct|union|const)?\s*([\w*\[\]_]+)\s*(\w+),?/g) {
         my $const_type = $1;
         my $type = $2;
         my $vname = $3;
         next if ($type eq '__code');
         $type =~ s/(?:Impl|Type|Isa)/union Data/;
         my $val = "$type $vname;\n";
-        push(@tmp_args, $const_type ?  "$const_type$val" : $val);
+        push(@tmp_args, $const_type ?  "$const_type $val" : $val);
       }
       next;
     }