antlr/antlr4 — Issue #36: Option to generate abstract classes
Author: sharwell
Created: 2012-03-01 13:34:46+00:00
State: open
Labels: code-gen, comp:tool, options, type:feature:1

For lexers and parsers which have an inherent requirement to implement some features in a derived class, it would be convenient to be able to generate the lexer/parser classes as abstract. This would also allow abstract methods instead of stubs which throw `UnsupportedOperationException` to be placed in the `@members{}` blocks.

In addition, it would be especially useful if it prepended `Abstract` to the name of the class generated for an abstract parser grammar `FooParser`:

* `AbstractFooParser`
* `FooParseListener` / `FooListener` / `FooVisitor`
* `FooBaseParseListener` / `FooBaseListener` / `FooBaseVisitor`