3bmd icon indicating copy to clipboard operation
3bmd copied to clipboard

make sure parser always returns something useful

Open 3b opened this issue 14 years ago • 0 comments

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 the doc rule, and add it to the blocks (maybe as an extra plain block?)
  • "incomplete parse" errors should probably be handled the same way (maybe not even bother with trying to catch extra in the doc grammar if this needs to be here anyway?)
  • "parse failed" should just return the original input?

3b avatar May 12 '11 23:05 3b