3bmd
3bmd copied to clipboard
make sure parser always returns something useful
The grammar should match all input, but in case of bugs it would be nice to (optionally?) catch parse errors and return something useful anyway.
- first step would probably be to add a catch-all
(* character)to the end of thedocrule, and add it to the blocks (maybe as an extraplainblock?) - "incomplete parse" errors should probably be handled the same way (maybe not even bother with trying to catch extra in the
docgrammar if this needs to be here anyway?) - "parse failed" should just return the original input?