[antlr-interest] bug in grammar inheritance

Terence Parr parrt at jguru.com
Thu Nov 7 10:27:24 PST 2002


THanks!  I'll look into it.
Ter

On Thursday, November 7, 2002, at 04:33  AM, Silvain Piree wrote:

>
> Hi,
>
> ANTLR contains a bug when using grammar inheritance.
>
> When no importVocab is specified then ANTLR copies
> the XxxTokenTypes.txt file from the supergrammar
> to the current directory instead of the target directory.
>
> This can be fixed by replacing following code in
> "antlr/preprocessor/Grammar.java":
>
> OLD CODE in method expandInPlace():
>
> String newImportVocabFileName =
>      antlrTool.fileMinusPath(superExportVocabFileName);
>
> NEW CODE in method expandInPlace()::
>
> String newImportVocabFileName =
>      antlrTool.getOutputDirectory() +
>      System.getProperty("file.separator") +
>      antlrTool.fileMinusPath(superExportVocabFileName);
>
> Silvain
>
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list