Put this in the 'uncategorized' category...
Does anyone know if someone created a BNF for Rust?
BNF is Backus-Naur Form for describing a syntax of a language.
I'm assuming that one has to exist since you have the auto competion and help available...
Thx
The reference has a bunch of BNF-esqe definitions of syntax spread through each section, eg:
I'm not sure how formally complete those are, there's probably a few ambiguous statements as the reference isn't complete or normative (yet?)
If you're interested in something that could be used for that sort of thing, there is a tree-sitter grammar for Rust. Unlike the reference, I think it's always kept up-to-date because it is used in editors, etc.