--- /dev/null
+#!/usr/bin/perl -w
+
+use strict;
+use Carp;
+
+BEGIN { unshift @INC, qw(.); }
+
+use Parse;
+
+our ($plagf) = @ARGV or die;
+
+parse_input_graph();
+
+our %prs2region;
+our %v2pos;
+
+foreach my $rn (keys %region) {
+ my $prs = plag_prs($rn);
+ die if $prs2region{$prs};
+ $prs2region{$prs} = $rn;
+}
+
+my $sre = qr{(\")(.*)\1$}; # 2 captures, $2 is the name
+
+open P, "<", $plagf or die $!;
+while (<P>) {
+ if (m/^$sre#/) {
+ my $invertex= $2;
+ } elsif (m/^ \@(.*),(.*)$/) {
+ die unless $invertex;
+ $v2pos{$invertex} = [ $1,$2 ];
+ } elsif (m/^ \^lface $sre$/) {
+ die unless $invertex;
+
+
+# Local variables:
+# cperl-indent-level: 2
+# End.