Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Where is the grammar of the current version of the C# language?
I mean a grammar similar to this SQL grammar: https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html
I would like to check, for example, what is the complex_pattern element mentioned on the https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-7.0/pattern-matching page and how it relates to the pattern and primary_pattern grammar elements defined on the https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/patterns3 page. Where can I find it in the grammar?
The most recent version of C# with a (draft) specification is C# 6.0. There's a grammar interspersed in the specification.
More recent versions of C# don't have a specification yet (you have to take the C# 6.0 specification, and add in proposals from features present in later versions, e.g. here).
The Roslyn repository contains a generated grammar from the most recent version of the compiler, currently here. Search the Roslyn repository for filename:g4 if it moves.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to know Is there any compiler-compiler library that is written in C# or Not ?
I know Antlr & JavaCC but these library wrote in Java
Is there any library like antlr but in C# (or ported in C#) and open source or not ?
Can anybody introduce them ?
There is Irony. I've never used it myself though.
The C# compiler is itself written in C#, and with Roslyn, this has been made open source.
https://github.com/dotnet/roslyn
There is also a C# port of JavaCC, however, it's no longer maintained. The author switched to Irony instead. If you're just looking for code for examples, it would do that.
https://github.com/deveel/csharpcc
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I would like to explore the use of formal language processing in the context of natural languages. To do so, I am searching for a parser generator that is robust to ambiguity in the sense that it won't denote EBNF as invalid when it multiple productions can be used to produce the same string. Furthermore, the standard way of handling redundancy is by returning parse forests instead of parse trees.
I am NOT asking what the best tool is, but only if there are tools that can be obtained for C#. And if there are, where can I find them.
It does not matter if the tool is open-source or proprietary.
The answer will be awarded to the longest list of unique (not mentioned earlier) tools which satisfy the required constraints on the parser returned by the parser generator.
Please help me explore parse forests.
You may find an implementation of Earley's Algorithm that does what you want, e.g. https://github.com/coonsta/earley
My own natural language engine (nlp.abodit.com) is based on an algorithm similar to Earley's.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Every now and then (usually when I stumble upon one of Eric's or Jon's answers) I want to get a quick read of some section of the C# spec.
Problem is, the only online version I can find pertains to the C# for VS 2003 (i.e. C# v1.2 / .NET v1.1 ).
The current version of the spec on MSDN is only available as a .docx download which is less than optimal for a quick read and a complete misfit for linking to a certain part of it.
Is there an online version of the said document that I have failed to find?
I don't think it's available online, but it's worth noting that the spec is installed as part of visual studio -e.g.
[prog files]\Microsoft Visual Studio 11.0\VC#\Specifications\1033\CSharp Language Specification.doc
Since it's not officially available online, I've looked around for online document viewers.
The spec (for C# v5) can be browsed online here.
Note that it has 500+ pages, so it takes a few seconds to load...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
ANTLR is a great piece of software, but, in my opinion, is a little bit uncomfortable for a C# programmer (the C# porting is out of date, the parser antlr-3.1.3.jar required java, etc)
I'm looking for a "more C# native" language tool in order to parse a simple json-like grammar, any suggestion?
I've used the GOLD Parser Generator, a freeware tool that you can use to specify BNF grammars, and then generate a parser in almost any target language including C#. You can also modify the way the parser generator generates C# code by altering a text template.
http://www.devincook.com/goldparser/
peg-sharp (C# packrat parser) is a simple but valid alternative.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for a free .NET (C#) library which i can use in my program and simply draw UML diagrams (especially class diagram). I tried to used Netron Diagramming Library but it is kind of tricky.
Have you looked at EasyDiagram?
Depending on your requirements you may be able to use the http://yuml.me/ REST api.
http://sourceforge.net/projects/numl/
From the home page:
Library for manipulating UML 2.0 and MOF 2.0 models, for .NET, Mono,
and DotGNU. Provides serialization to/from XMI 2.1.