how do I read grammar? #2652
-
i guess this indicates how do i write [#syntax] here. but this looks nothing like examples shown above. :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The grammar indeed defines the valid syntax for the attribute. It's written in EBNF, which is a common metasyntax (language) to more formally define the syntax of a language. It's certainly not necessary to understand the EBNF to use Rocket or fully understand how to use the attribute - the examples and rest of the documentation should suffice, and if it doesn't we would consider it a documentation bug. Instead, it's there to precisely define the syntax and serve as a reference and specification. In other words, to rigorously concretize the attribute. |
Beta Was this translation helpful? Give feedback.
The grammar indeed defines the valid syntax for the attribute. It's written in EBNF, which is a common metasyntax (language) to more formally define the syntax of a language. It's certainly not necessary to understand the EBNF to use Rocket or fully understand how to use the attribute - the examples and rest of the documentation should suffice, and if it doesn't we would consider it a documentation bug. Instead, it's there to precisely define the syntax and serve as a reference and specification. In other words, to rigorously concretize the attribute.