SELECT code
FROM
definition => {
name: CHAR ~ GetChar[tsd.ts, i.SUCC];
defn: Type;
IF tsd.defs[name] # [] THEN CCE[cirioError, IO.PutFR["double def of %02xH at pos %g", [cardinal[name.ORD]], [integer[i]] ]];
tsd.defs[name] ¬ [i+2, DeferringTypes.CreateDeferringType[rmtw.cc]];
[defn, i] ¬ AnalyzeTs[rmtw, tsd, i+2];
DeferringTypes.SetUndertype[tsd.defs[name].type, defn];
RETURN [tsd.defs[name].type, i]};
name => {
name: CHAR ~ GetChar[tsd.ts, i.SUCC];
IF tsd.defs[name]=[] THEN RETURN [CedarOtherPureTypes.CreateUnknownType[rmtw.cc, IO.PutFR["undefined reference %02xH at pos %g in TS for TC %g", [cardinal[name.ORD]], [integer[i]], [cardinal[tsd.tc]] ]], i+2];
RETURN [tsd.defs[name].type, i+2]};
union => RETURN AnalPaint[rmtw, tsd, i.SUCC, FALSE];
array => RETURN AnalArrayTs[rmtw, tsd, i.SUCC, opts];
sequence => RETURN BreakBinary["sequence", i.SUCC];
opaque => RETURN AnalPaint[rmtw, tsd, i.SUCC, TRUE];
countedZone => RETURN [MakeBrokenType[rmtw, "countedZone", 32], i.SUCC];
uncountedZone => RETURN [MakeBrokenType[rmtw, "uncountedZone", 32], i.SUCC];
list => RETURN BreakUnary["list", i.SUCC];
relativeRef => RETURN BreakBinary["relativeRef", i.SUCC];
ref => RETURN BreakUnary["ref", i.SUCC];
refAny => RETURN [MakeBrokenType[rmtw, "refAny", 32], i.SUCC];
pointer => RETURN BreakUnary["pointer", i.SUCC];
longPointer => RETURN BreakUnary["longPointer", i.SUCC];
descriptor => RETURN BreakUnary["descriptor", i.SUCC];
longDescriptor => RETURN BreakUnary["longDescriptor", i.SUCC];
port => RETURN BreakBinary["port", i.SUCC];
process => RETURN BreakUnary["process", i.SUCC];
program => RETURN BreakBinary["program", i.SUCC];
type => RETURN [MakeBrokenType[rmtw, "type", 32], i.SUCC];
any => RETURN [MakeBrokenType[rmtw, "any", 32], i.SUCC];
boolean => RETURN [CreateAnalyzedBOOL[rmtw], i.SUCC];
unspecified => RETURN [MakeBrokenType[rmtw, "unspecified", 32], i.SUCC];
procedure => RETURN AnalProcTs[rmtw, tsd, i.SUCC, opts];
signal => RETURN BreakBinary["signal", i.SUCC];
error => RETURN BreakBinary["error", i.SUCC];
cardinal, longCardinal => RETURN [AnalCntd[rmtw, [32, unsigned[full[]]]], i.SUCC];
integer, longInteger => RETURN [AnalCntd[rmtw, [32, signed[full[]]]], i.SUCC];
character => RETURN [MakeBrokenType[rmtw, "character", 32], i.SUCC];
stringBody => RETURN [MakeBrokenType[rmtw, "stringBody", 64], i.SUCC];
text => RETURN [MakeBrokenType[rmtw, "text", 64], i.SUCC];
atomRec =>
RETURN [
IF rmtw.atomRecRT#
NIL
THEN rmtw.atomRecRT
ELSE CedarOtherPureTypes.CreateUnknownType[rmtw.cc, "AtomRec not yet analyzed"],
i.SUCC];
mds => RETURN AnalyzeTs[rmtw, tsd, i.SUCC, TsoSet[opts, mds]];
ordered => RETURN AnalyzeTs[rmtw, tsd, i.SUCC, TsoSet[opts, ordered]];
packed => RETURN AnalyzeTs[rmtw, tsd, i.SUCC, TsoSet[opts, packed]];
readOnly => RETURN AnalyzeTs[rmtw, tsd, i.SUCC, TsoSet[opts, readOnly]];
real => RETURN [AnalCntd[rmtw, [32, real[]]], i.SUCC];
paint => RETURN AnalPaint[rmtw, tsd, i.SUCC, FALSE];
leftParen => RETURN AnalyzeTsRecord[rmtw, tsd, i.SUCC];
safeProc => RETURN BreakBinary["safeProc", i.SUCC];
safe => RETURN AnalyzeTs[rmtw, tsd, i.SUCC, TsoSet[opts, safe]];
var => RETURN BreakUnary["var", i.SUCC];
longUnspecified => RETURN [MakeBrokenType[rmtw, "longUnspecified", 32], i.SUCC];
dcard => RETURN [AnalCntd[rmtw, [64, unsigned[full[]]]], i.SUCC];
dint => RETURN [AnalCntd[rmtw, [64, signed[full[]]]], i.SUCC];
dreal => RETURN [AnalCntd[rmtw, [64, real[]]], i.SUCC];
ENDCASE => CCE[unimplemented, IO.PutFR["unimplemented code %02xH at pos %g", [cardinal[byte]], [integer[i]] ]];