Skip to content

Consistent naming for combined and separated grammars #37

Open
@sharwell

Description

@sharwell

Here is the current naming:

Combined

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

Separated

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

Request

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions