Using a simple combined grammar (see below), Eclipse freezes completely each time I try to "Run" or "Save" a code fragment in the Interpreter view that violates the grammar.
I use Win 7, Eclipse Inidigo, and the new ANTLR IDE, i.e.
ANTLR IDE- ANTLR Tools 2.1.2.201108281759 org.deved.antlride.feature.feature.group Edgar Espina
ANTLR IDE- GUnit Tools 1.1.0.201108281759 org.deved.antlride.feature.gunit.feature.group Edgar Espina
ANTLR IDE- JDT Integration (optional) 2.1.2.201108281759 org.deved.antlride.feature.integration.jdt.feature.group Edgar Espina
ANTLR IDE- StringTemplate Tools 1.1.0.201108281759 org.deved.antlride.feature.stringtemplate.feature.group Edgar Espina
ANTLR IDE- Viz 2.1.2.201108281759 org.deved.antlride.feature.viz.feature.group Edgar Espina
A simple grammar that causes the crash:
grammar crash;
options {
language = Java;
}
@header {
package crashgrammar;
}
@lexer::header {
package crashgrammar;
}
rule: EOF;
fragment LETTER : ('a'..'z' | 'A'..'Z');
fragment DIGIT : '0'..'9';
BOOLEAN : ('true' | 'false');
STRING_LITERAL : '"' .* '"';
INTEGER : DIGIT* ;
IDENT : LETTER (LETTER | DIGIT)*;
WS : (' ' | '\t' | '\n' | '\r' | '\f' )+ {$channel = HIDDEN;} ;
COMMENT: '//' .* ('\n' | '\r') {$channel = HIDDEN;} ;
MULTILINE_COMMENT: '/*' .* '*/' {$channel = HIDDEN;} ;
When trying to interpret the following:
var x = os { dir };
Trying most other inputs like "bla" the following, an expected NoViableAlternativeException occurs.
Best regards,
Felix (funlix@funlix.de)
This is biting me as well... it looks to me like the ANTLR interpreter is running fully in the UI event handler thread, effectively blocking the rest of the Eclipse IDE. This is happening for me on Linux (running Java 1.7.0_25) on Eclipse 3.7.2.
Please fix!!