my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ;
-while (s/^
+while (s/^
( # Start $1
( # Start $2
.*? # Minimal eat content
my $i = 0 ;
my %pList = map { $_ => $i++ }
split /\s*,\s*/, $param_list;
- my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ;
+ my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ;
my @params = split /\s*;\s*/, $params;
my @outParams = ();
}
}
-
- my %tmp = map { /$pMatch/; $_ => $pList{$1} }
+
+ my %tmp = map { /$pMatch/; $_ => $pList{$1} }
@outParams ;
- @outParams = map { " $_" }
- sort { $tmp{$a} <=> $tmp{$b} }
+ @outParams = map { " $_" }
+ sort { $tmp{$a} <=> $tmp{$b} }
@outParams ;
print $prefix ;
- print "(\n" . join(",\n", @outParams) . ")\n";
+ print "(\n" . join(",\n", @outParams) . ")\n";
print "{" ;
}
)* ## 0-or-more things which don't start with /
## but do end with '*'
/ ## End of /* ... */ comment
-
+
| ## OR C++ Comment
- // ## Start of C++ comment //
+ // ## Start of C++ comment //
[^\n]* ## followed by 0-or-more non end of line characters
| ## OR various things which aren't comments:
-
+
(
" ## Start of " ... " string
(
[^"\\] ## Non "\
)*
" ## End of " ... " string
-
+
| ## OR
-
+
' ## Start of ' ... ' string
(
\\. ## Escaped char
[^'\\] ## Non '\
)*
' ## End of ' ... ' string
-
+
| ## OR
-
+
. ## Anything other char
[^/"'\\]* ## Chars which doesn't start a comment, string or escape
)