equal
deleted
inserted
replaced
31 |
31 |
32 $_ = ''; |
32 $_ = ''; |
33 foreach (@lines) { |
33 foreach (@lines) { |
34 # simplificated comment remover |
34 # simplificated comment remover |
35 # after the comment character no '"' is allowed! |
35 # after the comment character no '"' is allowed! |
36 s{^\s*;.*$}{}; # strip comment lines |
36 # s{^\s*;.*$}{}; # strip comment lines |
37 s{\s*;[^"]*$}{}; # strip trailing comments |
37 # s{\s*;[^"]*$}{}; # strip trailing comments |
|
38 |
|
39 # see https://regex101.com/r/cG6fK3/2 |
|
40 s{\s*(?:;)(?:(?:[^"]|"[^"]*")*$)}{}; |
38 state $line; |
41 state $line; |
39 if (my $range = /(.*)\(\s*$/ .. /(.*)\)\s*/) { |
42 if (my $range = /(.*)\(\s*$/ .. /(.*)\)\s*/) { |
40 $line .= defined $1 ? $1 : $_; |
43 $line .= defined $1 ? $1 : $_; |
41 next unless $range =~ /E0$/; |
44 next unless $range =~ /E0$/; |
42 } |
45 } |