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
We still have backtracking in the parser on account of the fact we don't know if identifier oangle (in an expression grammatical context) is going to be a less-than symbol or a parametric instantiation. To disambiguate this and avoid the need for backtracking Rust has the turbofish qualifier which I'd like to propose we adopt to fully eliminate the backtracking (good explainer blog post with more links here: https://matematikaadit.github.io/posts/rust-turbofish.html )
What's hard to do? (limit 100 words)
We still have backtracking in the parser on account of the fact we don't know if
identifier oangle
(in an expression grammatical context) is going to be a less-than symbol or a parametric instantiation. To disambiguate this and avoid the need for backtracking Rust has the turbofish qualifier which I'd like to propose we adopt to fully eliminate the backtracking (good explainer blog post with more links here: https://matematikaadit.github.io/posts/rust-turbofish.html )Code is here:
xls/xls/dslx/frontend/parser.cc
Line 1730 in 6b7c0dc
xls/xls/dslx/frontend/parser.cc
Line 1967 in 6b7c0dc
Current best alternative workaround (limit 100 words)
Keep backtracking -- this had led to bugs historically, and I was able to eliminate almost all backtracking in the past, but this one remains.
Your view of the "best case XLS enhancement" (limit 100 words)
Introduce turbofish to make the parse unambiguous.
The text was updated successfully, but these errors were encountered: