ExampleParserImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 22, 1987 2:16:58 am PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
IO,
ExampleCGDef,
ExampleParserDef USING[],
OneCasabaParser,
FS,
ThreeC4Support,
ExampleGenericDef;
ExampleParserImpl: CEDAR PROGRAM IMPORTS IO, ExampleCGDef, OneCasabaParser, FS, ThreeC4Support, ExampleGenericDef EXPORTS ExampleParserDef=
BEGIN
OPEN IO, ExampleCGDef, OneCasabaParser, FS, ThreeC4Support, ExampleGenericDef;
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, 11, debugFlags, debuggingTextTo]]
END;
SetUpLinks: PROC[prodLinkArray: SeeProdLinkArray, tknLinkArray: TokenLinkArray] =
BEGIN
ExampleGenericLinkProc[prodLinkArray, tknLinkArray];
ExampleCGLinkProc[prodLinkArray, tknLinkArray];
END;
obtain parser table
BEGIN
tableStream: IO.STREAM ← FS.StreamOpen["ExampleParser.kipperedParseTables"];
ParseTable ← OneCasabaParser.BuildParserTableFromKipperedStream[tableStream];
IO.Close[tableStream];
END;
END..