From: Ian Jackson Date: Mon, 13 Dec 2010 02:10:40 +0000 (+0000) Subject: layout/data2safety: Transfer description of movfeatposmap, now implemented, from... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=b9445daaecdf5ff6b4a50ec39e8cbb614c07699b;p=trains.git layout/data2safety: Transfer description of movfeatposmap, now implemented, from TODO.slip-multi-movfeat --- diff --git a/TODO.slip-multi-movfeat b/TODO.slip-multi-movfeat index 64141b2..8462a01 100644 --- a/TODO.slip-multi-movfeat +++ b/TODO.slip-multi-movfeat @@ -1,15 +1,3 @@ -* new section in ours.wiring for breaking up S0 S1 S2 S3 into - P0Q0V0R0 et al. -* data2safety reads that and computes most things to have the - exploded version; the exception is layout-data.c SegPosCombInfo.pname - bidirectional mapping constructed from "movfeatposmap" lines - map from ([A-Za-z]+[0-9]+)* to ([A-Za-z]+[0-9]+)* - has two effects: - - in line_endwiring, used "forwards" - - when writing out .pname, used "backwards" - in each case we match only whole feature positions - by some suitable regexp trick - we record whether a mapping entry was used, and complain if not * movpos.c needs to be modified to cope with mixed MovPosChanges split MovPosChange into two structs, Change which is per-method diff --git a/layout/data2safety b/layout/data2safety index 4e29d12..d4935d1 100755 --- a/layout/data2safety +++ b/layout/data2safety @@ -240,6 +240,19 @@ sub line_interferences () { push @interfs, { Invert => $invert, Segs => $is }; } +# We read the movfeatmap and write out most things in the output to +# have the concrete (RHS) version; the exception is layout-data.c +# SegPosCombInfo.pname. +# +# The FeatMap is a bidirectional mapping constructed from "movfeatposmap" +# lines, a map between ([A-Za-z]+[0-9]+)* and ([A-Za-z]+[0-9]+)*. +# +# It has two effects: +# - in line_endwiring, used "forwards" +# - when writing out .pname, used "backwards" +# in each case we match only whole feature positions by regexp tricks +# we record whether a mapping entry was used, and complain if not + sub begin_movfeatposmap () { } sub line_movfeatposmap () { my ($segr,$abstr_namebase,$abstr_firstpos,$abstr_lastpos,$conc_posns) =