Open xied75 opened 7 years ago
Yes please, an official grammar is much way better. This is a great news.
I'm not so sure. The grammar on the MS tree may be encumbered MS Property.
The grammar is using ANTLR form more as a communication mechanism. The syntax is well understood by readers and works well with GitHub's available syntax highlighting features. I wouldn't expect it to work in unaltered form (e.g. possible ambiguities, preprocessor).
What is the outcome of this?
I'm not sure that there is one. Were you expecting one?
You closed the ticket, because of? That's why I'm asking.
I didn't see a need for further discussion. If you disagree you are absolutely welcome to re-open the ticket and explain what further action you are expecting.
Does the thing, what @sharwell said, prevent us/you from using the antlr stuff, coming from MS for C#?
I am not a lawyer, and am not able to comment on that. In any case would you like the issue to remain open?
I vote for give it a try to use the "more official" one, that MS maybe provides by there own on the MSDN page, to collect everything what we need. I only mean, as technical perspective, does the comment from @sharwell prevents us from using it, because it is ANTLR but in an other way and it is much more work for us to change the code, instead of using and enhance that one, that we have? If not, than I'm for opening the issue again. But of course, we need more disucssion here. I know there is a gitter chan for ANTLR for CS. It is a big topic, I think.
I don't see anything wrong with that suggestion. If it works for you then I will re-open this PR and label it with "grammar requests" since it would take some effort.
Ok, let's do it.
I think it makes sense to add the link to csharp
directory about autogenerated ANTLR grammar from Roslyn repository. We have the same description for MySql and other grammars.
A surprise to me that I just found this: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/
If you click into a page, e.g. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes you can see the grammar is in antlr
Guess this is really great! @parrt
I wonder should whoever interested in C# grammar chime in on the issue that "Should we try to unify the current g4 with MS work, then improve on to add C# 7 features?" @KvanTTT @sharwell