If you’re parsing Rust for any practical purpose, the complexity class of the grammar isn’t in the top 10 things that are difficult. It isn’t even in the top 100.
Of all the difficulties involved in doing partial parses of Rust, with error recovery, etc, unbounded lookahead is not even in the top 100.
-
-
this isn't about some huge one-time insurmountable cost it's about drawing a line in the sand so the grammar doesn't slowly slide into something ugly
-
And I’m saying this is a pointless line to draw. Draw the line at, like, the lexer hack. Not this. If we had persisted with the “line in the sand” reasoning in Rust’s early days, we’d have been writing “match foo { None. => {…} }” because someone might name a variable None.
- 13 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.