RoseTranslateInsides.Mesa
Last Edited by: Spreitzer, January 25, 1985 11:00:05 am PST PDT PDT
DIRECTORY IO, OpPrecParse, RoseTranslateTypes, BasicTime, TiogaFileOps, Commander;
RoseTranslateInsides: CEDAR DEFINITIONS =
BEGIN OPEN RoseTranslateTypes;
Familiar Types:
TokenClassList: TYPE = LIST OF TokenClass;
TokenClass: TYPE = OpPrecParse.TokenClass;
TokenClassRep: TYPE = OpPrecParse.TokenClassRep;
Errors:
Circularity: ERROR;
Top Level Things:
Job: TYPE = REF JobRep;
JobRep: TYPE = RECORD [
exec: Commander.Handle,
rootName: ROPE,
path: LIST OF ROPENIL,
outRoot, symbolsRoot: TiogaFileOps.Ref,
from, log: IO.STREAMNIL,
errCount, warnCount, tokenCount: CARDINAL ← 0,
to, symbolsStream, typeStream, directoryStream, importsStream, openStream, regStream: IO.STREAM,--actually TiogaStreams
partsAssertionsStream: IO.STREAM,
parseTree: REF ANYNIL,
directory, imports, opened, libbed: SymbolTable ← NIL,
previewing: BOOLFALSE,
nodeCreateHacks: SymbolTable ← NIL,
nchCount, symGen: CARDINAL ← 0,
things: SymbolTable ← NIL,
used: SymbolTable ← NIL,
type: JobType ← TranslateJob,
emptyDirectory, emptyImports, emptyOpen: BOOLEANTRUE,
start: BasicTime.Pulses ← 0];
JobType: TYPE = {TranslateJob, Other};
viewerLog: IO.STREAM;
versionString: ROPE;
omitted: REF ANY;
Op: TYPE = REF OpRep;
OpRep: TYPE = RECORD [
name: ROPE,
class: ARRAY BOOLEAN OF OpPrecParse.TokenClass,
eatsCedar: BOOLEANFALSE];
WasRef: TYPE = REF WasRefRep; WasRefRep: TYPE = RECORD [r: ROPE];
wasRef: WasRef;
Procedures:
Translate: PROC [exec: Commander.Handle, rootName: ROPE, pathIn: LIST OF ROPE, type: JobType] RETURNS [errCount: CARDINAL];
ParseExpression: PROC [job: Job] RETURNS [expr: REF ANY];
dashClass, assertClass, arrowDClass, arrowVClass, fmtClass, colonClass, ltClass, gtClass, eqClass, commaClass, lambdaClass, returnClass, squareClass, applClass, rsClass, semiClass, cellClass, cellEndClass, nameClass, portsProcClass, applyClass, sfClass, isfClass, initializerClass, ioClass, stateClass, driveClass, refClass, recClass, ivClass, testClass, bbClass, stClass, expandClass, portsClass, cedarClass, initCTPropsClass, errorClass, directoryClass, importsClass, openClass, libClass, noisyErrClass, myArgClass: TokenClass;
ReduceNoisily, SimplerReduce, ReduceError, ReduceSquare, ReduceBinding, ReduceArrowD, ReduceArrowV, ReduceFmt, ReduceDash, ReduceAssert, ReduceComma, ReduceSemi, ReduceDirectory, ReduceImports, ReduceOpen, ReduceLibrary, ReduceIntElt, ReduceLambda, ReduceAppl, ReduceName, ReduceCell, ReducePortsProc, ReduceApply, ReduceStateFields, ReduceInitStateFields, ReducePorts, ReduceExpand, ReduceInitializer, ReduceTest, ReduceTestClass, ReduceAuxClass, ReduceAuxVal, ReduceEval, ReduceBBTest, ReduceSTTest, ReduceInitCTProps: OpPrecParse.Reducer;
ErrCheck: PROC [args: OpPrecParse.ArgList] RETURNS [errFound: BOOLEAN];
OpsCheck: PROC [context: REF ANY, sr: SourceRange, ops: OpPrecParse.TokenList, classes: TokenClassList] RETURNS [err: BOOL];
CedarExpressionRope: PROC [CedarExpression] RETURNS [ROPE];
CedarFromRope: PROC [r: ROPE, sr: SourceRange ← nullSR] RETURNS [CedarExpression];
CedarFromQuoted: PROC [Quoted] RETURNS [CedarExpression];
CedarFromID: PROC [ID] RETURNS [CedarExpression];
Sofar: PROC [sr: SourceRange, context, org: REF ANY] RETURNS [cd: CellDef];
InsistOnCedarChildren: PROC [context: REF ANY, sofar: REF ANY, args: OpPrecParse.ArgList] RETURNS [cs: CedarChildren, reduced: REF ANY];
AuxSpecd: PROC [name: ROPE, cellDef: CellDef, auxClass: AuxClass, auxVal: AuxVal] RETURNS [given: BOOL];
AuxKnown: PROC [name: ROPE, cellDef: CellDef, auxClass: AuxClass, auxVal: AuxVal] RETURNS [given: BOOL];
GetAux: PROC [name: ROPE, cellDef: CellDef, auxClass: AuxClass, auxVal: AuxVal] RETURNS [aux: ROPE];
AddDirectory, AddImport, AddOpen: PROC [job: Job, name: ROPE];
AddMesa: PROC [job: Job, m: Mesa];
AddSymbols: PROC [job: Job, rootName: ROPE];
AddCellClass: PROC [job: Job, cce: ccEntry];
AddCellFn: PROC [job: Job, cfe: cfEntry];
ForceMesaType: PROC [mesaType: ROPE, on: NodeType] RETURNS [forced: NodeType];
DigestInterface: PROC [context: REF ANY, iel: InterfaceEltList] RETURNS [di: DigestedInterface];
InstantiateSignalType: PROC [context: REF ANY, name: ROPE, parms: REF ANY] RETURNS [sti: SignalTypeInvocation];
TypeCheck: PROC [job: Job, defName: ROPE, args: REF ANY, interface: DigestedInterface, instanceName: ROPE];
Complain: PROC [sr: SourceRange, context: REF ANY, complaint: ROPE, v1, v2, v3, v4, v5: IO.Value ← [null[]]] RETURNS [reduced: REF ANY];
Whimper: PROC [sr: SourceRange, context: REF ANY, complaint: ROPE, v1, v2, v3, v4, v5: IO.Value ← [null[]]];
MyBreak: IO.BreakProc;
Close: PROC [job: Job];
etNames: ARRAY EvalType OF ROPE;
auxClassNames: ARRAY AuxClass OF ROPE;
auxValNames: ARRAY AuxVal OF ROPE;
TranslatePiece: PROC [job: Job, asAny: REF ANY];
WriteRegistration: PROC [to: IO.STREAM, result, name: ROPE, cellDef: CellDef];
WriteInterfaceDecls: PROC [job: Job, name, ioRefTypeName: ROPE, cellDef: CellDef, function: BOOL] RETURNS [iCount: CARDINAL];
WriteInitializer: PROC [job: Job, name: ROPE, cc: CedarChildren, cellDef: CellDef];
WriteInvocation: PROC [to: IO.STREAM, i: Invocation];
WriteExpand: PROC [job: Job, name: ROPE, ec: LORA, cellDef: CellDef];
WriteEval: PROC [job: Job, name: ROPE, et: EvalType, cc: CedarChildren, cellDef: CellDef];
WriteBindingList: PROC [to: IO.STREAM, bl: BindingList];
WriteCellFnInvocation: PROC [to: IO.STREAM, i: Invocation];
WriteArgs: PROC [to: IO.STREAM, args: Args];
InjectCedar: PROC [job: Job, cc: CedarChildren];
TestName: PROC [name: ROPE, test: TestNote, cellDef: CellDef] RETURNS [ROPE];
END.