⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
Syntax analysis asks a precise question: given a grammar's rewrite rules, which structures can legally produce a sentence? This simulator runs the CYK (Cocke–Younger–Kasami) dynamic-programming algorithm on a small context-free grammar in Chomsky Normal Form, filling a triangular 3D chart one span-length layer at a time. Every tower is a chart cell; its height counts how many distinct derivations reach that span, and its colour shows the strongest grammatical category found there. Step through the three preset sentences — including the classic "the dog saw the cat with the telescope" prepositional-phrase attachment case — to watch grammatical ambiguity emerge as a genuinely taller tower at the root, not just a diagram of one possible tree.