[antlr-interest] ANTLR 3: Problem with separated lexer / parser

Oliver Zeigermann oliver.zeigermann at gmail.com
Fri Sep 9 09:26:43 PDT 2005


When lexer and parser are specified in different files I find no way
to tell the parser to use the token vocabulary of the lexer. Doing
something like this

grammar XMLParser;
options {
    tokenVocab=XMLLexer;
}


where the lexer is called XMLLexer sort of seems to work, but ANTLR
still complains like this

xmlParser.g:10:38: no lexer rule corresponding to token: VALUE
xmlParser.g:25:20: no lexer rule corresponding to token: PCDATA

which makes me suspicious that maybe it only worked incidentally.

Any hints?

Oliver


More information about the antlr-interest mailing list