Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

antlr4ng-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antlr4ng-cli

ANTLR4 NG command line tool for TypeScript

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
decreased by-6.19%
Maintainers
1
Weekly downloads
 
Created
Source

Weekly Downloads npm version

ANTLRngPart of the Next Generation ANTLR Project

Custom ANTLR4 Code Generator

This package contains a custom code generator for ANTLR4 grammars. It is based on the official ANTLR4 code generator, but includes support for the antlr4ng runtime, so the TypeScript output is different. Other than that it is a drop-in replacement for the official generator and can also be used with the official runtimes (C++, Java, etc.).

Installation

To install the package, run the following command:

npm install antlr4ng-cli

Usage

The package needs Java installed on your system, To generate your parser, run the following command:

antlr4ng <options> <grammar-file>

in the root of your project, where you installed the package.

Note: in contrast to antlr4ts you have to specify the target language explicitly, just as if you use the generator jar file directly. A typical case would be:

antlr4ng -Dlanguage=TypeScript -o generated/ -visitor -listener -Xexact-output-dir path/to/YourLexer.g4 path/to/YourParser.g4

Release Notes

1.0.3

  • Non-optional token members of a rule context no longer return null, which makes explicit non-null assertions in user code unnecessary.
  • Added override keyword for generated copyFrom methods.

1.0.2

Updated the ANTLR4 jar.

1.0.1

  • Some changes for renamed class members in the runtime (e.g. _interp -> interpreter).

1.0.0

  • Initial release.

Keywords

FAQs

Package last updated on 28 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc