O'Reilly logo
  • Ravinder Matte thinks this is interesting:

ANTLR generates lots of files that we’d normally have to write by hand.


Cover of The Definitive ANTLR 4 Reference, 2nd Edition


antlr4 ArrayInit.g4 generates following files.

  1. ArrayInitParser.java - All parser methods
  2. ArrayInitLexer.java . - All Lexer methods
  3. ArrayInit.tokens - Tokens for synchronization.
  4. ArrayInitListener.java & ArrayInitBaseListener.java -- Interface and the default implementation of listeners.