Skip to content
Tape‑n‑Trace
PracticeSearch 26 tools

Grammars and derivations

Hopcroft 2e §5.1–5.2. Type a grammar and a string; the engine finds a leftmost or rightmost derivation and replays it — sentential form, applied production and parse tree in step, with the yield read off the leaves so the tree-derivation correspondence is watched rather than asserted.

Also here: the ambiguity detector, left recursion elimination and, for Module 4, the simplification pipeline and CNF.

Presets:

Symbols split per character (aSb is a, S, b) unless any alternative contains spaces — then tokens are space-separated and id stays one terminal. Variables are whatever appears left of an arrow.

1 variables {S}, 2 terminals {a, b}, start S — 2 productions.