RiscAssemblerAGImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by hederman.pa at July 15, 1987 4:53:07 pm PDT
using ThreeCasabaFour [1.2] of June 1, 1987 6:00:00 pm PDT
DIRECTORY
RiscAssemblerAGDef,
RiscAssemblerATDef,
RiscAssemblerTokenDef;
RiscAssemblerAGImpl: CEDAR PROGRAM IMPORTS RiscAssemblerAGDef EXPORTS RiscAssemblerAGDef=
BEGIN
OPEN RiscAssemblerAGDef, RiscAssemblerATDef, RiscAssemblerTokenDef;
ProgramlistProd
ProgramlistProdProcs: PUBLIC ProgramNodeProcs ←
NEW[ProgramNodeProcsBody ← [ProgramlistProdAssemble]];
BuildProgramlistProdNode: PUBLIC PROC[position: INT, length: INT, List: ListNode]
RETURNS[ProgramNode] =
BEGIN
data: ProgramlistProdData ←
NEW[ProgramlistProdDataBody ← [
List]];
RETURN[NEW[ProgramNodeBody←[position, length, ProgramlistProdProcs, data]]];
END;
ListstatementProd
ListstatementProdProcs: PUBLIC ListNodeProcs ←
NEW[ListNodeProcsBody ← [ListstatementProdSymbolTable, ListstatementProdCodeSequence]];
BuildListstatementProdNode: PUBLIC PROC[position: INT, length: INT, Statement: StatementNode]
RETURNS[ListNode] =
BEGIN
data: ListstatementProdData ←
NEW[ListstatementProdDataBody ← [
Statement]];
RETURN[NEW[ListNodeBody←[position, length, ListstatementProdProcs, data]]];
END;
ListdangleProd
ListdangleProdProcs: PUBLIC ListNodeProcs ←
NEW[ListNodeProcsBody ← [ListdangleProdSymbolTable, ListdangleProdCodeSequence]];
BuildListdangleProdNode: PUBLIC PROC[position: INT, length: INT, Statement: StatementNode]
RETURNS[ListNode] =
BEGIN
data: ListdangleProdData ←
NEW[ListdangleProdDataBody ← [
Statement]];
RETURN[NEW[ListNodeBody←[position, length, ListdangleProdProcs, data]]];
END;
ListconsProd
ListconsProdProcs: PUBLIC ListNodeProcs ←
NEW[ListNodeProcsBody ← [ListconsProdSymbolTable, ListconsProdCodeSequence]];
BuildListconsProdNode: PUBLIC PROC[position: INT, length: INT, Statement: StatementNode, List: ListNode]
RETURNS[ListNode] =
BEGIN
data: ListconsProdData ←
NEW[ListconsProdDataBody ← [
Statement, List]];
RETURN[NEW[ListNodeBody←[position, length, ListconsProdProcs, data]]];
END;
StatementlabelProd
StatementlabelProdProcs: PUBLIC StatementNodeProcs ←
NEW[StatementNodeProcsBody ← [StatementlabelProdSymbolTable, StatementlabelProdCodeSequence]];
BuildStatementlabelProdNode: PUBLIC PROC[position: INT, length: INT, Label: LabelNode, Statement: StatementNode]
RETURNS[StatementNode] =
BEGIN
data: StatementlabelProdData ←
NEW[StatementlabelProdDataBody ← [
Label, Statement]];
RETURN[NEW[StatementNodeBody←[position, length, StatementlabelProdProcs, data]]];
END;
StatementopProd
StatementopProdProcs: PUBLIC StatementNodeProcs ←
NEW[StatementNodeProcsBody ← [StatementopProdSymbolTable, StatementopProdCodeSequence]];
BuildStatementopProdNode: PUBLIC PROC[position: INT, length: INT, Op: OpNode]
RETURNS[StatementNode] =
BEGIN
data: StatementopProdData ←
NEW[StatementopProdDataBody ← [
Op]];
RETURN[NEW[StatementNodeBody←[position, length, StatementopProdProcs, data]]];
END;
StatementoprandProd
StatementoprandProdProcs: PUBLIC StatementNodeProcs ←
NEW[StatementNodeProcsBody ← [StatementoprandProdSymbolTable, StatementoprandProdCodeSequence]];
BuildStatementoprandProdNode: PUBLIC PROC[position: INT, length: INT, Op: OpNode, Rand: RandNode]
RETURNS[StatementNode] =
BEGIN
data: StatementoprandProdData ←
NEW[StatementoprandProdDataBody ← [
Op, Rand]];
RETURN[NEW[StatementNodeBody←[position, length, StatementoprandProdProcs, data]]];
END;
LabelidProd
LabelidProdProcs: PUBLIC LabelNodeProcs ←
NEW[LabelNodeProcsBody ← [LabelidProdNotePosition]];
BuildLabelidProdNode: PUBLIC PROC[position: INT, length: INT, id: idNode]
RETURNS[LabelNode] =
BEGIN
data: LabelidProdData ←
NEW[LabelidProdDataBody ← [
id]];
RETURN[NEW[LabelNodeBody←[position, length, LabelidProdProcs, data]]];
END;
OpnoopProd
OpnoopProdProcs: PUBLIC OpNodeProcs ←
NEW[OpNodeProcsBody ← [OpnoopProdInstruction, OpnoopProdInstructionRand]];
BuildOpnoopProdNode: PUBLIC PROC[position: INT, length: INT]
RETURNS[OpNode] =
BEGIN
RETURN[NEW[OpNodeBody←[position, length, OpnoopProdProcs, NIL]]];
END;
OpgotoProd
OpgotoProdProcs: PUBLIC OpNodeProcs ←
NEW[OpNodeProcsBody ← [OpgotoProdInstruction, OpgotoProdInstructionRand]];
BuildOpgotoProdNode: PUBLIC PROC[position: INT, length: INT]
RETURNS[OpNode] =
BEGIN
RETURN[NEW[OpNodeBody←[position, length, OpgotoProdProcs, NIL]]];
END;
RandidProd
RandidProdProcs: PUBLIC RandNodeProcs ←
NEW[RandNodeProcsBody ← [RandidProdIndex]];
BuildRandidProdNode: PUBLIC PROC[position: INT, length: INT, id: idNode]
RETURNS[RandNode] =
BEGIN
data: RandidProdData ←
NEW[RandidProdDataBody ← [
id]];
RETURN[NEW[RandNodeBody←[position, length, RandidProdProcs, data]]];
END;
END..