Open kjosib opened 5 years ago
The "document" is just a catalog of the problems found in a particular grammar definition. Problem kinds are defined and enumerated somewhere. Actual problems are manifest in some set of symbols, and perhaps more distinctly to particular production rules. The list can be returned from a "problems" method, thus separating mechanism from policy.
Interim step: Grammar faults now route through a protocol object, which means a more polished application is possible.
ContextFreeGrammar.validate raises an exception for the first problem noticed. It might be nice to collect all the problems into a document of some form and raise THAT up the flagpole. However, that implies the "document of some form" gets designed, and some standard ways of reading said document also get implemented.