In order to use a customized token type, I believe I need to override
emit() and emitNew() within my ANTLR3_LEXER instance. However, my
function isn't getting called. I'm using version 3.1.3 of the C runtime.
The culprit appears to be this call to emit() within nextTokenStr() in
antlr3lexer.c:
Line 268:
if (lexer->rec->state->token == NULL)
{
// Emit the real token, which adds it in to the
token stream basically
//
emit(lexer);
}
Shouldn't it be "lexer->emit(lexer)"? As written, the call to emit()
will bind to the local version of emit() within antlr3lexer.c and won't
call my customized version. I've looked at more recent versions in the
source repository, and the code appears to be unchanged. Is this a real
bug, or am I going down the wrong road in my attempt to customize the
generated tokens?
Thanks,
Mike Carns
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.