chiark / gitweb /
L too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Jan 2019 02:54:57 +0000 (02:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Jan 2019 02:54:57 +0000 (02:54 +0000)
input-graph
parse-input-graph

index 1660eb9f674382f0fae390eb45ba4f7be8c29c05..1c7d6f23dfdefaa9027bd7b87558a198c0cc1dbb 100644 (file)
@@ -1,11 +1,13 @@
 purple
        Noorderzijlvest
                NZ +
+               L
                Drenthe
                Fryslan
        Fryslan
                NZ +
                N.t
+               L
                Drenthe
                Vollenhove
                Noordoostpolder +
@@ -43,6 +45,7 @@ purple
 
 high
        Drenthe
+               L
                Twente
                Vollenhove
                F.
@@ -95,18 +98,21 @@ yellow
 
 high
        Twente
+               L
                Rijn en Ijssel
                Vo.
                Dr.
 
 yellow
        Rijn en Ijssel
+               L
                Betuwe +
                Ve.
                Ij. +
                Vo. ++
                Tw.
        Betuwe
+               L
                R.e.Ij. +
                Land van Maas en Waal +
                Land van Heusden +
@@ -125,13 +131,16 @@ yellow
 
 green
        Roer en Overmaas
+               L
                Oost-Brabant
                Peel en Maasvallei +
        Peel en Maasvallei
+               L
                R.e.O. +
                Oost-Brabant
                Land van Maas en Waal +
        Land van Maas en Waal
+               L
                P.e.M. +
                Oost-Brabant
                Land van Heusden ++
@@ -139,6 +148,7 @@ green
 
 high
        Oost-Brabant
+               L
                West-Brabant
                Land van Heusden
                L..W.
@@ -159,6 +169,7 @@ green
                B.
                L.v.H. +
        West-Brabant
+               L
                De Zoom
                Schouwen-Duiveland +
                Goeree-Overflakkee +
@@ -204,10 +215,12 @@ red
        Zuid-Beveland
                S-D. +
                De Zoom
+               L
                Zeeuws-Vlaanderen +
                Walcheren +
        Zeeuws-Vlaanderen
                Z-B. +
+               L
                Walcheren +
                NZ +
        Walcheren
@@ -218,23 +231,25 @@ red
 
 high
        De Zoom
+               L
                Z-B.
                S-D.
                W-B.
 
 sea
        NZ
-               Z-V. +
-               Wa. +
-               S-D. +
-               G-O. +
-               V-P. +
-               De. +
-               Ke. +
-               Wie.
-               ZZ
-               Fr. +
                N.t +
+               Fr. +
+               ZZ
+               Wie.
+               Ke. +
+               De. +
+               V-P. +
+               G-O. +
+               S-D. +
+               Wa. +
+               Z-V. +
+               L
 
        ZZ
                NZ
@@ -244,3 +259,21 @@ sea
                Ma.
                Ke. +
                Wie.
+
+high
+       L
+               NZ
+               Z-V.
+               Z-B.
+               De Zoom
+               W-B.
+               O-B.
+               R.e.O.
+               P.e.M.
+               L..W.
+               Betuwe
+               R..Ij.
+               Tw.
+               Dr.
+               Fr.
+               N.t
index 5221c17e2670984ed5369b4e2836f6ba557a33a7..fec1ef89880645c570e6c7702879cf8c70457e18 100755 (executable)
@@ -30,7 +30,7 @@ sub read_in () {
       $ccolour = $&;
       next;
     }
-    if (my ($name, $water) = m{^\t(\S.*\w)(?: \[(\d+)\])?$}) {
+    if (my ($name, $water) = m{^\t(\S.*\w|L)(?: \[(\d+)\])?$}) {
       confess unless defined $ccolour;
       confess "$name ?" if $region{$name};
       $region{$name}{Colour} = $ccolour;
@@ -39,7 +39,7 @@ sub read_in () {
       $cregion = $name;
       next;
     }
-    if (my ($aref, $adikes) = m{^\t\t(\S.*[A-Za-z.])(?: (\+\+?))?$}) {
+    if (my ($aref, $adikes) = m{^\t\t(\S.*[A-Za-z.]|L)(?: (\+\+?))?$}) {
       my $adj = { Dikes => (length $adikes // 0), L => $. };
       if ($aref =~ m{\.}) {
        $adj->{Pattern} = $aref;
@@ -111,6 +111,7 @@ sub edges () {
     foreach my $adja (@{ $region{$ra}{Adj} }) {
       my $rb = $adja->{Name};
       my ($r0,$r1) = sort {
+       ($a eq 'L' ) <=> ($b eq 'L' ) or
        ($a eq 'NZ') <=> ($b eq 'NZ') or
         $a          cmp  $b
       } ($ra,$rb);
@@ -147,8 +148,8 @@ END
     foreach my $r1 (sort keys %{ $edges{$r0} }) {
       my $e = $edges{$r0}{$r1};
       my $r1n = $r1;
-      if ($r1 eq 'NZ') {
-       $r1n = "_NZ $r0";
+      if ($r1 eq 'NZ' || $r1 eq 'L') {
+       $r1n = "_$r1 $r0";
        next;
       }
       o "\"$r0\" -- \"$r1n\";\n";