Here is a extract from the grammar section of the C# Language Specification:

-
Is this written in a specific format? I looked at the grammar section in an old C++ ISO I found and it seemed to follow the same format, so is there some standard being used here for writing this grammar? I ask because I would like to be able to create a tool where I can paste the grammar directly and have a working C# parser immediately.
-
Microsoft seem to release their C# spec for free, but I can’t find the C++11 format anywhere. Am I going to have to buy this to view it?
It’s a variant of BNF that used by Yacc. Yacc normally has
;as part of its syntax, but changing that makes things simpler with a language like C# and C++ in which;is very significant in itself. Unlike most BNF variants, it has a:where often BNF uses=(see also Van Wijngaarden grammar and you’ll soon know much more than the little bit of knowledge that this answer is coming from).ISO don’t have a rule on which grammar must be used in their standards, so others use BNF, ABNF, EBNF, Wirth syntax and perhaps others.
ISO standards often originate as national or other standards that are then adopted by ISO. Since different standards bodies use different grammars (The IETF use ABNF in RFCs [itself defined in RFC 5234], BSI and the W3C use different variants of EBNF, and so on) the grammar in an ISO often reflects its origins.
This is the case here. Kernigan and Ritchie used this format in their book, The C Programming Language. While the ANSI standard and later ISO standards differed in the grammar itself, they used the same format, and it’s been used since for other C-like languages.