(* Copyright (C) 1990, Digital Equipment Corporation. *) (* All rights reserved. *) (* See the file COPYRIGHT for a full description. *) (* Last modified on Wed Mar 21 21:55:04 1990 by muller *) INTERFACE M3Entity; (* An Entity.T is a thing that can be denoted by a name in a Modula-3 program. *) IMPORT M3Type, M3Value; TYPE T <: ROOT; (* Constant | Type | Variable | Exception | Interface | Module | Procedure | Operator *) Constant = T OBJECT type: M3Type.T; value: M3Value.T; END; (* A constant entity e represents the Modula-3 value with type e.type and value e.value. *) Type = T OBJECT type: M3Type.T END; (* A Type entity e represents the type e.type *) Variable = T OBJECT type: M3Type.T; END; (* Parameter | Local | Global *) Parameter <: Variable; (* A procedure parameter *) Local <: Variable; (* A procedure local *) Global <: Variable; (* A variable declared in an interface or module. *) Exception = T OBJECT exception: M3Value.Exception; argType: M3Type.T (* NIL if there is no argument *) END; Procedure = T OBJECT proc: M3Value.Procedure; signature: M3Type.Signature END; Interface <: T; Module <: T; Operator = T OBJECT ops: REF ARRAY OF Operation END; (* One operation for each overloading of the operator. *) Operation = { Hat, (* r^ *) Sub, (* array[ ] *) HatSub, (* refArray[ ] *) RecordDot, (* record.field *) RecordHatDot, (* refRecord.field *) ObjectDot, (* object.field *) InterfaceDot, (* Interface.entity *) ObjTypeDot, (* ObjectType.methodname *) EnumDot, (* Enumeration.element *) Subarray, (* The SUBARRAY operation *) NewObject, (* The NEW operation on objects *) NewOpenArray, (* The NEW operation on open arrays *) New, (* Other NEW operations *) PlusInt, (* int + int *) PlusReal (* real + real *) (* ... only 77 more lines to go... *) }; END M3Entity.