Eu quero usar antlr4 em um projeto java em eclipse. Eu terminei preparar trabalho, tais como instalar ANTLR4 no mercado eclipse, escreveu arquivo g4, adicione antlr-4.7-complete.jar para construir caminho, e fazer target / gerados-sources / antlr4 como pasta de origem. Mas, em função java principal, eclipse me disse 'ArrayInitLexer' não pode ser resolvido para um tipo aqui está o meu arquivo g4.
grammar ArrayInit;
init : '{' value (',' value)* '}' ;
value : init
| INT
;
INT : [0-9]+;
WS : [\t\r\n]+ -> skip;
É correto, eu testá-lo na linha de comando, e pode me voltar uma árvore de análise. aqui está a minha estrutura do projeto:

e na Test.java
public class Test {
public static void main(String[] args) throws IOException {
ANTLRInputStream input = new ANTLRInputStream(System.in);
Lexer lexer = new ArrayInitLexer(input); //ArrayInitLexer couldn't resolve
CommonTokenStream tokens = new CommonTokenStream(lexer);
ANTLRParser parser = new ArrayIntParser(tokens);
}
}













