Skip to content

Commit

Permalink
tweak doc. update assembly name to Antlr4.Runtime.Standard
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed Dec 15, 2016
1 parent 3c1a34d commit 586b36f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
22 changes: 8 additions & 14 deletions doc/csharp-target.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand All @@ -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;
Expand All @@ -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".

Expand Down Expand Up @@ -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)

4 changes: 2 additions & 2 deletions doc/releasing-antlr.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@ This shoud display: Successfully created package <package-path>

**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 <path-to-nuget.exe> push Antlr4.Runtime.Official.<version>.nupkg <your-key> -Source https://www.nuget.org/api/v2/package
mono <path-to-nuget.exe> push Antlr4.Runtime.Standard.<version>.nupkg <your-key> -Source https://www.nuget.org/api/v2/package
```

**Creating DLLs**
Expand Down
16 changes: 10 additions & 6 deletions runtime/CSharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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++.

Expand Down Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Antlr4.Runtime</RootNamespace>
<AssemblyName>Antlr.4.Runtime</AssemblyName>
<AssemblyName>Antlr4.Runtime.Standard</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Antlr4.Runtime</RootNamespace>
<AssemblyName>Antlr4.Runtime</AssemblyName>
<AssemblyName>Antlr4.Runtime.Standard</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj\net35\</BaseIntermediateOutputPath>
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/runtime/CSharp/Package.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Antlr.4.Runtime</id>
<id>Antlr4.Runtime.Standard</id>
<version>4.6.0</version>
<language>en-us</language>
<title>ANTLR 4 Standard Runtime</title>
Expand Down

0 comments on commit 586b36f

Please sign in to comment.