You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.
The parser throws exceptions to signal that a grammar production cannot be matched and that the parser must backtrack.
This is a non-exceptional situation: we expect it to happen many times when parsing any XPath expression. The majority of parse exceptions thrown will be caught and handled. The only case where a parse exception will not be caught is if the parser has exhausted all backtracking possibilities without yielding a match; in other words, if the XPath expression itself is invalid.
It’s impolite to throw exceptions in such non-exceptional situations, and it may also be hurting parsing performance. We should consider an alternative mechanism to trigger backtracking. I’m not sure exactly what yet.
(It’s possible that haxe-xpath also throws and catches exceptions in some other non-exceptional circumstances, and of course those should be cleaned up too.)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The parser throws exceptions to signal that a grammar production cannot be matched and that the parser must backtrack.
This is a non-exceptional situation: we expect it to happen many times when parsing any XPath expression. The majority of parse exceptions thrown will be caught and handled. The only case where a parse exception will not be caught is if the parser has exhausted all backtracking possibilities without yielding a match; in other words, if the XPath expression itself is invalid.
It’s impolite to throw exceptions in such non-exceptional situations, and it may also be hurting parsing performance. We should consider an alternative mechanism to trigger backtracking. I’m not sure exactly what yet.
(It’s possible that haxe-xpath also throws and catches exceptions in some other non-exceptional circumstances, and of course those should be cleaned up too.)
The text was updated successfully, but these errors were encountered: