-- ParserDisplay.mesa
-- last edit September 4, 1984 3:33:44 pm PDT
DIRECTORY
GrammarBasic USING[Grammar, Symbol],
IO USING[STREAM],
LR0ItemSetsBasic USING[LR0Item, LR0ItemSet],
LR1ItemSetsBasic USING[LR1Item, LR1ItemSet],
ParserGraphs USING[Graph, Node],
Rope USING[ROPE],
TerminalSequences USING[TerminalSeq, TerminalSeqSet];
ParserDisplay: CEDAR DEFINITIONS =
BEGIN OPEN GrammarBasic, IO, LR0ItemSetsBasic, LR1ItemSetsBasic, ParserGraphs, Rope, TerminalSequences;
ShowGrammar: PROC[STREAM, Grammar];
ShowTerminalSeq: PROC[STREAM, CARDINAL, TerminalSeq];
ShowTerminalSeqSet: PROC[STREAM, CARDINAL, TerminalSeqSet];
ShowLR0Item: PROC[STREAM, CARDINAL, LR0Item];
ShowLR1Item: PROC[STREAM, CARDINAL, LR1Item];
ShowLR0ItemSet: PROC[STREAM, CARDINAL, LR0ItemSet];
ShowLR1ItemSet: PROC[STREAM, CARDINAL, LR1ItemSet];
ShowNode: PROC[STREAM, CARDINAL, Node];
ShowGraph: PROC[STREAM, BOOLEAN, CARDINAL, Graph];
ShowGeneratedParser: PROC[STREAM, Graph];
ShowArcCounts: PROC[STREAM, Graph];
ShowRingCounts: PROC[STREAM, Graph];
-- following signals for use during debugging
-- they avoid having to explicitly pass in a stream etc.
StartShowingSignals: SIGNAL[text: ROPE];
SignalRope: SIGNAL[text: ROPE];
SignalSymbol: SIGNAL[text: ROPE, symbol: Symbol];
SignalTerminalSeq: SIGNAL[text: ROPE, seq: TerminalSeq];
SignalTerminalSeqSet: SIGNAL[text: ROPE, set: TerminalSeqSet];
SignalLR0Item: SIGNAL[text: ROPE, item: LR0Item];
SignalLR1Item: SIGNAL[text: ROPE, item: LR1Item];
SignalLR0ItemSet: SIGNAL[text: ROPE, set: LR0ItemSet];
SignalLR1ItemSet: SIGNAL[text: ROPE, set: LR1ItemSet];
SignalNode: SIGNAL[text: ROPE, node: Node];
StopShowingSignals: SIGNAL[text: ROPE];
END..