What type of parser does the Rust compiler use?

What type of a parser does the Rust compiler use? By type I mean, is it recursive descent, LL(1), LL(k), LL(*), LR(1), LALR, .... or something even fancier?

It is a simple hand-written recursive-descent parser with variable (but small) lookahead.

Source code: https://github.com/rust-lang/rust/tree/master/compiler/rustc_parse/src/parser

2 Likes

Cool. Thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.