[
http://jira.codehaus.org/browse/MANTLR-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Gier closed MANTLR-1.
--------------------------
Resolution: Fixed
Fix Version/s: 2.2
This has been fixed in MANTLR-29
> ANTLR plugin does not track dependencies based on importVocab/exportVocab
> options
> ---------------------------------------------------------------------------------
>
> Key: MANTLR-1
> URL: http://jira.codehaus.org/browse/MANTLR-1
> Project: Maven 2.x Antlr Plugin
> Issue Type: Bug
> Environment: Win-XP
> Reporter: Sergey Kalinichenko
> Priority: Critical
> Fix For: 2.2
>
> 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 recognize this as a dependency. As the result, the generated sources may
> not work as expected if some new tokens are added or tokens are re-arranged
> in the file with the exportVocab option. I don't know of a work-around that
> does not involve manual deletion of files or a clean build.
> 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>bug.g,bugtree.g</grammars>
> 4. Run mvn compile
> 5. Find the BugTokensTokenTypes.java and BugTreeTokenTypes.java in the
> generated-sources directory; verify that in both files FALSE=4 and TRUE=5
> 6. Open bug.g file and uncomment the lines that define and reference the
> token called "NOTHING" (there are comments next to both places); save the
> file.
> 7. Run mvn compile again. Note that the plugin does not run antlr for
> bugtree.g, saying that the grammar is up to date
> 8. Verify that BugTokensTokenTypes.java and BugTreeTokenTypes.java set
> different values for the token TRUE: it is 6 in the newly generated
> BugTokensTokenTypes, but the old BugTreeTokenTypes still says TRUE=5.
> Expected behavior:
> Ideally, the plugin should recognize that the import vocabulary has changed
> and rerun the antlr for the file(s) with the corresponding importVocab
> option. Alternatively, rebuilding all grammars from the list when any of the
> sources is newer than its corresponding output grammar would be acceptable.
--
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 from this list, please visit:
http://xircles.codehaus.org/manage_email