DIRECTORY ISToken; ISBinding: CEDAR DEFINITIONS = BEGIN BindingFailureReason: TYPE = { noBindingFound, inappropriateType, spare }; BindingFailure: SIGNAL [reason: BindingFailureReason]; StackHandle: TYPE = REF StackObject; StackObject: TYPE = RECORD [ top: Handle _ NIL ]; Handle: TYPE = REF Object; Object: TYPE = RECORD [ -- defined in defs (rather than impl) to aid debugging -- previous: Handle _ NIL, name: ATOM _ NIL, value: ISToken.TVHandle _ NIL ]; Anchor: TYPE = StackObject; AnchorBindings: PROCEDURE [StackHandle] RETURNS [Anchor]; PruneBindings: PROCEDURE [StackHandle, Anchor]; CreateStack: PROCEDURE [useEnvironment: BOOLEAN _ TRUE] RETURNS [ISBinding.StackHandle]; DestroyStack: PROCEDURE [REF ISBinding.StackHandle]; EnvironmentHandle: TYPE = REF EnvironmentObject; EnvironmentObject: TYPE = RECORD [ stack: StackHandle _ NIL ]; CreateEnvironment: PROCEDURE [StackHandle] RETURNS [EnvironmentHandle]; DestroyEnvironment: PROCEDURE [REF EnvironmentHandle]; UseEnvironment: PROCEDURE [EnvironmentHandle]; UnuseEnvironment: PROCEDURE RETURNS [EnvironmentHandle]; AugmentBindings: PROCEDURE [name: ATOM, value: ISToken.TVHandle, stack: StackHandle]; ObtainBinding: PROCEDURE [name: ATOM, stack: StackHandle] RETURNS [ISToken.TVHandle]; -- _ must copy before prune -- ObtainBindingIntegerOrZero: PROCEDURE [name: ATOM, stack: StackHandle] RETURNS [INTEGER]; END. hISBinding.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. edit by Ayers 19-Dec-84 11:11:17 Rick Beach, August 1, 1985 2:57:18 pm PDT MKaplan, September 13, 1985 2:10:56 pm PDT Anchors are pointers to positions on the binding stack. They are dropped at the beginning of a new scope (new node) and restored to previous value at end. Κ/˜codešœ™Kšœ Οmœ1™