ProcessEachLine:
PROC [pinTable: PinTable, line:
ROPE] ~ {
c: CHAR;
pinInfoList: PinInfoList;
pinInfo: PinInfo;
in: IO.STREAM ← IO.RIS[line];
key: ROPE ← IO.GetTokenRope[in, TokenProc1].token;
[] ← IO.GetTokenRope[in, TokenProc1]; --Skips two token
[] ← IO.GetTokenRope[in, TokenProc1];
pinInfo.refDes ← IO.GetTokenRope[in, TokenProc1].token;
IF Rope.Equal[pinInfo.refDes, "?"]
THEN {
-- Symbol not yet placed
pinInfo.refDes ← NIL;
[] ← IO.GetTokenRope[in, TokenProc1];
pinInfo.pinNumber ← 0;
}
ELSE {
pinInfo.pinNumber ← IO.GetInt[in];
};
[] ← IO.GetChar[in]; -- Skips one character
c ← IO.GetChar[in];
IO.Backup[in, c];
IF c = '
THEN {
-- Tests the presence of a symbol pin mame
pinInfo.symbolPinName ← NIL
}
ELSE {
pinInfo.symbolPinName ← IO.GetTokenRope[in, TokenProc1].token;
};
[] ← IO.GetTokenRope[in, TokenProc1];
pinInfo.pageNumber ←
IO.GetInt[in];
Possible to land here if the pin name has a wrong character (ie a space) ...
pinInfoList ← NIL;
IF SymTab.Fetch[pinTable, key].found
THEN {
pinInfoList ← NARROW[SymTab.Fetch[pinTable, key].val];
};
pinInfoList ← CONS[pinInfo, pinInfoList];
[] ← SymTab.Store[pinTable, key, pinInfoList];
};