[antlr-interest] Import problem when antlr is in non-standard package

Ric Klaren ric.klaren at gmail.com
Mon Oct 17 15:40:11 PDT 2005


On 10/17/05, Mark Gressett <Mark.Gressett at sas.com> wrote:
> I'm using antlr 2.7.2 from within ant.  For reasons not entirely clear to me, in our part of
> the build we use antlr unmodified but packaged into com.sas.solutions.antlr.  The
> standard ant task for antlr hardwires the antlr package, so I tried a java task with the
> modified package name, i.e., <java classname="com.sas.solutions.antlr.Tool" ...>
>
> In the generated lexer and parser java files, I end up with import statements like
> import com.sas.solutions.antlr.TokenStream;
> import com.sas.solutions.antlr.ANTLRHashString;
> import com.sas.solutions.antlr.LexerSharedInputState;
> import com.sas.solutions.com.sas.solutions.com.sas.solutions.antlr.collections.impl.BitSet;
>
> Some are correct, but anything in collections.impl is prefixed with extra stuff.
>
> Is this a known bug that's been fixed in a later release?

I doubt wether this is an unmodified antlr... or these import
statements are somehow changed by something else. Anycase antlr only
generates lines like 'import antlr.collections...' so the wrong
prefixes must come from elsewhere (at least when looking at the
current 2.7.5 code).

Cheers,

Ric


More information about the antlr-interest mailing list