| Akron | 049e526 | 2022-03-18 09:59:34 +0100 | [diff] [blame] | 1 | #!/usr/bin/env perl |
| 2 | use strict; | ||||
| 3 | use warnings; | ||||
| 4 | |||||
| 5 | my $init = 1; | ||||
| 6 | my $c = ''; | ||||
| 7 | foreach (<>) { | ||||
| 8 | if (s/\s +Token: \"// && s/^(\"?[^\"]*?)\".+?$/$1/g) { | ||||
| 9 | $c .= $_; | ||||
| 10 | } | ||||
| 11 | elsif (m/Text Unit Start/) { | ||||
| 12 | if ($init) { | ||||
| 13 | $init = 0; | ||||
| 14 | } else { | ||||
| 15 | $c =~ s/[\s\n\t]+//g; | ||||
| 16 | print $c,"\n"; | ||||
| 17 | $c = ''; | ||||
| 18 | }; | ||||
| 19 | }; | ||||
| 20 | }; | ||||
| 21 | |||||
| 22 | print "\n"; | ||||