[antlr-interest] antlr v3 C target EOF PUSHSTREAM
Gavin Lambert
antlr at mirality.co.nz
Wed Jan 11 14:56:47 PST 2012
At 11:29 12/01/2012, Rampon Jerome wrote:
>I do not see how to do a similar job with C target as nextToken
>redefinition is not possible
It's been a while since I played with the C target, but IIRC most
of the "methods" (probably including nextToken) are defined as
function pointers within the structure data. So you should be
able to subclass the lexer and reassign the pointer to your
override method -- you just have to handle the recasting and base
pointer preservation yourself.
More information about the antlr-interest
mailing list