EDIFSemanticsTest.Mesa
Spreitzer, February 24, 1986 10:22:46 pm PST
DIRECTORY EDIFfing, EDIFGrammar, EDIFSemantics, FS, IO, Rope;
EDIFSemanticsTest:
CEDAR
PROGRAM
IMPORTS EDIFfing, EDIFGrammar, EDIFSemantics, FS, IO
= BEGIN OPEN EDIFfing, EDIFGrammar, EDIFSemantics;
rootRule: Rule = MakeRule[$EDIF];
TestFile:
PROC [fileName:
ROPE]
RETURNS [match:
BOOL, result:
REF
ANY] = {
source: Source = NEW [SourcePrivate ← [description: fileName]];
in: IO.STREAM = FS.StreamOpen[fileName];
pt: ParseTree = LexEDIF[source, in];
in.Close[];
[match, result] ← Traverse[pt, rootRule, 0, fileName];
};
END.