[antlr-interest] Using the ANTLRworks Debugger
Randall R Schulz
rschulz at sonic.net
Sun Nov 19 14:07:16 PST 2006
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