DIRECTORY
	IO,
	KipperMain1Def,
	OneCasabaParser,
	KipperMain2Def,
	FS,
	KipperCentralDef USING[],
	ThreeC4Support;

KipperCentralImpl: CEDAR PROGRAM IMPORTS IO, KipperMain1Def, OneCasabaParser, KipperMain2Def, FS, ThreeC4Support EXPORTS KipperCentralDef= 
BEGIN
OPEN IO, KipperMain1Def, OneCasabaParser, KipperMain2Def, FS, ThreeC4Support;
ParseTable: OneCasabaParser.ParserTable ← NIL;

ParseOneStream: PUBLIC PROC[from: IO.STREAM, debugFlags: CARDINAL, debuggingTextTo: IO.STREAM] RETURNS[REF ANY] =
BEGIN
RETURN[ThreeC4Support.ParseOneStream[from, ParseTable, SetUpLinks, 51, debugFlags, debuggingTextTo]]
END;

SetUpLinks: PROC[prodLinkArray: SeeProdLinkArray, tknLinkArray: TokenLinkArray] =
BEGIN
KipperMain1LinkProc[prodLinkArray, tknLinkArray];
KipperMain2LinkProc[prodLinkArray, tknLinkArray];
END;


-- obtain parser table

	BEGIN
	tableStream: IO.STREAM ← FS.StreamOpen["KipperCentral.kipperedParseTables"];
	ParseTable ← OneCasabaParser.BuildParserTableFromKipperedStream[tableStream];
	IO.Close[tableStream];
	END;

END..