i believe at some point @graydon_pub has had some interesting things to say about token lookahead too
-
Show this thread
-
Replying to @__anp__
I wanted rust to stay LL(k) ideally for k=1. I also wanted its lexical grammar to stay regular. I was sad when it lost the latter, am sad if it's currently losing the former, and strongly reject the "it's not so bad" narrative in the grammatical complexity section of that RFC.
1 reply 1 retweet 19 likes -
Replying to @graydon_pub
Frankly I am a bit despairing at the degree to which this "it's not so bad, let's just keep adding costs" thinking pervades the ongoing trajectory of the thing. I said so recently and publicly and it got a rebuke from the language team that IMO missed the point entirely. So: sad.
3 replies 5 retweets 37 likes -
Replying to @graydon_pub
i kinda agree, there have been multiple times where i've brought up hidden costs and kinda been sidestepped :/ (the breaking change bit also bothers me, rust *already* has issues being stable with larger codebases. firefox has hit this a bunch of times)
3 replies 0 retweets 7 likes -
Replying to @ManishEarth @graydon_pub
I’m normally conservative with language changes these days, but this is one area in which I don’t actually care. I think LL(k) is a property that doesn’t matter at all.
3 replies 0 retweets 4 likes -
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.
1 reply 0 retweets 7 likes -
The things that make parsing languages difficult are things like C’s lexer hack, or the way C++’s template expansion affects parsing. Not theoretical complexity class of the grammar.
3 replies 0 retweets 2 likes -
something something vim plug-ins?
1 reply 0 retweets 2 likes -
Vim plugins for syntax coloring can’t and don’t parse the grammar. More complex IDE support will just use libsyntax and be done with it.
2 replies 0 retweets 1 like -
Replying to @pcwalton @graydon_pub
well, libsyntax2, IDEs have different design requirements for parsers, chiefly they need to have *really* good recovery and be totally okay with partial nodes. That's kinda what the plan is with libsyntax2, which rustc probably won't use
1 reply 0 retweets 1 like
What does unbounded lookahead have to do with recovery?
-
-
Replying to @pcwalton @graydon_pub
no, it's just another parser that needs to be separately maintained, one that's even more complex than libsyntax a trivial answer to your question is that IDEs would get confused if you start typing a neo-turbofish and now have to deal with both possibilities
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.