3 ms·
Thank you. I found that to be a perfect refresher before reading the article in this story. Does anyone know if there's a plan to move rusts own parser to a ru
by e12e 11y ago
Thank you. I found that to be a perfect refresher before reading the article in this story.
Does anyone know if there's a plan to move rusts own parser to a rust native tool? Now it apparently uses antlr4 along with some custom rust code:
https://github.com/rust-lang/rust/tree/master/src/grammar https://github.com/rust-lang/rust/tree/master/src/grammar
- kzrdude 11y agoThat's just an alternative implementation of rust's grammar for verification purposes. Rust's parser is entirely hand coded inside rustc (in Rust).
- e12e 11y agoAh, I thought that was something new. I remember reading something about a manual parser a while back. Thank you for clarifying. Would there be a benefit to moving from hand coded to something like parent project for rustc? IIRC the rationale for hand-coding the parser was mostly speed (and a wish to avoid external (to rust) dependencies)?
- kzrdude 11y agoSeeing this bug filed today (rather interesting/weird breaking change needed to fix it), it seems plain sanity should prefer a generated parser. https://github.com/rust-lang/rust/issues/28777 https://github.com/rust-lang/rust/issues/28777 I'm not a compiler hacker, so I don't know how to weigh it really though.