interscript.mesa
Last Edited by: Mitchell, February 7, 1983 3:18 pm
DIRECTORY
Rope USING [ROPE];
Interscript: CEDAR DEFINITIONS = BEGIN
Id: TYPE ~ Rope.ROPE;
Universal: TYPE ~ ATOM;
LinkSet:
TYPE ~
REF LinkSetRec;
LinkSetRec: TYPE ~ RECORD[id: Id, targets: SpanList, sons: LIST OF LinkSet];
SpanList: TYPE ~ LIST OF Span;
Span:
TYPE ~
REF SpanRec;
SpanRec:
TYPE ~
RECORD[
parent, sibling: Span,
tags: LIST OF Universal,
targets: LIST OF LinkSet,
contents: LIST OF Value
];
Value:
TYPE ~
REF ValueRec;
OfValue: TYPE ~ {nil, number, string, span, sourceLink, expr};
OfNumber: TYPE ~ {int, real};
ValueRec:
TYPE ~
RECORD[
SELECT type: OfValue
FROM
nil => [],
number => [
SELECT numTag: OfNumber
FROM
int => [int: INT],
real => [real: REAL]
ENDCASE],
string => [r: Rope.ROPE],
span => [--TBD--],
sourceLink => [source: LinkSet],
expr => [expr: ExprTree]
ENDCASE];
ExprTree:
TYPE ~
REF ExprTreeRec;
ExprTreeRec:
TYPE ~
RECORD[
vp:
SELECT type: *
FROM
monadic => [op: Operator, left: ExprTree],
dyadic => [op: Operator, left, right: ExprTree],
terminal => [v: Value]
ENDCASE];
Operator: TYPE ~ {localGets, globalGets, dot, percent, exclamation, verticalBar, upArrow, colon, plus, minus, times, slash};
END.
Change Log
Created by Mitchell, February 7, 1983 3:18 pm