[antlr-interest] ANTLRWorks debug woes...

Alexander James Rickett ajr24 at u.washington.edu
Thu Jan 29 22:09:35 PST 2009


Hello,

I'm trying to use the debug in ANTLRWorks with a sample grammar from a tutorial. The grammar checks out, and generates code fine, but when I go into the debug menu, and choose "debug" I get the error message "Compliler failed with result code 1" and get the following message in the console:

[11:29:03] D:\workspace\AntlrCobol\src\grammarEtc\tempParser.java:10: cannot access org.antlr.runtime.debug.DebugParser
[11:29:03] bad class file: C:\Documents and Settings\Alexander_401007\My Documents\antlrworks-1.2.2.jar(org/antlr/runtime/debug/DebugParser.class)
[11:29:03] class file has wrong version 48.0, should be 47.0
[11:29:03] Please remove or make sure it appears in the correct subdirectory of the classpath.
[11:29:03] public class tempParser extends DebugParser {
[11:29:03]                                 ^
[11:29:03] 1 error

--------------------------------------------------------------------------------
I'm using this at work, and we have pretty strict firewall policies so I'm not sure that remote debug is an option....  ALSO, subsequent calls to debug, yield a greater variety of wrong-version files:
--------------------------------------------------------------------------------
[11:32:40] D:\workspace\AntlrCobol\src\grammarEtc\tempLexer.java:8: cannot access org.antlr.runtime.Lexer
[11:32:40] bad class file: C:\Documents and Settings\Alexander_401007\My Documents\antlrworks-1.2.2.jar(org/antlr/runtime/Lexer.class)
[11:32:40] class file has wrong version 48.0, should be 47.0
[11:32:40] Please remove or make sure it appears in the correct subdirectory of the classpath.
[11:32:40] public class tempLexer extends Lexer {
[11:32:40]                                ^
[11:32:40] 1 error
[11:32:40] D:\workspace\AntlrCobol\src\grammarEtc\tempParser.java:10: cannot access org.antlr.runtime.debug.DebugParser
[11:32:40] bad class file: C:\Documents and Settings\Alexander_401007\My Documents\antlrworks-1.2.2.jar(org/antlr/runtime/debug/DebugParser.class)
[11:32:40] class file has wrong version 48.0, should be 47.0
[11:32:40] Please remove or make sure it appears in the correct subdirectory of the classpath.
[11:32:40] public class tempParser extends DebugParser {
[11:32:40]                                 ^
[11:32:40] 1 error
[11:32:40] D:\workspace\AntlrCobol\src\grammarEtc\__Test__.java:3: cannot access org.antlr.runtime.debug.DebugEventSocketProxy
[11:32:40] bad class file: C:\Documents and Settings\Alexander_401007\My Documents\antlrworks-1.2.2.jar(org/antlr/runtime/debug/DebugEventSocketProxy.class)
[11:32:40] class file has wrong version 48.0, should be 47.0
[11:32:40] Please remove or make sure it appears in the correct subdirectory of the classpath.
[11:32:40] import org.antlr.runtime.debug.DebugEventSocketProxy;
[11:32:40]                                ^
[11:32:40] 1 error
--------------------------------------------------------------------------------
I'm running ANTLRWorks 1.2.2, on XP professional, I haven't done any class path
configurations, though I've used a few ANTLR plugins in eclipse...  Please tell me if any other information would be helpful...  The grammar I'm trying is below,  Thanks so much.
--------------------------------------------------------------------------------
grammar temp;

tokens {
     GET='get';
     PUT='put';
     CHANGE='change';
     DATA='data';
     METADATA='metadata';
     DEPENDENCIES='dependencies';
     DEPENDENTS='dependents';
     STATISTICS='statistics';
     FROM='from';
     IN='in';
     ABOUT='about';
     OF='of';
}

command
     :    sentence (NEWLINE sentence)* NEWLINE? EOF
     |
     ;

sentence
     :    WS? verb WS object WS preposition WS target WS?
     ;

verb
     :    GET
     |    PUT
     |    CHANGE
     ;

object
     :    DATA
     |    METADATA
     |    DEPENDENCIES
     |    DEPENDENTS
     |    STATISTICS
     ;

preposition
     :    FROM
     |    IN
     |    ABOUT
     |    OF
     ;

target
     :    FILE
     ;

FILE
     : ('a'..'z'|'A'..'Z'|'0'..'9'|'.')+
     ;

NEWLINE
     : '\r'? '\n'
     ;

WS
     : (' '|'\t'|'\n'|'\r')+ {skip();}
     ;




More information about the antlr-interest mailing list