Maven 2.x Antlr Plugin

Support for grammar inheritance

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-1
  • Fix Version/s: 2.0
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    2

Description

maven-antlr-plugin does not support grammar inheritance (-glib argument).

See http://jira.codehaus.org/browse/MPANTLR-4

Issue Links

Activity

Hide
Ersin Er added a comment -

The patch provides support for Antlr Grammar Inheritance. When the patch applied the plugin assumes all grammar files except the one being processed as candidates for super grammar source files and passes their paths to the antlr tool for the actual processed .g file.

The patch has been particularly tested within ApacheDS codebase.

Show
Ersin Er added a comment - The patch provides support for Antlr Grammar Inheritance. When the patch applied the plugin assumes all grammar files except the one being processed as candidates for super grammar source files and passes their paths to the antlr tool for the actual processed .g file. The patch has been particularly tested within ApacheDS codebase.
Hide
Ersin Er added a comment -

The previous attachment was a bad one due to subclipse.. The new one is the correct one. Sorry for inconvinience.

Show
Ersin Er added a comment - The previous attachment was a bad one due to subclipse.. The new one is the correct one. Sorry for inconvinience.
Hide
Vincent Siveton added a comment -

Fixed.
FYI you should use <grammarDefs/> parameter. For instance:

...
          <grammarDefs>
            <grammar>
              <name>StdCParser.g</name>
            </grammar>
            <grammar>
              <name>GnuCParser.g</name>
              <glib>StdCParser.g</glib>
            </grammar>
            <grammar>
              <name>GnuCTreeParser.g</name>
            </grammar>
            <grammar>
              <name>GnuCEmitter.g</name>
              <glib>GnuCTreeParser.g</glib>
            </grammar>
          </grammarDefs>
...
Show
Vincent Siveton added a comment - Fixed. FYI you should use <grammarDefs/> parameter. For instance:
...
          <grammarDefs>
            <grammar>
              <name>StdCParser.g</name>
            </grammar>
            <grammar>
              <name>GnuCParser.g</name>
              <glib>StdCParser.g</glib>
            </grammar>
            <grammar>
              <name>GnuCTreeParser.g</name>
            </grammar>
            <grammar>
              <name>GnuCEmitter.g</name>
              <glib>GnuCTreeParser.g</glib>
            </grammar>
          </grammarDefs>
...

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: