[ http://jira.codehaus.org/browse/MANTLR-3?page=all ]
Jason van Zyl moved MNG-1614 to MANTLR-3:
-----------------------------------------
Component: (was: maven-antlr-plugin)
Workflow: jira (was: Maven)
Key: MANTLR-3 (was: MNG-1614)
Project: Maven 2.x Antlr Plugin (was: Maven 2)
> ANTLR plugin does not reorder grammars connected by importVocab/exportVocab
> dependencies
> ----------------------------------------------------------------------------------------
>
> Key: MANTLR-3
> URL: http://jira.codehaus.org/browse/MANTLR-3
> Project: Maven 2.x Antlr Plugin
> Type: Bug
> Environment: Win-XP
> Reporter: Sergey Kalinichenko
> Priority: Minor
> Attachments: bug.zip
>
>
> When ANTLR parsers (e.g. the text parser and the tree parser) share token
> vocabularies through the importVocab/exportVocab options, ANTLR plugin does
> not reorder grammars sent to the antlr. As the result, a compile will fail if
> the grammar names are not sorted manually. A work-around is to sort the
> grammars manually is usually an easy fix, but if this is something that could
> be automated it would be a preferred solution to the problem.
> See http://www.antlr.org/doc/vocab.html for information on
> importVocab/exportVocab.
> Steps to reproduce the bug:
> 1. Create a maven project
> 2. Unzip the attached file into the src/main directory. This will create
> antlr directory with two files, bug.g and bugtree.g, in it.
> 3. Add maven-antlr-plugin to the POM with
> <grammars>bugtree.g,bug.g</grammars>
> 4. Run mvn compile. Note that the compile fails because the import vocabulary
> referenced by bugtree.g does not exist.
> 5. Run mvn compile again. Note that this time the compile succeeds.
> Expected behavior:
> Ideally, the plugin should recognize that the import vocabulary required by
> the grammar mentioned earlier in the list is produced by the grammar
> mentioned later in the list, and re-order the grammars based on this
> knowledge. I understand that this would require a lot more "parsing" than is
> currently going on in the plugin, but doing so would eliminate some very
> subtle errors (my co-worker spent a lot of time trying to figure out a
> similar problem in our ant-based build scripts).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]