Skip to content

Commit

Permalink
When parsing, don't swallow recursion depth errors.
Browse files Browse the repository at this point in the history
This is necessary for both performance and correctness reasons. At many points
when parsing symbols a failure to parse as one construct is retried as a
different construct. This makes sense when parsing fails because the input does
not match the first construct. It does not make sense when the input triggers
the recursion limits.

1. Because the input might have been correctly parsed on the path that was
  aborted due to the recursion limits, any other output produced may be wrong.
2. Even the error returned might be wrong, if the correct path was aborted due
  to recursion limits and the last path tried was aborted for a different error.
3. Attempting to try additional constructs after a recursion error increases
  the runtime, in some cases significantly.
  • Loading branch information
khuey committed Jun 23, 2023
1 parent f76900b commit d75415a
Showing 1 changed file with 142 additions and 113 deletions.
Loading

0 comments on commit d75415a

Please sign in to comment.