Definitive C# language reference?

The C# language reference has an Annex A with an ANTLR grammar for C#. At the beginning of the annex it says This clause is informative. Does that mean that the grammar isn't necessarily correct?

I found one case where I am wondering about the correctness. As you can see in the screenshot a using directive can either occur near the beginning of a compilation unit or inside a namespace body. But I think this doesn't account for the fact that the body of a file-scoped namespace declaration doesn't have any curly braces and instead has a semicolon.

I am wondering about this as I am looking for a "definitive source" for the C# language. Reading through https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/namespaces I don't find any mention of file scoped namespace declarations, which I can only find described when reading about the namespace keyword: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/namespace. So I am a bit unsure where I should be reading...
image.png
This appendix lists the complete ANTLR grammar for C#. It's comprised of extracted blocks from each of the other clauses.
This chapter defines namespaces, including how to declare them and how to use them.
Was this page helpful?