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: rust/compiler/rustc_parse/src/parser at master · rust-lang/rust · GitHub

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.