[ 
http://jira.codehaus.org/browse/MOJO-905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108091
 ] 

David Holroyd commented on MOJO-905:
------------------------------------

I've applied a slightly modified version of your patch (the build should not 
fail if the POM lacks a specification of <libDirectory>, so I add a test for 
this case).

I'll keep this issue open for the moment, as the docs need updating too.

> [antlr3] .tokens files for tokenVocab can't be found in package subfolders
> --------------------------------------------------------------------------
>
>                 Key: MOJO-905
>                 URL: http://jira.codehaus.org/browse/MOJO-905
>             Project: Mojo
>          Issue Type: Bug
>            Reporter: David Holroyd
>         Attachments: MOJO-905.patch
>
>
> Due to the plugin arranging the output files into a folder structure that 
> matches the package structure of the source folder, ANTLR end's up not being 
> able to find the .tokens file specified by a tokenVocab option (unless the 
> 'imported' grammar, and therefore the generated java classes, are in the 
> default top-level package).
> This issue has been reported on antlr-interest (as ideally ANTLR would 
> support this use case directly),
>   http://www.antlr.org:8080/pipermail/antlr-interest/2007-August/023196.html
> It isn't clear if this is something that the antlr3-maven-plugin can work 
> around, since ANTLR only allows the specification of a single folder to 
> search for .tokens files.  In a multi-grammar build with grammars a.A, b.B 
> and c.C, the plugin could not know which of 'a' or 'b' to specify as the lib 
> folder when processing grammar C.  We could inspect the dependencies of 
> grammar C, and on seeing a dependence on 'B.tokens' infer that the lib option 
> should be set to 'b', but this will still be defeated in the pathological 
> case of multiple grammars with the same name but in different 'packages'.
> I think the cause for all this confusion is that 'packages' are a 
> Java-output-specific concept that ANTLR itself doesn't have direct support 
> for (as it is intended to be able to generate code in arbitrary languages).

-- 
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

Reply via email to