[antlr-interest] import package in AntlrWorks debugger

Patrick Masselink patrick at patmas.net
Tue Jun 12 07:56:30 PDT 2007


You can change the classpath for the ANTLRWorks debugger at File > Preferences 
> Compiler. I had the need to add my own class reference too, so I initially 
tried package and import lines in the header blocks but I couldn't get this 
to work. I ended up just adding the dir in which the class resides to the 
classpath in ANTLRWorks. This worked as expected.

Regards, Patrick Masselink

On Tuesday 12 June 2007 16:10:42 Martin Fowler wrote:
> I'm having a problem using the AntlrWorks debugger. I have a reference
> to one of my classes in the parser, so I have an import statement in the
> parser header
>
>      @header{
>        package parser;
>        import copybook.*;
>      }
>
> It all works fine with antlr, but the antlr debugger doesn't seem to
> like it.
>
> from the antlrworks console when I hit the debug button:
>
>      09:59:59] import copybook.*;
>      [09:59:59] ^
>      [09:59:59] /tmp/antlrworks/copybookParser.java:51: cannot find symbol
>      [09:59:59] symbol  : class CopyBookLoader
>      [09:59:59] location: class parser.copybookParser
>
> The classpaths are all properly setup in intellij - I can run the parser
>   fine in there.
>
> Is there something I need to do to get the debugger to work? I'd really
> like to play with it. An old thread
> <http://www.antlr.org/pipermail/antlr-interest/2006-November/018445.ht
>ml> suggests that antlrworks doesn't deal with packages - is that still the
> case?
>
> Versions:
>
> IntelliJ 6.0.5
> AntlrWorks 1.0.2
> OS: Ubuntu Feisty
> Java: 1.6.0




More information about the antlr-interest mailing list