[antlr-interest] Using the ANTLRworks Debugger

Terence Parr parrt at cs.usfca.edu
Sun Nov 19 14:30:21 PST 2006


Ah.  Yeah, apparenlty AW cannot deal with packages; it doesn't look  
inside the header.
Ter

On Nov 19, 2006, at 2:07 PM, Randall R Schulz wrote:

> Terence,
>
> On Sunday 19 November 2006 13:49, Terence Parr wrote:
>> Hmm...Is TSTPLexer.java on the disk? the compiler saying that the
>> generated lexer is not there.
>> Ter
>
> They're there. They have a package declaration:
>
>
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> @header {
> package			tau.tstp;
>
> import			java.io.IOException;
> }
>
>
> @lexer::header {
> package			tau.tstp;
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
>
>
> Producing:
>
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> // $ANTLR 3.0b5 TSTP.g 2006-11-19 13:58:05
>
> package         tau.tstp;
>
> import          java.io.IOException;
>
>
> import org.antlr.runtime.*;
> import java.util.Stack;
> import java.util.List;
> import java.util.ArrayList;
>
> import org.antlr.runtime.debug.*;
>
> import org.antlr.runtime.tree.*;
>
> public class TSTPParser extends DebugParser {
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
>
>
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> // $ANTLR 3.0b5 TSTP.g 2006-11-19 13:58:06
>
> package         tau.tstp;
>
>
> import org.antlr.runtime.*;
> import java.util.Stack;
> import java.util.List;
> import java.util.ArrayList;
>
> public class TSTPLexer extends Lexer {
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
>
>
> But ANTLworks' __Test__ driver omits the package declaration and it  
> uses
> unqualified parser and lexer class names, hence the problem.
>
>
> Randall Schulz



More information about the antlr-interest mailing list