SaffronDeclarationAnalysis.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
James Rauen, June 17, 1988 11:21:49 am PDT
Last edited by: James Rauen June 17, 1988 7:24:00 pm PDT
Analyze the declarations within a context, specifically: (1) Raise an error if there are any cyclic dependencies. (2) Evaluate any compile-time constants. (3) Calculate SIZE, FIRST, and LAST (if appropriate) for each type declaration; raise an error if any of these quantities should be computable at compile time but isn't.
Phase I: Depends on. Is knowable at compile time.
DIRECTORY
SaffronContextPrivateTypes USING [LocalContextNode];
SaffronDeclarationAnalysis: CEDAR DEFINITIONS ~ BEGIN
AnalyzeDependencies: PROC [contextNode: SaffronContextPrivateTypes.LocalContextNode];
Perform the analysis described above on contextNode. If contextNode is okay, fill in all of its SIZE, FIRST, and LAST fields. (If we get really clever, and lucky, maybe we can also discriminate the Specianated types.)
END.