Antlr4CodeGenerator.Tool 2.3.0-alpha0002

This is a prerelease version of Antlr4CodeGenerator.Tool.
dotnet tool install --global Antlr4CodeGenerator.Tool --version 2.3.0-alpha0002
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Antlr4CodeGenerator.Tool --version 2.3.0-alpha0002
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Antlr4CodeGenerator.Tool&version=2.3.0-alpha0002&prerelease
nuke :add-package Antlr4CodeGenerator.Tool --version 2.3.0-alpha0002

Antlr4 CodeGenerator tool

License

Latest Release Latest pre Release

Build Status master Build Status develop

Just a commandline wrapper around the ANTLR (Java) tool (Version 4.13.1) for generating grammar artifacts.

The ANTLR (Java) tool is bundled, so no need to download it.

Dependencies

  • Java runtime

Installation

  • Install as dotnet global tool:

    dotnet tool install --global Antlr4CodeGenerator.Tool
    
  • Install as dotnet local tool (inside a dotnet project where you want to generate language artifacts):

    • See also sample project
    • Enable local dotnet tools for your project by the following command on solution file directory level:
    dotnet new tool-manifest
    
    • Install as local tool to your project:
    dotnet tool install Antlr4CodeGenerator.Tool
    

Usage

This tool only proxies the arguments to the ANTLR (Java) tool. (See also ANTLR (Java) tool arguments documentation)

  • global tool:

    dotnet antlr4-tool -Dlanguage=CSharp MyGrammar.g4
    
  • local tool via MsBuild target:

    <Target Name="GenerateAntlrArtifacts" BeforeTargets="BeforeResolveReferences">
      <PropertyGroup>
        <_GrammarFile>$(ProjectDir)calculator.g4</_GrammarFile>
        <_Generated>$(ProjectDir).generated\</_Generated>
        <_Namespace>MyCalculator</_Namespace>
      </PropertyGroup>
       <Exec Command="dotnet antlr4-tool -Dlanguage=CSharp  -o &quot;$(_Generated)&quot; -visitor -listener -package $(_Namespace) &quot;$(_GrammarFile)&quot;" />
    </Target>
    
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
2.3.0-alpha0002 212 9/25/2023
2.2.0 622 9/25/2023
2.1.0 952 4/1/2023
2.1.0-antlr4-12-0001 229 4/1/2023
2.0.0 919 10/29/2022
1.3.0-updates0004 247 10/29/2022
1.3.0-updates0003 214 10/29/2022
1.3.0-updates0002 198 10/29/2022
1.3.0-updates0001 187 10/29/2022
1.2.0 1,708 5/9/2020
1.2.0-alpha0013 394 5/9/2020
1.2.0-alpha0012 363 5/9/2020
1.1.0 521 5/8/2020