Skip to content

Commit 4d9feb0

Browse files
Mandatory message
1 parent 1dc6d10 commit 4d9feb0

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

faster.regex.pl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ sub register_normal_decl {
2727
my $poslast = pos();
2828
my $ident = $_[0];
2929
$matches[-1]{'ident'} = $ident;
30-
CORE::print ("registering " . $ident . " " . $matches[-1]{typedefkey} . "\n");
30+
#CORE::print ("registering " . $ident . " " . $matches[-1]{typedefkey} . "\n");
3131
register_decl($matches[-1]);
3232
push_decl($poslast, $ident)
33-
}
34-
35-
1
33+
}

parse.pl

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
use experimental 'switch';
5252

5353
use File::Basename;
54+
use Data::Dumper;
55+
use POSIX;
5456

5557
$genml = $ENV{'GENMLJSON'};
5658

@@ -62,15 +64,18 @@
6264
$silent = $ENV{'SILENT'};
6365
$lineonly = $ENV{'LINEONLY'};
6466
$maxthreads = $ENV{'MAXTHREADS'};
67+
@printprops = split //, $ENV{'PRINTPROPS'};
6568

6669
#my sub Dumper {"\n"}
6770
#use Data::Dumper;
68-
my sub print {CORE::print(@_) if( 1 )}
69-
my sub print2 {CORE::print(@_) if(1)}
70-
sub print3 {CORE::print(@_) if( 1)}
71-
sub Dumper2 {use Data::Dumper; CORE::print(Dumper(@_)) }
72-
my sub Dumper {use Data::Dumper; Dumper(@_) if( 1 )}
73-
my sub strftime {use POSIX; strftime(@_) if( 1 )}
71+
my sub print {CORE::print(@_) if( $printprops[0] eq 1)}
72+
my sub print2 {CORE::print(@_) if($printprops[1] eq 1)}
73+
sub print3 {CORE::print(@_) if( $printprops[2] eq 1)}
74+
sub Dumper2 {CORE::print(Data::Dumper::Dumper(@_)) }
75+
my sub Dumper {Data::Dumper::Dumper(@_) if( $printprops[3] eq 1 )}
76+
my sub strftime {POSIX::strftime(@_) if( $printprops[4] eq 1 )}
77+
78+
Dumper2(\@printprops);
7479

7580
sub push2 {
7681
my @args = @_;
@@ -353,11 +358,11 @@ sub dec {
353358

354359
my $matchinperl = 0;
355360

356-
chdir "regexes";
361+
#chdir "regexes";
357362

358363
$mainregexfilecontent =~/$utilregexfilecontent/;
359364

360-
chdir "..";
365+
#chdir "..";
361366

362367
#(?{parseregexfile($+{filename})})
363368
#(?{entryregexmain($+{entrygroup}, $+{prefix})})
@@ -1033,7 +1038,7 @@ sub waitforid {
10331038
while($subject =~ m{$compreg}gxxs) {
10341039
#CORE::print($lastposcurrlast . "\n");
10351040
$lasrtypedefobj = {%{$typedefidentifiersvector->[0]}};
1036-
$lastposcurrlast = $+[0];
1041+
$lastposcurrlast = pos($subject);
10371042
}
10381043

10391044
if(!($subject =~ m{$}sxxg)) {

primexpr.regex.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,4 @@ sub end_binary {
3232
my $res = shift;
3333
print $$res = not existsflag "ternaryexpr", {"normalexpr"}, $flagsarg;
3434
}
35-
=cut
36-
37-
1
35+
=cut

typename.regex.pl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ sub checkidentpermissive {
165165
sub checktypeorqualifortypdf {
166166
#print3 "checking". $^N . "\n";
167167

168-
my $force = $_[0];
169-
my $callnot = $_[1];
168+
my $force = scalar $_[0];
169+
my $callnot = scalar $_[1];
170170

171171
#inc2 "facet";
172172
#CORE::print ("dumping\n");
@@ -268,5 +268,3 @@ sub declident {
268268
return checktypeorqualif($^N)
269269
}
270270
}
271-
272-
1

0 commit comments

Comments
 (0)