In the baserecognizer code, the functions are called directly, but they are all available indirectly via the pointer interface. I think you are not fundamentally understanding this. So, they are all static to their source code files and do not pollute the namespace, and when they are not being called internally, you call them via their pointers in the interface.
Do you see this in the antlr3BaseRecognizerNew(): recognizer->match = match; recognizer->matchAny = matchAny; recognizer->memoize = memoize; recognizer->mismatch = mismatch; recognizer->mismatchIsUnwantedToken = mismatchIsUnwantedToken; recognizer->mismatchIsMissingToken = mismatchIsMissingToken; recognizer->recover = recover; recognizer->recoverFromMismatchedElement= recoverFromMismatchedElement; recognizer->recoverFromMismatchedSet = recoverFromMismatchedSet; recognizer->recoverFromMismatchedToken = recoverFromMismatchedToken; etc So, install your own versions of whatever you like, then in your external version, call the methods via the pointers in the interface. Easy. This is true of ALL the interfaces, so that you can override any method you like. Now, perhaps I should have called the error recovery methods indirectly in the library itself, but they are all bound together and it is a trivial matter for you to call mismatch indirectly instead of directly in your code. Jim > -----Original Message----- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Ruslan Zasukhin > Sent: Thursday, October 20, 2011 2:55 PM > To: antlr-interest@antlr.org > Subject: Re: [antlr-interest] [C target][HEELP :-] About disable > recovery ... Override recoverFromMismatchedToken() ... Linker error > > On 10/21/11 12:41 AM, "Ruslan Zasukhin" <ruslan_zasukhin@valentina- > db.com> > wrote: > > >> You need to copy the mismatch locally or call it via a pointer (if > it > >> is in the interface, but I think it is not). > > Jim, > > This not works, because mismatch() calls other static hidden functions. > Oops ... E.g. > > > error: 'mismatchIsUnwantedToken' was not declared in this scope > > > Something is not good here > > Anybody really was able do this for C Target? :-) > > > > -- > Best regards, > > Ruslan Zasukhin > VP Engineering and New Technology > Paradigma Software, Inc > > Valentina - Joining Worlds of Information http://www.paradigmasoft.com > > [I feel the need: the need for speed] > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- > email-address 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 il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.