Skip to content


Consistent naming for combined and separated grammars #37

sharwell opened this Issue · 0 comments

1 participant


Here is the current naming:


grammar Foo;
  • FooLexer, FooParser
  • FooListener, FooBaseListener
  • FooParseListener, FooBaseParseListener
  • FooVisitor, FooBaseVisitor


lexer grammar FooLexer;
parser grammar FooParser;
  • FooLexer, FooParser
  • FooParserListener, FooParserBaseListener
  • FooParserParseListener, FooParserBaseParseListener
  • FooParserVisitor, FooParserBaseVisitor


I find that in ANTLR 4 I'm more likely to use separated grammars than combined grammars. However, I wish the names of listeners/visitors generated by the separated grammars to match those of the combined grammar. In particular, if (and only if) a parser grammar is named *Parser, I'd like to drop the Parser suffix as part of deriving the generated file names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.