-
Notifications
You must be signed in to change notification settings - Fork 104
Installation
The C# target for ANTLR 4 requires Java for compiling applications. The resulting compiled C# applications will not require Java to be installed (at least not due to the use of ANTLR 4). You can install any of the following versions of Java to use this target.
If you already have one of the following installed, you should check to make sure the installation is up-to-date.
- Java 7 runtime environment (x86 or x64)
- Java 7 development kit (x86 or x64, provided that the JRE option is also installed during the development kit installation)
- Java 6 runtime environment (x86 or x64)
- Java 6 development kit (x86 or x64, provided that the JRE option is also installed during the development kit installation)
This step is optional, but highly recommended for users working with a version of Visual Studio that the extension supports. If you have one of the Express Editions of Visual Studio, or would like to skip this step, move on to the following step.
- Open Visual Studio
- Select Tools → Extensions and Updates...
- In the left pane, select Online
- In the top right, type ANTLR to search for extensions
- If your version of Visual Studio is supported, the results pane will show the extension ANTLR Language Support by Sam Harwell. You can click the result and then select Download to install the extension.
- Restart Visual Studio after installing the extension
- Open Visual Studio
- Select Tools → Extensions and Updates...
- In the left pane, select Updates, then select Product Updates
- Wait for ~10 seconds while the application checks for updates (it might not notify you that it's checking in the background)
- If an update for NuGet Package Manager is listed in the results, click to update it
- Repeat steps 3-5 for any other sections listed under Updates in the left pane
- If you updated NuGet, restart Visual Studio before continuing to Step 4 below
These versions of Visual Studio do not support the NuGet Package Manager extension, but the C# target for ANTLR 4 does support .NET 2.0 and higher so you should be able to use the command line NuGet utility instead of working directly within Visual Studio.
- Create or open a C# project which will use ANTLR
- Right click the top-level solution node in the Solution Explorer window and select Manage NuGet Packages for Solution...
- In the left pane, select Online, then select nuget.org
- At the top of the middle pane, if a drop down says Stable Only, change the selection to Include Prerelease
- In the top right, type Antlr4 to search for the package
- In the search results, locate and select the package called ANTLR 4. In the right pane, verify that the Id is listed as exactly Antlr4.
- Click install on the search result
- Select the C# projects you want to add support for ANTLR 4 to, and click OK to update those projects
TODO: This section needs more detail.
Use the NuGet Package Manager Console to install the latest version of the Antlr4 package, as described on the following page.
TODO: This section needs more detail.
A special NuGet package is available for installation in Visual Studio 2008 projects. You should be able to use the NuGet Package Manager Console to install the latest version of the Antlr4.VS2008 package, as described on the following page.
The sections below may be performed multiple times in any order as necessary to add and configure the grammars used in your project.
TODO
TODO
TODO
TODO
TODO
TODO