Documentation

Commentary

The Emacs package ANTLR-Mode provides: syntax highlighting for ANTLR grammar
files, automatic indentation, menus containing rule/token definitions and
supported options and various other things like running ANTLR from within
Emacs.  It works for ANTLR v2, v3 and v4.

For details, check <https://antlr-mode.sourceforge.net/> or, if you prefer
the manual style, follow all commands mentioned in the documentation of
`antlr-mode'.  ANTLR is a LL(k)-based recognition tool which generates
lexers, parsers and tree transformers in Java, C++ or other languages and
can be found at <https://www.antlr.org/>.

Topics for 3.2 or later:

 * Special support for `indent-region': faster and better for Python ELP
   profiling in a class init action shows half the time is spent in
   `antlr-next-rule', the other half in `c-guess-basic-syntax'.
   Do not define a indent command, just a function to be put into
   indent-line/region-function.
 * In v4, highlight lexer commands after "->"
 * Test: in `antlr-imenu-create-index-function', can we use
     (or antlr-skip-line-regexp antlr-grammar-header-regexp)
 * Use native menu bindings instead easymenu (and use :help)
 * Support v4 rule element options
 * Define minor mode for `antlr-hide-actions' functionality.
 * [C-c C-u].  *Help* for current rule / all rules: used-By list (at least
   for single-file grammars)
 * [C-c C-j].  Jump to generated coding.

Eventually:

 * Support for one of the multi-mode imenu extensions mentioned in
   https://www.emacswiki.org/emacs-test/ImenuMode - if necessary
 * [C-c C-w].  Produce HTML document with syntax highlighted and
   hyper-links.  With htmfontify: invisible actions did not really work
   (only w/o spaces?, default invisible would be better anyway) - we need to
   set <a> tags afterwards ourselves...  Firefox does not understand
   encoding via XML declaration - use HTML meta tag.
 * Support for outline-minor-mode.

The following topics and suggestions are unlikely to be implemented:

 * Some constructs of languages (in actions) which are highly un-C-ish might
   bring Emacs (and ANTLR!) out of sync: e.g. regexp literals in Perl,
   character and percent literals in Ruby.
 * Faster syntax highlighting: sectionize the buffer into Antlr and action
   code and run special highlighting functions on these regions.  UNLIKELY
   due to: code size, this mode would depend on font-lock internals.
 * Set the syntax-table of the inner mode before calling the indentation
   engine of the inner mode (possible? - BUT: actions should still end at
   the same place!).  Probably not worth the effort.

Bug fixes, bug reports, improvements, and suggestions for the newest version
are strongly appreciated.

Consumers

Reverse Dependencies

No reverse dependencies recorded.