# HG changeset patch # User Peter Gervai # Date 1633179881 -7200 # Node ID 5c38653bd7e70dbb8947870d1b868b831efe21c8 # Parent 72f6df1085b7697b3a34942b8ec9f9b1b29bd5cf perlgrok.pl: sanitize labels even if there was no macro replacement (manual capture groups) diff -r 72f6df1085b7 -r 5c38653bd7e7 perlgrok.pl --- a/perlgrok.pl Thu Sep 30 16:01:20 2021 +0200 +++ b/perlgrok.pl Sat Oct 02 15:04:41 2021 +0200 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: perlgrok.pl,v 87c55c058b6a 2021/09/30 14:00:47 grin $ +# $Id: perlgrok.pl,v 43b8b0709ac5 2021/10/02 13:03:51 grin $ # # grok parser in perl # @@ -43,7 +43,7 @@ ) or die "error in command line arguments"; if( $help ) { - my $VER = '$Id: perlgrok.pl,v 87c55c058b6a 2021/09/30 14:00:47 grin $'; + my $VER = '$Id: perlgrok.pl,v 43b8b0709ac5 2021/10/02 13:03:51 grin $'; print "$0 $VER (c) Peter 'grin' Gervai, 2021\n\n"; print "Usage: $0 [--input input_file] [--pattern pattern_file] [--pattern another] [--top final_macro] \n"; print " [--parsed parsed_outfile] [--failed failed_lines_file] [--debug n] [--help]\n"; @@ -162,6 +162,9 @@ } } + # sanitize macros where no resolve was necessary but manual entries may still screw perl up + &sanitize_labels( \$data ); + # update macro in %input with fully resolved line $input{$key} = $data; &d(7, "RESOLVED '$key'! Result=/$data/");