ANTLR4 Grammar Formatter

JSON →
library 2.1.5 ·javascript
verified Jun 4, 2026

A library for formatting ANTLR4 grammar files, supporting a wide variety of formatting options. Current stable version is 2.1.5, released on a modest cadence with bug fixes and dependency updates. It is the only dedicated formatter for ANTLR4 grammars, offering fine-grained control over whitespace, alignment, and comment placement. The companion CLI package antlr-format-cli provides a command-line interface for batch processing.