Skip to content

Curated Grammars for C# : An invitation #78981

Closed Answered by CyrusNajmabadi
bemafred asked this question in Ideas
Discussion options

You must be logged in to vote

You can find the latest syntactic grammar here: https://github.com/dotnet/roslyn/blob/main/src/Compilers/CSharp/Portable/Generated/CSharp.Generated.g4. Note that in four places at the end it calls out to certain lexical constructs***. Those can be found in: https://github.com/dotnet/csharpstandard/blob/draft-v8/standard/lexical-structure.md

*** The call outs are due to the deeper complexity here that is hard to express in a context free grammar.

Someone could extract that out into it's own file if motivated. I would recommend moving this request over to dotnet/csharpstandard as they are more likely to have the motivation and time for this sort of effort versus dotnet/roslyn or dotnet/csha…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CyrusNajmabadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants