[antlr-interest] Overriding the emit function to use custom tokens
frogery at voila.fr
frogery at voila.fr
Fri Jan 15 05:53:25 PST 2010
Hello,
I wanted to create a custom token object, so I have seen in the FAQ that I had to "override" the lexer emit function. So I did that this way:
...
pLexer = antlrLexerNew(pInput);
pLexer->pLexer->emit = customEmit;
...
but it was not working.
The customEmit function was never called. So I have debugged and I think there is a bug in antlr3lexer.c. In the nextTokenStr function, shouldn't "emit(lexer)" be replaced by "lexer->emit(lexer);"? What do you think?
Thanks,
Yann
____________________________________________________
Vous n’avez pas encore adressé vos voeux ? Retrouvez nos cartes sur http://carte-de-voeux.voila.fr
____________________________________________________
Vous n’avez pas encore adressé vos voeux ? Retrouvez nos cartes sur http://carte-de-voeux.voila.fr
More information about the antlr-interest
mailing list