DIRECTORY Convert USING [ CardFromRope, RopeFromRope ], Rope USING [ ROPE ], SiroccoATDef USING [ ConstantNode ], SiroccoBaseDef USING [ ], SiroccoCGDef USING [ Generic, idNode, decimalNode, hexNode, octalNode, ropeNode ], SiroccoPrivate USING [ CComponent, CComponentBody, CType, CTypeBody, FunctionList, TABLES ], SymTab USING [ Key ]; SiroccoDupOps: CEDAR PROGRAM IMPORTS Convert EXPORTS SiroccoBaseDef ~ { OPEN SiroccoBaseDef, SiroccoCGDef, SiroccoPrivate; ROPE: TYPE ~ Rope.ROPE; card: PUBLIC PROC [in: INT] RETURNS [out: CARD] ~ { out _ CARD[in] }; int: PUBLIC PROC [in: CARD] RETURNS [out: INT] ~ { out _ INT[in] }; nat: PUBLIC PROC [in: INT] RETURNS [out: NAT] ~ { out _ NAT[in] }; TextFromID: PUBLIC PROC [id: idNode] RETURNS [text: ROPE] ~ { text _ id.text }; CardFromDecimal: PUBLIC PROC [decimal: decimalNode] RETURNS [card: CARD] ~ { card _ Convert.CardFromRope[decimal.text] }; CardFromHex: PUBLIC PROC [hex: hexNode] RETURNS [card: CARD] ~ { card _ Convert.CardFromRope[hex.text, 16] }; CardFromOctal: PUBLIC PROC [octal: octalNode] RETURNS [card: CARD] ~ { card _ Convert.CardFromRope[octal.text, 8] }; GetRopeFromRope: PUBLIC PROC [rope: ropeNode] RETURNS [r: ROPE] ~ { r _ Convert.RopeFromRope[rope.text, TRUE] }; -- FALSE? False: PUBLIC PROC [ ] RETURNS [false: BOOL] ~ { false _ FALSE }; True: PUBLIC PROC [ ] RETURNS [true: BOOL] ~ { true _ TRUE }; AddOne: PUBLIC PROC [in: INT] RETURNS [out: INT] ~ { out _ in.SUCC }; Add: PUBLIC PROC [a, b: INT] RETURNS [c: INT] ~ { c _ (a + b) }; Subtract: PUBLIC PROC [a: INT, b: INT] RETURNS [c: INT] ~ { c _ (a - b) }; Copy: PUBLIC PROC [t1: ROPE, t2: CType, t3: SiroccoATDef.ConstantNode, t4: TABLES] RETURNS [ROPE, CType, SiroccoATDef.ConstantNode, TABLES] ~ { RETURN[t1, t2, t3, t4] }; CopyAll: PUBLIC PROC [in1: ROPE, in2: FunctionList, in3: TABLES] RETURNS [out1: ROPE, out2: FunctionList, out3: TABLES] ~ { out1 _ in1; out2 _ in2; out3 _ in3; }; CopyCComponent: PUBLIC PROC [in: CComponent] RETURNS [out: CComponent] ~ { out _ in }; CopyFunctionList: PUBLIC PROC [in: FunctionList] RETURNS [out: FunctionList] ~ { out _ in }; CopyRope: PUBLIC PROC [in: ROPE] RETURNS [out: ROPE] ~ { out _ in }; CopyTables: PUBLIC PROC [t1: TABLES] RETURNS [t2: TABLES] ~ { t2 _ t1 }; CreateKey: PUBLIC PROC [id: idNode] RETURNS [key: ROPE] ~ { key _ id.text }; RopeFromKey: PUBLIC PROC [key: SymTab.Key] RETURNS [rope: ROPE] ~ { rope _ key }; NotEnumeration: PUBLIC PROC[type: CType] RETURNS [result: BOOLEAN] ~ { result _ NOT ( type.class = enum ) }; MkCComponent: PUBLIC PROC [name: ROPE, valBinding: INT, typeBinding: ROPE, sibling: CComponent] RETURNS [new: CComponent] ~ { new _ NEW[CComponentBody _ [name: name, sibling: sibling, type: typeBinding, val: valBinding]] }; MkCType: PUBLIC PROC [class: SiroccoCGDef.Generic, bound: INT, children: CComponent] RETURNS [new: CType] ~ { new _ NEW[CTypeBody _ [bound: bound, children: children, class: class]] }; MkNILCComponent: PUBLIC PROC RETURNS [nil: CComponent] ~ { nil _ NIL }; }. BSiroccoDupOps.Mesa Copyright Σ 1986, 1987 by Xerox Corporation. All rights reserved. Bill Jackson (bj) July 28, 1987 2:28:40 am PDT Since Casaba only understands INTs values from tokens values / constant fcns Arithmetic Operations Convince Casaba that things are undamaged Hash Keys Predicates Record Constructors Κ˜codešœ™KšœB™BK™.—K˜šΟk ˜ Kšœœ ˜-Kšœœœ˜Kšœ œ˜$Kšœœ˜Kšœ œ@˜RKšœœ?œ˜\Kšœœ ˜—K˜šΟn œœ˜Kšœ˜Kšœ˜Kšœ.˜2Kšœœœ˜headšΟz"™"KšΟbœœœœœœ œ˜EKš œœœœœœ œ˜DKš œœœœœœ œ˜C—šŸ™Kš ž œœœœœ˜OKš žœœœœœ2˜yKš ž œœœœœ2˜mKš ž œœœœœ3˜tKšžœœœœœ*œΟcΠcs‘˜z—šŸ™Icode40š žœœœœ œœ˜AMš žœœœœœ œ˜=—šŸ™Kšžœœœœœœœ˜EKš žœœœœœœ˜@Kšžœœœœœœœ˜J—šŸ)™)Kšžœœœœ0œœœ$œœ˜©Kšžœœœœœœœœ-˜£Kšžœœœœ"˜VKšžœœœœ$˜\Kš žœœœœœœ˜DKš ž œœœœœœ˜H—šŸ ™ Kš ž œœœœœ˜LKš ž œœœœœ˜Q—šŸ ™ Kš žœœœœ œœ˜l—šŸ™Kšž œœœœœœœœX˜ίKš žœœœ&œœœA˜ΉKš žœœœœœ˜GK˜—Kšœ˜K˜—J˜—…— Ά