Is Rust syntax grammar contextual or context sensitive?

The syntactic grammar of almost any programming language is regular, since they allow arbitrarily deeply enclosed parentheses. Rust too:

let x = ((((()))));

But is Rust's syntactic grammar, at least context-free? If not, which element makes the grammar context-sensitive? Or is a grammar even recursively enumerable, such as C ++ syntactic grammar ?


Related: Is Rust's lexical grammar regular, context-sensitive, or context-sensitive?

+3
source share
2

Rust , .

, , - , - , , , .

, , Rust .

, , , ( ) -, .

, - Rust. , , , , bison Antlr ( ). , Rust, ; , , CF.

+4

Rust:

-. . , r, N ( N ), , , , N . , , , N . , r ### "" ### "### .

0

Source: https://habr.com/ru/post/1675901/


All Articles