EDIFfing:
CEDAR
DEFINITIONS = {
LexError: ERROR [stream: IO.STREAM, index: INT, complaint: ROPE];
ROPE: TYPE = Rope.ROPE;
REFTEXT: TYPE = REF TEXT;
ParseTreeList: TYPE = LIST OF ParseTree;
ParseTree: TYPE = REF ParseTreePrivate;
ParseTreePrivate:
TYPE =
RECORD [
origin: SourceLocation ← [],
replacing, generator: ParseTree ← NIL,
variant:
SELECT type: ParseTreeNodeType
FROM
string => [s: ROPE],
integer => [i: INT],
identifier => [id: ATOM--case untouched--],
list => [children: ParseTreeList],
ENDCASE
];
ParseTreeNodeType: TYPE = {string, integer, identifier, list};
SourceLocation:
TYPE =
RECORD [
source: Source ← NIL,
where: PositionRange ← []];
Source: TYPE = REF SourcePrivate;
SourcePrivate:
TYPE =
RECORD [
description: ROPE,
data: REF ANY
];
PositionRange: TYPE = RECORD [start, endPlusOne: INT ← FIRST[INT]];
unspecifiedPositionRange: PositionRange = [];
LexEDIF: PROC [source: Source, from: IO.STREAM] RETURNS [pt: ParseTree];
FmtOrg: PROC [pt: ParseTree] RETURNS [rope: ROPE];
}.