3 ms·
> Rust's grammar is also context-free, as far as I know. I believe bytestrings are context-sensitive :( I don't remember the exact details here, so I could be
by steveklabnik 12y ago
> Rust's grammar is also context-free, as far as I know.
I believe bytestrings are context-sensitive :( I don't remember the exact details here, so I could be wrong. But other than that...
- nikomatsakis 12y agoTechnically, byte-strings (and nested comments) mean the lexer is not regular, but the grammar is still context-free. But anyway, parsing is not typically the bottle-neck these days.
- pcwalton 12y agoOh, that's just lexing though.
- Gankro 12y agoraw strings: https://github.com/rust-lang/rust/blob/master/src/grammar/raw-string-literal-ambiguity.md https://github.com/rust-lang/rust/blob/master/src/grammar/ra...