diff --git a/doc/csharp-target.md b/doc/csharp-target.md index 76e063521..18e6075d0 100644 --- a/doc/csharp-target.md +++ b/doc/csharp-target.md @@ -1,6 +1,6 @@ # C♯ -### Which frameworks are supported? +## Which frameworks are supported? The C# runtime is CLS compliant, and only requires a corresponding 3.5 .Net framework. @@ -11,19 +11,15 @@ In practice, the runtime has been extensively tested against: No issue was found, so you should find that the runtime works pretty much against any recent .Net framework. -### How do I get started? +## How do I get started? -You will find full instructions on the [Git web page for ANTLR C# runtime](https://github.com/antlr/antlr4/tree/master/runtime/CSharp). +You will find full instructions on the [Git repo page for ANTLR C# runtime](https://github.com/antlr/antlr4/tree/master/runtime/CSharp). -### How do I use the runtime from my project? +## How do I use the runtime from my project? (i.e., How do I run the generated lexer and/or parser?) -Let's suppose that your grammar is named, as above, "MyGrammar". - -Let's suppose this parser comprises a rule named "StartRule" - -The tool will have generated for you the following files: +Let's suppose that your grammar is named `MyGrammar`. The tool will generate for you the following files: * MyGrammarLexer.cs * MyGrammarParser.cs @@ -32,7 +28,7 @@ The tool will have generated for you the following files: * MyGrammarVisitor.js (if you have activated the -visitor option) * MyGrammarBaseVisitor.js (if you have activated the -visitor option) -Now a fully functioning code might look like the following: +Now a fully functioning code might look like the following for start rule `StartRule`: ``` using Antlr4.Runtime; @@ -56,7 +52,7 @@ This program will work. But it won't be useful unless you do one of the followin (please note that production code is target specific, so you can't have multi target grammars that include production code) -### How do I create and run a custom listener? +## How do I create and run a custom listener? Let's suppose your MyGrammar grammar comprises 2 rules: "key" and "value". @@ -94,7 +90,5 @@ ParseTreeWalker.DEFAULT.walk(printer, tree); Further information can be found from The Definitive ANTLR Reference book. -The C# implementation of ANTLR is as close as possible to the Java one, so you shouldn't find it difficult to adapt the examples for C#. - -See also [Sam Harwell's alternative C# target](https://github.com/tunnelvisionlabs/antlr4cs) +The C# implementation of ANTLR is as close as possible to the Java one, so you shouldn't find it difficult to adapt the examples for C#. See also [Sam Harwell's alternative C# target](https://github.com/tunnelvisionlabs/antlr4cs) diff --git a/doc/releasing-antlr.md b/doc/releasing-antlr.md index bb0da0c2e..799a3d365 100644 --- a/doc/releasing-antlr.md +++ b/doc/releasing-antlr.md @@ -251,13 +251,13 @@ This shoud display: Successfully created package **Publishing to NuGet** -You need to be a NuGet owner for "ANTLR 4 Official Runtime" +You need to be a NuGet owner for "ANTLR 4 Standard Runtime" As a registered NuGet user, you can then manually upload the package spec here (`runtime/CSharp/runtime/CSharp/Package.nuspec`): [https://www.nuget.org/packages/manage/upload](https://www.nuget.org/packages/manage/upload) Alternately, you can publish from the cmd line. You need to get your NuGet key from [https://www.nuget.org/account#](https://www.nuget.org/account#) and then from the cmd line, you can then type: ```bash -mono push Antlr4.Runtime.Official..nupkg -Source https://www.nuget.org/api/v2/package +mono push Antlr4.Runtime.Standard..nupkg -Source https://www.nuget.org/api/v2/package ``` **Creating DLLs** diff --git a/runtime/CSharp/README.md b/runtime/CSharp/README.md index d4675da41..d98722990 100644 --- a/runtime/CSharp/README.md +++ b/runtime/CSharp/README.md @@ -2,11 +2,15 @@ ### Note to historical users -Versions of ANTLR 4.4.x and before managed the C# target as a [separate tool provided by Sam Harwell](https://github.com/tunnelvisionlabs/antlr4cs/releases/tag/v4.3.0). -As of 4.5, we our releasing a (mono-compatible) C# target together with the main tool. +Versions of ANTLR 4.4.x and before managed the C# +target as part of a [separate tool provided by Sam Harwell](https://github.com/tunnelvisionlabs/antlr4cs/releases/tag/v4.3.0). +As of 4.5, we our releasing a (mono-compatible) C# target together +with the main tool. -Mono compatibility makes it possible to use ANTLR 4 in any C# development environment, including of course Microsoft Visual Studio, but also Xamarin Studio, which runs on MacOS X. -Given Microsoft's recent commitment to *cross-platform developer experiences*, we believe this is a great opportunity for C# developers. +Mono compatibility makes it possible to use ANTLR 4 in any C# development +environment, including of course Microsoft Visual Studio, but also Xamarin Studio, which runs on MacOS X. +Given Microsoft's recent commitment to *cross-platform developer experiences*, +we believe this is a great opportunity for C# developers. Releasing the runtime with the tool ensures that you can get the exact same behavior across many languages: Java, C#, Python, JavaScript, Go, Swift and C++. @@ -61,10 +65,10 @@ While the latter works, it is no longer the recommended approach, because it is See the web site for examples of using the generated code. -To learn more about ANTLR 4, read the book. +To learn more about ANTLR 4, read [the book](http://a.co/2n4rJlb). ### Visual Studio integration -If you require tighter Visual Studio integration, you can use the tools from Tunnel Vision Labs. +If you require tighter Visual Studio integration, you can use the tools from [Tunnel Vision Labs](http://tunnelvisionlabs.com/). (please note however that they use a different tool and runtime) diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj index 62c379dc2..74b0eb240 100644 --- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj +++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj @@ -8,7 +8,7 @@ Library Properties Antlr4.Runtime - Antlr.4.Runtime + Antlr4.Runtime.Standard v3.5 512 obj\net20\ diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.vs2013.csproj b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.vs2013.csproj index b0e9d1c95..948b9ea5e 100644 --- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.vs2013.csproj +++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.vs2013.csproj @@ -8,7 +8,7 @@ Library Properties Antlr4.Runtime - Antlr4.Runtime + Antlr4.Runtime.Standard v3.5 512 obj\net35\ diff --git a/runtime/CSharp/runtime/CSharp/Package.nuspec b/runtime/CSharp/runtime/CSharp/Package.nuspec index 9c85282a4..6ad4feca2 100644 --- a/runtime/CSharp/runtime/CSharp/Package.nuspec +++ b/runtime/CSharp/runtime/CSharp/Package.nuspec @@ -1,7 +1,7 @@ - Antlr.4.Runtime + Antlr4.Runtime.Standard 4.6.0 en-us ANTLR 4 Standard Runtime