RoseTranslateInsides.Mesa
Last Edited by: Spreitzer, April 28, 1985 3:29:42 pm 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, exportsStream, openStream, regStream: IO.STREAM,--actually TiogaStreams
partsAssertionsStream: IO.STREAM,
parseTree: REF ANYNIL,
directory, imports, exports, opened, libbed: SymbolTable ← NIL,
previewing: BOOLFALSE,
nodeCreateHacks: SymbolTable ← NIL,
nchCount, symGen: CARDINAL ← 0,
things: SymbolTable ← NIL,
used: SymbolTable ← NIL,
type: JobType ← TranslateJob,
emptyDirectory, emptyImports, emptyExports, 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 --expectingArg--BOOLEAN OF OpPrecParse.TokenClass,
eatsCedar: BOOLEANFALSE];
ops: SymbolTable;
WasRef: TYPE = REF WasRefRep; WasRefRep: TYPE = RECORD [r: ROPE];
wasRef: WasRef;
rsClass: TokenClass;
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];
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 [known: BOOL];
GetAux: PROC [name: ROPE, cellDef: CellDef, auxClass: AuxClass, auxVal: AuxVal] RETURNS [aux: ROPE];
AddDirectory, AddImport, AddExport, 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];
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, switchIORefTypeName, simpleIORefTypeName: 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.