Converts between checked pushdown machines and context-free grammars. Each conversion returns the result with construction frames, and the grammar direction keeps the source transition of every production.
cfgToPda, buildCfgPda)ll1ToDpda, PredictiveTable)lr1ToDpda, ShiftReduceTable)completeDpda, complementDpda)pdaToCfg, buildPdaGrammar, buildPdaGrammarBounded)explainPushdownFrame)dumpNormalPda)SummaryMeaning)productionOriginDecoder)PushdownFrame)PushdownMachine, PdaGrammarResult, PdaToCfgResult, CfgToPdaResult)pushdownMachineDecoder, pushdownFrameDecoder, summaryMeaningDecoder, productionOriginDecoder, expandFrameDecoder, keepFrameDecoder, matchFrameDecoder, normalizeFrameDecoder, protectFrameDecoder, pushdownIssueDecoder, startFrameDecoder, summarizeFrameDecoder)DeterministicIssue, DeterministicIssueCode, deterministicIssueDecoder)PushdownFrameKind, PushdownIssueCode)A missing conflict lookahead denotes end of input.
The deterministic constructions keep the input alphabet unchanged. A read step stores its lookahead in the control. Expansions and reductions then use epsilon steps while that lookahead is held, and a match or shift returns to the reading control. Each control and stack top has at most one applicable epsilon step or one read for each input symbol, so the checked output is a DPDA.
End-of-input reductions define a regular set of parser stacks. Saturation begins with the exact accepting stacks and adds the predecessors of every original end reduction. A finite run of end reductions gives a predecessor path by induction on its length. Each added edge also has such a run by induction on the saturation steps. The saturated language therefore contains exactly the stacks from which the parser accepts at end of input.
Each stack symbol stores the finite predecessor summary of the suffix beneath it. A push computes the new summaries, and a pop exposes the saved one. The reading control is accepting exactly when its current summary admits end-of-input acceptance. Reading another symbol continues parsing from that control, so acceptance observes the entire word without an extra input marker. LL end acceptance computes the least nullable set from original productions. Conservative table supersets cannot make a nonnullable stack accept.