BodyTile:
PROC[key: BodyTileKey]
RETURNS[cell: CellType] = {
SELECT key
FROM
[header, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaHLeftSide.sch" ];
[header, glue, between ] => cell ← Get[orig, "PLAGen.HPlaHBetween.sch" ];
[header, glue, rightSide ] => cell ← Get[orig, "PLAGen.HPlaHRightSide.sch" ];
[header, and, nc ] => cell ← Get[orig, "PLAGen.HPlaHAnd.sch" ];
[header, or, nc ] => cell ← Get[orig, "PLAGen.HPlaHOr.sch" ];
[header, or, extra ] => cell ← Get[orig, "PLAGen.HPlaHOrEx.sch" ];
[footer, glue, leftSide ] => cell ← Get[flipY, "PLAGen.HPlaHLeftSide.sch" ];
[footer, glue, between ] => cell ← Get[flipY, "PLAGen.HPlaHBetween.sch" ];
[footer, glue, rightSide ] => cell ← Get[flipY, "PLAGen.HPlaHRightSide.sch" ];
[footer, and, nc ] => cell ← Get[flipY, "PLAGen.HPlaHAnd.sch" ];
[footer, or, nc ] => cell ← Get[flipY, "PLAGen.BPlaHOr.sch" ];
[footer, or, extra ] => cell ← Get[flipY, "PLAGen.HPlaHOrEx.sch" ];
[blank, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaBLeftSide.sch" ];
[blank, glue, between ] => cell ← Get[orig, "PLAGen.HPlaBBetween.sch" ];
[blank, glue, rightSide ] => cell ← Get[orig, "PLAGen.HPlaBRightSide.sch" ];
[blank, and, nc ] => cell ← Get[orig, "PLAGen.HPlaBAnd.sch" ];
[blank, or, nc ] => cell ← Get[orig, "PLAGen.BOr.sch" ];
[blank, or, extra ] => cell ← Get[orig, "PLAGen.HPlaBOrEx.sch" ];
[conn, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaBLeftSide.sch" ];
[conn, glue, between ] => cell ← Get[orig, "PLAGen.HPlaBBetween.sch" ];
[conn, glue, rightSide ] => cell ← Get[orig, "PLAGen.HPlaCRightSide.sch" ];
[conn, and, nc ] => cell ← Get[orig, "PLAGen.HPlaBAnd.sch" ];
[conn, or, left ] => cell ← Get[orig, "PLAGen.COr.sch" ];
[conn, or, nc ] => cell ← Get[orig, "PLAGen.COrNC.sch" ];
[conn, or, extra ] => cell ← Get[orig, "PLAGen.HPlaCOrEx.sch" ];
[dataUp, glue, leftSide, big ] => cell ← Get[orig, "PLAGen.HPlaDLeftSideHot.sch" ];
[dataUp, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaDLeftSide.sch" ];
[dataUp, glue, between ] => cell ← Get[orig, "PLAGen.HPlaDBetween.sch" ];
[dataUp, glue, rightSide ] => cell ← Get[orig, "PLAGen.HPlaDRightSide.sch" ];
[dataUp, and, left ] => cell ← Get[orig, "PLAGen.DAndLt.sch" ];
[dataUp, and, right ] => cell ← Get[orig, "PLAGen.DAndRt.sch" ];
[dataUp, and, nc ] => cell ← Get[orig, "PLAGen.DAnd.sch" ];
[dataUp, or, left ] => cell ← Get[orig, "PLAGen.DOr.sch" ];
[dataUp, or, nc ] => cell ← Get[orig, "PLAGen.DOrNC.sch" ];
[dataUp, or, extra ] => cell ← Get[orig, "PLAGen.HPlaDOrEx.sch" ];
[dataDn, glue, leftSide, big ] => cell ← Get[orig, "PLAGen.HPlaDLeftSideHot.sch" ];
[dataDn, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaDLeftSide.sch" ];
[dataDn, glue, between ] => cell ← Get[flipY, "PLAGen.HPlaDBetween.sch" ];
[dataDn, glue, rightSide ] => cell ← Get[flipY, "PLAGen.HPlaDRightSide.sch" ];
[dataDn, and, left ] => cell ← Get[orig, "PLAGen.DAndLt.sch" ];
[dataDn, and, right ] => cell ← Get[orig, "PLAGen.DAndRt.sch" ];
[dataDn, and, nc ] => cell ← Get[orig, "PLAGen.DAnd.sch" ];
[dataDn, or, left ] => cell ← Get[flipY, "PLAGen.DOr.sch" ];
[dataDn, or, nc ] => cell ← Get[flipY, "PLAGen.DOrNC.sch" ];
[dataDn, or, extra ] => cell ← Get[flipY, "PLAGen.HPlaDOrEx.sch" ];
[inCntc, glue, leftSide ] => cell ← Get[orig, "PLAGen.HPlaInCntcLeftSide.sch" ];
[inCntc, glue, between ] => cell ← Get[orig, "PLAGen.HPlaInCntcBetween.sch" ];
[inCntc, glue, rightSide ] => cell ← Get[orig, "PLAGen.HPlaInCntcRightSide.sch" ];
[inCntc, and, nc ] => cell ← Get[orig, "PLAGen.HPlaInCntcAnd.sch" ];
[inCntc, or, nc ] => cell ← Get[orig, "PLAGen.HPlaInCntcOr.sch" ];
[inCntc, or, extra ] => cell ← Get[orig, "PLAGen.HPlaInCntcOrEx.sch" ];
ENDCASE};